guito 1.0.8 → 1.0.10

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,67 @@
1
+ var AC=Object.defineProperty,LC=Object.defineProperties;var FC=Object.getOwnPropertyDescriptors;var pg=Object.getOwnPropertySymbols;var VC=Object.prototype.hasOwnProperty,BC=Object.prototype.propertyIsEnumerable;var fg=(n,t,e)=>t in n?AC(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,z=(n,t)=>{for(var e in t||={})VC.call(t,e)&&fg(n,e,t[e]);if(pg)for(var e of pg(t))BC.call(t,e)&&fg(n,e,t[e]);return n},ie=(n,t)=>LC(n,FC(t));var Qt=(n,t,e)=>new Promise((i,r)=>{var o=l=>{try{a(e.next(l))}catch(h){r(h)}},s=l=>{try{a(e.throw(l))}catch(h){r(h)}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(o,s);a((e=e.apply(n,t)).next())});var gu;function qa(){return gu}function Tn(n){let t=gu;return gu=n,t}var hg=Symbol("NotFound");function $r(n){return n===hg||n?.name==="\u0275NotFound"}var vt=null,Za=!1,_u=1,jC=null,Ke=Symbol("SIGNAL");function ae(n){let t=vt;return vt=n,t}function Ya(){return vt}var oi={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 si(n){if(Za)throw new Error("");if(vt===null)return;vt.consumerOnSignalRead(n);let t=vt.producersTail;if(t!==void 0&&t.producer===n)return;let e,i=vt.recomputing;if(i&&(e=t!==void 0?t.nextProducer:vt.producers,e!==void 0&&e.producer===n)){vt.producersTail=e,e.lastReadVersion=n.version;return}let r=n.consumersTail;if(r!==void 0&&r.consumer===vt&&(!i||HC(r,vt)))return;let o=zr(vt),s={producer:n,consumer:vt,nextProducer:e,prevConsumer:r,lastReadVersion:n.version,nextConsumer:void 0};vt.producersTail=s,t!==void 0?t.nextProducer=s:vt.producers=s,o&&vg(n,s)}function mg(){_u++}function ji(n){if(!(zr(n)&&!n.dirty)&&!(!n.dirty&&n.lastCleanEpoch===_u)){if(!n.producerMustRecompute(n)&&!$i(n)){Hr(n);return}n.producerRecomputeValue(n),Hr(n)}}function vu(n){if(n.consumers===void 0)return;let t=Za;Za=!0;try{for(let e=n.consumers;e!==void 0;e=e.nextConsumer){let i=e.consumer;i.dirty||$C(i)}}finally{Za=t}}function bu(){return vt?.consumerAllowSignalWrites!==!1}function $C(n){n.dirty=!0,vu(n),n.consumerMarkedDirty?.(n)}function Hr(n){n.dirty=!1,n.lastCleanEpoch=_u}function $n(n){return n&&gg(n),ae(n)}function gg(n){n.producersTail=void 0,n.recomputing=!0}function ai(n,t){ae(t),n&&_g(n)}function _g(n){n.recomputing=!1;let t=n.producersTail,e=t!==void 0?t.nextProducer:n.producers;if(e!==void 0){if(zr(n))do e=yu(e);while(e!==void 0);t!==void 0?t.nextProducer=void 0:n.producers=void 0}}function $i(n){for(let t=n.producers;t!==void 0;t=t.nextProducer){let e=t.producer,i=t.lastReadVersion;if(i!==e.version||(ji(e),i!==e.version))return!0}return!1}function li(n){if(zr(n)){let t=n.producers;for(;t!==void 0;)t=yu(t)}n.producers=void 0,n.producersTail=void 0,n.consumers=void 0,n.consumersTail=void 0}function vg(n,t){let e=n.consumersTail,i=zr(n);if(e!==void 0?(t.nextConsumer=e.nextConsumer,e.nextConsumer=t):(t.nextConsumer=void 0,n.consumers=t),t.prevConsumer=e,n.consumersTail=t,!i)for(let r=n.producers;r!==void 0;r=r.nextProducer)vg(r.producer,r)}function yu(n){let t=n.producer,e=n.nextProducer,i=n.nextConsumer,r=n.prevConsumer;if(n.nextConsumer=void 0,n.prevConsumer=void 0,i!==void 0?i.prevConsumer=r:t.consumersTail=r,r!==void 0)r.nextConsumer=i;else if(t.consumers=i,!zr(t)){let o=t.producers;for(;o!==void 0;)o=yu(o)}return e}function zr(n){return n.consumerIsAlwaysLive||n.consumers!==void 0}function Ko(n){jC?.(n)}function HC(n,t){let e=t.producersTail;if(e!==void 0){let i=t.producers;do{if(i===n)return!0;if(i===e)break;i=i.nextProducer}while(i!==void 0)}return!1}function Xo(n,t){return Object.is(n,t)}function Jo(n,t){let e=Object.create(zC);e.computation=n,t!==void 0&&(e.equal=t);let i=()=>{if(ji(e),si(e),e.value===jn)throw e.error;return e.value};return i[Ke]=e,Ko(e),i}var ri=Symbol("UNSET"),Bi=Symbol("COMPUTING"),jn=Symbol("ERRORED"),zC=ie(z({},oi),{value:ri,dirty:!0,error:null,equal:Xo,kind:"computed",producerMustRecompute(n){return n.value===ri||n.value===Bi},producerRecomputeValue(n){if(n.value===Bi)throw new Error("");let t=n.value;n.value=Bi;let e=$n(n),i,r=!1;try{i=n.computation(),ae(null),r=t!==ri&&t!==jn&&i!==jn&&n.equal(t,i)}catch(o){i=jn,n.error=o}finally{ai(n,e)}if(r){n.value=t;return}n.value=i,n.version++}});function UC(){throw new Error}var bg=UC;function yg(n){bg(n)}function xu(n){bg=n}var GC=null;function Cu(n,t){let e=Object.create(es);e.value=n,t!==void 0&&(e.equal=t);let i=()=>xg(e);return i[Ke]=e,Ko(e),[i,s=>Hi(e,s),s=>Qa(e,s)]}function xg(n){return si(n),n.value}function Hi(n,t){bu()||yg(n),n.equal(n.value,t)||(n.value=t,WC(n))}function Qa(n,t){bu()||yg(n),Hi(n,t(n.value))}var es=ie(z({},oi),{equal:Xo,value:void 0,kind:"signal"});function WC(n){n.version++,mg(),vu(n),GC?.(n)}function me(n){return typeof n=="function"}function Ur(n){let e=n(i=>{Error.call(i),i.stack=new Error().stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Ka=Ur(n=>function(e){n(this),this.message=e?`${e.length} errors occurred during unsubscription:
2
+ ${e.map((i,r)=>`${r+1}) ${i.toString()}`).join(`
3
+ `)}`:"",this.name="UnsubscriptionError",this.errors=e});function zi(n,t){if(n){let e=n.indexOf(t);0<=e&&n.splice(e,1)}}var Be=class n{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;let{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(let o of e)o.remove(this);else e.remove(this);let{initialTeardown:i}=this;if(me(i))try{i()}catch(o){t=o instanceof Ka?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{Cg(o)}catch(s){t=t??[],s instanceof Ka?t=[...t,...s.errors]:t.push(s)}}if(t)throw new Ka(t)}}add(t){var e;if(t&&t!==this)if(this.closed)Cg(t);else{if(t instanceof n){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}}_hasParent(t){let{_parentage:e}=this;return e===t||Array.isArray(e)&&e.includes(t)}_addParent(t){let{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t}_removeParent(t){let{_parentage:e}=this;e===t?this._parentage=null:Array.isArray(e)&&zi(e,t)}remove(t){let{_finalizers:e}=this;e&&zi(e,t),t instanceof n&&t._removeParent(this)}};Be.EMPTY=(()=>{let n=new Be;return n.closed=!0,n})();var wu=Be.EMPTY;function Xa(n){return n instanceof Be||n&&"closed"in n&&me(n.remove)&&me(n.add)&&me(n.unsubscribe)}function Cg(n){me(n)?n():n.unsubscribe()}var un={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Gr={setTimeout(n,t,...e){let{delegate:i}=Gr;return i?.setTimeout?i.setTimeout(n,t,...e):setTimeout(n,t,...e)},clearTimeout(n){let{delegate:t}=Gr;return(t?.clearTimeout||clearTimeout)(n)},delegate:void 0};function Ja(n){Gr.setTimeout(()=>{let{onUnhandledError:t}=un;if(t)t(n);else throw n})}function ts(){}var wg=Eu("C",void 0,void 0);function Eg(n){return Eu("E",void 0,n)}function Dg(n){return Eu("N",n,void 0)}function Eu(n,t,e){return{kind:n,value:t,error:e}}var Ui=null;function Wr(n){if(un.useDeprecatedSynchronousErrorHandling){let t=!Ui;if(t&&(Ui={errorThrown:!1,error:null}),n(),t){let{errorThrown:e,error:i}=Ui;if(Ui=null,e)throw i}}else n()}function Sg(n){un.useDeprecatedSynchronousErrorHandling&&Ui&&(Ui.errorThrown=!0,Ui.error=n)}var Gi=class extends Be{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Xa(t)&&t.add(this)):this.destination=YC}static create(t,e,i){return new pn(t,e,i)}next(t){this.isStopped?Su(Dg(t),this):this._next(t)}error(t){this.isStopped?Su(Eg(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Su(wg,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},qC=Function.prototype.bind;function Du(n,t){return qC.call(n,t)}var Mu=class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(i){el(i)}}error(t){let{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(i){el(i)}else el(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){el(e)}}},pn=class extends Gi{constructor(t,e,i){super();let r;if(me(t)||!t)r={next:t??void 0,error:e??void 0,complete:i??void 0};else{let o;this&&un.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&Du(t.next,o),error:t.error&&Du(t.error,o),complete:t.complete&&Du(t.complete,o)}):r=t}this.destination=new Mu(r)}};function el(n){un.useDeprecatedSynchronousErrorHandling?Sg(n):Ja(n)}function ZC(n){throw n}function Su(n,t){let{onStoppedNotification:e}=un;e&&Gr.setTimeout(()=>e(n,t))}var YC={closed:!0,next:ts,error:ZC,complete:ts};var qr=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Zr(n){return n}function Mg(n){return n.length===0?Zr:n.length===1?n[0]:function(e){return n.reduce((i,r)=>r(i),e)}}var pe=(()=>{class n{constructor(e){e&&(this._subscribe=e)}lift(e){let i=new n;return i.source=this,i.operator=e,i}subscribe(e,i,r){let o=KC(e)?e:new pn(e,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(e){try{return this._subscribe(e)}catch(i){e.error(i)}}forEach(e,i){return i=Tg(i),new i((r,o)=>{let s=new pn({next:a=>{try{e(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:r});this.subscribe(s)})}_subscribe(e){var i;return(i=this.source)===null||i===void 0?void 0:i.subscribe(e)}[qr](){return this}pipe(...e){return Mg(e)(this)}toPromise(e){return e=Tg(e),new e((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return n.create=t=>new n(t),n})();function Tg(n){var t;return(t=n??un.Promise)!==null&&t!==void 0?t:Promise}function QC(n){return n&&me(n.next)&&me(n.error)&&me(n.complete)}function KC(n){return n&&n instanceof Gi||QC(n)&&Xa(n)}function Tu(n){return me(n?.lift)}function xe(n){return t=>{if(Tu(t))return t.lift(function(e){try{return n(e,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function Ce(n,t,e,i,r){return new ku(n,t,e,i,r)}var ku=class extends Gi{constructor(t,e,i,r,o,s){super(t),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=e?function(a){try{e(a)}catch(l){t.error(l)}}:super._next,this._error=r?function(a){try{r(a)}catch(l){t.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(a){t.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:e}=this;super.unsubscribe(),!e&&((t=this.onFinalize)===null||t===void 0||t.call(this))}}};function kg(){return xe((n,t)=>{let e=null;n._refCount++;let i=Ce(t,void 0,void 0,void 0,()=>{if(!n||n._refCount<=0||0<--n._refCount){e=null;return}let r=n._connection,o=e;e=null,r&&(!o||r===o)&&r.unsubscribe(),t.unsubscribe()});n.subscribe(i),i.closed||(e=n.connect())})}var ns=class extends pe{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,Tu(t)&&(this.lift=t.lift)}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){let t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:t}=this;this._subject=this._connection=null,t?.unsubscribe()}connect(){let t=this._connection;if(!t){t=this._connection=new Be;let e=this.getSubject();t.add(this.source.subscribe(Ce(e,void 0,()=>{this._teardown(),e.complete()},i=>{this._teardown(),e.error(i)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Be.EMPTY)}return t}refCount(){return kg()(this)}};var Yr={schedule(n){let t=requestAnimationFrame,e=cancelAnimationFrame,{delegate:i}=Yr;i&&(t=i.requestAnimationFrame,e=i.cancelAnimationFrame);let r=t(o=>{e=void 0,n(o)});return new Be(()=>e?.(r))},requestAnimationFrame(...n){let{delegate:t}=Yr;return(t?.requestAnimationFrame||requestAnimationFrame)(...n)},cancelAnimationFrame(...n){let{delegate:t}=Yr;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...n)},delegate:void 0};var Ig=Ur(n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var ze=(()=>{class n extends pe{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let i=new tl(this,this);return i.operator=e,i}_throwIfClosed(){if(this.closed)throw new Ig}next(e){Wr(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let i of this.currentObservers)i.next(e)}})}error(e){Wr(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;let{observers:i}=this;for(;i.length;)i.shift().error(e)}})}complete(){Wr(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){let{hasError:i,isStopped:r,observers:o}=this;return i||r?wu:(this.currentObservers=null,o.push(e),new Be(()=>{this.currentObservers=null,zi(o,e)}))}_checkFinalizedStatuses(e){let{hasError:i,thrownError:r,isStopped:o}=this;i?e.error(r):o&&e.complete()}asObservable(){let e=new pe;return e.source=this,e}}return n.create=(t,e)=>new tl(t,e),n})(),tl=class extends ze{constructor(t,e){super(),this.destination=t,this.source=e}next(t){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.next)===null||i===void 0||i.call(e,t)}error(t){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.error)===null||i===void 0||i.call(e,t)}complete(){var t,e;(e=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||e===void 0||e.call(t)}_subscribe(t){var e,i;return(i=(e=this.source)===null||e===void 0?void 0:e.subscribe(t))!==null&&i!==void 0?i:wu}};var is=class extends ze{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){let e=super._subscribe(t);return!e.closed&&t.next(this._value),e}getValue(){let{hasError:t,thrownError:e,_value:i}=this;if(t)throw e;return this._throwIfClosed(),i}next(t){super.next(this._value=t)}};var rs={now(){return(rs.delegate||Date).now()},delegate:void 0};var Wi=class extends ze{constructor(t=1/0,e=1/0,i=rs){super(),this._bufferSize=t,this._windowTime=e,this._timestampProvider=i,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=e===1/0,this._bufferSize=Math.max(1,t),this._windowTime=Math.max(1,e)}next(t){let{isStopped:e,_buffer:i,_infiniteTimeWindow:r,_timestampProvider:o,_windowTime:s}=this;e||(i.push(t),!r&&i.push(o.now()+s)),this._trimBuffer(),super.next(t)}_subscribe(t){this._throwIfClosed(),this._trimBuffer();let e=this._innerSubscribe(t),{_infiniteTimeWindow:i,_buffer:r}=this,o=r.slice();for(let s=0;s<o.length&&!t.closed;s+=i?1:2)t.next(o[s]);return this._checkFinalizedStatuses(t),e}_trimBuffer(){let{_bufferSize:t,_timestampProvider:e,_buffer:i,_infiniteTimeWindow:r}=this,o=(r?1:2)*t;if(t<1/0&&o<i.length&&i.splice(0,i.length-o),!r){let s=e.now(),a=0;for(let l=1;l<i.length&&i[l]<=s;l+=2)a=l;a&&i.splice(0,a+1)}}};var nl=class extends Be{constructor(t,e){super()}schedule(t,e=0){return this}};var os={setInterval(n,t,...e){let{delegate:i}=os;return i?.setInterval?i.setInterval(n,t,...e):setInterval(n,t,...e)},clearInterval(n){let{delegate:t}=os;return(t?.clearInterval||clearInterval)(n)},delegate:void 0};var ci=class extends nl{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){var i;if(this.closed)return this;this.state=t;let r=this.id,o=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(o,r,e)),this.pending=!0,this.delay=e,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(o,this.id,e),this}requestAsyncId(t,e,i=0){return os.setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(i!=null&&this.delay===i&&this.pending===!1)return e;e!=null&&os.clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let i=this._execute(t,e);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let i=!1,r;try{this.work(t)}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:t,scheduler:e}=this,{actions:i}=e;this.work=this.state=this.scheduler=null,this.pending=!1,zi(i,this),t!=null&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}};var XC=1,Iu,Pu={};function Pg(n){return n in Pu?(delete Pu[n],!0):!1}var Og={setImmediate(n){let t=XC++;return Pu[t]=!0,Iu||(Iu=Promise.resolve()),Iu.then(()=>Pg(t)&&n()),t},clearImmediate(n){Pg(n)}};var{setImmediate:JC,clearImmediate:ew}=Og,ss={setImmediate(...n){let{delegate:t}=ss;return(t?.setImmediate||JC)(...n)},clearImmediate(n){let{delegate:t}=ss;return(t?.clearImmediate||ew)(n)},delegate:void 0};var il=class extends ci{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return i!==null&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t._scheduled||(t._scheduled=ss.setImmediate(t.flush.bind(t,void 0))))}recycleAsyncId(t,e,i=0){var r;if(i!=null?i>0:this.delay>0)return super.recycleAsyncId(t,e,i);let{actions:o}=t;e!=null&&((r=o[o.length-1])===null||r===void 0?void 0:r.id)!==e&&(ss.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}};var Qr=class n{constructor(t,e=n.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,i){return new this.schedulerActionCtor(this,t).schedule(i,e)}};Qr.now=rs.now;var di=class extends Qr{constructor(t,e=Qr.now){super(t,e),this.actions=[],this._active=!1}flush(t){let{actions:e}=this;if(this._active){e.push(t);return}let i;this._active=!0;do if(i=t.execute(t.state,t.delay))break;while(t=e.shift());if(this._active=!1,i){for(;t=e.shift();)t.unsubscribe();throw i}}};var rl=class extends di{flush(t){this._active=!0;let e=this._scheduled;this._scheduled=void 0;let{actions:i}=this,r;t=t||i.shift();do if(r=t.execute(t.state,t.delay))break;while((t=i[0])&&t.id===e&&i.shift());if(this._active=!1,r){for(;(t=i[0])&&t.id===e&&i.shift();)t.unsubscribe();throw r}}};var Ou=new rl(il);var as=new di(ci),Rg=as;var ol=class extends ci{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return i!==null&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t._scheduled||(t._scheduled=Yr.requestAnimationFrame(()=>t.flush(void 0))))}recycleAsyncId(t,e,i=0){var r;if(i!=null?i>0:this.delay>0)return super.recycleAsyncId(t,e,i);let{actions:o}=t;e!=null&&e===t._scheduled&&((r=o[o.length-1])===null||r===void 0?void 0:r.id)!==e&&(Yr.cancelAnimationFrame(e),t._scheduled=void 0)}};var sl=class extends di{flush(t){this._active=!0;let e;t?e=t.id:(e=this._scheduled,this._scheduled=void 0);let{actions:i}=this,r;t=t||i.shift();do if(r=t.execute(t.state,t.delay))break;while((t=i[0])&&t.id===e&&i.shift());if(this._active=!1,r){for(;(t=i[0])&&t.id===e&&i.shift();)t.unsubscribe();throw r}}};var Ru=new sl(ol);function al(n){return n&&me(n.schedule)}function Ng(n){return n[n.length-1]}function Ag(n){return me(Ng(n))?n.pop():void 0}function Kr(n){return al(Ng(n))?n.pop():void 0}function Fg(n,t,e,i){function r(o){return o instanceof e?o:new e(function(s){s(o)})}return new(e||(e=Promise))(function(o,s){function a(_){try{h(i.next(_))}catch(w){s(w)}}function l(_){try{h(i.throw(_))}catch(w){s(w)}}function h(_){_.done?o(_.value):r(_.value).then(a,l)}h((i=i.apply(n,t||[])).next())})}function Lg(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],i=0;if(e)return e.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(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function qi(n){return this instanceof qi?(this.v=n,this):new qi(n)}function Vg(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=e.apply(n,t||[]),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(T){return function(A){return Promise.resolve(A).then(T,w)}}function a(T,A){i[T]&&(r[T]=function(U){return new Promise(function(K,G){o.push([T,U,K,G])>1||l(T,U)})},A&&(r[T]=A(r[T])))}function l(T,A){try{h(i[T](A))}catch(U){M(o[0][3],U)}}function h(T){T.value instanceof qi?Promise.resolve(T.value.v).then(_,w):M(o[0][2],T)}function _(T){l("next",T)}function w(T){l("throw",T)}function M(T,A){T(A),o.shift(),o.length&&l(o[0][0],o[0][1])}}function Bg(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n[Symbol.asyncIterator],e;return t?t.call(n):(n=typeof Lg=="function"?Lg(n):n[Symbol.iterator](),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(o){e[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(h){o({value:h,done:a})},s)}}var ll=n=>n&&typeof n.length=="number"&&typeof n!="function";function cl(n){return me(n?.then)}function dl(n){return me(n[qr])}function ul(n){return Symbol.asyncIterator&&me(n?.[Symbol.asyncIterator])}function pl(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 tw(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var fl=tw();function hl(n){return me(n?.[fl])}function ml(n){return Vg(this,arguments,function*(){let e=n.getReader();try{for(;;){let{value:i,done:r}=yield qi(e.read());if(r)return yield qi(void 0);yield yield qi(i)}}finally{e.releaseLock()}})}function gl(n){return me(n?.getReader)}function Ne(n){if(n instanceof pe)return n;if(n!=null){if(dl(n))return nw(n);if(ll(n))return iw(n);if(cl(n))return rw(n);if(ul(n))return jg(n);if(hl(n))return ow(n);if(gl(n))return sw(n)}throw pl(n)}function nw(n){return new pe(t=>{let e=n[qr]();if(me(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function iw(n){return new pe(t=>{for(let e=0;e<n.length&&!t.closed;e++)t.next(n[e]);t.complete()})}function rw(n){return new pe(t=>{n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Ja)})}function ow(n){return new pe(t=>{for(let e of n)if(t.next(e),t.closed)return;t.complete()})}function jg(n){return new pe(t=>{aw(n,t).catch(e=>t.error(e))})}function sw(n){return jg(ml(n))}function aw(n,t){var e,i,r,o;return Fg(this,void 0,void 0,function*(){try{for(e=Bg(n);i=yield e.next(),!i.done;){let s=i.value;if(t.next(s),t.closed)return}}catch(s){r={error:s}}finally{try{i&&!i.done&&(o=e.return)&&(yield o.call(e))}finally{if(r)throw r.error}}t.complete()})}function Kt(n,t,e,i=0,r=!1){let o=t.schedule(function(){e(),r?n.add(this.schedule(null,i)):this.unsubscribe()},i);if(n.add(o),!r)return o}function _l(n,t=0){return xe((e,i)=>{e.subscribe(Ce(i,r=>Kt(i,n,()=>i.next(r),t),()=>Kt(i,n,()=>i.complete(),t),r=>Kt(i,n,()=>i.error(r),t)))})}function vl(n,t=0){return xe((e,i)=>{i.add(n.schedule(()=>e.subscribe(i),t))})}function $g(n,t){return Ne(n).pipe(vl(t),_l(t))}function Hg(n,t){return Ne(n).pipe(vl(t),_l(t))}function zg(n,t){return new pe(e=>{let i=0;return t.schedule(function(){i===n.length?e.complete():(e.next(n[i++]),e.closed||this.schedule())})})}function Ug(n,t){return new pe(e=>{let i;return Kt(e,t,()=>{i=n[fl](),Kt(e,t,()=>{let r,o;try{({value:r,done:o}=i.next())}catch(s){e.error(s);return}o?e.complete():e.next(r)},0,!0)}),()=>me(i?.return)&&i.return()})}function bl(n,t){if(!n)throw new Error("Iterable cannot be null");return new pe(e=>{Kt(e,t,()=>{let i=n[Symbol.asyncIterator]();Kt(e,t,()=>{i.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Gg(n,t){return bl(ml(n),t)}function Wg(n,t){if(n!=null){if(dl(n))return $g(n,t);if(ll(n))return zg(n,t);if(cl(n))return Hg(n,t);if(ul(n))return bl(n,t);if(hl(n))return Ug(n,t);if(gl(n))return Gg(n,t)}throw pl(n)}function yl(n,t){return t?Wg(n,t):Ne(n)}function Ee(...n){let t=Kr(n);return yl(n,t)}function Nu(n,t){let e=me(n)?n:()=>n,i=r=>r.error(e());return new pe(t?r=>t.schedule(i,0,r):i)}function ls(n){return!!n&&(n instanceof pe||me(n.lift)&&me(n.subscribe))}var qg=Ur(n=>function(){n(this),this.name="EmptyError",this.message="no elements in sequence"});function xl(n,t){let e=typeof t=="object";return new Promise((i,r)=>{let o=new pn({next:s=>{i(s),o.unsubscribe()},error:r,complete:()=>{e?i(t.defaultValue):r(new qg)}});n.subscribe(o)})}function Zg(n){return n instanceof Date&&!isNaN(n)}function Oe(n,t){return xe((e,i)=>{let r=0;e.subscribe(Ce(i,o=>{i.next(n.call(t,o,r++))}))})}var{isArray:lw}=Array;function cw(n,t){return lw(t)?n(...t):n(t)}function Yg(n){return Oe(t=>cw(n,t))}var{isArray:dw}=Array,{getPrototypeOf:uw,prototype:pw,keys:fw}=Object;function Qg(n){if(n.length===1){let t=n[0];if(dw(t))return{args:t,keys:null};if(hw(t)){let e=fw(t);return{args:e.map(i=>t[i]),keys:e}}}return{args:n,keys:null}}function hw(n){return n&&typeof n=="object"&&uw(n)===pw}function Kg(n,t){return n.reduce((e,i,r)=>(e[i]=t[r],e),{})}function Xg(n,t,e,i,r,o,s,a){let l=[],h=0,_=0,w=!1,M=()=>{w&&!l.length&&!h&&t.complete()},T=U=>h<i?A(U):l.push(U),A=U=>{o&&t.next(U),h++;let K=!1;Ne(e(U,_++)).subscribe(Ce(t,G=>{r?.(G),o?T(G):t.next(G)},()=>{K=!0},void 0,()=>{if(K)try{for(h--;l.length&&h<i;){let G=l.shift();s?Kt(t,s,()=>A(G)):A(G)}M()}catch(G){t.error(G)}}))};return n.subscribe(Ce(t,T,()=>{w=!0,M()})),()=>{a?.()}}function Xr(n,t,e=1/0){return me(t)?Xr((i,r)=>Oe((o,s)=>t(i,o,r,s))(Ne(n(i,r))),e):(typeof t=="number"&&(e=t),xe((i,r)=>Xg(i,r,n,e)))}function Jg(n=1/0){return Xr(Zr,n)}function e0(){return Jg(1)}function Au(...n){return e0()(yl(n,Kr(n)))}function Lu(n){return new pe(t=>{Ne(n()).subscribe(t)})}function Cl(...n){let t=Ag(n),{args:e,keys:i}=Qg(n),r=new pe(o=>{let{length:s}=e;if(!s){o.complete();return}let a=new Array(s),l=s,h=s;for(let _=0;_<s;_++){let w=!1;Ne(e[_]).subscribe(Ce(o,M=>{w||(w=!0,h--),a[_]=M},()=>l--,void 0,()=>{(!l||!w)&&(h||o.next(i?Kg(i,a):a),o.complete())}))}});return t?r.pipe(Yg(t)):r}function t0(n=0,t,e=Rg){let i=-1;return t!=null&&(al(t)?e=t:i=t),new pe(r=>{let o=Zg(n)?+n-e.now():n;o<0&&(o=0);let s=0;return e.schedule(function(){r.closed||(r.next(s++),0<=i?this.schedule(void 0,i):r.complete())},o)})}function cs(n,t){return xe((e,i)=>{let r=0;e.subscribe(Ce(i,o=>n.call(t,o,r++)&&i.next(o)))})}function n0(n){return xe((t,e)=>{let i=!1,r=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,i){i=!1;let h=r;r=null,e.next(h)}s&&e.complete()},l=()=>{o=null,s&&e.complete()};t.subscribe(Ce(e,h=>{i=!0,r=h,o||Ne(n(h)).subscribe(o=Ce(e,a,l))},()=>{s=!0,(!i||!o||o.closed)&&e.complete()}))})}function ds(n,t=as){return n0(()=>t0(n,t))}function ct(n){return xe((t,e)=>{let i=null,r=!1,o;i=t.subscribe(Ce(e,void 0,void 0,s=>{o=Ne(n(s,ct(n)(t))),i?(i.unsubscribe(),i=null,o.subscribe(e)):r=!0})),r&&(i.unsubscribe(),i=null,o.subscribe(e))})}function Fu(n,t){return me(t)?Xr(n,t,1):Xr(n,1)}function Vu(n,t=as){return xe((e,i)=>{let r=null,o=null,s=null,a=()=>{if(r){r.unsubscribe(),r=null;let h=o;o=null,i.next(h)}};function l(){let h=s+n,_=t.now();if(_<h){r=this.schedule(void 0,h-_),i.add(r);return}a()}e.subscribe(Ce(i,h=>{o=h,s=t.now(),r||(r=t.schedule(l,n),i.add(r))},()=>{a(),i.complete()},void 0,()=>{o=r=null}))})}function us(n,t=Zr){return n=n??mw,xe((e,i)=>{let r,o=!0;e.subscribe(Ce(i,s=>{let a=t(s);(o||!n(r,a))&&(o=!1,r=a,i.next(s))}))})}function mw(n,t){return n===t}function ui(n){return xe((t,e)=>{try{t.subscribe(e)}finally{e.add(n)}})}function Bu(){return xe((n,t)=>{let e,i=!1;n.subscribe(Ce(t,r=>{let o=e;e=r,i&&t.next([o,r]),i=!0}))})}function i0(n={}){let{connector:t=()=>new ze,resetOnError:e=!0,resetOnComplete:i=!0,resetOnRefCountZero:r=!0}=n;return o=>{let s,a,l,h=0,_=!1,w=!1,M=()=>{a?.unsubscribe(),a=void 0},T=()=>{M(),s=l=void 0,_=w=!1},A=()=>{let U=s;T(),U?.unsubscribe()};return xe((U,K)=>{h++,!w&&!_&&M();let G=l=l??t();K.add(()=>{h--,h===0&&!w&&!_&&(a=ju(A,r))}),G.subscribe(K),!s&&h>0&&(s=new pn({next:be=>G.next(be),error:be=>{w=!0,M(),a=ju(T,e,be),G.error(be)},complete:()=>{_=!0,M(),a=ju(T,i),G.complete()}}),Ne(U).subscribe(s))})(o)}}function ju(n,t,...e){if(t===!0){n();return}if(t===!1)return;let i=new pn({next:()=>{i.unsubscribe(),n()}});return Ne(t(...e)).subscribe(i)}function Jr(n,t,e){let i,r=!1;return n&&typeof n=="object"?{bufferSize:i=1/0,windowTime:t=1/0,refCount:r=!1,scheduler:e}=n:i=n??1/0,i0({connector:()=>new Wi(i,t,e),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:r})}function wl(...n){let t=Kr(n);return xe((e,i)=>{(t?Au(n,e,t):Au(n,e)).subscribe(i)})}function St(n,t){return xe((e,i)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&i.complete();e.subscribe(Ce(i,l=>{r?.unsubscribe();let h=0,_=o++;Ne(n(l,_)).subscribe(r=Ce(i,w=>i.next(t?t(l,w,_,h++):w),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function Zi(n){return xe((t,e)=>{Ne(n).subscribe(Ce(e,()=>e.complete(),ts)),!e.closed&&t.subscribe(e)})}function $u(n,t,e){let i=Object.create(gw);i.source=n,i.computation=t,e!=null&&(i.equal=e);let o=()=>{if(ji(i),si(i),i.value===jn)throw i.error;return i.value};return o[Ke]=i,Ko(i),o}function r0(n,t){ji(n),Hi(n,t),Hr(n)}function o0(n,t){ji(n),Qa(n,t),Hr(n)}var gw=ie(z({},oi),{value:ri,dirty:!0,error:null,equal:Xo,kind:"linkedSignal",producerMustRecompute(n){return n.value===ri||n.value===Bi},producerRecomputeValue(n){if(n.value===Bi)throw new Error("");let t=n.value;n.value=Bi;let e=$n(n),i;try{let r=n.source(),o=t===ri||t===jn?void 0:{source:n.sourceValue,value:t};i=n.computation(r,o),n.sourceValue=r}catch(r){i=jn,n.error=r}finally{ai(n,e)}if(t!==ri&&i!==jn&&n.equal(t,i)){n.value=t;return}n.value=i,n.version++}});function s0(n){let t=ae(null);try{return n()}finally{ae(t)}}var a0=ie(z({},oi),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:"effect"});function l0(n){if(n.dirty=!1,n.version>0&&!$i(n))return;n.version++;let t=$n(n);try{n.cleanup(),n.fn()}finally{ai(n,t)}}var Tl="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",X=class extends Error{code;constructor(t,e){super(er(t,e)),this.code=t}};function _w(n){return`NG0${Math.abs(n)}`}function er(n,t){return`${_w(n)}${t?": "+t:""}`}var fn=globalThis;function Te(n){for(let t in n)if(n[t]===Te)return t;throw Error("")}function u0(n,t){for(let e in t)t.hasOwnProperty(e)&&!n.hasOwnProperty(e)&&(n[e]=t[e])}function fi(n){if(typeof n=="string")return n;if(Array.isArray(n))return`[${n.map(fi).join(", ")}]`;if(n==null)return""+n;let t=n.overriddenName||n.name;if(t)return`${t}`;let e=n.toString();if(e==null)return""+e;let i=e.indexOf(`
4
+ `);return i>=0?e.slice(0,i):e}function kl(n,t){return n?t?`${n} ${t}`:n:t||""}var vw=Te({__forward_ref__:Te});function to(n){return n.__forward_ref__=to,n.toString=function(){return fi(this())},n}function bt(n){return p0(n)?n():n}function p0(n){return typeof n=="function"&&n.hasOwnProperty(vw)&&n.__forward_ref__===to}function ce(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function Il(n){return bw(n,Pl)}function bw(n,t){return n.hasOwnProperty(t)&&n[t]||null}function yw(n){let t=n?.[Pl]??null;return t||null}function zu(n){return n&&n.hasOwnProperty(Sl)?n[Sl]:null}var Pl=Te({\u0275prov:Te}),Sl=Te({\u0275inj:Te}),se=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(t,e){this._desc=t,this.\u0275prov=void 0,typeof e=="number"?this.__NG_ELEMENT_ID__=e:e!==void 0&&(this.\u0275prov=ce({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function ep(n){return n&&!!n.\u0275providers}var tp=Te({\u0275cmp:Te}),np=Te({\u0275dir:Te}),ip=Te({\u0275pipe:Te});var Uu=Te({\u0275fac:Te}),tr=Te({__NG_ELEMENT_ID__:Te}),c0=Te({__NG_ENV_ID__:Te});function hn(n){return typeof n=="string"?n:n==null?"":String(n)}function f0(n){return typeof n=="function"?n.name||n.toString():typeof n=="object"&&n!=null&&typeof n.type=="function"?n.type.name||n.type.toString():hn(n)}var h0=Te({ngErrorCode:Te}),xw=Te({ngErrorMessage:Te}),Cw=Te({ngTokenPath:Te});function rp(n,t){return m0("",-200,t)}function Ol(n,t){throw new X(-201,!1)}function m0(n,t,e){let i=new X(t,n);return i[h0]=t,i[xw]=n,e&&(i[Cw]=e),i}function ww(n){return n[h0]}var Gu;function g0(){return Gu}function Tt(n){let t=Gu;return Gu=n,t}function op(n,t,e){let i=Il(n);if(i&&i.providedIn=="root")return i.value===void 0?i.value=i.factory():i.value;if(e&8)return null;if(t!==void 0)return t;Ol(n,"Injector")}var Ew={},Yi=Ew,Wu="__NG_DI_FLAG__",qu=class{injector;constructor(t){this.injector=t}retrieve(t,e){let i=Qi(e)||0;try{return this.injector.get(t,i&8?null:Yi,i)}catch(r){if($r(r))return r;throw r}}};function Dw(n,t=0){let e=qa();if(e===void 0)throw new X(-203,!1);if(e===null)return op(n,void 0,t);{let i=Sw(t),r=e.retrieve(n,i);if($r(r)){if(i.optional)return null;throw r}return r}}function _e(n,t=0){return(g0()||Dw)(bt(n),t)}function R(n,t){return _e(n,Qi(t))}function Qi(n){return typeof n>"u"||typeof n=="number"?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function Sw(n){return{optional:!!(n&8),host:!!(n&1),self:!!(n&2),skipSelf:!!(n&4)}}function Zu(n){let t=[];for(let e=0;e<n.length;e++){let i=bt(n[e]);if(Array.isArray(i)){if(i.length===0)throw new X(900,!1);let r,o=0;for(let s=0;s<i.length;s++){let a=i[s],l=Mw(a);typeof l=="number"?l===-1?r=a.token:o|=l:r=a}t.push(_e(r,o))}else t.push(_e(i))}return t}function sp(n,t){return n[Wu]=t,n.prototype[Wu]=t,n}function Mw(n){return n[Wu]}function Ki(n,t){let e=n.hasOwnProperty(Uu);return e?n[Uu]:null}function _0(n,t,e){if(n.length!==t.length)return!1;for(let i=0;i<n.length;i++){let r=n[i],o=t[i];if(e&&(r=e(r),o=e(o)),o!==r)return!1}return!0}function v0(n){return n.flat(Number.POSITIVE_INFINITY)}function Rl(n,t){n.forEach(e=>Array.isArray(e)?Rl(e,t):t(e))}function ap(n,t,e){t>=n.length?n.push(e):n.splice(t,0,e)}function gs(n,t){return t>=n.length-1?n.pop():n.splice(t,1)[0]}function b0(n,t){let e=[];for(let i=0;i<n;i++)e.push(t);return e}function y0(n,t,e,i){let r=n.length;if(r==t)n.push(e,i);else if(r===1)n.push(i,n[0]),n[0]=e;else{for(r--,n.push(n[r-1],n[r]);r>t;){let o=r-2;n[r]=n[o],r--}n[t]=e,n[t+1]=i}}function Nl(n,t,e){let i=no(n,t);return i>=0?n[i|1]=e:(i=~i,y0(n,i,t,e)),i}function Al(n,t){let e=no(n,t);if(e>=0)return n[e|1]}function no(n,t){return Tw(n,t,1)}function Tw(n,t,e){let i=0,r=n.length>>e;for(;r!==i;){let o=i+(r-i>>1),s=n[o<<e];if(t===s)return o<<e;s>t?r=o:i=o+1}return~(r<<e)}var mi={},Xt=[],nr=new se(""),lp=new se("",-1),cp=new se(""),fs=class{get(t,e=Yi){if(e===Yi){let r=m0("",-201);throw r.name="\u0275NotFound",r}return e}};function ir(n){return n[tp]||null}function dp(n){return n[np]||null}function x0(n){return n[ip]||null}function _s(n){return{\u0275providers:n}}function C0(...n){return{\u0275providers:up(!0,n),\u0275fromNgModule:!0}}function up(n,...t){let e=[],i=new Set,r,o=s=>{e.push(s)};return Rl(t,s=>{let a=s;Ml(a,o,[],i)&&(r||=[],r.push(a))}),r!==void 0&&w0(r,o),e}function w0(n,t){for(let e=0;e<n.length;e++){let{ngModule:i,providers:r}=n[e];pp(r,o=>{t(o,i)})}}function Ml(n,t,e,i){if(n=bt(n),!n)return!1;let r=null,o=zu(n),s=!o&&ir(n);if(!o&&!s){let l=n.ngModule;if(o=zu(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 h of l)Ml(h,t,e,i)}}else if(o){if(o.imports!=null&&!a){i.add(r);let h;Rl(o.imports,_=>{Ml(_,t,e,i)&&(h||=[],h.push(_))}),h!==void 0&&w0(h,t)}if(!a){let h=Ki(r)||(()=>new r);t({provide:r,useFactory:h,deps:Xt},r),t({provide:cp,useValue:r,multi:!0},r),t({provide:nr,useValue:()=>_e(r),multi:!0},r)}let l=o.providers;if(l!=null&&!a){let h=n;pp(l,_=>{t(_,h)})}}else return!1;return r!==n&&n.providers!==void 0}function pp(n,t){for(let e of n)ep(e)&&(e=e.\u0275providers),Array.isArray(e)?pp(e,t):t(e)}var kw=Te({provide:String,useValue:Te});function E0(n){return n!==null&&typeof n=="object"&&kw in n}function Iw(n){return!!(n&&n.useExisting)}function Pw(n){return!!(n&&n.useFactory)}function Xi(n){return typeof n=="function"}function D0(n){return!!n.useClass}var vs=new se(""),El={},d0={},Hu;function bs(){return Hu===void 0&&(Hu=new fs),Hu}var Vt=class{},Ji=class extends Vt{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(t,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,Qu(t,s=>this.processProvider(s)),this.records.set(lp,eo(void 0,this)),r.has("environment")&&this.records.set(Vt,eo(void 0,this));let o=this.records.get(vs);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(cp,Xt,{self:!0}))}retrieve(t,e){let i=Qi(e)||0;try{return this.get(t,Yi,i)}catch(r){if($r(r))return r;throw r}}destroy(){ps(this),this._destroyed=!0;let t=ae(null);try{for(let i of this._ngOnDestroyHooks)i.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let i of e)i()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),ae(t)}}onDestroy(t){return ps(this),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){ps(this);let e=Tn(this),i=Tt(void 0),r;try{return t()}finally{Tn(e),Tt(i)}}get(t,e=Yi,i){if(ps(this),t.hasOwnProperty(c0))return t[c0](this);let r=Qi(i),o,s=Tn(this),a=Tt(void 0);try{if(!(r&4)){let h=this.records.get(t);if(h===void 0){let _=Lw(t)&&Il(t);_&&this.injectableDefInScope(_)?h=eo(Yu(t),El):h=null,this.records.set(t,h)}if(h!=null)return this.hydrate(t,h,r)}let l=r&2?bs():this.parent;return e=r&8&&e===Yi?null:e,l.get(t,e)}catch(l){let h=ww(l);throw h===-200||h===-201?new X(h,null):l}finally{Tt(a),Tn(s)}}resolveInjectorInitializers(){let t=ae(null),e=Tn(this),i=Tt(void 0),r;try{let o=this.get(nr,Xt,{self:!0});for(let s of o)s()}finally{Tn(e),Tt(i),ae(t)}}toString(){let t=[],e=this.records;for(let i of e.keys())t.push(fi(i));return`R3Injector[${t.join(", ")}]`}processProvider(t){t=bt(t);let e=Xi(t)?t:bt(t&&t.provide),i=Rw(t);if(!Xi(t)&&t.multi===!0){let r=this.records.get(e);r||(r=eo(void 0,El,!0),r.factory=()=>Zu(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,i)}hydrate(t,e,i){let r=ae(null);try{if(e.value===d0)throw rp(fi(t));return e.value===El&&(e.value=d0,e.value=e.factory(void 0,i)),typeof e.value=="object"&&e.value&&Aw(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}finally{ae(r)}}injectableDefInScope(t){if(!t.providedIn)return!1;let e=bt(t.providedIn);return typeof e=="string"?e==="any"||this.scopes.has(e):this.injectorDefTypes.has(e)}removeOnDestroy(t){let e=this._onDestroyHooks.indexOf(t);e!==-1&&this._onDestroyHooks.splice(e,1)}};function Yu(n){let t=Il(n),e=t!==null?t.factory:Ki(n);if(e!==null)return e;if(n instanceof se)throw new X(204,!1);if(n instanceof Function)return Ow(n);throw new X(204,!1)}function Ow(n){if(n.length>0)throw new X(204,!1);let e=yw(n);return e!==null?()=>e.factory(n):()=>new n}function Rw(n){if(E0(n))return eo(void 0,n.useValue);{let t=fp(n);return eo(t,El)}}function fp(n,t,e){let i;if(Xi(n)){let r=bt(n);return Ki(r)||Yu(r)}else if(E0(n))i=()=>bt(n.useValue);else if(Pw(n))i=()=>n.useFactory(...Zu(n.deps||[]));else if(Iw(n))i=(r,o)=>_e(bt(n.useExisting),o!==void 0&&o&8?8:void 0);else{let r=bt(n&&(n.useClass||n.provide));if(Nw(n))i=()=>new r(...Zu(n.deps));else return Ki(r)||Yu(r)}return i}function ps(n){if(n.destroyed)throw new X(205,!1)}function eo(n,t,e=!1){return{factory:n,value:t,multi:e?[]:void 0}}function Nw(n){return!!n.deps}function Aw(n){return n!==null&&typeof n=="object"&&typeof n.ngOnDestroy=="function"}function Lw(n){return typeof n=="function"||typeof n=="object"&&n.ngMetadataName==="InjectionToken"}function Qu(n,t){for(let e of n)Array.isArray(e)?Qu(e,t):e&&ep(e)?Qu(e.\u0275providers,t):t(e)}function io(n,t){let e;n instanceof Ji?(ps(n),e=n):e=new qu(n);let i,r=Tn(e),o=Tt(void 0);try{return t()}finally{Tn(r),Tt(o)}}function S0(){return g0()!==void 0||qa()!=null}var mn=0,re=1,le=2,it=3,en=4,It=5,rr=6,ro=7,Ue=8,Pt=9,kn=10,ke=11,oo=12,hp=13,or=14,yt=15,zn=16,sr=17,In=18,ys=19,mp=20,Hn=21,Ll=22,Un=23,Ut=24,ar=25,Gn=26,Ae=27,M0=1,gp=6,gi=7,xs=8,lr=9,Ge=10;function Pn(n){return Array.isArray(n)&&typeof n[M0]=="object"}function gn(n){return Array.isArray(n)&&n[M0]===!0}function _p(n){return(n.flags&4)!==0}function _i(n){return n.componentOffset>-1}function so(n){return(n.flags&1)===1}function On(n){return!!n.template}function ao(n){return(n[le]&512)!==0}function cr(n){return(n[le]&256)===256}var Mt=(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})(Mt||{}),Dl,hs="svg",vp="math";function T0(){return Dl||(Dl={},pi(Mt.HTML,void 0,[["iframe",["srcdoc"]],["*",["innerHTML","outerHTML"]]]),pi(Mt.STYLE,void 0,[["*",["style"]]]),pi(Mt.URL,void 0,[["*",["formAction"]],["area",["href"]],["a",["href","xlink:href"]],["form",["action"]],["img",["src"]],["video",["src"]]]),pi(Mt.URL,vp,[["*",["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"]]]),pi(Mt.RESOURCE_URL,void 0,[["base",["href"]],["embed",["src"]],["frame",["src"]],["iframe",["src"]],["link",["href"]],["object",["codebase","data"]]]),pi(Mt.URL,hs,[["a",["href","xlink:href"]]]),pi(Mt.ATTRIBUTE_NO_BINDING,hs,[["animate",["attributeName","values","to","from"]],["set",["to","attributeName"]],["animateMotion",["attributeName"]],["animateTransform",["attributeName"]]]),pi(Mt.ATTRIBUTE_NO_BINDING,void 0,[["unknown",["attributeName","values","to","from","sandbox","allow","allowFullscreen","referrerPolicy","csp","fetchPriority"]],["iframe",["sandbox","allow","allowFullscreen","referrerPolicy","csp","fetchPriority"]]])),Dl}function pi(n,t,e){for(let[i,r]of e){let o=t&&i!=="unknown"?`:${t}:${i}`:i;o=o.toLowerCase();for(let s of r)Dl[`${o}|${s.toLowerCase()}`]=n}}function k0(n,t,e){let i=T0(),r=n.toLowerCase(),o=t.toLowerCase(),s=e&&r!=="*"&&r!=="unknown"?i[`:${e}:${r}|${o}`]:void 0,a=e?i[`:${e}:*|${o}`]:void 0;return s??a??i[`${r}|${o}`]??i[`*|${o}`]??Mt.NONE}function tn(n){for(;Array.isArray(n);)n=n[mn];return n}function bp(n,t){return tn(t[n])}function Bt(n,t){return tn(t[n.index])}function Cs(n,t){return n.data[t]}function Fl(n,t){return n[t]}function yp(n,t,e,i){e>=n.data.length&&(n.data[e]=null,n.blueprint[e]=null),t[e]=i}function nn(n,t){let e=t[n];return Pn(e)?e:e[mn]}function I0(n){return(n[le]&4)===4}function Vl(n){return(n[le]&128)===128}function P0(n){return gn(n[it])}function rn(n,t){return t==null?null:n[t]}function xp(n){n[sr]=0}function Cp(n){n[le]&1024||(n[le]|=1024,Vl(n)&&vi(n))}function O0(n,t){for(;n>0;)t=t[or],n--;return t}function ws(n){return!!(n[le]&9216||n[Ut]?.dirty)}function Bl(n){n[kn].changeDetectionScheduler?.notify(8),n[le]&64&&(n[le]|=1024),ws(n)&&vi(n)}function vi(n){n[kn].changeDetectionScheduler?.notify(0);let t=hi(n);for(;t!==null&&!(t[le]&8192||(t[le]|=8192,!Vl(t)));)t=hi(t)}function wp(n,t){if(cr(n))throw new X(911,!1);n[Hn]===null&&(n[Hn]=[]),n[Hn].push(t)}function R0(n,t){if(n[Hn]===null)return;let e=n[Hn].indexOf(t);e!==-1&&n[Hn].splice(e,1)}function hi(n){let t=n[it];return gn(t)?t[it]:t}function Ep(n){return n[ro]??=[]}function Dp(n){return n.cleanup??=[]}function N0(n,t,e,i){let r=Ep(t);r.push(e),n.firstCreatePass&&Dp(n).push(i,r.length-1)}var he={lFrame:G0(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var Ku=!1;function A0(){return he.lFrame.elementDepthCount}function L0(){he.lFrame.elementDepthCount++}function Sp(){he.lFrame.elementDepthCount--}function jl(){return he.bindingsEnabled}function Mp(){return he.skipHydrationRootTNode!==null}function Tp(n){return he.skipHydrationRootTNode===n}function kp(){he.skipHydrationRootTNode=null}function oe(){return he.lFrame.lView}function We(){return he.lFrame.tView}function m(n){return he.lFrame.contextLView=n,n[Ue]}function g(n){return he.lFrame.contextLView=null,n}function rt(){let n=Ip();for(;n!==null&&n.type===64;)n=n.parent;return n}function Ip(){return he.lFrame.currentTNode}function F0(){let n=he.lFrame,t=n.currentTNode;return n.isParent?t:t.parent}function lo(n,t){let e=he.lFrame;e.currentTNode=n,e.isParent=t}function Pp(){return he.lFrame.isParent}function Op(){he.lFrame.isParent=!1}function V0(){return he.lFrame.contextLView}function Rp(){return Ku}function co(n){let t=Ku;return Ku=n,t}function Es(){let n=he.lFrame,t=n.bindingRootIndex;return t===-1&&(t=n.bindingRootIndex=n.tView.bindingStartIndex),t}function Np(){return he.lFrame.bindingIndex}function B0(n){return he.lFrame.bindingIndex=n}function dr(){return he.lFrame.bindingIndex++}function Ds(n){let t=he.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+n,e}function j0(){return he.lFrame.inI18n}function $0(n,t){let e=he.lFrame;e.bindingIndex=e.bindingRootIndex=n,$l(t)}function H0(){return he.lFrame.currentDirectiveIndex}function $l(n){he.lFrame.currentDirectiveIndex=n}function z0(n){let t=he.lFrame.currentDirectiveIndex;return t===-1?null:n[t]}function Hl(){return he.lFrame.currentQueryIndex}function Ss(n){he.lFrame.currentQueryIndex=n}function Fw(n){let t=n[re];return t.type===2?t.declTNode:t.type===1?n[It]:null}function Ap(n,t,e){if(e&4){let r=t,o=n;for(;r=r.parent,r===null&&!(e&1);)if(r=Fw(o),r===null||(o=o[or],r.type&10))break;if(r===null)return!1;t=r,n=o}let i=he.lFrame=U0();return i.currentTNode=t,i.lView=n,!0}function zl(n){let t=U0(),e=n[re];he.lFrame=t,t.currentTNode=e.firstChild,t.lView=n,t.tView=e,t.contextLView=n,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function U0(){let n=he.lFrame,t=n===null?null:n.child;return t===null?G0(n):t}function G0(n){let t={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=t),t}function W0(){let n=he.lFrame;return he.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}var Lp=W0;function Ul(){let n=W0();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 q0(n){return(he.lFrame.contextLView=O0(n,he.lFrame.contextLView))[Ue]}function on(){return he.lFrame.selectedIndex}function bi(n){he.lFrame.selectedIndex=n}function Ms(){let n=he.lFrame;return Cs(n.tView,n.selectedIndex)}function V(){he.lFrame.currentNamespace=hs}function fe(){Vw()}function Vw(){he.lFrame.currentNamespace=null}function Fp(){return he.lFrame.currentNamespace}var Z0=!0;function Gl(){return Z0}function Ts(n){Z0=n}function Xu(n,t=null,e=null,i){let r=Y0(n,t,e,i);return r.resolveInjectorInitializers(),r}function Y0(n,t=null,e=null,i,r=new Set){let o=[e||Xt,C0(n)];return i=i||(typeof n=="object"?void 0:fi(n)),new Ji(o,t||bs(),i||null,r)}var kt=class n{static THROW_IF_NOT_FOUND=Yi;static NULL=new fs;static create(t,e){if(Array.isArray(t))return Xu({name:""},e,t,"");{let i=t.name??"";return Xu({name:i},t.parent,t.providers,i)}}static \u0275prov=ce({token:n,providedIn:"any",factory:()=>_e(lp)});static __NG_ELEMENT_ID__=-1},mt=new se(""),ot=(()=>{class n{static __NG_ELEMENT_ID__=Bw;static __NG_ENV_ID__=e=>e}return n})(),ms=class extends ot{_lView;constructor(t){super(),this._lView=t}get destroyed(){return cr(this._lView)}onDestroy(t){let e=this._lView;return wp(e,t),()=>R0(e,t)}};function Bw(){return new ms(oe())}var zt=class{_console=console;handleError(t){this._console.error("ERROR",t)}},_n=new se("",{providedIn:"root",factory:()=>{let n=R(Vt),t;return e=>{n.destroyed&&!t?setTimeout(()=>{throw e}):(t??=n.get(zt),t.handleError(e))}}}),Q0={provide:nr,useValue:()=>{R(zt)},multi:!0};function v(n,t){let[e,i,r]=Cu(n,t?.equal),o=e,s=o[Ke];return o.set=i,o.update=r,o.asReadonly=Wl.bind(o),o}function Wl(){let n=this[Ke];if(n.readonlyFn===void 0){let t=()=>this();t[Ke]=n,n.readonlyFn=t}return n.readonlyFn}var ur=(()=>{class n{view;node;constructor(e,i){this.view=e,this.node=i}static __NG_ELEMENT_ID__=jw}return n})();function jw(){return new ur(oe(),rt())}var Jt=class{},ks=new se("",{providedIn:"root",factory:()=>!1});var Vp=new se(""),Bp=new se(""),yi=(()=>{class n{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new is(!1);get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new pe(e=>{e.next(!1),e.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let e=this.taskId++;return this.pendingTasks.add(e),e}has(e){return this.pendingTasks.has(e)}remove(e){this.pendingTasks.delete(e),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=ce({token:n,providedIn:"root",factory:()=>new n})}return n})(),uo=(()=>{class n{internalPendingTasks=R(yi);scheduler=R(Jt);errorHandler=R(_n);add(){let e=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(e)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(e))}}run(e){let i=this.add();e().catch(this.errorHandler).finally(i)}static \u0275prov=ce({token:n,providedIn:"root",factory:()=>new n})}return n})();function pr(...n){}var Is=(()=>{class n{static \u0275prov=ce({token:n,providedIn:"root",factory:()=>new Ju})}return n})(),Ju=class{dirtyEffectCount=0;queues=new Map;add(t){this.enqueue(t),this.schedule(t)}schedule(t){t.dirty&&this.dirtyEffectCount++}remove(t){let e=t.zone,i=this.queues.get(e);i.has(t)&&(i.delete(t),t.dirty&&this.dirtyEffectCount--)}enqueue(t){let e=t.zone;this.queues.has(e)||this.queues.set(e,new Set);let i=this.queues.get(e);i.has(t)||i.add(t)}flush(){for(;this.dirtyEffectCount>0;){let t=!1;for(let[e,i]of this.queues)e===null?t||=this.flushQueue(i):t||=e.run(()=>this.flushQueue(i));t||(this.dirtyEffectCount=0)}}flushQueue(t){let e=!1;for(let i of t)i.dirty&&(this.dirtyEffectCount--,e=!0,i.run());return e}};function Cc(n){return{toString:n}.toString()}var ql="__parameters__";function Yw(n){return function(...e){if(n){let i=n(...e);for(let r in i)this[r]=i[r]}}}function N_(n,t,e){return Cc(()=>{let i=Yw(t);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,h,_){let w=l.hasOwnProperty(ql)?l[ql]:Object.defineProperty(l,ql,{value:[]})[ql];for(;w.length<=_;)w.push(null);return(w[_]=w[_]||[]).push(s),l}}return r.prototype.ngMetadataName=n,r.annotationCls=r,r})}var Pf=sp(N_("Inject",n=>({token:n})),-1),Of=sp(N_("Optional"),8);function Qw(n){return typeof n=="function"}var rc=class{previousValue;currentValue;firstChange;constructor(t,e,i){this.previousValue=t,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}};function A_(n,t,e,i){t!==null?t.applyValueToInputSignal(t,i):n[e]=i}var zs=(()=>{let n=()=>L_;return n.ngInherit=!0,n})();function L_(n){return n.type.prototype.ngOnChanges&&(n.setInput=Xw),Kw}function Kw(){let n=V_(this),t=n?.current;if(t){let e=n.previous;if(e===mi)n.previous=t;else for(let i in t)e[i]=t[i];n.current=null,this.ngOnChanges(t)}}function Xw(n,t,e,i,r){let o=this.declaredInputs[i],s=V_(n)||Jw(n,{previous:mi,current:null}),a=s.current||(s.current={}),l=s.previous,h=l[o];a[o]=new rc(h&&h.currentValue,e,l===mi),A_(n,t,r,e)}var F_="__ngSimpleChanges__";function V_(n){return n[F_]||null}function Jw(n,t){return n[F_]=t}var K0=[];var Me=function(n,t=null,e){for(let i=0;i<K0.length;i++){let r=K0[i];r(n,t,e)}};function e1(n,t,e){let{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=t.type.prototype;if(i){let s=L_(t);(e.preOrderHooks??=[]).push(n,s),(e.preOrderCheckHooks??=[]).push(n,s)}r&&(e.preOrderHooks??=[]).push(0-n,r),o&&((e.preOrderHooks??=[]).push(n,o),(e.preOrderCheckHooks??=[]).push(n,o))}function B_(n,t){for(let e=t.directiveStart,i=t.directiveEnd;e<i;e++){let o=n.data[e].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:l,ngAfterViewChecked:h,ngOnDestroy:_}=o;s&&(n.contentHooks??=[]).push(-e,s),a&&((n.contentHooks??=[]).push(e,a),(n.contentCheckHooks??=[]).push(e,a)),l&&(n.viewHooks??=[]).push(-e,l),h&&((n.viewHooks??=[]).push(e,h),(n.viewCheckHooks??=[]).push(e,h)),_!=null&&(n.destroyHooks??=[]).push(e,_)}}function Jl(n,t,e){j_(n,t,3,e)}function ec(n,t,e,i){(n[le]&3)===e&&j_(n,t,e,i)}function jp(n,t){let e=n[le];(e&3)===t&&(e&=16383,e+=1,n[le]=e)}function j_(n,t,e,i){let r=i!==void 0?n[sr]&65535:0,o=i??-1,s=t.length-1,a=0;for(let l=r;l<s;l++)if(typeof t[l+1]=="number"){if(a=t[l],i!=null&&a>=i)break}else t[l]<0&&(n[sr]+=65536),(a<o||o==-1)&&(t1(n,e,t,l),n[sr]=(n[sr]&4294901760)+l+2),l++}function X0(n,t){Me(4,n,t);let e=ae(null);try{t.call(n)}finally{ae(e),Me(5,n,t)}}function t1(n,t,e,i){let r=e[i]<0,o=e[i+1],s=r?-e[i]:e[i],a=n[s];r?n[le]>>14<n[sr]>>16&&(n[le]&3)===t&&(n[le]+=16384,X0(a,o)):X0(a,o)}var fo=-1,_r=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(t,e,i,r){this.factory=t,this.name=r,this.canSeeViewProviders=e,this.injectImpl=i}};function n1(n){return(n.flags&8)!==0}function i1(n){return(n.flags&16)!==0}function r1(n,t,e){let i=0;for(;i<e.length;){let r=e[i];if(typeof r=="number"){if(r!==0)break;i++;let o=e[i++],s=e[i++],a=e[i++];n.setAttribute(t,s,a,o)}else{let o=r,s=e[++i];s1(o)?n.setProperty(t,o,s):n.setAttribute(t,o,s),i++}}return i}function o1(n){return n===3||n===4||n===6}function s1(n){return n.charCodeAt(0)===64}function go(n,t){if(!(t===null||t.length===0))if(n===null||n.length===0)n=t.slice();else{let e=-1;for(let i=0;i<t.length;i++){let r=t[i];typeof r=="number"?e=r:e===0||(e===-1||e===2?J0(n,e,r,null,t[++i]):J0(n,e,r,null,null))}}return n}function J0(n,t,e,i,r){let o=0,s=n.length;if(t===-1)s=-1;else for(;o<n.length;){let a=n[o++];if(typeof a=="number"){if(a===t){s=-1;break}else if(a>t){s=o-1;break}}}for(;o<n.length;){let a=n[o];if(typeof a=="number")break;if(a===e){r!==null&&(n[o+1]=r);return}o++,r!==null&&o++}s!==-1&&(n.splice(s,0,t),o=s+1),n.splice(o++,0,e),r!==null&&n.splice(o++,0,r)}function $_(n){return n!==fo}function oc(n){return n&32767}function a1(n){return n>>16}function sc(n,t){let e=a1(n),i=t;for(;e>0;)i=i[or],e--;return i}var Kp=!0;function ac(n){let t=Kp;return Kp=n,t}var l1=256,H_=l1-1,z_=5,c1=0,Rn={};function d1(n,t,e){let i;typeof e=="string"?i=e.charCodeAt(0)||0:e.hasOwnProperty(tr)&&(i=e[tr]),i==null&&(i=e[tr]=c1++);let r=i&H_,o=1<<r;t.data[n+(r>>z_)]|=o}function lc(n,t){let e=U_(n,t);if(e!==-1)return e;let i=t[re];i.firstCreatePass&&(n.injectorIndex=t.length,$p(i.data,n),$p(t,null),$p(i.blueprint,null));let r=Rf(n,t),o=n.injectorIndex;if($_(r)){let s=oc(r),a=sc(r,t),l=a[re].data;for(let h=0;h<8;h++)t[o+h]=a[s+h]|l[s+h]}return t[o+8]=r,o}function $p(n,t){n.push(0,0,0,0,0,0,0,0,t)}function U_(n,t){return n.injectorIndex===-1||n.parent&&n.parent.injectorIndex===n.injectorIndex||t[n.injectorIndex+8]===null?-1:n.injectorIndex}function Rf(n,t){if(n.parent&&n.parent.injectorIndex!==-1)return n.parent.injectorIndex;let e=0,i=null,r=t;for(;r!==null;){if(i=Y_(r),i===null)return fo;if(e++,r=r[or],i.injectorIndex!==-1)return i.injectorIndex|e<<16}return fo}function Xp(n,t,e){d1(n,t,e)}function G_(n,t,e){if(e&8||n!==void 0)return n;Ol(t,"NodeInjector")}function W_(n,t,e,i){if(e&8&&i===void 0&&(i=null),(e&3)===0){let r=n[Pt],o=Tt(void 0);try{return r?r.get(t,i,e&8):op(t,i,e&8)}finally{Tt(o)}}return G_(i,t,e)}function q_(n,t,e,i=0,r){if(n!==null){if(t[le]&2048&&!(i&2)){let s=h1(n,t,e,i,Rn);if(s!==Rn)return s}let o=Z_(n,t,e,i,Rn);if(o!==Rn)return o}return W_(t,e,i,r)}function Z_(n,t,e,i,r){let o=p1(e);if(typeof o=="function"){if(!Ap(t,n,i))return i&1?G_(r,e,i):W_(t,e,i,r);try{let s;if(s=o(i),s==null&&!(i&8))Ol(e);else return s}finally{Lp()}}else if(typeof o=="number"){let s=null,a=U_(n,t),l=fo,h=i&1?t[yt][It]:null;for((a===-1||i&4)&&(l=a===-1?Rf(n,t):t[a+8],l===fo||!t_(i,!1)?a=-1:(s=t[re],a=oc(l),t=sc(l,t)));a!==-1;){let _=t[re];if(e_(o,a,_.data)){let w=u1(a,t,e,s,i,h);if(w!==Rn)return w}l=t[a+8],l!==fo&&t_(i,t[re].data[a+8]===h)&&e_(o,a,t)?(s=_,a=oc(l),t=sc(l,t)):a=-1}}return r}function u1(n,t,e,i,r,o){let s=t[re],a=s.data[n+8],l=i==null?_i(a)&&Kp:i!=s&&(a.type&3)!==0,h=r&1&&o===a,_=tc(a,s,e,l,h);return _!==null?Rs(t,s,_,a,r):Rn}function tc(n,t,e,i,r){let o=n.providerIndexes,s=t.data,a=o&1048575,l=n.directiveStart,h=n.directiveEnd,_=o>>20,w=i?a:a+_,M=r?a+_:h;for(let T=w;T<M;T++){let A=s[T];if(T<l&&e===A||T>=l&&A.type===e)return T}if(r){let T=s[l];if(T&&On(T)&&T.type===e)return l}return null}function Rs(n,t,e,i,r){let o=n[e],s=t.data;if(o instanceof _r){let a=o;if(a.resolving){let T=f0(s[e]);throw rp(T)}let l=ac(a.canSeeViewProviders);a.resolving=!0;let h=s[e].type||s[e],_,w=a.injectImpl?Tt(a.injectImpl):null,M=Ap(n,i,0);try{o=n[e]=a.factory(void 0,r,s,n,i),t.firstCreatePass&&e>=i.directiveStart&&e1(e,s[e],t)}finally{w!==null&&Tt(w),ac(l),a.resolving=!1,Lp()}}return o}function p1(n){if(typeof n=="string")return n.charCodeAt(0)||0;let t=n.hasOwnProperty(tr)?n[tr]:void 0;return typeof t=="number"?t>=0?t&H_:f1:t}function e_(n,t,e){let i=1<<n;return!!(e[t+(n>>z_)]&i)}function t_(n,t){return!(n&2)&&!(n&1&&t)}var fr=class{_tNode;_lView;constructor(t,e){this._tNode=t,this._lView=e}get(t,e,i){return q_(this._tNode,this._lView,t,Qi(i),e)}};function f1(){return new fr(rt(),oe())}function h1(n,t,e,i,r){let o=n,s=t;for(;o!==null&&s!==null&&s[le]&2048&&!ao(s);){let a=Z_(o,s,e,i|2,Rn);if(a!==Rn)return a;let l=o.parent;if(!l){let h=s[mp];if(h){let _=h.get(e,Rn,i);if(_!==Rn)return _}l=Y_(s),s=s[or]}o=l}return r}function Y_(n){let t=n[re],e=t.type;return e===2?t.declTNode:e===1?n[It]:null}function m1(){return xo(rt(),oe())}function xo(n,t){return new Ot(Bt(n,t))}var Ot=(()=>{class n{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=m1}return n})();function Q_(n){return n instanceof Ot?n.nativeElement:n}function g1(){return this._results[Symbol.iterator]()}var cc=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 ze}constructor(t=!1){this._emitDistinctChangesOnly=t}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,e){this.dirty=!1;let i=v0(t);(this._changesDetected=!_0(this._results,i,e))&&(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(t){this._onDirty=t}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=g1};function K_(n){return(n.flags&128)===128}var Nf=(function(n){return n[n.OnPush=0]="OnPush",n[n.Default=1]="Default",n})(Nf||{}),X_=new Map,_1=0;function v1(){return _1++}function b1(n){X_.set(n[ys],n)}function Jp(n){X_.delete(n[ys])}var n_="__ngContext__";function _o(n,t){Pn(t)?(n[n_]=t[ys],b1(t)):n[n_]=t}function J_(n){return tv(n[oo])}function ev(n){return tv(n[en])}function tv(n){for(;n!==null&&!gn(n);)n=n[en];return n}var ef;function Af(n){ef=n}function Lf(){if(ef!==void 0)return ef;if(typeof document<"u")return document;throw new X(210,!1)}var wc=new se("",{providedIn:"root",factory:()=>y1}),y1="ng",Ec=new se(""),br=new se("",{providedIn:"platform",factory:()=>"unknown"});var Dc=new se("",{providedIn:"root",factory:()=>Lf().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var x1="h",C1="b";var nv="r";var iv="di";var rv=!1,ov=new se("",{providedIn:"root",factory:()=>rv});var w1=(n,t,e,i)=>{};function E1(n,t,e,i){w1(n,t,e,i)}function Sc(n){return(n.flags&32)===32}var D1=()=>null;function sv(n,t,e=!1){return D1(n,t,e)}function av(n,t){let e=n.contentQueries;if(e!==null){let i=ae(null);try{for(let r=0;r<e.length;r+=2){let o=e[r],s=e[r+1];if(s!==-1){let a=n.data[s];Ss(o),a.contentQueries(2,t[s],s)}}}finally{ae(i)}}}function tf(n,t,e){Ss(0);let i=ae(null);try{t(n,e)}finally{ae(i)}}function Ff(n,t,e){if(_p(t)){let i=ae(null);try{let r=t.directiveStart,o=t.directiveEnd;for(let s=r;s<o;s++){let a=n.data[s];if(a.contentQueries){let l=e[s];a.contentQueries(1,l,s)}}}finally{ae(i)}}}var Wn=(function(n){return n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",n})(Wn||{});var S1="svg",M1="math",T1={"http://www.w3.org/2000/svg":S1,"http://www.w3.org/1998/Math/MathML":M1},Zl;function k1(){if(Zl===void 0&&(Zl=null,fn.trustedTypes))try{Zl=fn.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return Zl}function Mc(n){return k1()?.createHTML(n)||n}var Yl;function I1(){if(Yl===void 0&&(Yl=null,fn.trustedTypes))try{Yl=fn.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return Yl}function i_(n){return I1()?.createHTML(n)||n}var dc=class{changingThisBreaksApplicationSecurity;constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Tl})`}};function Us(n){return n instanceof dc?n.changingThisBreaksApplicationSecurity:n}function Vf(n,t){let e=lv(n);if(e!=null&&e!==t){if(e==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${e} (see ${Tl})`)}return e===t}function lv(n){return n instanceof dc&&n.getTypeName()||null}function P1(n){let t=new rf(n);return O1()?new nf(t):t}var nf=class{inertDocumentHelper;constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t="<body><remove></remove>"+t;try{let e=new window.DOMParser().parseFromString(Mc(t),"text/html").body;return e===null?this.inertDocumentHelper.getInertBodyElement(t):(e.firstChild?.remove(),e)}catch{return null}}},rf=class{defaultDoc;inertDocument;constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){let e=this.inertDocument.createElement("template");return e.innerHTML=Mc(t),e}};function O1(){try{return!!new window.DOMParser().parseFromString(Mc(""),"text/html")}catch{return!1}}var R1=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Bf(n){return n=String(n),n.match(R1)?n:"unsafe:"+n}function qn(n){let t={};for(let e of n.split(","))t[e]=!0;return t}function Gs(...n){let t={};for(let e of n)for(let i in e)e.hasOwnProperty(i)&&(t[i]=!0);return t}var cv=qn("area,br,col,hr,img,wbr"),dv=qn("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),uv=qn("rp,rt"),N1=Gs(uv,dv),A1=Gs(dv,qn("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")),L1=Gs(uv,qn("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")),r_=Gs(cv,A1,L1,N1),pv=qn("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),F1=qn("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"),V1=qn("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"),B1=Gs(pv,F1,V1),j1=qn("script,style,template"),of=class{sanitizedSomething=!1;buf=[];sanitizeChildren(t){let e=t.firstChild,i=!0,r=[];for(;e;){if(e.nodeType===Node.ELEMENT_NODE?i=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,i&&e.firstChild){r.push(e),e=z1(e);continue}for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let o=H1(e);if(o){e=o;break}e=r.pop()}}return this.buf.join("")}startElement(t){let e=o_(t).toLowerCase();if(!r_.hasOwnProperty(e))return this.sanitizedSomething=!0,!j1.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);let i=t.attributes;for(let r=0;r<i.length;r++){let o=i.item(r),s=o.name,a=s.toLowerCase();if(!B1.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=o.value;pv[a]&&(l=Bf(l)),this.buf.push(" ",s,'="',s_(l),'"')}return this.buf.push(">"),!0}endElement(t){let e=o_(t).toLowerCase();r_.hasOwnProperty(e)&&!cv.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))}chars(t){this.buf.push(s_(t))}};function $1(n,t){return(n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function H1(n){let t=n.nextSibling;if(t&&n!==t.previousSibling)throw fv(t);return t}function z1(n){let t=n.firstChild;if(t&&$1(n,t))throw fv(t);return t}function o_(n){let t=n.nodeName;return typeof t=="string"?t:"FORM"}function fv(n){return new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`)}var U1=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,G1=/([^\#-~ |!])/g;function s_(n){return n.replace(/&/g,"&amp;").replace(U1,function(t){let e=t.charCodeAt(0),i=t.charCodeAt(1);return"&#"+((e-55296)*1024+(i-56320)+65536)+";"}).replace(G1,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Ql;function hv(n,t){let e=null;try{Ql=Ql||P1(n);let i=t?String(t):"";e=Ql.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=e.innerHTML,e=Ql.getInertBodyElement(i)}while(i!==o);let a=new of().sanitizeChildren(a_(e)||e);return Mc(a)}finally{if(e){let i=a_(e)||e;for(;i.firstChild;)i.firstChild.remove()}}}function a_(n){return"content"in n&&W1(n)?n.content:null}function W1(n){return n.nodeType===Node.ELEMENT_NODE&&n.nodeName==="TEMPLATE"}var q1=/^>|^->|<!--|-->|--!>|<!-$/g,Z1=/(<|>)/g,Y1="\u200B$1\u200B";function Q1(n){return n.replace(q1,t=>t.replace(Z1,Y1))}function K1(n,t){return n.createText(t)}function X1(n,t,e){n.setValue(t,e)}function J1(n,t){return n.createComment(Q1(t))}function mv(n,t,e){return n.createElement(t,e)}function uc(n,t,e,i,r){n.insertBefore(t,e,i,r)}function gv(n,t,e){n.appendChild(t,e)}function l_(n,t,e,i,r){i!==null?uc(n,t,e,i,r):gv(n,t,e)}function _v(n,t,e,i){n.removeChild(null,t,e,i)}function eE(n,t,e){n.setAttribute(t,"style",e)}function tE(n,t,e){e===""?n.removeAttribute(t,"class"):n.setAttribute(t,"class",e)}function vv(n,t,e){let{mergedAttrs:i,classes:r,styles:o}=e;i!==null&&r1(n,t,i),r!==null&&tE(n,t,r),o!==null&&eE(n,t,o)}function nE(n,t=!0){if(n[0]!=":")return[null,n];let e=n.indexOf(":",1);if(e===-1){if(t)throw new Error(`Unsupported format "${n}" expecting ":namespace:name"`);return[null,n]}return[n.slice(1,e),n.slice(e+1)]}function jf(n,t,e){if(t!==void 0&&e!==void 0&&iE(t,e)!==Mt.HTML)return n;let i=bv();return i?i_(i.sanitize(Mt.HTML,n)||""):Vf(n,"HTML")?i_(Us(n)):hv(Lf(),hn(n))}function yr(n){let t=bv();return t?t.sanitize(Mt.URL,n)||"":Vf(n,"URL")?Us(n):Bf(hn(n))}function bv(){let n=oe();return n&&n[kn].sanitizer}function iE(n,t){let[e,i]=rE(n);return k0(i,t,e)}function rE(n){n=n.toLowerCase();let t=nE(n,!1);if(t[0])return t;let i=on()===-1?null:Ms(),r=i?.namespace;if(n==="#host"&&i?.type===2){let o=Bt(i,oe());if(o.tagName&&(n=o.tagName.toLowerCase()),r==null){let s=o.namespaceURI;r=s&&T1[s]}}return[r,n]}function $f(n){return n.ownerDocument.defaultView}function qe(n){return n.ownerDocument}function oE(n,t,e){let i=n.length;for(;;){let r=n.indexOf(t,e);if(r===-1)return r;if(r===0||n.charCodeAt(r-1)<=32){let o=t.length;if(r+o===i||n.charCodeAt(r+o)<=32)return r}e=r+1}}var yv="ng-template";function sE(n,t,e,i){let r=0;if(i){for(;r<t.length&&typeof t[r]=="string";r+=2)if(t[r]==="class"&&oE(t[r+1].toLowerCase(),e,0)!==-1)return!0}else if(Hf(n))return!1;if(r=t.indexOf(1,r),r>-1){let o;for(;++r<t.length&&typeof(o=t[r])=="string";)if(o.toLowerCase()===e)return!0}return!1}function Hf(n){return n.type===4&&n.value!==yv}function aE(n,t,e){let i=n.type===4&&!e?yv:n.value;return t===i}function lE(n,t,e){let i=4,r=n.attrs,o=r!==null?uE(r):0,s=!1;for(let a=0;a<t.length;a++){let l=t[a];if(typeof l=="number"){if(!s&&!vn(i)&&!vn(l))return!1;if(s&&vn(l))continue;s=!1,i=l|i&1;continue}if(!s)if(i&4){if(i=2|i&1,l!==""&&!aE(n,l,e)||l===""&&t.length===1){if(vn(i))return!1;s=!0}}else if(i&8){if(r===null||!sE(n,r,l,e)){if(vn(i))return!1;s=!0}}else{let h=t[++a],_=cE(l,r,Hf(n),e);if(_===-1){if(vn(i))return!1;s=!0;continue}if(h!==""){let w;if(_>o?w="":w=r[_+1].toLowerCase(),i&2&&h!==w){if(vn(i))return!1;s=!0}}}}return vn(i)||s}function vn(n){return(n&1)===0}function cE(n,t,e,i){if(t===null)return-1;let r=0;if(i||!e){let o=!1;for(;r<t.length;){let s=t[r];if(s===n)return r;if(s===3||s===6)o=!0;else if(s===1||s===2){let a=t[++r];for(;typeof a=="string";)a=t[++r];continue}else{if(s===4)break;if(s===0){r+=4;continue}}r+=o?1:2}return-1}else return pE(t,n)}function xv(n,t,e=!1){for(let i=0;i<t.length;i++)if(lE(n,t[i],e))return!0;return!1}function dE(n){let t=n.attrs;if(t!=null){let e=t.indexOf(5);if((e&1)===0)return t[e+1]}return null}function uE(n){for(let t=0;t<n.length;t++){let e=n[t];if(o1(e))return t}return n.length}function pE(n,t){let e=n.indexOf(4);if(e>-1)for(e++;e<n.length;){let i=n[e];if(typeof i=="number")return-1;if(i===t)return e;e++}return-1}function fE(n,t){e:for(let e=0;e<t.length;e++){let i=t[e];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 c_(n,t){return n?":not("+t.trim()+")":t}function hE(n){let t=n[0],e=1,i=2,r="",o=!1;for(;e<n.length;){let s=n[e];if(typeof s=="string")if(i&2){let a=n[++e];r+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else i&8?r+="."+s:i&4&&(r+=" "+s);else r!==""&&!vn(s)&&(t+=c_(o,r),r=""),i=s,o=o||!vn(i);e++}return r!==""&&(t+=c_(o,r)),t}function mE(n){return n.map(hE).join(",")}function gE(n){let t=[],e=[],i=1,r=2;for(;i<n.length;){let o=n[i];if(typeof o=="string")r===2?o!==""&&t.push(o,n[++i]):r===8&&e.push(o);else{if(!vn(r))break;r=o}i++}return e.length&&t.push(1,...e),t}var gt={};function zf(n,t,e,i,r,o,s,a,l,h,_){let w=Ae+i,M=w+r,T=_E(w,M),A=typeof h=="function"?h():h;return T[re]={type:n,blueprint:T,template:e,queries:null,viewQuery:a,declTNode:t,data:T.slice().fill(null,w),bindingStartIndex:w,expandoStartIndex:M,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:A,incompleteFirstPass:!1,ssrId:_}}function _E(n,t){let e=[];for(let i=0;i<t;i++)e.push(i<n?null:gt);return e}function vE(n){let t=n.tView;return t===null||t.incompleteFirstPass?n.tView=zf(1,null,n.template,n.decls,n.vars,n.directiveDefs,n.pipeDefs,n.viewQuery,n.schemas,n.consts,n.id):t}function Uf(n,t,e,i,r,o,s,a,l,h,_){let w=t.blueprint.slice();return w[mn]=r,w[le]=i|4|128|8|64|1024,(h!==null||n&&n[le]&2048)&&(w[le]|=2048),xp(w),w[it]=w[or]=n,w[Ue]=e,w[kn]=s||n&&n[kn],w[ke]=a||n&&n[ke],w[Pt]=l||n&&n[Pt]||null,w[It]=o,w[ys]=v1(),w[rr]=_,w[mp]=h,w[yt]=t.type==2?n[yt]:w,w}function bE(n,t,e){let i=Bt(t,n),r=vE(e),o=n[kn].rendererFactory,s=Gf(n,Uf(n,r,null,Cv(e),i,t,null,o.createRenderer(i,e),null,null,null));return n[t.index]=s}function Cv(n){let t=16;return n.signals?t=4096:n.onPush&&(t=64),t}function wv(n,t,e,i){if(e===0)return-1;let r=t.length;for(let o=0;o<e;o++)t.push(i),n.blueprint.push(i),n.data.push(null);return r}function Gf(n,t){return n[oo]?n[hp][en]=t:n[oo]=t,n[hp]=t,t}function c(n=1){Ev(We(),oe(),on()+n,!1)}function Ev(n,t,e,i){if(!i)if((t[le]&3)===3){let o=n.preOrderCheckHooks;o!==null&&Jl(t,o,e)}else{let o=n.preOrderHooks;o!==null&&ec(t,o,0,e)}bi(e)}var Tc=(function(n){return n[n.None=0]="None",n[n.SignalBased=1]="SignalBased",n[n.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",n})(Tc||{});function sf(n,t,e,i){let r=ae(null);try{let[o,s,a]=n.inputs[e],l=null;(s&Tc.SignalBased)!==0&&(l=t[o][Ke]),l!==null&&l.transformFn!==void 0?i=l.transformFn(i):a!==null&&(i=a.call(t,i)),n.setInput!==null?n.setInput(t,l,i,e,o):A_(t,l,o,i)}finally{ae(r)}}var Nn=(function(n){return n[n.Important=1]="Important",n[n.DashCase=2]="DashCase",n})(Nn||{}),yE;function Wf(n,t){return yE(n,t)}function pc(n){if(!n)return 0;let t=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*t}function ho(n,t){return n.getPropertyValue(t).split(",").map(i=>i.trim())}function xE(n){let t=ho(n,"transition-property"),e=ho(n,"transition-duration"),i=ho(n,"transition-delay"),r={propertyName:"",duration:0,animationName:void 0};for(let o=0;o<t.length;o++){let s=pc(i[o])+pc(e[o]);s>r.duration&&(r.propertyName=t[o],r.duration=s)}return r}function CE(n){let t=ho(n,"animation-name"),e=ho(n,"animation-delay"),i=ho(n,"animation-duration"),r={animationName:"",propertyName:void 0,duration:0};for(let o=0;o<t.length;o++){let s=pc(e[o])+pc(i[o]);s>r.duration&&(r.animationName=t[o],r.duration=s)}return r}function Dv(n,t){return n!==void 0&&n.duration>t.duration}function Sv(n){return(n.animationName!=null||n.propertyName!=null)&&n.duration>0}function wE(n,t){let e=getComputedStyle(n),i=CE(e),r=xE(e),o=i.duration>r.duration?i:r;Dv(t.get(n),o)||Sv(o)&&t.set(n,o)}function Mv(n,t,e){if(!e)return;let i=n.getAnimations();return i.length===0?wE(n,t):EE(n,t,i)}function EE(n,t,e){let i={animationName:void 0,propertyName:void 0,duration:0};for(let r of e){let o=r.effect?.getTiming(),s=typeof o?.duration=="number"?o.duration:0,a=(o?.delay??0)+s,l,h;r.animationName?h=r.animationName:l=r.transitionProperty,a>=i.duration&&(i={animationName:h,propertyName:l,duration:a})}Dv(t.get(n),i)||Sv(i)&&t.set(n,i)}var xi=new Set,kc=(function(n){return n[n.CHANGE_DETECTION=0]="CHANGE_DETECTION",n[n.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",n})(kc||{}),Ei=new se(""),d_=new Set;function Ln(n){d_.has(n)||(d_.add(n),performance?.mark?.("mark_feature_usage",{detail:{feature:n}}))}var Tv=!1,af=class extends ze{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(t=!1){super(),this.__isAsync=t,S0()&&(this.destroyRef=R(ot,{optional:!0})??void 0,this.pendingTasks=R(yi,{optional:!0})??void 0)}emit(t){let e=ae(null);try{super.next(t)}finally{ae(e)}}subscribe(t,e,i){let r=t,o=e||(()=>null),s=i;if(t&&typeof t=="object"){let l=t;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 t instanceof Be&&t.add(a),a}wrapInTimeout(t){return e=>{let i=this.pendingTasks?.add();setTimeout(()=>{try{t(e)}finally{i!==void 0&&this.pendingTasks?.remove(i)}})}}},yn=af;function kv(n){let t,e;function i(){n=pr;try{e!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{n(),i()}),typeof requestAnimationFrame=="function"&&(e=requestAnimationFrame(()=>{n(),i()})),()=>i()}function u_(n){return queueMicrotask(()=>n()),()=>{n=pr}}var qf="isAngularZone",fc=qf+"_ID",DE=0,we=class n{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new yn(!1);onMicrotaskEmpty=new yn(!1);onStable=new yn(!1);onError=new yn(!1);constructor(t){let{enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:i=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=Tv}=t;if(typeof Zone>"u")throw new X(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)),e&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!r&&i,s.shouldCoalesceRunChangeDetection=r,s.callbackScheduled=!1,s.scheduleInRootZone=o,TE(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(qf)===!0}static assertInAngularZone(){if(!n.isInAngularZone())throw new X(909,!1)}static assertNotInAngularZone(){if(n.isInAngularZone())throw new X(909,!1)}run(t,e,i){return this._inner.run(t,e,i)}runTask(t,e,i,r){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,t,SE,pr,pr);try{return o.runTask(s,e,i)}finally{o.cancelTask(s)}}runGuarded(t,e,i){return this._inner.runGuarded(t,e,i)}runOutsideAngular(t){return this._outer.run(t)}},SE={};function Zf(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 ME(n){if(n.isCheckStableRunning||n.callbackScheduled)return;n.callbackScheduled=!0;function t(){kv(()=>{n.callbackScheduled=!1,lf(n),n.isCheckStableRunning=!0,Zf(n),n.isCheckStableRunning=!1})}n.scheduleInRootZone?Zone.root.run(()=>{t()}):n._outer.run(()=>{t()}),lf(n)}function TE(n){let t=()=>{ME(n)},e=DE++;n._inner=n._inner.fork({name:"angular",properties:{[qf]:!0,[fc]:e,[fc+e]:!0},onInvokeTask:(i,r,o,s,a,l)=>{if(kE(l))return i.invokeTask(o,s,a,l);try{return p_(n),i.invokeTask(o,s,a,l)}finally{(n.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||n.shouldCoalesceRunChangeDetection)&&t(),f_(n)}},onInvoke:(i,r,o,s,a,l,h)=>{try{return p_(n),i.invoke(o,s,a,l,h)}finally{n.shouldCoalesceRunChangeDetection&&!n.callbackScheduled&&!IE(l)&&t(),f_(n)}},onHasTask:(i,r,o,s)=>{i.hasTask(o,s),r===o&&(s.change=="microTask"?(n._hasPendingMicrotasks=s.microTask,lf(n),Zf(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 lf(n){n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&n.callbackScheduled===!0?n.hasPendingMicrotasks=!0:n.hasPendingMicrotasks=!1}function p_(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function f_(n){n._nesting--,Zf(n)}var hc=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new yn;onMicrotaskEmpty=new yn;onStable=new yn;onError=new yn;run(t,e,i){return t.apply(e,i)}runGuarded(t,e,i){return t.apply(e,i)}runOutsideAngular(t){return t()}runTask(t,e,i,r){return t.apply(e,i)}};function kE(n){return Iv(n,"__ignore_ng_zone__")}function IE(n){return Iv(n,"__scheduler_tick__")}function Iv(n,t){return!Array.isArray(n)||n.length!==1?!1:n[0]?.data?.[t]===!0}var Ic=(()=>{class n{impl=null;execute(){this.impl?.execute()}static \u0275prov=ce({token:n,providedIn:"root",factory:()=>new n})}return n})(),Yf=[0,1,2,3],Qf=(()=>{class n{ngZone=R(we);scheduler=R(Jt);errorHandler=R(zt,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){R(Ei,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Me(16),this.executing=!0;for(let i of Yf)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(),e&&Me(17)}register(e){let{view:i}=e;i!==void 0?((i[ar]??=[]).push(e),vi(i),i[le]|=8192):this.executing?this.deferredRegistrations.add(e):this.addSequence(e)}addSequence(e){this.sequences.add(e),this.scheduler.notify(7)}unregister(e){this.executing&&this.sequences.has(e)?(e.erroredOrDestroyed=!0,e.pipelinedValue=void 0,e.once=!0):(this.sequences.delete(e),this.deferredRegistrations.delete(e))}maybeTrace(e,i){return i?i.run(kc.AFTER_NEXT_RENDER,e):e()}static \u0275prov=ce({token:n,providedIn:"root",factory:()=>new n})}return n})(),Ns=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(t,e,i,r,o,s=null){this.impl=t,this.hooks=e,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 t=this.view?.[ar];t&&(this.view[ar]=t.filter(e=>e!==this))}};function Pc(n,t){let e=t?.injector??R(kt);return Ln("NgAfterNextRender"),OE(n,e,t,!0)}function PE(n){return n instanceof Function?[void 0,void 0,n,void 0]:[n.earlyRead,n.write,n.mixedReadWrite,n.read]}function OE(n,t,e,i){let r=t.get(Ic);r.impl??=t.get(Qf);let o=t.get(Ei,null,{optional:!0}),s=e?.manualCleanup!==!0?t.get(ot):null,a=t.get(ur,null,{optional:!0}),l=new Ns(r.impl,PE(n),a?.view,i,s,o?.snapshot(null));return r.impl.register(l),l}var Oc=new se("",{providedIn:"root",factory:()=>({queue:new Set,isScheduled:!1,scheduler:null})});function Pv(n,t,e){let i=n.get(Oc);if(Array.isArray(t))for(let r of t)i.queue.add(r),e?.detachedLeaveAnimationFns?.push(r);else i.queue.add(t),e?.detachedLeaveAnimationFns?.push(t);i.scheduler&&i.scheduler(n)}function RE(n,t){let e=n.get(Oc);if(t.detachedLeaveAnimationFns){for(let i of t.detachedLeaveAnimationFns)e.queue.delete(i);t.detachedLeaveAnimationFns=void 0}}function NE(n){let t=n.get(Oc);t.isScheduled||(Pc(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:n}),t.isScheduled=!0)}function Ov(n){let t=n.get(Oc);t.scheduler=NE,t.scheduler(n)}function Rv(n,t){for(let[e,i]of t)Pv(n,i.animateFns)}function h_(n,t,e,i){let r=n?.[Gn]?.enter;t!==null&&r&&r.has(e.index)&&Rv(i,r)}function po(n,t,e,i,r,o,s,a){if(r!=null){let l,h=!1;gn(r)?l=r:Pn(r)&&(h=!0,r=r[mn]);let _=tn(r);n===0&&i!==null?(h_(a,i,o,e),s==null?gv(t,i,_):uc(t,i,_,s||null,!0)):n===1&&i!==null?(h_(a,i,o,e),uc(t,i,_,s||null,!0)):n===2?m_(a,o,e,w=>{_v(t,_,h,w)}):n===3&&m_(a,o,e,()=>{t.destroyNode(_)}),l!=null&&GE(t,n,e,l,o,i,s)}}function AE(n,t){Nv(n,t),t[mn]=null,t[It]=null}function LE(n,t,e,i,r,o){i[mn]=r,i[It]=t,Nc(n,i,e,1,r,o)}function Nv(n,t){t[kn].changeDetectionScheduler?.notify(9),Nc(n,t,t[ke],2,null,null)}function FE(n){let t=n[oo];if(!t)return Hp(n[re],n);for(;t;){let e=null;if(Pn(t))e=t[oo];else{let i=t[Ge];i&&(e=i)}if(!e){for(;t&&!t[en]&&t!==n;)Pn(t)&&Hp(t[re],t),t=t[it];t===null&&(t=n),Pn(t)&&Hp(t[re],t),e=t&&t[en]}t=e}}function Kf(n,t){let e=n[lr],i=e.indexOf(t);e.splice(i,1)}function Rc(n,t){if(cr(t))return;let e=t[ke];e.destroyNode&&Nc(n,t,e,3,null,null),FE(t)}function Hp(n,t){if(cr(t))return;let e=ae(null);try{t[le]&=-129,t[le]|=256,t[Ut]&&li(t[Ut]),jE(n,t),BE(n,t),t[re].type===1&&t[ke].destroy();let i=t[zn];if(i!==null&&gn(t[it])){i!==t[it]&&Kf(i,t);let r=t[In];r!==null&&r.detachView(n)}Jp(t)}finally{ae(e)}}function m_(n,t,e,i){let r=n?.[Gn];if(r==null||r.leave==null||!r.leave.has(t.index))return i(!1);n&&xi.add(n),Pv(e,()=>{if(r.leave&&r.leave.has(t.index)){let s=r.leave.get(t.index),a=[];if(s){for(let l=0;l<s.animateFns.length;l++){let h=s.animateFns[l],{promise:_}=h();a.push(_)}r.detachedLeaveAnimationFns=void 0}r.running=Promise.allSettled(a),VE(n,i)}else n&&xi.delete(n),i(!1)},r)}function VE(n,t){let e=n[Gn]?.running;if(e){e.then(()=>{n[Gn].running=void 0,xi.delete(n),t(!0)});return}t(!1)}function BE(n,t){let e=n.cleanup,i=t[ro];if(e!==null)for(let s=0;s<e.length-1;s+=2)if(typeof e[s]=="string"){let a=e[s+3];a>=0?i[a]():i[-a].unsubscribe(),s+=2}else{let a=i[e[s+1]];e[s].call(a)}i!==null&&(t[ro]=null);let r=t[Hn];if(r!==null){t[Hn]=null;for(let s=0;s<r.length;s++){let a=r[s];a()}}let o=t[Un];if(o!==null){t[Un]=null;for(let s of o)s.destroy()}}function jE(n,t){let e;if(n!=null&&(e=n.destroyHooks)!=null)for(let i=0;i<e.length;i+=2){let r=t[e[i]];if(!(r instanceof _r)){let o=e[i+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){let a=r[o[s]],l=o[s+1];Me(4,a,l);try{l.call(a)}finally{Me(5,a,l)}}else{Me(4,r,o);try{o.call(r)}finally{Me(5,r,o)}}}}}function Av(n,t,e){return $E(n,t.parent,e)}function $E(n,t,e){let i=t;for(;i!==null&&i.type&168;)t=i,i=t.parent;if(i===null)return e[mn];if(_i(i)){let{encapsulation:r}=n.data[i.directiveStart+i.componentOffset];if(r===Wn.None||r===Wn.Emulated)return null}return Bt(i,e)}function Lv(n,t,e){return zE(n,t,e)}function HE(n,t,e){return n.type&40?Bt(n,e):null}var zE=HE,g_;function Xf(n,t,e,i){let r=Av(n,i,t),o=t[ke],s=i.parent||t[It],a=Lv(s,i,t);if(r!=null)if(Array.isArray(e))for(let l=0;l<e.length;l++)l_(o,r,e[l],a,!1);else l_(o,r,e,a,!1);g_!==void 0&&g_(o,i,t,e,r)}function Ps(n,t){if(t!==null){let e=t.type;if(e&3)return Bt(t,n);if(e&4)return mc(-1,n[t.index]);if(e&8){let i=t.child;if(i!==null)return Ps(n,i);{let r=n[t.index];return gn(r)?mc(-1,r):tn(r)}}else{if(e&128)return Ps(n,t.next);if(e&32)return Wf(t,n)()||tn(n[t.index]);{let i=Fv(n,t);if(i!==null){if(Array.isArray(i))return i[0];let r=hi(n[yt]);return Ps(r,i)}else return Ps(n,t.next)}}}return null}function Fv(n,t){if(t!==null){let i=n[yt][It],r=t.projection;return i.projection[r]}return null}function mc(n,t){let e=Ge+n+1;if(e<t.length){let i=t[e],r=i[re].firstChild;if(r!==null)return Ps(i,r)}return t[gi]}function Jf(n,t,e,i,r,o,s){for(;e!=null;){let a=i[Pt];if(e.type===128){e=e.next;continue}let l=i[e.index],h=e.type;if(s&&t===0&&(l&&_o(tn(l),i),e.flags|=2),!Sc(e))if(h&8)Jf(n,t,e.child,i,r,o,!1),po(t,n,a,r,l,e,o,i);else if(h&32){let _=Wf(e,i),w;for(;w=_();)po(t,n,a,r,w,e,o,i);po(t,n,a,r,l,e,o,i)}else h&16?Vv(n,t,i,e,r,o):po(t,n,a,r,l,e,o,i);e=s?e.projectionNext:e.next}}function Nc(n,t,e,i,r,o){Jf(e,i,n.firstChild,t,r,o,!1)}function UE(n,t,e){let i=t[ke],r=Av(n,e,t),o=e.parent||t[It],s=Lv(o,e,t);Vv(i,0,t,e,r,s)}function Vv(n,t,e,i,r,o){let s=e[yt],l=s[It].projection[i.projection];if(Array.isArray(l))for(let h=0;h<l.length;h++){let _=l[h];po(t,n,e[Pt],r,_,i,o,e)}else{let h=l,_=s[it];K_(i)&&(h.flags|=128),Jf(n,t,h,_,r,o,!0)}}function GE(n,t,e,i,r,o,s){let a=i[gi],l=tn(i);a!==l&&po(t,n,e,o,a,r,s);for(let h=Ge;h<i.length;h++){let _=i[h];Nc(_[re],_,n,t,o,a)}}function WE(n,t,e,i,r){if(t)r?n.addClass(e,i):n.removeClass(e,i);else{let o=i.indexOf("-")===-1?void 0:Nn.DashCase;r==null?n.removeStyle(e,i,o):(typeof r=="string"&&r.endsWith("!important")&&(r=r.slice(0,-10),o|=Nn.Important),n.setStyle(e,i,r,o))}}function Bv(n,t,e,i,r){let o=on(),s=i&2;try{bi(-1),s&&t.length>Ae&&Ev(n,t,Ae,!1),Me(s?2:0,r,e),e(i,r)}finally{bi(o),Me(s?3:1,r,e)}}function Ac(n,t,e){JE(n,t,e),(e.flags&64)===64&&eD(n,t,e)}function Ws(n,t,e=Bt){let i=t.localNames;if(i!==null){let r=t.index+1;for(let o=0;o<i.length;o+=2){let s=i[o+1],a=s===-1?e(t,n):n[s];n[r++]=a}}}function qE(n,t,e,i){let o=i.get(ov,rv)||e===Wn.ShadowDom,s=n.selectRootElement(t,o);return ZE(s),s}function ZE(n){YE(n)}var YE=()=>null;function QE(n){return n==="class"?"className":n==="for"?"htmlFor":n==="formaction"?"formAction":n==="innerHtml"?"innerHTML":n==="readonly"?"readOnly":n==="tabindex"?"tabIndex":n}function KE(n,t,e,i,r,o){let s=t[re];if(ih(n,s,t,e,i)){_i(n)&&XE(t,n.index);return}n.type&3&&(e=QE(e)),jv(n,t,e,i,r,o)}function jv(n,t,e,i,r,o){if(n.type&3){let s=Bt(n,t);i=o!=null?o(i,n.value||"",e):i,r.setProperty(s,e,i)}else n.type&12}function XE(n,t){let e=nn(t,n);e[le]&16||(e[le]|=64)}function JE(n,t,e){let i=e.directiveStart,r=e.directiveEnd;_i(e)&&bE(t,e,n.data[i+e.componentOffset]),n.firstCreatePass||lc(e,t);let o=e.initialInputs;for(let s=i;s<r;s++){let a=n.data[s],l=Rs(t,n,s,e);if(_o(l,t),o!==null&&rD(t,s-i,l,a,e,o),On(a)){let h=nn(e.index,t);h[Ue]=Rs(t,n,s,e)}}}function eD(n,t,e){let i=e.directiveStart,r=e.directiveEnd,o=e.index,s=H0();try{bi(o);for(let a=i;a<r;a++){let l=n.data[a],h=t[a];$l(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&tD(l,h)}}finally{bi(-1),$l(s)}}function tD(n,t){n.hostBindings!==null&&n.hostBindings(1,t)}function eh(n,t){let e=n.directiveRegistry,i=null;if(e)for(let r=0;r<e.length;r++){let o=e[r];xv(t,o.selectors,!1)&&(i??=[],On(o)?i.unshift(o):i.push(o))}return i}function nD(n,t,e,i,r,o){let s=Bt(n,t);iD(t[ke],s,o,n.value,e,i,r)}function iD(n,t,e,i,r,o,s){if(o==null)n.removeAttribute(t,r,e);else{let a=s==null?hn(o):s(o,i||"",r);n.setAttribute(t,r,a,e)}}function rD(n,t,e,i,r,o){let s=o[t];if(s!==null)for(let a=0;a<s.length;a+=2){let l=s[a],h=s[a+1];sf(i,e,l,h)}}function th(n,t,e,i,r){let o=Ae+e,s=t[re],a=r(s,t,n,i,e);t[o]=a,lo(n,!0);let l=n.type===2;return l?(vv(t[ke],a,n),(A0()===0||so(n))&&_o(a,t),L0()):_o(a,t),Gl()&&(!l||!Sc(n))&&Xf(s,t,a,n),n}function nh(n){let t=n;return Pp()?Op():(t=t.parent,lo(t,!1)),t}function oD(n,t){let e=n[Pt];if(!e)return;let i;try{i=e.get(_n,null)}catch{i=null}i?.(t)}function ih(n,t,e,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 h=s[l],_=s[l+1],w=t.data[h];sf(w,e[h],_,r),a=!0}if(o)for(let l of o){let h=e[l],_=t.data[l];sf(_,h,i,r),a=!0}return a}function sD(n,t){let e=nn(t,n),i=e[re];aD(i,e);let r=e[mn];r!==null&&e[rr]===null&&(e[rr]=sv(r,e[Pt])),Me(18),rh(i,e,e[Ue]),Me(19,e[Ue])}function aD(n,t){for(let e=t.length;e<n.blueprint.length;e++)t.push(n.blueprint[e])}function rh(n,t,e){zl(t);try{let i=n.viewQuery;i!==null&&tf(1,i,e);let r=n.template;r!==null&&Bv(n,t,r,1,e),n.firstCreatePass&&(n.firstCreatePass=!1),t[In]?.finishViewCreation(n),n.staticContentQueries&&av(n,t),n.staticViewQueries&&tf(2,n.viewQuery,e);let o=n.components;o!==null&&lD(t,o)}catch(i){throw n.firstCreatePass&&(n.incompleteFirstPass=!0,n.firstCreatePass=!1),i}finally{t[le]&=-5,Ul()}}function lD(n,t){for(let e=0;e<t.length;e++)sD(n,t[e])}function qs(n,t,e,i){let r=ae(null);try{let o=t.tView,a=n[le]&4096?4096:16,l=Uf(n,o,e,a,null,t,null,null,i?.injector??null,i?.embeddedViewInjector??null,i?.dehydratedView??null),h=n[t.index];l[zn]=h;let _=n[In];return _!==null&&(l[In]=_.createEmbeddedView(o)),rh(o,l,e),l}finally{ae(r)}}function vo(n,t){return!t||t.firstChild===null||K_(n)}function As(n,t,e,i,r=!1){for(;e!==null;){if(e.type===128){e=r?e.projectionNext:e.next;continue}let o=t[e.index];o!==null&&i.push(tn(o)),gn(o)&&$v(o,i);let s=e.type;if(s&8)As(n,t,e.child,i);else if(s&32){let a=Wf(e,t),l;for(;l=a();)i.push(l)}else if(s&16){let a=Fv(t,e);if(Array.isArray(a))i.push(...a);else{let l=hi(t[yt]);As(l[re],l,a,i,!0)}}e=r?e.projectionNext:e.next}return i}function $v(n,t){for(let e=Ge;e<n.length;e++){let i=n[e],r=i[re].firstChild;r!==null&&As(i[re],i,r,t)}n[gi]!==n[mn]&&t.push(n[gi])}function Hv(n){if(n[ar]!==null){for(let t of n[ar])t.impl.addSequence(t);n[ar].length=0}}var zv=[];function cD(n){return n[Ut]??dD(n)}function dD(n){let t=zv.pop()??Object.create(pD);return t.lView=n,t}function uD(n){n.lView[Ut]!==n&&(n.lView=null,zv.push(n))}var pD=ie(z({},oi),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:n=>{vi(n.lView)},consumerOnSignalRead(){this.lView[Ut]=this}});function fD(n){let t=n[Ut]??Object.create(hD);return t.lView=n,t}var hD=ie(z({},oi),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:n=>{let t=hi(n.lView);for(;t&&!Uv(t[re]);)t=hi(t);t&&Cp(t)},consumerOnSignalRead(){this.lView[Ut]=this}});function Uv(n){return n.type!==2}function Gv(n){if(n[Un]===null)return;let t=!0;for(;t;){let e=!1;for(let i of n[Un])i.dirty&&(e=!0,i.zone===null||Zone.current===i.zone?i.run():i.zone.run(()=>i.run()));t=e&&!!(n[le]&8192)}}var mD=100;function Wv(n,t=0){let i=n[kn].rendererFactory,r=!1;r||i.begin?.();try{gD(n,t)}finally{r||i.end?.()}}function gD(n,t){let e=Rp();try{co(!0),cf(n,t);let i=0;for(;ws(n);){if(i===mD)throw new X(103,!1);i++,cf(n,1)}}finally{co(e)}}function _D(n,t,e,i){if(cr(t))return;let r=t[le],o=!1,s=!1;zl(t);let a=!0,l=null,h=null;o||(Uv(n)?(h=cD(t),l=$n(h)):Ya()===null?(a=!1,h=fD(t),l=$n(h)):t[Ut]&&(li(t[Ut]),t[Ut]=null));try{xp(t),B0(n.bindingStartIndex),e!==null&&Bv(n,t,e,2,i);let _=(r&3)===3;if(!o)if(_){let T=n.preOrderCheckHooks;T!==null&&Jl(t,T,null)}else{let T=n.preOrderHooks;T!==null&&ec(t,T,0,null),jp(t,0)}if(s||vD(t),Gv(t),qv(t,0),n.contentQueries!==null&&av(n,t),!o)if(_){let T=n.contentCheckHooks;T!==null&&Jl(t,T)}else{let T=n.contentHooks;T!==null&&ec(t,T,1),jp(t,1)}yD(n,t);let w=n.components;w!==null&&Yv(t,w,0);let M=n.viewQuery;if(M!==null&&tf(2,M,i),!o)if(_){let T=n.viewCheckHooks;T!==null&&Jl(t,T)}else{let T=n.viewHooks;T!==null&&ec(t,T,2),jp(t,2)}if(n.firstUpdatePass===!0&&(n.firstUpdatePass=!1),t[Ll]){for(let T of t[Ll])T();t[Ll]=null}o||(Hv(t),t[le]&=-73)}catch(_){throw o||vi(t),_}finally{h!==null&&(ai(h,l),a&&uD(h)),Ul()}}function qv(n,t){for(let e=J_(n);e!==null;e=ev(e))for(let i=Ge;i<e.length;i++){let r=e[i];Zv(r,t)}}function vD(n){for(let t=J_(n);t!==null;t=ev(t)){if(!(t[le]&2))continue;let e=t[lr];for(let i=0;i<e.length;i++){let r=e[i];Cp(r)}}}function bD(n,t,e){Me(18);let i=nn(t,n);Zv(i,e),Me(19,i[Ue])}function Zv(n,t){Vl(n)&&cf(n,t)}function cf(n,t){let i=n[re],r=n[le],o=n[Ut],s=!!(t===0&&r&16);if(s||=!!(r&64&&t===0),s||=!!(r&1024),s||=!!(o?.dirty&&$i(o)),s||=!1,o&&(o.dirty=!1),n[le]&=-9217,s)_D(i,n,i.template,n[Ue]);else if(r&8192){let a=ae(null);try{Gv(n),qv(n,1);let l=i.components;l!==null&&Yv(n,l,1),Hv(n)}finally{ae(a)}}}function Yv(n,t,e){for(let i=0;i<t.length;i++)bD(n,t[i],e)}function yD(n,t){let e=n.hostBindingOpCodes;if(e!==null)try{for(let i=0;i<e.length;i++){let r=e[i];if(r<0)bi(~r);else{let o=r,s=e[++i],a=e[++i];$0(s,o);let l=t[o];Me(24,l),a(2,l),Me(25,l)}}}finally{bi(-1)}}function oh(n,t){let e=Rp()?64:1088;for(n[kn].changeDetectionScheduler?.notify(t);n;){n[le]|=e;let i=hi(n);if(ao(n)&&!i)return n;n=i}return null}function Qv(n,t,e,i){return[n,!0,0,t,null,i,null,e,null,null]}function Kv(n,t){let e=Ge+t;if(e<n.length)return n[e]}function Zs(n,t,e,i=!0){let r=t[re];if(xD(r,t,n,e),i){let s=mc(e,n),a=t[ke],l=a.parentNode(n[gi]);l!==null&&LE(r,n[It],a,t,l,s)}let o=t[rr];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function Xv(n,t){let e=Ls(n,t);return e!==void 0&&Rc(e[re],e),e}function Ls(n,t){if(n.length<=Ge)return;let e=Ge+t,i=n[e];if(i){let r=i[zn];r!==null&&r!==n&&Kf(r,i),t>0&&(n[e-1][en]=i[en]);let o=gs(n,Ge+t);AE(i[re],i);let s=o[In];s!==null&&s.detachView(o[re]),i[it]=null,i[en]=null,i[le]&=-129}return i}function xD(n,t,e,i){let r=Ge+i,o=e.length;i>0&&(e[r-1][en]=t),i<o-Ge?(t[en]=e[r],ap(e,Ge+i,t)):(e.push(t),t[en]=null),t[it]=e;let s=t[zn];s!==null&&e!==s&&Jv(s,t);let a=t[In];a!==null&&a.insertView(n),Bl(t),t[le]|=128}function Jv(n,t){let e=n[lr],i=t[it];if(Pn(i))n[le]|=2;else{let r=i[it][yt];t[yt]!==r&&(n[le]|=2)}e===null?n[lr]=[t]:e.push(t)}var Ci=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let t=this._lView,e=t[re];return As(e,t,e.firstChild,[])}constructor(t,e){this._lView=t,this._cdRefInjectingView=e}get context(){return this._lView[Ue]}set context(t){this._lView[Ue]=t}get destroyed(){return cr(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let t=this._lView[it];if(gn(t)){let e=t[xs],i=e?e.indexOf(this):-1;i>-1&&(Ls(t,i),gs(e,i))}this._attachedToViewContainer=!1}Rc(this._lView[re],this._lView)}onDestroy(t){wp(this._lView,t)}markForCheck(){oh(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[le]&=-129}reattach(){Bl(this._lView),this._lView[le]|=128}detectChanges(){this._lView[le]|=1024,Wv(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new X(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let t=ao(this._lView),e=this._lView[zn];e!==null&&!t&&Kf(e,this._lView),Nv(this._lView[re],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new X(902,!1);this._appRef=t;let e=ao(this._lView),i=this._lView[zn];i!==null&&!e&&Jv(i,this._lView),Bl(this._lView)}};var wi=(()=>{class n{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=CD;constructor(e,i,r){this._declarationLView=e,this._declarationTContainer=i,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,i){return this.createEmbeddedViewImpl(e,i)}createEmbeddedViewImpl(e,i,r){let o=qs(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:i,dehydratedView:r});return new Ci(o)}}return n})();function CD(){return Lc(rt(),oe())}function Lc(n,t){return n.type&4?new wi(t,n,xo(n,t)):null}function Co(n,t,e,i,r){let o=n.data[t];if(o===null)o=wD(n,t,e,i,r),j0()&&(o.flags|=32);else if(o.type&64){o.type=e,o.value=i,o.attrs=r;let s=F0();o.injectorIndex=s===null?-1:s.injectorIndex}return lo(o,!0),o}function wD(n,t,e,i,r){let o=Ip(),s=Pp(),a=s?o:o&&o.parent,l=n.data[t]=DD(n,a,e,t,i,r);return ED(n,l,o,s),l}function ED(n,t,e,i){n.firstChild===null&&(n.firstChild=t),e!==null&&(i?e.child==null&&t.parent!==null&&(e.child=t):e.next===null&&(e.next=t,t.prev=e))}function DD(n,t,e,i,r,o){let s=t?t.injectorIndex:-1,a=0;return Mp()&&(a|=128),{type:e,index:i,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:r,namespace:Fp(),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:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var i$=new RegExp(`^(\\d+)*(${C1}|${x1})*(.*)`);function SD(n){let t=n[gp]??[],i=n[it][ke],r=[];for(let o of t)o.data[iv]!==void 0?r.push(o):MD(o,i);n[gp]=r}function MD(n,t){let e=0,i=n.firstChild;if(i){let r=n.data[nv];for(;e<r;){let o=i.nextSibling;_v(t,i,!1),i=o,e++}}}var TD=()=>null,kD=()=>null;function gc(n,t){return TD(n,t)}function eb(n,t,e){return kD(n,t,e)}var tb=class{},Fc=class{},df=class{resolveComponentFactory(t){throw new X(917,!1)}},Vc=class{static NULL=new df},An=class{},Bc=(()=>{class n{destroyNode=null;static __NG_ELEMENT_ID__=()=>ID()}return n})();function ID(){let n=oe(),t=rt(),e=nn(t.index,n);return(Pn(e)?e:n)[ke]}var nb=(()=>{class n{static \u0275prov=ce({token:n,providedIn:"root",factory:()=>null})}return n})();var nc={},uf=class{injector;parentInjector;constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,i){let r=this.injector.get(t,nc,i);return r!==nc||e===nc?r:this.parentInjector.get(t,e,i)}};function _c(n,t,e){let i=e?n.styles:null,r=e?n.classes:null,o=0;if(t!==null)for(let s=0;s<t.length;s++){let a=t[s];if(typeof a=="number")o=a;else if(o==1)r=kl(r,a);else if(o==2){let l=a,h=t[++s];i=kl(i,l+": "+h+";")}}e?n.styles=i:n.stylesWithoutHost=i,e?n.classes=r:n.classesWithoutHost=r}function xn(n,t=0){let e=oe();if(e===null)return _e(n,t);let i=rt();return q_(i,e,bt(n),t)}function ib(n,t,e,i,r){let o=i===null?null:{"":-1},s=r(n,e);if(s!==null){let a=s,l=null,h=null;for(let _ of s)if(_.resolveHostDirectives!==null){[a,l,h]=_.resolveHostDirectives(s);break}RD(n,t,e,a,o,l,h)}o!==null&&i!==null&&PD(e,i,o)}function PD(n,t,e){let i=n.localNames=[];for(let r=0;r<t.length;r+=2){let o=e[t[r+1]];if(o==null)throw new X(-301,!1);i.push(t[r],o)}}function OD(n,t,e){t.componentOffset=e,(n.components??=[]).push(t.index)}function RD(n,t,e,i,r,o,s){let a=i.length,l=!1;for(let M=0;M<a;M++){let T=i[M];!l&&On(T)&&(l=!0,OD(n,e,M)),Xp(lc(e,t),n,T.type)}BD(e,n.data.length,a);for(let M=0;M<a;M++){let T=i[M];T.providersResolver&&T.providersResolver(T)}let h=!1,_=!1,w=wv(n,t,a,null);a>0&&(e.directiveToIndex=new Map);for(let M=0;M<a;M++){let T=i[M];if(e.mergedAttrs=go(e.mergedAttrs,T.hostAttrs),AD(n,e,t,w,T),VD(w,T,r),s!==null&&s.has(T)){let[U,K]=s.get(T);e.directiveToIndex.set(T.type,[w,U+e.directiveStart,K+e.directiveStart])}else(o===null||!o.has(T))&&e.directiveToIndex.set(T.type,w);T.contentQueries!==null&&(e.flags|=4),(T.hostBindings!==null||T.hostAttrs!==null||T.hostVars!==0)&&(e.flags|=64);let A=T.type.prototype;!h&&(A.ngOnChanges||A.ngOnInit||A.ngDoCheck)&&((n.preOrderHooks??=[]).push(e.index),h=!0),!_&&(A.ngOnChanges||A.ngDoCheck)&&((n.preOrderCheckHooks??=[]).push(e.index),_=!0),w++}ND(n,e,o)}function ND(n,t,e){for(let i=t.directiveStart;i<t.directiveEnd;i++){let r=n.data[i];if(e===null||!e.has(r))__(0,t,r,i),__(1,t,r,i),b_(t,i,!1);else{let o=e.get(r);v_(0,t,o,i),v_(1,t,o,i),b_(t,i,!0)}}}function __(n,t,e,i){let r=n===0?e.inputs:e.outputs;for(let o in r)if(r.hasOwnProperty(o)){let s;n===0?s=t.inputs??={}:s=t.outputs??={},s[o]??=[],s[o].push(i),rb(t,o)}}function v_(n,t,e,i){let r=n===0?e.inputs:e.outputs;for(let o in r)if(r.hasOwnProperty(o)){let s=r[o],a;n===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[s]??=[],a[s].push(i,o),rb(t,s)}}function rb(n,t){t==="class"?n.flags|=8:t==="style"&&(n.flags|=16)}function b_(n,t,e){let{attrs:i,inputs:r,hostDirectiveInputs:o}=n;if(i===null||!e&&r===null||e&&o===null||Hf(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(!e&&r.hasOwnProperty(l)){let h=r[l];for(let _ of h)if(_===t){s??=[],s.push(l,i[a+1]);break}}else if(e&&o.hasOwnProperty(l)){let h=o[l];for(let _=0;_<h.length;_+=2)if(h[_]===t){s??=[],s.push(h[_+1],i[a+1]);break}}a+=2}n.initialInputs??=[],n.initialInputs.push(s)}function AD(n,t,e,i,r){n.data[i]=r;let o=r.factory||(r.factory=Ki(r.type,!0)),s=new _r(o,On(r),xn,null);n.blueprint[i]=s,e[i]=s,LD(n,t,i,wv(n,e,r.hostVars,gt),r)}function LD(n,t,e,i,r){let o=r.hostBindings;if(o){let s=n.hostBindingOpCodes;s===null&&(s=n.hostBindingOpCodes=[]);let a=~t.index;FD(s)!=a&&s.push(a),s.push(e,i,o)}}function FD(n){let t=n.length;for(;t>0;){let e=n[--t];if(typeof e=="number"&&e<0)return e}return 0}function VD(n,t,e){if(e){if(t.exportAs)for(let i=0;i<t.exportAs.length;i++)e[t.exportAs[i]]=n;On(t)&&(e[""]=n)}}function BD(n,t,e){n.flags|=1,n.directiveStart=t,n.directiveEnd=t+e,n.providerIndexes=t}function sh(n,t,e,i,r,o,s,a){let l=t[re],h=l.consts,_=rn(h,s),w=Co(l,n,e,i,_);return o&&ib(l,t,w,rn(h,a),r),w.mergedAttrs=go(w.mergedAttrs,w.attrs),w.attrs!==null&&_c(w,w.attrs,!1),w.mergedAttrs!==null&&_c(w,w.mergedAttrs,!0),l.queries!==null&&l.queries.elementStart(l,w),w}function ah(n,t){B_(n,t),_p(t)&&n.queries.elementEnd(t)}function jD(n,t,e,i,r,o){let s=t.consts,a=rn(s,r),l=Co(t,n,e,i,a);if(l.mergedAttrs=go(l.mergedAttrs,l.attrs),o!=null){let h=rn(s,o);l.localNames=[];for(let _=0;_<h.length;_+=2)l.localNames.push(h[_],-1)}return l.attrs!==null&&_c(l,l.attrs,!1),l.mergedAttrs!==null&&_c(l,l.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,l),l}function lh(n){return sb(n)?Array.isArray(n)||!(n instanceof Map)&&Symbol.iterator in n:!1}function ob(n,t){if(Array.isArray(n))for(let e=0;e<n.length;e++)t(n[e]);else{let e=n[Symbol.iterator](),i;for(;!(i=e.next()).done;)t(i.value)}}function sb(n){return n!==null&&(typeof n=="function"||typeof n=="object")}function ch(n,t,e){return n[t]=e}function $D(n,t){return n[t]}function sn(n,t,e){if(e===gt)return!1;let i=n[t];return Object.is(i,e)?!1:(n[t]=e,!0)}function dh(n,t,e,i){let r=sn(n,t,e);return sn(n,t+1,i)||r}function HD(n,t,e,i,r){let o=dh(n,t,e,i);return sn(n,t+2,r)||o}function ic(n,t,e){return function i(r){let o=_i(n)?nn(n.index,t):t;oh(o,5);let s=t[Ue],a=y_(t,s,e,r),l=i.__ngNextListenerFn__;for(;l;)a=y_(t,s,l,r)&&a,l=l.__ngNextListenerFn__;return a}}function y_(n,t,e,i){let r=ae(null);try{return Me(6,t,e),e(i)!==!1}catch(o){return oD(n,o),!1}finally{Me(7,t,e),ae(r)}}function ab(n,t,e,i,r,o,s,a){let l=so(n),h=!1,_=null;if(!i&&l&&(_=UD(t,e,o,n.index)),_!==null){let w=_.__ngLastListenerFn__||_;w.__ngNextListenerFn__=s,_.__ngLastListenerFn__=s,h=!0}else{let w=Bt(n,e),M=i?i(w):w;E1(e,M,o,a);let T=r.listen(M,o,a);if(!zD(o)){let A=i?U=>i(tn(U[n.index])):n.index;lb(A,t,e,o,a,T,!1)}}return h}function zD(n){return n.startsWith("animation")||n.startsWith("transition")}function UD(n,t,e,i){let r=n.cleanup;if(r!=null)for(let o=0;o<r.length-1;o+=2){let s=r[o];if(s===e&&r[o+1]===i){let a=t[ro],l=r[o+2];return a&&a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function lb(n,t,e,i,r,o,s){let a=t.firstCreatePass?Dp(t):null,l=Ep(e),h=l.length;l.push(r,o),a&&a.push(i,n,h,(h+1)*(s?-1:1))}function x_(n,t,e,i,r,o){let s=t[e],a=t[re],h=a.data[e].outputs[i],w=s[h].subscribe(o);lb(n.index,a,t,r,o,w,!0)}var pf=Symbol("BINDING");var ff=class extends Vc{ngModule;constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){let e=ir(t);return new Fs(e,this.ngModule)}};function GD(n){return Object.keys(n).map(t=>{let[e,i,r]=n[t],o={propName:e,templateName:t,isSignal:(i&Tc.SignalBased)!==0};return r&&(o.transform=r),o})}function WD(n){return Object.keys(n).map(t=>({propName:n[t],templateName:t}))}function qD(n,t,e){let i=t instanceof Vt?t:t?.injector;return i&&n.getStandaloneInjector!==null&&(i=n.getStandaloneInjector(i)||i),i?new uf(e,i):e}function ZD(n){let t=n.get(An,null);if(t===null)throw new X(407,!1);let e=n.get(nb,null),i=n.get(Jt,null);return{rendererFactory:t,sanitizer:e,changeDetectionScheduler:i,ngReflect:!1}}function YD(n,t){let e=cb(n);return mv(t,e,e==="svg"?hs:e==="math"?vp:null)}function QD(n){if(n?.toLowerCase()==="script")throw new X(905,!1)}function cb(n){return(n.selectors[0][0]||"div").toLowerCase()}var Fs=class extends Fc{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=GD(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=WD(this.componentDef.outputs),this.cachedOutputs}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=mE(t.selectors),this.ngContentSelectors=t.ngContentSelectors??[],this.isBoundToModule=!!e}create(t,e,i,r,o,s){Me(22);let a=ae(null);try{let l=this.componentDef,h=KD(i,l,s,o),_=qD(l,r||this.ngModule,t),w=ZD(_),M=w.rendererFactory.createRenderer(null,l),T=i?qE(M,i,l.encapsulation,_):YD(l,M);QD(T?.tagName);let A=s?.some(C_)||o?.some(G=>typeof G!="function"&&G.bindings.some(C_)),U=Uf(null,h,null,512|Cv(l),null,null,w,M,_,null,sv(T,_,!0));U[Ae]=T,zl(U);let K=null;try{let G=sh(Ae,U,2,"#host",()=>h.directiveRegistry,!0,0);vv(M,T,G),_o(T,U),Ac(h,U,G),Ff(h,G,U),ah(h,G),e!==void 0&&JD(G,this.ngContentSelectors,e),K=nn(G.index,U),U[Ue]=K[Ue],rh(h,U,null)}catch(G){throw K!==null&&Jp(K),Jp(U),G}finally{Me(23),Ul()}return new vc(this.componentType,U,!!A)}finally{ae(a)}}};function KD(n,t,e,i){let r=n?["ng-version","20.3.29"]:gE(t.selectors[0]),o=null,s=null,a=0;if(e)for(let _ of e)a+=_[pf].requiredVars,_.create&&(_.targetIdx=0,(o??=[]).push(_)),_.update&&(_.targetIdx=0,(s??=[]).push(_));if(i)for(let _=0;_<i.length;_++){let w=i[_];if(typeof w!="function")for(let M of w.bindings){a+=M[pf].requiredVars;let T=_+1;M.create&&(M.targetIdx=T,(o??=[]).push(M)),M.update&&(M.targetIdx=T,(s??=[]).push(M))}}let l=[t];if(i)for(let _ of i){let w=typeof _=="function"?_:_.type,M=dp(w);l.push(M)}return zf(0,null,XD(o,s),1,a,l,null,null,null,[r],null)}function XD(n,t){return!n&&!t?null:e=>{if(e&1&&n)for(let i of n)i.create();if(e&2&&t)for(let i of t)i.update()}}function C_(n){let t=n[pf].kind;return t==="input"||t==="twoWay"}var vc=class extends tb{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(t,e,i){super(),this._rootLView=e,this._hasInputBindings=i,this._tNode=Cs(e[re],Ae),this.location=xo(this._tNode,e),this.instance=nn(this._tNode.index,e)[Ue],this.hostView=this.changeDetectorRef=new Ci(e,void 0),this.componentType=t}setInput(t,e){this._hasInputBindings;let i=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(t)&&Object.is(this.previousInputValues.get(t),e))return;let r=this._rootLView,o=ih(i,r[re],r,t,e);this.previousInputValues.set(t,e);let s=nn(i.index,r);oh(s,1)}get injector(){return new fr(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}};function JD(n,t,e){let i=n.projection=[];for(let r=0;r<t.length;r++){let o=e[r];i.push(o!=null&&o.length?Array.from(o):null)}}var Di=(()=>{class n{static __NG_ELEMENT_ID__=eS}return n})();function eS(){let n=rt();return ub(n,oe())}var tS=Di,db=class extends tS{_lContainer;_hostTNode;_hostLView;constructor(t,e,i){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=i}get element(){return xo(this._hostTNode,this._hostLView)}get injector(){return new fr(this._hostTNode,this._hostLView)}get parentInjector(){let t=Rf(this._hostTNode,this._hostLView);if($_(t)){let e=sc(t,this._hostLView),i=oc(t),r=e[re].data[i+8];return new fr(r,e)}else return new fr(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){let e=w_(this._lContainer);return e!==null&&e[t]||null}get length(){return this._lContainer.length-Ge}createEmbeddedView(t,e,i){let r,o;typeof i=="number"?r=i:i!=null&&(r=i.index,o=i.injector);let s=gc(this._lContainer,t.ssrId),a=t.createEmbeddedViewImpl(e||{},o,s);return this.insertImpl(a,r,vo(this._hostTNode,s)),a}createComponent(t,e,i,r,o,s,a){let l=t&&!Qw(t),h;if(l)h=e;else{let K=e||{};h=K.index,i=K.injector,r=K.projectableNodes,o=K.environmentInjector||K.ngModuleRef,s=K.directives,a=K.bindings}let _=l?t:new Fs(ir(t)),w=i||this.parentInjector;if(!o&&_.ngModule==null){let G=(l?w:this.parentInjector).get(Vt,null);G&&(o=G)}let M=ir(_.componentType??{}),T=gc(this._lContainer,M?.id??null),A=T?.firstChild??null,U=_.create(w,r,A,o,s,a);return this.insertImpl(U.hostView,h,vo(this._hostTNode,T)),U}insert(t,e){return this.insertImpl(t,e,!0)}insertImpl(t,e,i){let r=t._lView;if(P0(r)){let a=this.indexOf(t);if(a!==-1)this.detach(a);else{let l=r[it],h=new db(l,l[It],l[it]);h.detach(h.indexOf(t))}}let o=this._adjustIndex(e),s=this._lContainer;return Zs(s,r,o,i),t.attachToViewContainerRef(),ap(zp(s),o,t),t}move(t,e){return this.insert(t,e)}indexOf(t){let e=w_(this._lContainer);return e!==null?e.indexOf(t):-1}remove(t){let e=this._adjustIndex(t,-1),i=Ls(this._lContainer,e);i&&(gs(zp(this._lContainer),e),Rc(i[re],i))}detach(t){let e=this._adjustIndex(t,-1),i=Ls(this._lContainer,e);return i&&gs(zp(this._lContainer),e)!=null?new Ci(i):null}_adjustIndex(t,e=0){return t??this.length+e}};function w_(n){return n[xs]}function zp(n){return n[xs]||(n[xs]=[])}function ub(n,t){let e,i=t[n.index];return gn(i)?e=i:(e=Qv(i,t,null,n),t[n.index]=e,Gf(t,e)),iS(e,t,n,i),new db(e,n,t)}function nS(n,t){let e=n[ke],i=e.createComment(""),r=Bt(t,n),o=e.parentNode(r);return uc(e,o,i,e.nextSibling(r),!1),i}var iS=sS,rS=()=>!1;function oS(n,t,e){return rS(n,t,e)}function sS(n,t,e,i){if(n[gi])return;let r;e.type&8?r=tn(i):r=nS(t,e),n[gi]=r}var hf=class n{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new n(this.queryList)}setDirty(){this.queryList.setDirty()}},mf=class n{queries;constructor(t=[]){this.queries=t}createEmbeddedView(t){let e=t.queries;if(e!==null){let i=t.contentQueries!==null?t.contentQueries[0]:e.length,r=[];for(let o=0;o<i;o++){let s=e.getByIndex(o),a=this.queries[s.indexInDeclarationView];r.push(a.clone())}return new n(r)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}finishViewCreation(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let e=0;e<this.queries.length;e++)ph(t,e).matches!==null&&this.queries[e].setDirty()}},gf=class{flags;read;predicate;constructor(t,e,i=null){this.flags=e,this.read=i,typeof t=="string"?this.predicate=pS(t):this.predicate=t}},_f=class n{queries;constructor(t=[]){this.queries=t}elementStart(t,e){for(let i=0;i<this.queries.length;i++)this.queries[i].elementStart(t,e)}elementEnd(t){for(let e=0;e<this.queries.length;e++)this.queries[e].elementEnd(t)}embeddedTView(t){let e=null;for(let i=0;i<this.length;i++){let r=e!==null?e.length:0,o=this.getByIndex(i).embeddedTView(t,r);o&&(o.indexInDeclarationView=i,e!==null?e.push(o):e=[o])}return e!==null?new n(e):null}template(t,e){for(let i=0;i<this.queries.length;i++)this.queries[i].template(t,e)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}},vf=class n{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(t,e=-1){this.metadata=t,this._declarationNodeIndex=e}elementStart(t,e){this.isApplyingToNode(e)&&this.matchTNode(t,e)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,e){this.elementStart(t,e)}embeddedTView(t,e){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,e),new n(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let e=this._declarationNodeIndex,i=t.parent;for(;i!==null&&i.type&8&&i.index!==e;)i=i.parent;return e===(i!==null?i.index:-1)}return this._appliesToNextNode}matchTNode(t,e){let i=this.metadata.predicate;if(Array.isArray(i))for(let r=0;r<i.length;r++){let o=i[r];this.matchTNodeWithReadOption(t,e,aS(e,o)),this.matchTNodeWithReadOption(t,e,tc(e,t,o,!1,!1))}else i===wi?e.type&4&&this.matchTNodeWithReadOption(t,e,-1):this.matchTNodeWithReadOption(t,e,tc(e,t,i,!1,!1))}matchTNodeWithReadOption(t,e,i){if(i!==null){let r=this.metadata.read;if(r!==null)if(r===Ot||r===Di||r===wi&&e.type&4)this.addMatch(e.index,-2);else{let o=tc(e,t,r,!1,!1);o!==null&&this.addMatch(e.index,o)}else this.addMatch(e.index,i)}}addMatch(t,e){this.matches===null?this.matches=[t,e]:this.matches.push(t,e)}};function aS(n,t){let e=n.localNames;if(e!==null){for(let i=0;i<e.length;i+=2)if(e[i]===t)return e[i+1]}return null}function lS(n,t){return n.type&11?xo(n,t):n.type&4?Lc(n,t):null}function cS(n,t,e,i){return e===-1?lS(t,n):e===-2?dS(n,t,i):Rs(n,n[re],e,t)}function dS(n,t,e){if(e===Ot)return xo(t,n);if(e===wi)return Lc(t,n);if(e===Di)return ub(t,n)}function pb(n,t,e,i){let r=t[In].queries[i];if(r.matches===null){let o=n.data,s=e.matches,a=[];for(let l=0;s!==null&&l<s.length;l+=2){let h=s[l];if(h<0)a.push(null);else{let _=o[h];a.push(cS(t,_,s[l+1],e.metadata.read))}}r.matches=a}return r.matches}function bf(n,t,e,i){let r=n.queries.getByIndex(e),o=r.matches;if(o!==null){let s=pb(n,t,r,e);for(let a=0;a<o.length;a+=2){let l=o[a];if(l>0)i.push(s[a/2]);else{let h=o[a+1],_=t[-l];for(let w=Ge;w<_.length;w++){let M=_[w];M[zn]===M[it]&&bf(M[re],M,h,i)}if(_[lr]!==null){let w=_[lr];for(let M=0;M<w.length;M++){let T=w[M];bf(T[re],T,h,i)}}}}}return i}function uh(n,t){return n[In].queries[t].queryList}function uS(n,t,e){let i=new cc((e&4)===4);return N0(n,t,i,i.destroy),(t[In]??=new mf).queries.push(new hf(i))-1}function fb(n,t,e){let i=We();return i.firstCreatePass&&(fS(i,new gf(n,t,e),-1),(t&2)===2&&(i.staticViewQueries=!0)),uS(i,oe(),t)}function pS(n){return n.split(",").map(t=>t.trim())}function fS(n,t,e){n.queries===null&&(n.queries=new _f),n.queries.track(new vf(t,e))}function ph(n,t){return n.queries.getByIndex(t)}function hb(n,t){let e=n[re],i=ph(e,t);return i.crossesNgTemplate?bf(e,n,t,[]):pb(e,n,i,t)}function mb(n,t,e){let i,r=Jo(()=>{i._dirtyCounter();let o=mS(i,n);if(t&&o===void 0)throw new X(-951,!1);return o});return i=r[Ke],i._dirtyCounter=v(0),i._flatValue=void 0,r}function gb(n){return mb(!0,!1,n)}function _b(n){return mb(!0,!0,n)}function hS(n,t){let e=n[Ke];e._lView=oe(),e._queryIndex=t,e._queryList=uh(e._lView,t),e._queryList.onDirty(()=>e._dirtyCounter.update(i=>i+1))}function mS(n,t){let e=n._lView,i=n._queryIndex;if(e===void 0||i===void 0||e[le]&4)return t?void 0:Xt;let r=uh(e,i),o=hb(e,i);return r.reset(o,Q_),t?r.first:r._changesDetected||n._flatValue===void 0?n._flatValue=r.toArray():n._flatValue}var Vs=class{};var Bs=class extends Vs{injector;componentFactoryResolver=new ff(this);instance=null;constructor(t){super();let e=new Ji([...t.providers,{provide:Vs,useValue:this},{provide:Vc,useValue:this.componentFactoryResolver}],t.parent||bs(),t.debugName,new Set(["environment"]));this.injector=e,t.runEnvironmentInitializers&&e.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}};function vb(n,t,e=null){return new Bs({providers:n,parent:t,debugName:e,runEnvironmentInitializers:!0}).injector}var gS=(()=>{class n{_injector;cachedInjectors=new Map;constructor(e){this._injector=e}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){let i=up(!1,e.type),r=i.length>0?vb([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e,r)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=ce({token:n,providedIn:"environment",factory:()=>new n(_e(Vt))})}return n})();function ue(n){return Cc(()=>{let t=bb(n),e=ie(z({},t),{decls:n.decls,vars:n.vars,template:n.template,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,onPush:n.changeDetection===Nf.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&n.dependencies||null,getStandaloneInjector:t.standalone?r=>r.get(gS).getOrCreateStandaloneInjector(e):null,getExternalStyles:null,signals:n.signals??!1,data:n.data||{},encapsulation:n.encapsulation||Wn.Emulated,styles:n.styles||Xt,_:null,schemas:n.schemas||null,tView:null,id:""});t.standalone&&Ln("NgStandalone"),yb(e);let i=n.dependencies;return e.directiveDefs=E_(i,_S),e.pipeDefs=E_(i,x0),e.id=yS(e),e})}function _S(n){return ir(n)||dp(n)}function vS(n,t){if(n==null)return mi;let e={};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=Tc.None,l=null),e[o]=[i,a,l],t[o]=s}return e}function bS(n){if(n==null)return mi;let t={};for(let e in n)n.hasOwnProperty(e)&&(t[n[e]]=e);return t}function Si(n){return Cc(()=>{let t=bb(n);return yb(t),t})}function jc(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 bb(n){let t={};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:t,inputConfig:n.inputs||mi,exportAs:n.exportAs||null,standalone:n.standalone??!0,signals:n.signals===!0,selectors:n.selectors||Xt,viewQuery:n.viewQuery||null,features:n.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,inputs:vS(n.inputs,t),outputs:bS(n.outputs),debugInfo:null}}function yb(n){n.features?.forEach(t=>t(n))}function E_(n,t){return n?()=>{let e=typeof n=="function"?n():n,i=[];for(let r of e){let o=t(r);o!==null&&i.push(o)}return i}:null}function yS(n){let t=0,e=typeof n.consts=="function"?"":n.consts,i=[n.selectors,n.ngContentSelectors,n.hostVars,n.hostAttrs,e,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("|"))t=Math.imul(31,t)+o.charCodeAt(0)<<0;return t+=2147483648,"c"+t}function xS(n){return Object.getPrototypeOf(n.prototype).constructor}function Ys(n){let t=xS(n.type),e=!0,i=[n];for(;t;){let r;if(On(n))r=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new X(903,!1);r=t.\u0275dir}if(r){if(e){i.push(r);let s=n;s.inputs=Up(n.inputs),s.declaredInputs=Up(n.declaredInputs),s.outputs=Up(n.outputs);let a=r.hostBindings;a&&SS(n,a);let l=r.viewQuery,h=r.contentQueries;if(l&&ES(n,l),h&&DS(n,h),CS(n,r),u0(n.outputs,r.outputs),On(r)&&r.data.animation){let _=n.data;_.animation=(_.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===Ys&&(e=!1)}}t=Object.getPrototypeOf(t)}wS(i)}function CS(n,t){for(let e in t.inputs){if(!t.inputs.hasOwnProperty(e)||n.inputs.hasOwnProperty(e))continue;let i=t.inputs[e];i!==void 0&&(n.inputs[e]=i,n.declaredInputs[e]=t.declaredInputs[e])}}function wS(n){let t=0,e=null;for(let i=n.length-1;i>=0;i--){let r=n[i];r.hostVars=t+=r.hostVars,r.hostAttrs=go(r.hostAttrs,e=go(e,r.hostAttrs))}}function Up(n){return n===mi?{}:n===Xt?[]:n}function ES(n,t){let e=n.viewQuery;e?n.viewQuery=(i,r)=>{t(i,r),e(i,r)}:n.viewQuery=t}function DS(n,t){let e=n.contentQueries;e?n.contentQueries=(i,r,o)=>{t(i,r,o),e(i,r,o)}:n.contentQueries=t}function SS(n,t){let e=n.hostBindings;e?n.hostBindings=(i,r)=>{t(i,r),e(i,r)}:n.hostBindings=t}function xb(n,t,e,i,r,o,s,a){if(e.firstCreatePass){n.mergedAttrs=go(n.mergedAttrs,n.attrs);let _=n.tView=zf(2,n,r,o,s,e.directiveRegistry,e.pipeRegistry,null,e.schemas,e.consts,null);e.queries!==null&&(e.queries.template(e,n),_.queries=e.queries.embeddedTView(n))}a&&(n.flags|=a),lo(n,!1);let l=TS(e,t,n,i);Gl()&&Xf(e,t,l,n),_o(l,t);let h=Qv(l,t,l,n);t[i+Ae]=h,Gf(t,h),oS(h,n,t)}function MS(n,t,e,i,r,o,s,a,l,h,_){let w=e+Ae,M;return t.firstCreatePass?(M=Co(t,w,4,s||null,a||null),jl()&&ib(t,n,M,rn(t.consts,h),eh),B_(t,M)):M=t.data[w],xb(M,n,t,e,i,r,o,l),so(M)&&Ac(t,n,M),h!=null&&Ws(n,M,_),M}function js(n,t,e,i,r,o,s,a,l,h,_){let w=e+Ae,M;if(t.firstCreatePass){if(M=Co(t,w,4,s||null,a||null),h!=null){let T=rn(t.consts,h);M.localNames=[];for(let A=0;A<T.length;A+=2)M.localNames.push(T[A],-1)}}else M=t.data[w];return xb(M,n,t,e,i,r,o,l),h!=null&&Ws(n,M,_),M}function xt(n,t,e,i,r,o,s,a){let l=oe(),h=We(),_=rn(h.consts,o);return MS(l,h,n,t,e,i,r,_,void 0,s,a),xt}var TS=kS;function kS(n,t,e,i){return Ts(!0),t[ke].createComment("")}var fh=new se("");function Qs(n){return!!n&&typeof n.then=="function"}function $c(n){return!!n&&typeof n.subscribe=="function"}var Cb=new se("");var hh=(()=>{class n{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,i)=>{this.resolve=e,this.reject=i});appInits=R(Cb,{optional:!0})??[];injector=R(kt);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let r of this.appInits){let o=io(this.injector,r);if(Qs(o))e.push(o);else if($c(o)){let s=new Promise((a,l)=>{o.subscribe({complete:a,error:l})});e.push(s)}}let i=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),e.length===0&&i(),this.initialized=!0}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),wb=new se("");function Eb(){xu(()=>{let n="";throw new X(600,n)})}function Db(n){return n.isBoundToModule}var IS=10;var xr=(()=>{class n{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=R(_n);afterRenderManager=R(Ic);zonelessEnabled=R(ks);rootEffectScheduler=R(Is);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new ze;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=R(yi);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(Oe(e=>!e))}constructor(){R(Ei,{optional:!0})}whenStable(){let e;return new Promise(i=>{e=this.isStable.subscribe({next:r=>{r&&i()}})}).finally(()=>{e.unsubscribe()})}_injector=R(Vt);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,i){return this.bootstrapImpl(e,i)}bootstrapImpl(e,i,r=kt.NULL){return this._injector.get(we).run(()=>{Me(10);let s=e instanceof Fc;if(!this._injector.get(hh).done){let A="";throw new X(405,A)}let l;s?l=e:l=this._injector.get(Vc).resolveComponentFactory(e),this.componentTypes.push(l.componentType);let h=Db(l)?void 0:this._injector.get(Vs),_=i||l.selector,w=l.create(r,[],_,h),M=w.location.nativeElement,T=w.injector.get(fh,null);return T?.registerApplication(M),w.onDestroy(()=>{this.detachView(w.hostView),Os(this.components,w),T?.unregisterApplication(M)}),this._loadComponent(w),Me(11,w),w})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Me(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(kc.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new X(101,!1);let e=ae(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,ae(e),this.afterTick.next(),Me(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(An,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++<IS;)Me(14),this.synchronizeOnce(),Me(15)}synchronizeOnce(){this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush());let e=!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&&!ws(r))continue;let o=i&&!this.zonelessEnabled?0:1;Wv(r,o),e=!0}if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}e||(this._rendererFactory?.begin?.(),this._rendererFactory?.end?.()),this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:e})=>ws(e))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(e){let i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){let i=e;Os(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView);try{this.tick()}catch(r){this.internalErrorHandler(r)}this.components.push(e),this._injector.get(wb,[]).forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>Os(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new X(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function Os(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function PS(){let n,t;return{promise:new Promise((i,r)=>{n=i,t=r}),resolve:n,reject:t}}function Q(n,t,e,i){let r=oe(),o=dr();if(sn(r,o,t)){let s=We(),a=Ms();nD(a,r,n,t,e,i)}return Q}var Sb=new se("",{providedIn:"root",factory:()=>!1});var OS=!1,Ks=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";function Mb(n){return n[Pt].get(Sb,OS)}function RS(n,t,e){let i=bo.get(n);if(i){for(let r of t)i.classList.push(r);for(let r of e)i.cleanupFns.push(r)}else bo.set(n,{classList:t,cleanupFns:e})}function mh(n){let t=bo.get(n);if(t){for(let e of t.cleanupFns)e();bo.delete(n)}hr.delete(n)}var bo=new WeakMap,hr=new WeakMap,mo=new WeakMap;function D_(n,t){let e=mo.get(n);if(e&&e.length>0){let i=e.findIndex(r=>r===t);i>-1&&e.splice(i,1)}e?.length===0&&mo.delete(n)}function Tb(n,t){let e=mo.get(n)?.shift(),i=t[zn];if(i){let o=mc(n.index,i)?.previousSibling;e&&o&&e===o&&e.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}}))}}function NS(n,t){mo.has(n)?mo.get(n)?.push(t):mo.set(n,[t])}function S_(n){let t=n[Gn]??={};return t.enter??=new Map}function Hc(n){let t=n[Gn]??={};return t.leave??=new Map}function kb(n){let t=typeof n=="function"?n():n,e=Array.isArray(t)?t:null;return typeof t=="string"&&(e=t.trim().split(/\s+/).filter(i=>i)),e}function AS(n,t){if(!Ks)return;let e=bo.get(n);if(e&&e.classList.length>0&&LS(n,e.classList))for(let i of e.classList)t.removeClass(n,i);mh(n)}function LS(n,t){for(let e of t)if(n.classList.contains(e))return!0;return!1}function Ib(n,t){let e=hr.get(t);return e===void 0?!0:t===n.target&&(e.animationName!==void 0&&n.animationName===e.animationName||e.propertyName!==void 0&&n.propertyName===e.propertyName)}function Pb(n,t,e){let i=n.get(t.index)??{animateFns:[]};i.animateFns.push(e),n.set(t.index,i)}function M_(n,t){if(n)for(let e of n)e();for(let e of t)e()}function T_(n,t){let e=Hc(n).get(t.index);e&&(e.resolvers=void 0)}function mr(n){if(Ln("NgAnimateEnter"),!Ks)return mr;let t=oe();if(Mb(t))return mr;let e=rt();return Tb(e,t),Pb(S_(t),e,()=>FS(t,e,n)),Ov(t[Pt]),Rv(t[Pt],S_(t)),mr}function FS(n,t,e){let i=Bt(t,n),r=n[ke],o=n[Pt].get(we),s=kb(e),a=[],l=_=>{if(_.target!==i)return;let w=_ instanceof AnimationEvent?"animationend":"transitionend";o.runOutsideAngular(()=>{r.listen(i,w,h)})},h=_=>{_.target===i&&VS(_,i,r)};if(s&&s.length>0){o.runOutsideAngular(()=>{a.push(r.listen(i,"animationstart",l)),a.push(r.listen(i,"transitionstart",l))}),RS(i,s,a);for(let _ of s)r.addClass(i,_);o.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(Mv(i,hr,Ks),!hr.has(i)){for(let _ of s)r.removeClass(i,_);mh(i)}})})}}function VS(n,t,e){let i=bo.get(t);if(!(n.target!==t||!i)&&Ib(n,t)){n.stopImmediatePropagation();for(let r of i.classList)e.removeClass(t,r);mh(t)}}function gr(n){if(Ln("NgAnimateLeave"),!Ks)return gr;let t=oe();if(Mb(t))return gr;let i=rt();return Tb(i,t),Pb(Hc(t),i,()=>BS(t,i,n)),Ov(t[Pt]),gr}function BS(n,t,e){let{promise:i,resolve:r}=PS(),o=Bt(t,n),s=n[ke],a=n[Pt].get(we);xi.add(n),(Hc(n).get(t.index).resolvers??=[]).push(r);let l=kb(e);return l&&l.length>0?jS(o,t,n,l,s,a):r(),{promise:i,resolve:r}}function jS(n,t,e,i,r,o){AS(n,r);let s=[],a=Hc(e).get(t.index)?.resolvers,l=h=>{if(h.target===n&&(h instanceof CustomEvent||Ib(h,n))){if(h.stopImmediatePropagation(),hr.delete(n),D_(t,n),Array.isArray(t.projection))for(let _ of i)r.removeClass(n,_);M_(a,s),T_(e,t)}};o.runOutsideAngular(()=>{s.push(r.listen(n,"animationend",l)),s.push(r.listen(n,"transitionend",l))}),NS(t,n);for(let h of i)r.addClass(n,h);o.runOutsideAngular(()=>{requestAnimationFrame(()=>{Mv(n,hr,Ks),hr.has(n)||(D_(t,n),M_(a,s),T_(e,t))})})}function zc(){return oe()[yt][Ue]}var yf=class{destroy(t){}updateValue(t,e){}swap(t,e){let i=Math.min(t,e),r=Math.max(t,e),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(t,e){this.attach(e,this.detach(t))}};function Gp(n,t,e,i,r){return n===e&&Object.is(t,i)?1:Object.is(r(n,t),r(e,i))?-1:0}function $S(n,t,e){let i,r,o=0,s=n.length-1,a=void 0;if(Array.isArray(t)){let l=t.length-1;for(;o<=s&&o<=l;){let h=n.at(o),_=t[o],w=Gp(o,h,o,_,e);if(w!==0){w<0&&n.updateValue(o,_),o++;continue}let M=n.at(s),T=t[l],A=Gp(s,M,l,T,e);if(A!==0){A<0&&n.updateValue(s,T),s--,l--;continue}let U=e(o,h),K=e(s,M),G=e(o,_);if(Object.is(G,K)){let be=e(l,T);Object.is(be,U)?(n.swap(o,s),n.updateValue(s,T),l--,s--):n.move(s,o),n.updateValue(o,_),o++;continue}if(i??=new bc,r??=I_(n,o,s,e),xf(n,i,o,G))n.updateValue(o,_),o++,s++;else if(r.has(G))i.set(U,n.detach(o)),s--;else{let be=n.create(o,t[o]);n.attach(o,be),o++,s++}}for(;o<=l;)k_(n,i,e,o,t[o]),o++}else if(t!=null){let l=t[Symbol.iterator](),h=l.next();for(;!h.done&&o<=s;){let _=n.at(o),w=h.value,M=Gp(o,_,o,w,e);if(M!==0)M<0&&n.updateValue(o,w),o++,h=l.next();else{i??=new bc,r??=I_(n,o,s,e);let T=e(o,w);if(xf(n,i,o,T))n.updateValue(o,w),o++,s++,h=l.next();else if(!r.has(T))n.attach(o,n.create(o,w)),o++,s++,h=l.next();else{let A=e(o,_);i.set(A,n.detach(o)),s--}}}for(;!h.done;)k_(n,i,e,n.length,h.value),h=l.next()}for(;o<=s;)n.destroy(n.detach(s--));i?.forEach(l=>{n.destroy(l)})}function xf(n,t,e,i){return t!==void 0&&t.has(i)?(n.attach(e,t.get(i)),t.delete(i),!0):!1}function k_(n,t,e,i,r){if(xf(n,t,i,e(i,r)))n.updateValue(i,r);else{let o=n.create(i,r);n.attach(i,o)}}function I_(n,t,e,i){let r=new Set;for(let o=t;o<=e;o++)r.add(i(o,n.at(o)));return r}var bc=class{kvMap=new Map;_vMap=void 0;has(t){return this.kvMap.has(t)}delete(t){if(!this.has(t))return!1;let e=this.kvMap.get(t);return this._vMap!==void 0&&this._vMap.has(e)?(this.kvMap.set(t,this._vMap.get(e)),this._vMap.delete(e)):this.kvMap.delete(t),!0}get(t){return this.kvMap.get(t)}set(t,e){if(this.kvMap.has(t)){let i=this.kvMap.get(t);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(i);)i=r.get(i);r.set(i,e)}else this.kvMap.set(t,e)}forEach(t){for(let[e,i]of this.kvMap)if(t(i,e),this._vMap!==void 0){let r=this._vMap;for(;r.has(i);)i=r.get(i),t(i,e)}}};function E(n,t,e,i,r,o,s,a){Ln("NgControlFlow");let l=oe(),h=We(),_=rn(h.consts,o);return js(l,h,n,t,e,i,r,_,256,s,a),Xs}function Xs(n,t,e,i,r,o,s,a){Ln("NgControlFlow");let l=oe(),h=We(),_=rn(h.consts,o);return js(l,h,n,t,e,i,r,_,512,s,a),Xs}function D(n,t){Ln("NgControlFlow");let e=oe(),i=dr(),r=e[i]!==gt?e[i]:-1,o=r!==-1?yc(e,Ae+r):void 0,s=0;if(sn(e,i,n)){let a=ae(null);try{if(o!==void 0&&Xv(o,s),n!==-1){let l=Ae+n,h=yc(e,l),_=Df(e[re],l),w=eb(h,_,e),M=qs(e,_,t,{dehydratedView:w});Zs(h,M,s,vo(_,w))}}finally{ae(a)}}else if(o!==void 0){let a=Kv(o,s);a!==void 0&&(a[Ue]=t)}}var Cf=class{lContainer;$implicit;$index;constructor(t,e,i){this.lContainer=t,this.$implicit=e,this.$index=i}get $count(){return this.lContainer.length-Ge}};function Zn(n){return n}function jt(n,t){return t}var wf=class{hasEmptyBlock;trackByFn;liveCollection;constructor(t,e,i){this.hasEmptyBlock=t,this.trackByFn=e,this.liveCollection=i}};function W(n,t,e,i,r,o,s,a,l,h,_,w,M){Ln("NgControlFlow");let T=oe(),A=We(),U=l!==void 0,K=oe(),G=a?s.bind(K[yt][Ue]):s,be=new wf(U,G);K[Ae+n]=be,js(T,A,n+1,t,e,i,r,rn(A.consts,o),256),U&&js(T,A,n+2,l,h,_,w,rn(A.consts,M),512)}var Ef=class extends yf{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(t,e,i){super(),this.lContainer=t,this.hostLView=e,this.templateTNode=i}get length(){return this.lContainer.length-Ge}at(t){return this.getLView(t)[Ue].$implicit}attach(t,e){let i=e[rr];this.needsIndexUpdate||=t!==this.length,Zs(this.lContainer,e,t,vo(this.templateTNode,i)),HS(this.lContainer,t)}detach(t){return this.needsIndexUpdate||=t!==this.length-1,zS(this.lContainer,t),US(this.lContainer,t)}create(t,e){let i=gc(this.lContainer,this.templateTNode.tView.ssrId),r=qs(this.hostLView,this.templateTNode,new Cf(this.lContainer,e,t),{dehydratedView:i});return this.operationsCounter?.recordCreate(),r}destroy(t){Rc(t[re],t),this.operationsCounter?.recordDestroy()}updateValue(t,e){this.getLView(t)[Ue].$implicit=e}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let t=0;t<this.length;t++)this.getLView(t)[Ue].$index=t}getLView(t){return GS(this.lContainer,t)}};function q(n){let t=ae(null),e=on();try{let i=oe(),r=i[re],o=i[e],s=e+1,a=yc(i,s);if(o.liveCollection===void 0){let h=Df(r,s);o.liveCollection=new Ef(a,i,h)}else o.liveCollection.reset();let l=o.liveCollection;if($S(l,n,o.trackByFn),l.updateIndexes(),o.hasEmptyBlock){let h=dr(),_=l.length===0;if(sn(i,h,_)){let w=e+2,M=yc(i,w);if(_){let T=Df(r,w),A=eb(M,T,i),U=qs(i,T,void 0,{dehydratedView:A});Zs(M,U,0,vo(T,A))}else r.firstUpdatePass&&SD(M),Xv(M,0)}}}finally{ae(t)}}function yc(n,t){return n[t]}function HS(n,t){if(n.length<=Ge)return;let e=Ge+t,i=n[e],r=i?i[Gn]:void 0;if(i&&r&&r.detachedLeaveAnimationFns&&r.detachedLeaveAnimationFns.length>0){let o=i[Pt];RE(o,r),xi.delete(i),r.detachedLeaveAnimationFns=void 0}}function zS(n,t){if(n.length<=Ge)return;let e=Ge+t,i=n[e],r=i?i[Gn]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function US(n,t){return Ls(n,t)}function GS(n,t){return Kv(n,t)}function Df(n,t){return Cs(n,t)}function S(n,t,e){let i=oe(),r=dr();if(sn(i,r,t)){let o=We(),s=Ms();KE(s,i,n,t,i[ke],e)}return S}function Sf(n,t,e,i,r){ih(t,n,e,r?"class":"style",i)}function u(n,t,e,i){let r=oe(),o=r[re],s=n+Ae,a=o.firstCreatePass?sh(s,r,2,t,eh,jl(),e,i):o.data[s];if(th(a,r,n,t,Ob),so(a)){let l=r[re];Ac(l,r,a),Ff(l,a,r)}return i!=null&&Ws(r,a),u}function f(){let n=We(),t=rt(),e=nh(t);return n.firstCreatePass&&ah(n,e),Tp(e)&&kp(),Sp(),e.classesWithoutHost!=null&&n1(e)&&Sf(n,e,oe(),e.classesWithoutHost,!0),e.stylesWithoutHost!=null&&i1(e)&&Sf(n,e,oe(),e.stylesWithoutHost,!1),f}function j(n,t,e,i){return u(n,t,e,i),f(),j}function b(n,t,e,i){let r=oe(),o=r[re],s=n+Ae,a=o.firstCreatePass?jD(s,o,2,t,e,i):o.data[s];return th(a,r,n,t,Ob),i!=null&&Ws(r,a),b}function y(){let n=rt(),t=nh(n);return Tp(t)&&kp(),Sp(),y}function te(n,t,e,i){return b(n,t,e,i),y(),te}var Ob=(n,t,e,i,r)=>(Ts(!0),mv(t[ke],i,Fp()));function gh(n,t,e){let i=oe(),r=i[re],o=n+Ae,s=r.firstCreatePass?sh(o,i,8,"ng-container",eh,jl(),t,e):r.data[o];if(th(s,i,n,"ng-container",WS),so(s)){let a=i[re];Ac(a,i,s),Ff(a,s,i)}return e!=null&&Ws(i,s),gh}function _h(){let n=We(),t=rt(),e=nh(t);return n.firstCreatePass&&ah(n,e),_h}function Ct(n,t,e){return gh(n,t,e),_h(),Ct}var WS=(n,t,e,i,r)=>(Ts(!0),J1(t[ke],""));function I(){return oe()}function $(n,t,e){let i=oe(),r=dr();if(sn(i,r,t)){let o=We(),s=Ms();jv(s,i,n,t,i[ke],e)}return $}var Kl=void 0;function qS(n){let t=Math.floor(Math.abs(n)),e=n.toString().replace(/^[^.]*\.?/,"").length;return t===1&&e===0?1:5}var ZS=["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"]],Kl,[["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"]],Kl,[["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}",Kl,"{1} 'at' {0}",Kl],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",qS],Wp={};function Gt(n){let t=YS(n),e=P_(t);if(e)return e;let i=t.split("-")[0];if(e=P_(i),e)return e;if(i==="en")return ZS;throw new X(701,!1)}function P_(n){if(!(n in Wp)){let t=fn.ng&&fn.ng.common&&fn.ng.common.locales&&fn.ng.common.locales[n];return t!==void 0&&(Wp[n]=t),t}return Wp[n]}var Qe=(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})(Qe||{});function YS(n){return n.toLowerCase().replace(/_/g,"-")}var Js="en-US";var QS=Js;function Rb(n){typeof n=="string"&&(QS=n.toLowerCase().replace(/_/g,"-"))}function C(n,t,e){let i=oe(),r=We(),o=rt();return KS(r,i,i[ke],o,n,t,e),C}function F(n,t,e){let i=oe(),r=We(),o=rt();return(o.type&3||e)&&ab(o,r,i,e,i[ke],n,t,ic(o,i,t)),F}function KS(n,t,e,i,r,o,s){let a=!0,l=null;if((i.type&3||s)&&(l??=ic(i,t,o),ab(i,n,t,s,e,r,o,l)&&(a=!1)),a){let h=i.outputs?.[r],_=i.hostDirectiveOutputs?.[r];if(_&&_.length)for(let w=0;w<_.length;w+=2){let M=_[w],T=_[w+1];l??=ic(i,t,o),x_(i,t,M,T,r,l)}if(h&&h.length)for(let w of h)l??=ic(i,t,o),x_(i,t,w,r,r,l)}}function d(n=1){return q0(n)}function XS(n,t){let e=null,i=dE(n);for(let r=0;r<t.length;r++){let o=t[r];if(o==="*"){e=r;continue}if(i===null?xv(n,o,!0):fE(i,o))return r}return e}function vh(n){let t=oe()[yt][It];if(!t.projection){let e=n?n.length:1,i=t.projection=b0(e,null),r=i.slice(),o=t.child;for(;o!==null;){if(o.type!==128){let s=n?XS(o,n):0;s!==null&&(r[s]?r[s].projectionNext=o:i[s]=o,r[s]=o)}o=o.next}}}function bh(n,t=0,e,i,r,o){let s=oe(),a=We(),l=i?n+1:null;l!==null&&js(s,a,l,i,r,o,null,e);let h=Co(a,Ae+n,16,null,e||null);h.projection===null&&(h.projection=t),Op();let w=!s[rr]||Mp();s[yt][It].projection[h.projection]===null&&l!==null?JS(s,a,l):w&&!Sc(h)&&UE(a,s,h)}function JS(n,t,e){let i=Ae+e,r=t.data[i],o=n[i],s=gc(o,r.tView.ssrId),a=qs(n,r,void 0,{dehydratedView:s});Zs(o,a,0,vo(r,s))}function yh(n,t,e){fb(n,t,e)}function xh(n){let t=oe(),e=We(),i=Hl();Ss(i+1);let r=ph(e,i);if(n.dirty&&I0(t)===((r.metadata.flags&2)===2)){if(r.matches===null)n.reset([]);else{let o=hb(t,i);n.reset(o,Q_),n.notifyOnChanges()}return!0}return!1}function Ch(){return uh(oe(),Hl())}function st(n,t,e,i){hS(n,fb(t,e,i))}function Rt(n=1){Ss(Hl()+n)}function _t(n){let t=V0();return Fl(t,Ae+n)}function Xl(n,t){return n<<17|t<<2}function vr(n){return n>>17&32767}function eM(n){return(n&2)==2}function tM(n,t){return n&131071|t<<17}function Mf(n){return n|2}function yo(n){return(n&131068)>>2}function qp(n,t){return n&-131069|t<<2}function nM(n){return(n&1)===1}function Tf(n){return n|1}function iM(n,t,e,i,r,o){let s=o?t.classBindings:t.styleBindings,a=vr(s),l=yo(s);n[i]=e;let h=!1,_;if(Array.isArray(e)){let w=e;_=w[1],(_===null||no(w,_)>0)&&(h=!0)}else _=e;if(r)if(l!==0){let M=vr(n[a+1]);n[i+1]=Xl(M,a),M!==0&&(n[M+1]=qp(n[M+1],i)),n[a+1]=tM(n[a+1],i)}else n[i+1]=Xl(a,0),a!==0&&(n[a+1]=qp(n[a+1],i)),a=i;else n[i+1]=Xl(l,0),a===0?a=i:n[l+1]=qp(n[l+1],i),l=i;h&&(n[i+1]=Mf(n[i+1])),O_(n,_,i,!0),O_(n,_,i,!1),rM(t,_,n,i,o),s=Xl(a,l),o?t.classBindings=s:t.styleBindings=s}function rM(n,t,e,i,r){let o=r?n.residualClasses:n.residualStyles;o!=null&&typeof t=="string"&&no(o,t)>=0&&(e[i+1]=Tf(e[i+1]))}function O_(n,t,e,i){let r=n[e+1],o=t===null,s=i?vr(r):yo(r),a=!1;for(;s!==0&&(a===!1||o);){let l=n[s],h=n[s+1];oM(l,t)&&(a=!0,n[s+1]=i?Tf(h):Mf(h)),s=i?vr(h):yo(h)}a&&(n[e+1]=i?Mf(r):Tf(r))}function oM(n,t){return n===null||t==null||(Array.isArray(n)?n[1]:n)===t?!0:Array.isArray(n)&&typeof t=="string"?no(n,t)>=0:!1}var bn={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function sM(n){return n.substring(bn.key,bn.keyEnd)}function aM(n){return lM(n),Nb(n,Ab(n,0,bn.textEnd))}function Nb(n,t){let e=bn.textEnd;return e===t?-1:(t=bn.keyEnd=cM(n,bn.key=t,e),Ab(n,t,e))}function lM(n){bn.key=0,bn.keyEnd=0,bn.value=0,bn.valueEnd=0,bn.textEnd=n.length}function Ab(n,t,e){for(;t<e&&n.charCodeAt(t)<=32;)t++;return t}function cM(n,t,e){for(;t<e&&n.charCodeAt(t)>32;)t++;return t}function ne(n,t,e){return Lb(n,t,e,!1),ne}function J(n,t){return Lb(n,t,null,!0),J}function Xe(n){uM(_M,dM,n,!0)}function dM(n,t){for(let e=aM(t);e>=0;e=Nb(t,e))Nl(n,sM(t),!0)}function Lb(n,t,e,i){let r=oe(),o=We(),s=Ds(2);if(o.firstUpdatePass&&Vb(o,n,s,i),t!==gt&&sn(r,s,t)){let a=o.data[on()];Bb(o,a,r,r[ke],n,r[s+1]=bM(t,e),i,s)}}function uM(n,t,e,i){let r=We(),o=Ds(2);r.firstUpdatePass&&Vb(r,null,o,i);let s=oe();if(e!==gt&&sn(s,o,e)){let a=r.data[on()];if(jb(a,i)&&!Fb(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;l!==null&&(e=kl(l,e||"")),Sf(r,a,s,e,i)}else vM(r,a,s,s[ke],s[o+1],s[o+1]=gM(n,t,e),i,o)}}function Fb(n,t){return t>=n.expandoStartIndex}function Vb(n,t,e,i){let r=n.data;if(r[e+1]===null){let o=r[on()],s=Fb(n,e);jb(o,i)&&t===null&&!s&&(t=!1),t=pM(r,o,t,i),iM(r,o,t,e,s,i)}}function pM(n,t,e,i){let r=z0(n),o=i?t.residualClasses:t.residualStyles;if(r===null)(i?t.classBindings:t.styleBindings)===0&&(e=Zp(null,n,t,e,i),e=$s(e,t.attrs,i),o=null);else{let s=t.directiveStylingLast;if(s===-1||n[s]!==r)if(e=Zp(r,n,t,e,i),o===null){let l=fM(n,t,i);l!==void 0&&Array.isArray(l)&&(l=Zp(null,n,t,l[1],i),l=$s(l,t.attrs,i),hM(n,t,i,l))}else o=mM(n,t,i)}return o!==void 0&&(i?t.residualClasses=o:t.residualStyles=o),e}function fM(n,t,e){let i=e?t.classBindings:t.styleBindings;if(yo(i)!==0)return n[vr(i)]}function hM(n,t,e,i){let r=e?t.classBindings:t.styleBindings;n[vr(r)]=i}function mM(n,t,e){let i,r=t.directiveEnd;for(let o=1+t.directiveStylingLast;o<r;o++){let s=n[o].hostAttrs;i=$s(i,s,e)}return $s(i,t.attrs,e)}function Zp(n,t,e,i,r){let o=null,s=e.directiveEnd,a=e.directiveStylingLast;for(a===-1?a=e.directiveStart:a++;a<s&&(o=t[a],i=$s(i,o.hostAttrs,r),o!==n);)a++;return n!==null&&(e.directiveStylingLast=a),i}function $s(n,t,e){let i=e?1:2,r=-1;if(t!==null)for(let o=0;o<t.length;o++){let s=t[o];typeof s=="number"?r=s:r===i&&(Array.isArray(n)||(n=n===void 0?[]:["",n]),Nl(n,s,e?!0:t[++o]))}return n===void 0?null:n}function gM(n,t,e){if(e==null||e==="")return Xt;let i=[],r=Us(e);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"&&t(i,r);return i}function _M(n,t,e){let i=String(t);i!==""&&!i.includes(" ")&&Nl(n,i,e)}function vM(n,t,e,i,r,o,s,a){r===gt&&(r=Xt);let l=0,h=0,_=0<r.length?r[0]:null,w=0<o.length?o[0]:null;for(;_!==null||w!==null;){let M=l<r.length?r[l+1]:void 0,T=h<o.length?o[h+1]:void 0,A=null,U;_===w?(l+=2,h+=2,M!==T&&(A=w,U=T)):w===null||_!==null&&_<w?(l+=2,A=_):(h+=2,A=w,U=T),A!==null&&Bb(n,t,e,i,A,U,s,a),_=l<r.length?r[l]:null,w=h<o.length?o[h]:null}}function Bb(n,t,e,i,r,o,s,a){if(!(t.type&3))return;let l=n.data,h=l[a+1],_=nM(h)?R_(l,t,e,r,yo(h),s):void 0;if(!xc(_)){xc(o)||eM(h)&&(o=R_(l,null,e,r,a,s));let w=bp(on(),e);WE(i,s,w,r,o)}}function R_(n,t,e,i,r,o){let s=t===null,a;for(;r>0;){let l=n[r],h=Array.isArray(l),_=h?l[1]:l,w=_===null,M=e[r+1];M===gt&&(M=w?Xt:void 0);let T=w?Al(M,i):_===i?M:void 0;if(h&&!xc(T)&&(T=Al(l,i)),xc(T)&&(a=T,s))return a;let A=n[r+1];r=s?vr(A):yo(A)}if(t!==null){let l=o?t.residualClasses:t.residualStyles;l!=null&&(a=Al(l,i))}return a}function xc(n){return n!==void 0}function bM(n,t){return n==null||n===""||(typeof t=="string"?n=n+t:typeof n=="object"&&(n=fi(Us(n)))),n}function jb(n,t){return(n.flags&(t?8:16))!==0}function p(n,t=""){let e=oe(),i=We(),r=n+Ae,o=i.firstCreatePass?Co(i,r,1,t,null):i.data[r],s=yM(i,e,o,t,n);e[r]=s,Gl()&&Xf(i,e,s,o),lo(o,!1)}var yM=(n,t,e,i,r)=>(Ts(!0),K1(t[ke],i));function xM(n,t,e,i=""){return sn(n,dr(),e)?t+hn(e)+i:gt}function CM(n,t,e,i,r,o=""){let s=Np(),a=dh(n,s,e,r);return Ds(2),a?t+hn(e)+i+hn(r)+o:gt}function wM(n,t,e,i,r,o,s,a=""){let l=Np(),h=HD(n,l,e,r,s);return Ds(3),h?t+hn(e)+i+hn(r)+o+hn(s)+a:gt}function P(n){return H("",n),P}function H(n,t,e){let i=oe(),r=xM(i,n,t,e);return r!==gt&&wh(i,on(),r),H}function Fn(n,t,e,i,r){let o=oe(),s=CM(o,n,t,e,i,r);return s!==gt&&wh(o,on(),s),Fn}function wo(n,t,e,i,r,o,s){let a=oe(),l=wM(a,n,t,e,i,r,o,s);return l!==gt&&wh(a,on(),l),wo}function wh(n,t,e){let i=bp(t,n);X1(n[ke],i,e)}function EM(n,t,e){let i=We();if(i.firstCreatePass){let r=On(n);kf(e,i.data,i.blueprint,r,!0),kf(t,i.data,i.blueprint,r,!1)}}function kf(n,t,e,i,r){if(n=bt(n),Array.isArray(n))for(let o=0;o<n.length;o++)kf(n[o],t,e,i,r);else{let o=We(),s=oe(),a=rt(),l=Xi(n)?n:bt(n.provide),h=fp(n),_=a.providerIndexes&1048575,w=a.directiveStart,M=a.providerIndexes>>20;if(Xi(n)||!n.multi){let T=new _r(h,r,xn,null),A=Qp(l,t,r?_:_+M,w);A===-1?(Xp(lc(a,s),o,l),Yp(o,n,t.length),t.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),e.push(T),s.push(T)):(e[A]=T,s[A]=T)}else{let T=Qp(l,t,_+M,w),A=Qp(l,t,_,_+M),U=T>=0&&e[T],K=A>=0&&e[A];if(r&&!K||!r&&!U){Xp(lc(a,s),o,l);let G=MM(r?SM:DM,e.length,r,i,h,n);!r&&K&&(e[A].providerFactory=G),Yp(o,n,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),e.push(G),s.push(G)}else{let G=$b(e[r?A:T],h,!r&&i);Yp(o,n,T>-1?T:A,G)}!r&&i&&K&&e[A].componentProviders++}}}function Yp(n,t,e,i){let r=Xi(t),o=D0(t);if(r||o){let l=(o?bt(t.useClass):t).prototype.ngOnDestroy;if(l){let h=n.destroyHooks||(n.destroyHooks=[]);if(!r&&t.multi){let _=h.indexOf(e);_===-1?h.push(e,[i,l]):h[_+1].push(i,l)}else h.push(e,l)}}}function $b(n,t,e){return e&&n.componentProviders++,n.multi.push(t)-1}function Qp(n,t,e,i){for(let r=e;r<i;r++)if(t[r]===n)return r;return-1}function DM(n,t,e,i,r){return If(this.multi,[])}function SM(n,t,e,i,r){let o=this.multi,s;if(this.providerFactory){let a=this.providerFactory.componentProviders,l=Rs(i,i[re],this.providerFactory.index,r);s=l.slice(0,a),If(o,s);for(let h=a;h<l.length;h++)s.push(l[h])}else s=[],If(o,s);return s}function If(n,t){for(let e=0;e<n.length;e++){let i=n[e];t.push(i())}return t}function MM(n,t,e,i,r,o){let s=new _r(n,e,xn,null);return s.multi=[],s.index=t,s.componentProviders=0,$b(s,r,i&&!e),s}function ea(n,t=[]){return e=>{e.providersResolver=(i,r)=>EM(i,r?r(n):n,t)}}function ta(n,t,e){let i=Es()+n,r=oe();return r[i]===gt?ch(r,i,e?t.call(e):t()):$D(r,i)}function Mi(n,t,e,i){return zb(oe(),Es(),n,t,e,i)}function Hb(n,t){let e=n[t];return e===gt?void 0:e}function zb(n,t,e,i,r,o){let s=t+e;return sn(n,s,r)?ch(n,s+1,o?i.call(o,r):i(r)):Hb(n,s+1)}function TM(n,t,e,i,r,o,s){let a=t+e;return dh(n,a,r,o)?ch(n,a+2,s?i.call(s,r,o):i(r,o)):Hb(n,a+2)}function Ti(n,t){let e=We(),i,r=n+Ae;e.firstCreatePass?(i=kM(t,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks??=[]).push(r,i.onDestroy)):i=e.data[r];let o=i.factory||(i.factory=Ki(i.type,!0)),s,a=Tt(xn);try{let l=ac(!1),h=o();return ac(l),yp(e,oe(),r,h),h}finally{Tt(a)}}function kM(n,t){if(t)for(let e=t.length-1;e>=0;e--){let i=t[e];if(n===i.name)return i}}function Eh(n,t,e){let i=n+Ae,r=oe(),o=Fl(r,i);return Ub(r,i)?zb(r,Es(),t,o.transform,e,o):o.transform(e)}function Eo(n,t,e,i){let r=n+Ae,o=oe(),s=Fl(o,r);return Ub(o,r)?TM(o,Es(),t,s.transform,e,i,s):s.transform(e,i)}function Ub(n,t){return n[re].data[t].pure}function Do(n,t){return Lc(n,t)}var IM=(()=>{class n{zone=R(we);changeDetectionScheduler=R(Jt);applicationRef=R(xr);applicationErrorHandler=R(_n);_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(e){this.applicationErrorHandler(e)}})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Gb=new se("",{factory:()=>!1});function Dh({ngZoneFactory:n,ignoreChangesOutsideZone:t,scheduleInRootZone:e}){return n??=()=>new we(ie(z({},Mh()),{scheduleInRootZone:e})),[{provide:we,useFactory:n},{provide:nr,multi:!0,useFactory:()=>{let i=R(IM,{optional:!0});return()=>i.initialize()}},{provide:nr,multi:!0,useFactory:()=>{let i=R(PM);return()=>{i.initialize()}}},t===!0?{provide:Vp,useValue:!0}:[],{provide:Bp,useValue:e??Tv},{provide:_n,useFactory:()=>{let i=R(we),r=R(Vt),o;return s=>{i.runOutsideAngular(()=>{r.destroyed&&!o?setTimeout(()=>{throw s}):(o??=r.get(zt),o.handleError(s))})}}}]}function Sh(n){let t=n?.ignoreChangesOutsideZone,e=n?.scheduleInRootZone,i=Dh({ngZoneFactory:()=>{let r=Mh(n);return r.scheduleInRootZone=e,r.shouldCoalesceEventChangeDetection&&Ln("NgZone_CoalesceEvent"),new we(r)},ignoreChangesOutsideZone:t,scheduleInRootZone:e});return _s([{provide:Gb,useValue:!0},{provide:ks,useValue:!1},i])}function Mh(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:n?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:n?.runCoalescing??!1}}var PM=(()=>{class n{subscription=new Be;initialized=!1;zone=R(we);pendingTasks=R(yi);initialize(){if(this.initialized)return;this.initialized=!0;let e=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(e=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{we.assertNotInAngularZone(),queueMicrotask(()=>{e!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(e),e=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{we.assertInAngularZone(),e??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Wb=(()=>{class n{applicationErrorHandler=R(_n);appRef=R(xr);taskService=R(yi);ngZone=R(we);zonelessEnabled=R(ks);tracing=R(Ei,{optional:!0});disableScheduling=R(Vp,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Be;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(fc):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(R(Bp,{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 hc||!this.zoneIsDefined)}notify(e){if(!this.zonelessEnabled&&e===5)return;let i=!1;switch(e){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?u_:kv;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>r(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>r(()=>this.tick()))}shouldScheduleTick(e){return!(this.disableScheduling&&!e||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(fc+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 e=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(i){this.taskService.remove(e),this.applicationErrorHandler(i)}finally{this.cleanup()}this.useMicrotaskScheduler=!0,u_(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(e)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let e=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(e)}}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function OM(){return typeof $localize<"u"&&$localize.locale||Js}var na=new se("",{providedIn:"root",factory:()=>R(na,{optional:!0,skipSelf:!0})||OM()});var Uc=class{destroyed=!1;listeners=null;errorHandler=R(zt,{optional:!0});destroyRef=R(ot);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(t){if(this.destroyed)throw new X(953,!1);return(this.listeners??=[]).push(t),{unsubscribe:()=>{let e=this.listeners?.indexOf(t);e!==void 0&&e!==-1&&this.listeners?.splice(e,1)}}}emit(t){if(this.destroyed){console.warn(er(953,!1));return}if(this.listeners===null)return;let e=ae(null);try{for(let i of this.listeners)try{i(t)}catch(r){this.errorHandler?.handleError(r)}}finally{ae(e)}}};function je(n){return s0(n)}function O(n,t){return Jo(n,t?.equal)}var Th=class{[Ke];constructor(t){this[Ke]=t}destroy(){this[Ke].destroy()}};function ge(n,t){let e=t?.injector??R(kt),i=t?.manualCleanup!==!0?e.get(ot):null,r,o=e.get(ur,null,{optional:!0}),s=e.get(Jt);return o!==null?(r=AM(o.view,s,n),i instanceof ms&&i._lView===o.view&&(i=null)):r=LM(n,e.get(Is),s),r.injector=e,i!==null&&(r.onDestroyFn=i.onDestroy(()=>r.destroy())),new Th(r)}var Zb=ie(z({},a0),{cleanupFns:void 0,zone:null,onDestroyFn:pr,run(){let n=co(!1);try{l0(this)}finally{co(n)}},cleanup(){if(!this.cleanupFns?.length)return;let n=ae(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],ae(n)}}}),RM=ie(z({},Zb),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){li(this),this.onDestroyFn(),this.cleanup(),this.scheduler.remove(this)}}),NM=ie(z({},Zb),{consumerMarkedDirty(){this.view[le]|=8192,vi(this.view),this.notifier.notify(13)},destroy(){li(this),this.onDestroyFn(),this.cleanup(),this.view[Un]?.delete(this)}});function AM(n,t,e){let i=Object.create(NM);return i.view=n,i.zone=typeof Zone<"u"?Zone.current:null,i.notifier=t,i.fn=Yb(i,e),n[Un]??=new Set,n[Un].add(i),i.consumerMarkedDirty(i),i}function LM(n,t,e){let i=Object.create(RM);return i.fn=Yb(i,n),i.scheduler=t,i.notifier=e,i.zone=typeof Zone<"u"?Zone.current:null,i.scheduler.add(i),i.notifier.notify(12),i}function Yb(n,t){return()=>{t(e=>(n.cleanupFns??=[]).push(e))}}var FM=n=>n;function Cr(n,t){if(typeof n=="function"){let e=$u(n,FM,t?.equal);return qb(e,t?.debugName)}else{let e=$u(n.source,n.computation,n.equal);return qb(e,n.debugName)}}function qb(n,t){let e=n[Ke],i=n;return i.set=r=>r0(e,r),i.update=r=>o0(e,r),i.asReadonly=Wl.bind(n),i}var ey=Symbol("InputSignalNode#UNSET"),KM=ie(z({},es),{transformFn:void 0,applyValueToInputSignal(n,t){Hi(n,t)}});function ty(n,t){let e=Object.create(KM);e.value=n,e.transformFn=t?.transform;function i(){if(si(e),e.value===ey){let r=null;throw new X(-950,r)}return e.value}return i[Ke]=e,i}var XM=new se("");XM.__NG_ELEMENT_ID__=n=>{let t=rt();if(t===null)throw new X(204,!1);if(t.type&2)return t.value;if(n&8)return null;throw new X(204,!1)};function Z(n){return new Uc}function Qb(n,t){return ty(n,t)}function JM(n){return ty(ey,n)}var N=(Qb.required=JM,Qb);function Kb(n,t){return gb(t)}function eT(n,t){return _b(t)}var dt=(Kb.required=eT,Kb);var Ih=new se(""),tT=new se("");function ia(n){return!n.moduleRef}function nT(n){let t=ia(n)?n.r3Injector:n.moduleRef.injector,e=t.get(we);return e.run(()=>{ia(n)?n.r3Injector.resolveInjectorInitializers():n.moduleRef.resolveInjectorInitializers();let i=t.get(_n),r;if(e.runOutsideAngular(()=>{r=e.onError.subscribe({next:i})}),ia(n)){let o=()=>t.destroy(),s=n.platformInjector.get(Ih);s.add(o),t.onDestroy(()=>{r.unsubscribe(),s.delete(o)})}else{let o=()=>n.moduleRef.destroy(),s=n.platformInjector.get(Ih);s.add(o),n.moduleRef.onDestroy(()=>{Os(n.allPlatformModules,n.moduleRef),r.unsubscribe(),s.delete(o)})}return rT(i,e,()=>{let o=t.get(yi),s=o.add(),a=t.get(hh);return a.runInitializers(),a.donePromise.then(()=>{let l=t.get(na,Js);if(Rb(l||Js),!t.get(tT,!0))return ia(n)?t.get(xr):(n.allPlatformModules.push(n.moduleRef),n.moduleRef);if(ia(n)){let _=t.get(xr);return n.rootComponent!==void 0&&_.bootstrap(n.rootComponent),_}else return iT?.(n.moduleRef,n.allPlatformModules),n.moduleRef}).finally(()=>{o.remove(s)})})})}var iT;function rT(n,t,e){try{let i=e();return Qs(i)?i.catch(r=>{throw t.runOutsideAngular(()=>n(r)),r}):i}catch(i){throw t.runOutsideAngular(()=>n(i)),i}}var Gc=null;function oT(n=[],t){return kt.create({name:t,providers:[{provide:vs,useValue:"platform"},{provide:Ih,useValue:new Set([()=>Gc=null])},...n]})}function sT(n=[]){if(Gc)return Gc;let t=oT(n);return Gc=t,Eb(),aT(t),t}function aT(n){let t=n.get(Ec,null);io(n,()=>{t?.forEach(e=>e())})}var Zc=(()=>{class n{static __NG_ELEMENT_ID__=lT}return n})();function lT(n){return cT(rt(),oe(),(n&16)===16)}function cT(n,t,e){if(_i(n)&&!e){let i=nn(n.index,t);return new Ci(i,i)}else if(n.type&175){let i=t[yt];return new Ci(i,t)}return null}var Ph=class{constructor(){}supports(t){return lh(t)}create(t){return new Oh(t)}},dT=(n,t)=>t,Oh=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(t){this._trackByFn=t||dT}forEachItem(t){let e;for(e=this._itHead;e!==null;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,i=this._removalsHead,r=0,o=null;for(;e||i;){let s=!i||e&&e.currentIndex<Xb(i,r,o)?e:i,a=Xb(s,r,o),l=s.currentIndex;if(s===i)r--,i=i._nextRemoved;else if(e=e._next,s.previousIndex==null)r++;else{o||(o=[]);let h=a-r,_=l-r;if(h!=_){for(let M=0;M<h;M++){let T=M<o.length?o[M]:o[M]=0,A=T+M;_<=A&&A<h&&(o[M]=T+1)}let w=s.previousIndex;o[w]=_-h}}a!==l&&t(s,a,l)}}forEachPreviousItem(t){let e;for(e=this._previousItHead;e!==null;e=e._nextPrevious)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;e!==null;e=e._nextAdded)t(e)}forEachMovedItem(t){let e;for(e=this._movesHead;e!==null;e=e._nextMoved)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;e!==null;e=e._nextRemoved)t(e)}forEachIdentityChange(t){let e;for(e=this._identityChangesHead;e!==null;e=e._nextIdentityChange)t(e)}diff(t){if(t==null&&(t=[]),!lh(t))throw new X(900,!1);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e=this._itHead,i=!1,r,o,s;if(Array.isArray(t)){this.length=t.length;for(let a=0;a<this.length;a++)o=t[a],s=this._trackByFn(a,o),e===null||!Object.is(e.trackById,s)?(e=this._mismatch(e,o,s,a),i=!0):(i&&(e=this._verifyReinsertion(e,o,s,a)),Object.is(e.item,o)||this._addIdentityChange(e,o)),e=e._next}else r=0,ob(t,a=>{s=this._trackByFn(r,a),e===null||!Object.is(e.trackById,s)?(e=this._mismatch(e,a,s,r),i=!0):(i&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=t,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;t!==null;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;t!==null;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;t!==null;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,i,r){let o;return t===null?o=this._itTail:(o=t._prev,this._remove(t)),t=this._unlinkedRecords===null?null:this._unlinkedRecords.get(i,null),t!==null?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,o,r)):(t=this._linkedRecords===null?null:this._linkedRecords.get(i,r),t!==null?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,o,r)):t=this._addAfter(new Rh(e,i),o,r)),t}_verifyReinsertion(t,e,i,r){let o=this._unlinkedRecords===null?null:this._unlinkedRecords.get(i,null);return o!==null?t=this._reinsertAfter(o,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t}_truncate(t){for(;t!==null;){let e=t._next;this._addToRemovals(this._unlink(t)),t=e}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(t,e,i){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(t);let r=t._prevRemoved,o=t._nextRemoved;return r===null?this._removalsHead=o:r._nextRemoved=o,o===null?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(t,e,i),this._addToMoves(t,i),t}_moveAfter(t,e,i){return this._unlink(t),this._insertAfter(t,e,i),this._addToMoves(t,i),t}_addAfter(t,e,i){return this._insertAfter(t,e,i),this._additionsTail===null?this._additionsTail=this._additionsHead=t:this._additionsTail=this._additionsTail._nextAdded=t,t}_insertAfter(t,e,i){let r=e===null?this._itHead:e._next;return t._next=r,t._prev=e,r===null?this._itTail=t:r._prev=t,e===null?this._itHead=t:e._next=t,this._linkedRecords===null&&(this._linkedRecords=new Wc),this._linkedRecords.put(t),t.currentIndex=i,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){this._linkedRecords!==null&&this._linkedRecords.remove(t);let e=t._prev,i=t._next;return e===null?this._itHead=i:e._next=i,i===null?this._itTail=e:i._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail===null?this._movesTail=this._movesHead=t:this._movesTail=this._movesTail._nextMoved=t),t}_addToRemovals(t){return this._unlinkedRecords===null&&(this._unlinkedRecords=new Wc),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=t:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=t,t}},Rh=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(t,e){this.item=t,this.trackById=e}},Nh=class{_head=null;_tail=null;add(t){this._head===null?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let i;for(i=this._head;i!==null;i=i._nextDup)if((e===null||e<=i.currentIndex)&&Object.is(i.trackById,t))return i;return null}remove(t){let e=t._prevDup,i=t._nextDup;return e===null?this._head=i:e._nextDup=i,i===null?this._tail=e:i._prevDup=e,this._head===null}},Wc=class{map=new Map;put(t){let e=t.trackById,i=this.map.get(e);i||(i=new Nh,this.map.set(e,i)),i.add(t)}get(t,e){let i=t,r=this.map.get(i);return r?r.get(t,e):null}remove(t){let e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function Xb(n,t,e){let i=n.previousIndex;if(i===null)return i;let r=0;return e&&i<e.length&&(r=e[i]),i+t+r}function Jb(){return new Yc([new Ph])}var Yc=(()=>{class n{factories;static \u0275prov=ce({token:n,providedIn:"root",factory:Jb});constructor(e){this.factories=e}static create(e,i){if(i!=null){let r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:()=>{let i=R(n,{optional:!0,skipSelf:!0});return n.create(e,i||Jb())}}}find(e){let i=this.factories.find(r=>r.supports(e));if(i!=null)return i;throw new X(901,!1)}}return n})();function ny(n){let{rootComponent:t,appProviders:e,platformProviders:i,platformRef:r}=n;Me(8);try{let o=r?.injector??sT(i),s=[Dh({}),{provide:Jt,useExisting:Wb},Q0,...e||[]],a=new Bs({providers:s,parent:o,debugName:"",runEnvironmentInitializers:!1});return nT({r3Injector:a.injector,platformInjector:o,rootComponent:t})}catch(o){return Promise.reject(o)}finally{Me(9)}}function iy(n){return typeof n=="boolean"?n:n!=null&&n!=="false"}var kh=Symbol("NOT_SET"),ry=new Set,uT=ie(z({},es),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:kh,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!==kh&&!$i(this))return this.signal;try{for(let r of this.cleanup??ry)r()}finally{this.cleanup?.clear()}let t=[];n!==void 0&&t.push(n),t.push(this.registerCleanupFn);let e=$n(this),i;try{i=this.userFn.apply(null,t)}finally{ai(this,e)}return(this.value===kh||!this.equal(this.value,i))&&(this.value=i,this.version++),this.signal}}),Ah=class extends Ns{scheduler;lastPhase=null;nodes=[void 0,void 0,void 0,void 0];constructor(t,e,i,r,o,s=null){super(t,[void 0,void 0,void 0,void 0],i,!1,o.get(ot),s),this.scheduler=r;for(let a of Yf){let l=e[a];if(l===void 0)continue;let h=Object.create(uT);h.sequence=this,h.phase=a,h.userFn=l,h.dirty=!0,h.signal=()=>(si(h),h.value),h.signal[Ke]=h,h.registerCleanupFn=_=>(h.cleanup??=new Set).add(_),this.nodes[a]=h,this.hooks[a]=_=>h.phaseFn(_)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){super.destroy();for(let t of this.nodes)if(t)try{for(let e of t.cleanup??ry)e()}finally{li(t)}}};function ra(n,t){let e=t?.injector??R(kt),i=e.get(Jt),r=e.get(Ic),o=e.get(Ei,null,{optional:!0});r.impl??=e.get(Qf);let s=n;typeof s=="function"&&(s={mixedReadWrite:n});let a=e.get(ur,null,{optional:!0}),l=new Ah(r.impl,[s.earlyRead,s.write,s.mixedReadWrite,s.read],a?.view,i,e,o?.snapshot(null));return r.impl.register(l),l}var oy=null;function sa(){return oy}function Lh(n){oy??=n}var oa=class{};var wt=(function(n){return n[n.Format=0]="Format",n[n.Standalone=1]="Standalone",n})(wt||{}),Ie=(function(n){return n[n.Narrow=0]="Narrow",n[n.Abbreviated=1]="Abbreviated",n[n.Wide=2]="Wide",n[n.Short=3]="Short",n})(Ie||{}),$t=(function(n){return n[n.Short=0]="Short",n[n.Medium=1]="Medium",n[n.Long=2]="Long",n[n.Full=3]="Full",n})($t||{}),Qn={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 ay(n){return Gt(n)[Qe.LocaleId]}function ly(n,t,e){let i=Gt(n),r=[i[Qe.DayPeriodsFormat],i[Qe.DayPeriodsStandalone]],o=an(r,t);return an(o,e)}function cy(n,t,e){let i=Gt(n),r=[i[Qe.DaysFormat],i[Qe.DaysStandalone]],o=an(r,t);return an(o,e)}function dy(n,t,e){let i=Gt(n),r=[i[Qe.MonthsFormat],i[Qe.MonthsStandalone]],o=an(r,t);return an(o,e)}function uy(n,t){let i=Gt(n)[Qe.Eras];return an(i,t)}function aa(n,t){let e=Gt(n);return an(e[Qe.DateFormat],t)}function la(n,t){let e=Gt(n);return an(e[Qe.TimeFormat],t)}function ca(n,t){let i=Gt(n)[Qe.DateTimeFormat];return an(i,t)}function da(n,t){let e=Gt(n),i=e[Qe.NumberSymbols][t];if(typeof i>"u"){if(t===Qn.CurrencyDecimal)return e[Qe.NumberSymbols][Qn.Decimal];if(t===Qn.CurrencyGroup)return e[Qe.NumberSymbols][Qn.Group]}return i}function py(n){if(!n[Qe.ExtraData])throw new X(2303,!1)}function fy(n){let t=Gt(n);return py(t),(t[Qe.ExtraData][2]||[]).map(i=>typeof i=="string"?Fh(i):[Fh(i[0]),Fh(i[1])])}function hy(n,t,e){let i=Gt(n);py(i);let r=[i[Qe.ExtraData][0],i[Qe.ExtraData][1]],o=an(r,t)||[];return an(o,e)||[]}function an(n,t){for(let e=t;e>-1;e--)if(typeof n[e]<"u")return n[e];throw new X(2304,!1)}function Fh(n){let[t,e]=n.split(":");return{hours:+t,minutes:+e}}var pT=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Qc={},fT=/((?:[^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]*)/,hT=256;function my(n,t,e,i){let r=ET(n);mT(t),t=Yn(e,t)||t;let s=[],a;for(;t;)if(a=fT.exec(t),a){s=s.concat(a.slice(1));let _=s.pop();if(!_)break;t=_}else{s.push(t);break}let l=r.getTimezoneOffset();i&&(l=_y(i,l),r=wT(r,i));let h="";return s.forEach(_=>{let w=xT(_);h+=w?w(r,e,l):_==="''"?"'":_.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),h}function mT(n){if(n.length>hT)throw new X(2300,!1)}function td(n,t,e){let i=new Date(0);return i.setFullYear(n,t,e),i.setHours(0,0,0),i}function Yn(n,t){let e=ay(n);if(Qc[e]??={},Qc[e][t])return Qc[e][t];let i="";switch(t){case"shortDate":i=aa(n,$t.Short);break;case"mediumDate":i=aa(n,$t.Medium);break;case"longDate":i=aa(n,$t.Long);break;case"fullDate":i=aa(n,$t.Full);break;case"shortTime":i=la(n,$t.Short);break;case"mediumTime":i=la(n,$t.Medium);break;case"longTime":i=la(n,$t.Long);break;case"fullTime":i=la(n,$t.Full);break;case"short":let r=Yn(n,"shortTime"),o=Yn(n,"shortDate");i=Kc(ca(n,$t.Short),[r,o]);break;case"medium":let s=Yn(n,"mediumTime"),a=Yn(n,"mediumDate");i=Kc(ca(n,$t.Medium),[s,a]);break;case"long":let l=Yn(n,"longTime"),h=Yn(n,"longDate");i=Kc(ca(n,$t.Long),[l,h]);break;case"full":let _=Yn(n,"fullTime"),w=Yn(n,"fullDate");i=Kc(ca(n,$t.Full),[_,w]);break}return i&&(Qc[e][t]=i),i}function Kc(n,t){return t&&(n=n.replace(/\{([^}]+)}/g,function(e,i){return t!=null&&i in t?t[i]:e})),n}function Cn(n,t,e="-",i,r){let o="";(n<0||r&&n<=0)&&(r?n=-n+1:(n=-n,o=e));let s=String(n);for(;s.length<t;)s="0"+s;return i&&(s=s.slice(s.length-t)),o+s}function gT(n,t){return Cn(n,3).substring(0,t)}function Je(n,t,e=0,i=!1,r=!1){return function(o,s){let a=_T(n,o);if((e>0||a>-e)&&(a+=e),n===3)a===0&&e===-12&&(a=12);else if(n===6)return gT(a,t);let l=da(s,Qn.MinusSign);return Cn(a,t,l,i,r)}}function _T(n,t){switch(n){case 0:return t.getFullYear();case 1:return t.getMonth();case 2:return t.getDate();case 3:return t.getHours();case 4:return t.getMinutes();case 5:return t.getSeconds();case 6:return t.getMilliseconds();case 7:return t.getDay();default:throw new X(2301,!1)}}function Re(n,t,e=wt.Format,i=!1){return function(r,o){return vT(r,o,n,t,e,i)}}function vT(n,t,e,i,r,o){switch(e){case 2:return dy(t,r,i)[n.getMonth()];case 1:return cy(t,r,i)[n.getDay()];case 0:let s=n.getHours(),a=n.getMinutes();if(o){let h=fy(t),_=hy(t,r,i),w=h.findIndex(M=>{if(Array.isArray(M)){let[T,A]=M,U=s>=T.hours&&a>=T.minutes,K=s<A.hours||s===A.hours&&a<A.minutes;if(T.hours<A.hours){if(U&&K)return!0}else if(U||K)return!0}else if(M.hours===s&&M.minutes===a)return!0;return!1});if(w!==-1)return _[w]}return ly(t,r,i)[s<12?0:1];case 3:return uy(t,i)[n.getFullYear()<=0?0:1];default:let l=e;throw new X(2302,!1)}}function Xc(n){return function(t,e,i){let r=-1*i,o=da(e,Qn.MinusSign),s=r>0?Math.floor(r/60):Math.ceil(r/60);switch(n){case 0:return(r>=0?"+":"")+Cn(s,2,o)+Cn(Math.abs(r%60),2,o);case 1:return"GMT"+(r>=0?"+":"")+Cn(s,1,o);case 2:return"GMT"+(r>=0?"+":"")+Cn(s,2,o)+":"+Cn(Math.abs(r%60),2,o);case 3:return i===0?"Z":(r>=0?"+":"")+Cn(s,2,o)+":"+Cn(Math.abs(r%60),2,o);default:throw new X(2310,!1)}}}var bT=0,ed=4;function yT(n){let t=td(n,bT,1).getDay();return td(n,0,1+(t<=ed?ed:ed+7)-t)}function gy(n){let t=n.getDay(),e=t===0?-3:ed-t;return td(n.getFullYear(),n.getMonth(),n.getDate()+e)}function Vh(n,t=!1){return function(e,i){let r;if(t){let o=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,s=e.getDate();r=1+Math.floor((s+o)/7)}else{let o=gy(e),s=yT(o.getFullYear()),a=o.getTime()-s.getTime();r=1+Math.round(a/6048e5)}return Cn(r,n,da(i,Qn.MinusSign))}}function Jc(n,t=!1){return function(e,i){let o=gy(e).getFullYear();return Cn(o,n,da(i,Qn.MinusSign),t)}}var Bh={};function xT(n){if(Bh[n])return Bh[n];let t;switch(n){case"G":case"GG":case"GGG":t=Re(3,Ie.Abbreviated);break;case"GGGG":t=Re(3,Ie.Wide);break;case"GGGGG":t=Re(3,Ie.Narrow);break;case"y":t=Je(0,1,0,!1,!0);break;case"yy":t=Je(0,2,0,!0,!0);break;case"yyy":t=Je(0,3,0,!1,!0);break;case"yyyy":t=Je(0,4,0,!1,!0);break;case"Y":t=Jc(1);break;case"YY":t=Jc(2,!0);break;case"YYY":t=Jc(3);break;case"YYYY":t=Jc(4);break;case"M":case"L":t=Je(1,1,1);break;case"MM":case"LL":t=Je(1,2,1);break;case"MMM":t=Re(2,Ie.Abbreviated);break;case"MMMM":t=Re(2,Ie.Wide);break;case"MMMMM":t=Re(2,Ie.Narrow);break;case"LLL":t=Re(2,Ie.Abbreviated,wt.Standalone);break;case"LLLL":t=Re(2,Ie.Wide,wt.Standalone);break;case"LLLLL":t=Re(2,Ie.Narrow,wt.Standalone);break;case"w":t=Vh(1);break;case"ww":t=Vh(2);break;case"W":t=Vh(1,!0);break;case"d":t=Je(2,1);break;case"dd":t=Je(2,2);break;case"c":case"cc":t=Je(7,1);break;case"ccc":t=Re(1,Ie.Abbreviated,wt.Standalone);break;case"cccc":t=Re(1,Ie.Wide,wt.Standalone);break;case"ccccc":t=Re(1,Ie.Narrow,wt.Standalone);break;case"cccccc":t=Re(1,Ie.Short,wt.Standalone);break;case"E":case"EE":case"EEE":t=Re(1,Ie.Abbreviated);break;case"EEEE":t=Re(1,Ie.Wide);break;case"EEEEE":t=Re(1,Ie.Narrow);break;case"EEEEEE":t=Re(1,Ie.Short);break;case"a":case"aa":case"aaa":t=Re(0,Ie.Abbreviated);break;case"aaaa":t=Re(0,Ie.Wide);break;case"aaaaa":t=Re(0,Ie.Narrow);break;case"b":case"bb":case"bbb":t=Re(0,Ie.Abbreviated,wt.Standalone,!0);break;case"bbbb":t=Re(0,Ie.Wide,wt.Standalone,!0);break;case"bbbbb":t=Re(0,Ie.Narrow,wt.Standalone,!0);break;case"B":case"BB":case"BBB":t=Re(0,Ie.Abbreviated,wt.Format,!0);break;case"BBBB":t=Re(0,Ie.Wide,wt.Format,!0);break;case"BBBBB":t=Re(0,Ie.Narrow,wt.Format,!0);break;case"h":t=Je(3,1,-12);break;case"hh":t=Je(3,2,-12);break;case"H":t=Je(3,1);break;case"HH":t=Je(3,2);break;case"m":t=Je(4,1);break;case"mm":t=Je(4,2);break;case"s":t=Je(5,1);break;case"ss":t=Je(5,2);break;case"S":t=Je(6,1);break;case"SS":t=Je(6,2);break;case"SSS":t=Je(6,3);break;case"Z":case"ZZ":case"ZZZ":t=Xc(0);break;case"ZZZZZ":t=Xc(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":t=Xc(1);break;case"OOOO":case"ZZZZ":case"zzzz":t=Xc(2);break;default:return null}return Bh[n]=t,t}function _y(n,t){n=n.replace(/:/g,"");let e=Date.parse("Jan 01, 1970 00:00:00 "+n)/6e4;return isNaN(e)?t:e}function CT(n,t){return n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+t),n}function wT(n,t,e){let r=n.getTimezoneOffset(),o=_y(t,r);return CT(n,-1*(o-r))}function ET(n){if(sy(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 td(r,o-1,s)}let e=parseFloat(n);if(!isNaN(n-e))return new Date(e);let i;if(i=n.match(pT))return DT(i)}let t=new Date(n);if(!sy(t))throw new X(2311,!1);return t}function DT(n){let t=new Date(0),e=0,i=0,r=n[8]?t.setUTCFullYear:t.setFullYear,o=n[8]?t.setUTCHours:t.setHours;n[9]&&(e=Number(n[9]+n[10]),i=Number(n[9]+n[11])),r.call(t,Number(n[1]),Number(n[2])-1,Number(n[3]));let s=Number(n[4]||0)-e,a=Number(n[5]||0)-i,l=Number(n[6]||0),h=Math.floor(parseFloat("0."+(n[7]||0))*1e3);return o.call(t,s,a,l,h),t}function sy(n){return n instanceof Date&&!isNaN(n.valueOf())}var ua=(()=>{class n{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){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(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,i,r)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,i,r):!1,get:(e,i,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,i,r)}})}static \u0275fac=function(i){return new(i||n)(xn(Di))};static \u0275dir=Si({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[zs]})}return n})();function vy(n,t){return new X(2100,!1)}var jh=class{createSubscription(t,e,i){return je(()=>t.subscribe({next:e,error:i}))}dispose(t){je(()=>t.unsubscribe())}},$h=class{createSubscription(t,e,i){return t.then(r=>e?.(r),r=>i?.(r)),{unsubscribe:()=>{e=null,i=null}}}dispose(t){t.unsubscribe()}},ST=new $h,MT=new jh,Hh=(()=>{class n{_ref;_latestValue=null;markForCheckOnValueUpdate=!0;_subscription=null;_obj=null;_strategy=null;applicationErrorHandler=R(_n);constructor(e){this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){if(!this._obj){if(e)try{this.markForCheckOnValueUpdate=!1,this._subscribe(e)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,i=>this._updateLatestValue(e,i),i=>this.applicationErrorHandler(i))}_selectStrategy(e){if(Qs(e))return ST;if($c(e))return MT;throw vy(n,e)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,i){e===this._obj&&(this._latestValue=i,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static \u0275fac=function(i){return new(i||n)(xn(Zc,16))};static \u0275pipe=jc({name:"async",type:n,pure:!1})}return n})();var TT="mediumDate",by=new se(""),yy=new se(""),pa=(()=>{class n{locale;defaultTimezone;defaultOptions;constructor(e,i,r){this.locale=e,this.defaultTimezone=i,this.defaultOptions=r}transform(e,i,r,o){if(e==null||e===""||e!==e)return null;try{let s=i??this.defaultOptions?.dateFormat??TT,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return my(e,s,o||this.locale,a)}catch(s){throw vy(n,s.message)}}static \u0275fac=function(i){return new(i||n)(xn(na,16),xn(by,24),xn(yy,24))};static \u0275pipe=jc({name:"date",type:n,pure:!0})}return n})();function fa(n,t){t=encodeURIComponent(t);for(let e of n.split(";")){let i=e.indexOf("="),[r,o]=i==-1?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===t)return decodeURIComponent(o)}return null}var wr=class{};var zh="browser";function xy(n){return n===zh}var ha=class{_doc;constructor(t){this._doc=t}manager},nd=(()=>{class n extends ha{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r,o){return e.addEventListener(i,r,o),()=>this.removeEventListener(e,i,r,o)}removeEventListener(e,i,r,o){return e.removeEventListener(i,r,o)}static \u0275fac=function(i){return new(i||n)(_e(mt))};static \u0275prov=ce({token:n,factory:n.\u0275fac})}return n})(),rd=new se(""),Zh=(()=>{class n{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,i){this._zone=i,e.forEach(s=>{s.manager=this});let r=e.filter(s=>!(s instanceof nd));this._plugins=r.slice().reverse();let o=e.find(s=>s instanceof nd);o&&this._plugins.push(o)}addEventListener(e,i,r,o){return this._findPluginFor(i).addEventListener(e,i,r,o)}getZone(){return this._zone}_findPluginFor(e){let i=this._eventNameToPlugin.get(e);if(i)return i;if(i=this._plugins.find(o=>o.supports(e)),!i)throw new X(5101,!1);return this._eventNameToPlugin.set(e,i),i}static \u0275fac=function(i){return new(i||n)(_e(rd),_e(we))};static \u0275prov=ce({token:n,factory:n.\u0275fac})}return n})(),Uh="ng-app-id";function Cy(n){for(let t of n)t.remove()}function wy(n,t){let e=t.createElement("style");return e.textContent=n,e}function PT(n,t,e,i){let r=n.head?.querySelectorAll(`style[${Uh}="${t}"],link[${Uh}="${t}"]`);if(r)for(let o of r)o.removeAttribute(Uh),o instanceof HTMLLinkElement?i.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&e.set(o.textContent,{usage:0,elements:[o]})}function Wh(n,t){let e=t.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",n),e}var Yh=(()=>{class n{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,i,r,o={}){this.doc=e,this.appId=i,this.nonce=r,PT(e,i,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,i){for(let r of e)this.addUsage(r,this.inline,wy);i?.forEach(r=>this.addUsage(r,this.external,Wh))}removeStyles(e,i){for(let r of e)this.removeUsage(r,this.inline);i?.forEach(r=>this.removeUsage(r,this.external))}addUsage(e,i,r){let o=i.get(e);o?o.usage++:i.set(e,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,r(e,this.doc)))})}removeUsage(e,i){let r=i.get(e);r&&(r.usage--,r.usage<=0&&(Cy(r.elements),i.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Cy(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[i,{elements:r}]of this.inline)r.push(this.addElement(e,wy(i,this.doc)));for(let[i,{elements:r}]of this.external)r.push(this.addElement(e,Wh(i,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,i){return this.nonce&&i.setAttribute("nonce",this.nonce),e.appendChild(i)}static \u0275fac=function(i){return new(i||n)(_e(mt),_e(wc),_e(Dc,8),_e(br))};static \u0275prov=ce({token:n,factory:n.\u0275fac})}return n})(),Gh={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"},Qh=/%COMP%/g;var Dy="%COMP%",OT=`_nghost-${Dy}`,RT=`_ngcontent-${Dy}`,NT=!0,AT=new se("",{providedIn:"root",factory:()=>NT});function LT(n){return RT.replace(Qh,n)}function FT(n){return OT.replace(Qh,n)}function Sy(n,t){return t.map(e=>e.replace(Qh,n))}var Kh=(()=>{class n{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,i,r,o,s,a,l=null,h=null){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestroy=o,this.doc=s,this.ngZone=a,this.nonce=l,this.tracingService=h,this.platformIsServer=!1,this.defaultRenderer=new ma(e,s,a,this.platformIsServer,this.tracingService)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;let r=this.getOrCreateRenderer(e,i);return r instanceof id?r.applyToHost(e):r instanceof ga&&r.applyStyles(),r}getOrCreateRenderer(e,i){let r=this.rendererByCompId,o=r.get(i.id);if(!o){let s=this.doc,a=this.ngZone,l=this.eventManager,h=this.sharedStylesHost,_=this.removeStylesOnCompDestroy,w=this.platformIsServer,M=this.tracingService;switch(i.encapsulation){case Wn.Emulated:o=new id(l,h,i,this.appId,_,s,a,w,M);break;case Wn.ShadowDom:return new qh(l,h,e,i,s,a,this.nonce,w,M);default:o=new ga(l,h,i,_,s,a,w,M);break}r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(i){return new(i||n)(_e(Zh),_e(Yh),_e(wc),_e(AT),_e(mt),_e(we),_e(Dc),_e(Ei,8))};static \u0275prov=ce({token:n,factory:n.\u0275fac})}return n})(),ma=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,e,i,r,o){this.eventManager=t,this.doc=e,this.ngZone=i,this.platformIsServer=r,this.tracingService=o}destroy(){}destroyNode=null;createElement(t,e){return e?this.doc.createElementNS(Gh[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(Ey(t)?t.content:t).appendChild(e)}insertBefore(t,e,i){t&&(Ey(t)?t.content:t).insertBefore(e,i)}removeChild(t,e){e.remove()}selectRootElement(t,e){let i=typeof t=="string"?this.doc.querySelector(t):t;if(!i)throw new X(-5104,!1);return e||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,i,r){if(r){e=r+":"+e;let o=Gh[r];o?t.setAttributeNS(o,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){let r=Gh[i];r?t.removeAttributeNS(r,e):t.removeAttribute(`${i}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,i,r){r&(Nn.DashCase|Nn.Important)?t.style.setProperty(e,i,r&Nn.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&Nn.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,i){t!=null&&(t[e]=i)}setValue(t,e){t.nodeValue=e}listen(t,e,i,r){if(typeof t=="string"&&(t=sa().getGlobalEventTarget(this.doc,t),!t))throw new X(5102,!1);let o=this.decoratePreventDefault(i);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(t,e,o)),this.eventManager.addEventListener(t,e,o,r)}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;t(e)===!1&&e.preventDefault()}}};function Ey(n){return n.tagName==="TEMPLATE"&&n.content!==void 0}var qh=class extends ma{sharedStylesHost;hostEl;shadowRoot;constructor(t,e,i,r,o,s,a,l,h){super(t,o,s,l,h),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let _=r.styles;_=Sy(r.id,_);for(let M of _){let T=document.createElement("style");a&&T.setAttribute("nonce",a),T.textContent=M,this.shadowRoot.appendChild(T)}let w=r.getExternalStyles?.();if(w)for(let M of w){let T=Wh(M,o);a&&T.setAttribute("nonce",a),this.shadowRoot.appendChild(T)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,i){return super.insertBefore(this.nodeOrShadowRoot(t),e,i)}removeChild(t,e){return super.removeChild(null,e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},ga=class extends ma{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,e,i,r,o,s,a,l,h){super(t,o,s,a,l),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=r;let _=i.styles;this.styles=h?Sy(h,_):_,this.styleUrls=i.getExternalStyles?.(h)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&xi.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},id=class extends ga{contentAttr;hostAttr;constructor(t,e,i,r,o,s,a,l,h){let _=r+"-"+i.id;super(t,e,i,o,s,a,l,h,_),this.contentAttr=LT(_),this.hostAttr=FT(_)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}};var od=class n extends oa{supportsDOMEvents=!0;static makeCurrent(){Lh(new n)}onAndCancel(t,e,i,r){return t.addEventListener(e,i,r),()=>{t.removeEventListener(e,i,r)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.remove()}createElement(t,e){return e=e||this.getDefaultDocument(),e.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return e==="window"?window:e==="document"?t:e==="body"?t.body:null}getBaseHref(t){let e=VT();return e==null?null:BT(e)}resetBaseElement(){_a=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return fa(document.cookie,t)}},_a=null;function VT(){return _a=_a||document.head.querySelector("base"),_a?_a.getAttribute("href"):null}function BT(n){return new URL(n,document.baseURI).pathname}var jT=(()=>{class n{build(){return new XMLHttpRequest}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac})}return n})(),My=["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"},HT={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey},Ty=(()=>{class n extends ha{constructor(e){super(e)}supports(e){return n.parseEventName(e)!=null}addEventListener(e,i,r,o){let s=n.parseEventName(i),a=n.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>sa().onAndCancel(e,s.domEventName,a,o))}static parseEventName(e){let i=e.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."),My.forEach(h=>{let _=i.indexOf(h);_>-1&&(i.splice(_,1),s+=h+".")}),s+=o,i.length!=0||o.length===0)return null;let l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(e,i){let r=$T[e.key]||e.key,o="";return i.indexOf("code.")>-1&&(r=e.code,o="code."),r==null||!r?!1:(r=r.toLowerCase(),r===" "?r="space":r==="."&&(r="dot"),My.forEach(s=>{if(s!==r){let a=HT[s];a(e)&&(o+=s+".")}}),o+=r,o===i)}static eventCallback(e,i,r){return o=>{n.matchEventFullKeyCode(o,e)&&r.runGuarded(()=>i(o))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(i){return new(i||n)(_e(mt))};static \u0275prov=ce({token:n,factory:n.\u0275fac})}return n})();function Xh(n,t,e){let i=z({rootComponent:n,platformRef:e?.platformRef},zT(t));return ny(i)}function zT(n){return{appProviders:[...ZT,...n?.providers??[]],platformProviders:qT}}function UT(){od.makeCurrent()}function GT(){return new zt}function WT(){return Af(document),document}var qT=[{provide:br,useValue:zh},{provide:Ec,useValue:UT,multi:!0},{provide:mt,useFactory:WT}];var ZT=[{provide:vs,useValue:"root"},{provide:zt,useFactory:GT},{provide:rd,useClass:nd,multi:!0,deps:[mt]},{provide:rd,useClass:Ty,multi:!0,deps:[mt]},Kh,Yh,Zh,{provide:An,useExisting:Kh},{provide:wr,useClass:jT},[]];var Dr=class{},va=class{},ki=class n{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(t){t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(`
5
+ `).forEach(e=>{let i=e.indexOf(":");if(i>0){let r=e.slice(0,i),o=e.slice(i+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((e,i)=>{this.addHeaderEntry(i,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([e,i])=>{this.setHeaderEntries(e,i)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof n?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init();for(let[e,i]of t.headers.entries())this.headers.set(e,i),this.normalizedNames.set(e,t.normalizedNames.get(e))}clone(t){let e=new n;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof n?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){let e=t.name.toLowerCase();switch(t.op){case"a":case"s":let i=t.value;if(typeof i=="string"&&(i=[i]),i.length===0)return;this.maybeSetNormalizedName(t.name,e);let r=t.op==="a"?(this.headers.get(e)||[]).slice():[];r.push(...i),this.headers.set(e,r);break;case"d":let o=t.value;if(o===void 0)this.headers.delete(e),this.normalizedNames.delete(e);else{let s=Array.isArray(o)?o:[o],a=this.headers.get(e);if(!a)return;a=a.filter(l=>s.indexOf(l)===-1),a.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,a)}break}}addHeaderEntry(t,e){let i=t.toLowerCase();this.maybeSetNormalizedName(t,i),this.headers.has(i)?this.headers.get(i).push(e):this.headers.set(i,[e])}setHeaderEntries(t,e){let i=(Array.isArray(e)?e:[e]).map(o=>o.toString()),r=t.toLowerCase();this.headers.set(r,i),this.maybeSetNormalizedName(t,r)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var ad=class{encodeKey(t){return ky(t)}encodeValue(t){return ky(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function YT(n,t){let e=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=o==-1?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,o)),t.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}var QT=/%(\d[a-f0-9])/gi,KT={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function ky(n){return encodeURIComponent(n).replace(QT,(t,e)=>KT[e]??t)}function sd(n){return`${n}`}var ut=class n{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new ad,t.fromString){if(t.fromObject)throw new X(2805,!1);this.map=YT(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let i=t.fromObject[e],r=Array.isArray(i)?i.map(sd):[sd(i)];this.map.set(e,r)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){let e=[];return Object.keys(t).forEach(i=>{let r=t[i];Array.isArray(r)?r.forEach(o=>{e.push({param:i,value:o,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let e=this.encoder.encodeKey(t);return this.map.get(t).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let e=new n({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){if(this.map===null&&(this.map=new Map),this.cloneFrom!==null){this.cloneFrom.init();for(let[t,e]of this.cloneFrom.map.entries())this.map.set(t,e);this.updates.forEach(t=>{switch(t.op){case"a":case"s":let e=t.op==="a"?(this.map.get(t.param)||[]).slice():[];e.push(sd(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let i=(this.map.get(t.param)||[]).slice(),r=i.indexOf(sd(t.value));r!==-1&&i.splice(r,1),i.length>0?this.map.set(t.param,i):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null}}};var ld=class{map=new Map;set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};function XT(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 Py(n){return typeof Blob<"u"&&n instanceof Blob}function Oy(n){return typeof FormData<"u"&&n instanceof FormData}function JT(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}var Ry="Content-Type",Ny="Accept",Ay="X-Request-URL",Ly="text/plain",Fy="application/json",ek=`${Fy}, ${Ly}, */*`,So=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(t,e,i,r){this.url=e,this.method=t.toUpperCase();let o;if(XT(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 X(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 ki,this.context??=new ld,!this.params)this.params=new ut,this.urlWithParams=e;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=e;else{let a=e.indexOf("?"),l=a===-1?"?":a<e.length-1?"&":"";this.urlWithParams=e+l+s}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||Iy(this.body)||Py(this.body)||Oy(this.body)||JT(this.body)?this.body:this.body instanceof ut?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||Oy(this.body)?null:Py(this.body)?this.body.type||null:Iy(this.body)?null:typeof this.body=="string"?Ly:this.body instanceof ut?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Fy:null}clone(t={}){let e=t.method||this.method,i=t.url||this.url,r=t.responseType||this.responseType,o=t.keepalive??this.keepalive,s=t.priority||this.priority,a=t.cache||this.cache,l=t.mode||this.mode,h=t.redirect||this.redirect,_=t.credentials||this.credentials,w=t.referrer??this.referrer,M=t.integrity||this.integrity,T=t.transferCache??this.transferCache,A=t.timeout??this.timeout,U=t.body!==void 0?t.body:this.body,K=t.withCredentials??this.withCredentials,G=t.reportProgress??this.reportProgress,be=t.headers||this.headers,Zt=t.params||this.params,$e=t.context??this.context;return t.setHeaders!==void 0&&(be=Object.keys(t.setHeaders).reduce((ht,lt)=>ht.set(lt,t.setHeaders[lt]),be)),t.setParams&&(Zt=Object.keys(t.setParams).reduce((ht,lt)=>ht.set(lt,t.setParams[lt]),Zt)),new n(e,i,U,{params:Zt,headers:be,context:$e,reportProgress:G,responseType:r,withCredentials:K,transferCache:T,keepalive:o,cache:a,priority:s,timeout:A,mode:l,redirect:h,credentials:_,referrer:w,integrity:M})}},Er=(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})(Er||{}),To=class{headers;status;statusText;url;ok;type;redirected;constructor(t,e=200,i="OK"){this.headers=t.headers||new ki,this.status=t.status!==void 0?t.status:e,this.statusText=t.statusText||i,this.url=t.url||null,this.redirected=t.redirected,this.ok=this.status>=200&&this.status<300}},cd=class n extends To{constructor(t={}){super(t)}type=Er.ResponseHeader;clone(t={}){return new n({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},ba=class n extends To{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=Er.Response;clone(t={}){return new n({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0,redirected:t.redirected??this.redirected})}},Mo=class extends To{name="HttpErrorResponse";message;error;ok=!1;constructor(t){super(t,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},tk=200,nk=204;function Jh(n,t){return{body:t,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 ko=(()=>{class n{handler;constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof So)o=e;else{let l;r.headers instanceof ki?l=r.headers:l=new ki(r.headers);let h;r.params&&(r.params instanceof ut?h=r.params:h=new ut({fromObject:r.params})),o=new So(e,i,r.body!==void 0?r.body:null,{headers:l,context:r.context,params:h,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=Ee(o).pipe(Fu(l=>this.handler.handle(l)));if(e instanceof So||r.observe==="events")return s;let a=s.pipe(cs(l=>l instanceof ba));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(Oe(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new X(2806,!1);return l.body}));case"blob":return a.pipe(Oe(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new X(2807,!1);return l.body}));case"text":return a.pipe(Oe(l=>{if(l.body!==null&&typeof l.body!="string")throw new X(2808,!1);return l.body}));default:return a.pipe(Oe(l=>l.body))}case"response":return a;default:throw new X(2809,!1)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:new ut().append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,Jh(r,i))}post(e,i,r={}){return this.request("POST",e,Jh(r,i))}put(e,i,r={}){return this.request("PUT",e,Jh(r,i))}static \u0275fac=function(i){return new(i||n)(_e(Dr))};static \u0275prov=ce({token:n,factory:n.\u0275fac})}return n})();var ik=new se("");function rk(n,t){return t(n)}function ok(n,t,e){return(i,r)=>io(e,()=>t(i,o=>n(o,r)))}var tm=new se(""),Vy=new se(""),By=new se("",{providedIn:"root",factory:()=>!0});var dd=(()=>{class n extends Dr{backend;injector;chain=null;pendingTasks=R(uo);contributeToStability=R(By);constructor(e,i){super(),this.backend=e,this.injector=i}handle(e){if(this.chain===null){let i=this.injector.get(Dr,null,{skipSelf:!0}),r=i!==null&&this.backend===i,o=this.injector.get(Vy,[],r?{self:!0}:void 0),s=Array.from(new Set([...this.injector.get(tm),...o]));this.chain=s.reduceRight((a,l)=>ok(a,l,this.injector),rk)}if(this.contributeToStability){let i=this.pendingTasks.add();return this.chain(e,r=>this.backend.handle(r)).pipe(ui(i))}else return this.chain(e,i=>this.backend.handle(i))}static \u0275fac=function(i){return new(i||n)(_e(va),_e(Vt))};static \u0275prov=ce({token:n,factory:n.\u0275fac})}return n})();var sk=/^\)\]\}',?\n/,ak=RegExp(`^${Ay}:`,"m");function lk(n){return"responseURL"in n&&n.responseURL?n.responseURL:ak.test(n.getAllResponseHeaders())?n.getResponseHeader(Ay):null}var em=(()=>{class n{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new X(-2800,!1);let i=this.xhrFactory;return Ee(null).pipe(St(()=>new pe(o=>{let s=i.build();if(s.open(e.method,e.urlWithParams),e.withCredentials&&(s.withCredentials=!0),e.headers.forEach((K,G)=>s.setRequestHeader(K,G.join(","))),e.headers.has(Ny)||s.setRequestHeader(Ny,ek),!e.headers.has(Ry)){let K=e.detectContentTypeHeader();K!==null&&s.setRequestHeader(Ry,K)}if(e.timeout&&(s.timeout=e.timeout),e.responseType){let K=e.responseType.toLowerCase();s.responseType=K!=="json"?K:"text"}let a=e.serializeBody(),l=null,h=()=>{if(l!==null)return l;let K=s.statusText||"OK",G=new ki(s.getAllResponseHeaders()),be=lk(s)||e.url;return l=new cd({headers:G,status:s.status,statusText:K,url:be}),l},_=()=>{let{headers:K,status:G,statusText:be,url:Zt}=h(),$e=null;G!==nk&&($e=typeof s.response>"u"?s.responseText:s.response),G===0&&(G=$e?tk:0);let ht=G>=200&&G<300;if(e.responseType==="json"&&typeof $e=="string"){let lt=$e;$e=$e.replace(sk,"");try{$e=$e!==""?JSON.parse($e):null}catch(Yt){$e=lt,ht&&(ht=!1,$e={error:Yt,text:$e})}}ht?(o.next(new ba({body:$e,headers:K,status:G,statusText:be,url:Zt||void 0})),o.complete()):o.error(new Mo({error:$e,headers:K,status:G,statusText:be,url:Zt||void 0}))},w=K=>{let{url:G}=h(),be=new Mo({error:K,status:s.status||0,statusText:s.statusText||"Unknown Error",url:G||void 0});o.error(be)},M=w;e.timeout&&(M=K=>{let{url:G}=h(),be=new Mo({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:G||void 0});o.error(be)});let T=!1,A=K=>{T||(o.next(h()),T=!0);let G={type:Er.DownloadProgress,loaded:K.loaded};K.lengthComputable&&(G.total=K.total),e.responseType==="text"&&s.responseText&&(G.partialText=s.responseText),o.next(G)},U=K=>{let G={type:Er.UploadProgress,loaded:K.loaded};K.lengthComputable&&(G.total=K.total),o.next(G)};return s.addEventListener("load",_),s.addEventListener("error",w),s.addEventListener("timeout",M),s.addEventListener("abort",w),e.reportProgress&&(s.addEventListener("progress",A),a!==null&&s.upload&&s.upload.addEventListener("progress",U)),s.send(a),o.next({type:Er.Sent}),()=>{s.removeEventListener("error",w),s.removeEventListener("abort",w),s.removeEventListener("load",_),s.removeEventListener("timeout",M),e.reportProgress&&(s.removeEventListener("progress",A),a!==null&&s.upload&&s.upload.removeEventListener("progress",U)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(i){return new(i||n)(_e(wr))};static \u0275prov=ce({token:n,factory:n.\u0275fac})}return n})(),jy=new se(""),ck="XSRF-TOKEN",dk=new se("",{providedIn:"root",factory:()=>ck}),uk="X-XSRF-TOKEN",pk=new se("",{providedIn:"root",factory:()=>uk}),ya=class{},fk=(()=>{class n{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,i){this.doc=e,this.cookieName=i}getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=fa(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(i){return new(i||n)(_e(mt),_e(dk))};static \u0275prov=ce({token:n,factory:n.\u0275fac})}return n})(),hk=/^(?:https?:)?\/\//i;function mk(n,t){if(!R(jy)||n.method==="GET"||n.method==="HEAD"||hk.test(n.url))return t(n);let e=R(ya).getToken(),i=R(pk);return e!=null&&!n.headers.has(i)&&(n=n.clone({headers:n.headers.set(i,e)})),t(n)}var nm=(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})(nm||{});function gk(n,t){return{\u0275kind:n,\u0275providers:t}}function im(...n){let t=[ko,em,dd,{provide:Dr,useExisting:dd},{provide:va,useFactory:()=>R(ik,{optional:!0})??R(em)},{provide:tm,useValue:mk,multi:!0},{provide:jy,useValue:!0},{provide:ya,useClass:fk}];for(let e of n)t.push(...e.\u0275providers);return _s(t)}function rm(n){return gk(nm.Interceptors,n.map(t=>({provide:tm,useValue:t,multi:!0})))}var $y="guitoToken";function Hy(){return new URLSearchParams(window.location.search).get($y)??""}var zy=(n,t)=>{let e=Hy();return!e||!n.url.startsWith("/api")?t(n):t(n.clone({setHeaders:{"X-Guito-Token":e}}))};function Uy(n){let t=new URL(n,window.location.origin),e=Hy();return e&&t.searchParams.set($y,e),t.toString()}var Gy={providers:[Sh({eventCoalescing:!0}),im(rm([zy]))]};function _k(n,t){if(n&1){let e=I();b(0,"button",11),F("click",function(){m(e);let r=d(2);return g(r.retry.emit())}),p(1),y()}if(n&2){let e=d(2);$("disabled",e.busy()),c(),P(e.retryLabel())}}function vk(n,t){if(n&1){let e=I();b(0,"div",1),F("animationend",function(r){m(e);let o=d();return g(o.finishDismiss(r))}),V(),b(1,"svg",2),te(2,"circle",3)(3,"path",4)(4,"circle",5),y(),fe(),b(5,"div",6)(6,"p"),p(7),y(),E(8,_k,2,2,"button",7),y(),b(9,"button",8),F("click",function(){m(e);let r=d();return g(r.dismiss())}),V(),b(10,"svg",9),te(11,"path",10),y()()()}if(n&2){let e=d();J("closing",e.closing()),c(7),P(e.message()),c(),D(e.retryLabel()?8:-1)}}var pt=class n{message=N.required();retryLabel=N("");busy=N(!1);retry=Z();dismissed=v(!1);closing=v(!1);constructor(){ge(()=>{this.message(),this.busy(),this.closing.set(!1),this.dismissed.set(!1)})}dismiss(){if(typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches){this.dismissed.set(!0);return}this.closing.set(!0)}finishDismiss(t){t.target!==t.currentTarget||!this.closing()||this.dismissed.set(!0)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({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",3,"closing"],["role","alert",1,"error-banner",3,"animationend"],["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(e,i){e&1&&E(0,vk,12,4,"div",0),e&2&&D(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;animation:_ngcontent-%COMP%_error-banner-enter .12s ease-out}.error-banner.closing[_ngcontent-%COMP%]{pointer-events:none;animation:_ngcontent-%COMP%_error-banner-leave .1s ease-in forwards}.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}@keyframes _ngcontent-%COMP%_error-banner-enter{0%{opacity:0}}@keyframes _ngcontent-%COMP%_error-banner-leave{to{opacity:0}}@media(prefers-reduced-motion:reduce){.error-banner[_ngcontent-%COMP%], .error-banner.closing[_ngcontent-%COMP%]{animation:none}button[_ngcontent-%COMP%]{transition:none}}"],changeDetection:0})};var ud=class n{http=R(ko);cache=new Map;empty=Ee(null);get(t){let e=t.trim().toLowerCase();if(!e)return this.empty;let i=this.cache.get(e);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:e},responseType:"blob"}).pipe(St(o=>o.size?new pe(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),ct(()=>this.empty),Jr({bufferSize:1,refCount:!1}));return this.cache.set(e,{expires:Date.now()+36e5,image:r}),r}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})};function bk(n,t){n&1&&te(0,"img",0),n&2&&$("src",t,yr)}function yk(n,t){if(n&1&&(b(0,"span",1),p(1),y()),n&2){let e=d();c(),P(e.initials())}}var Vn=class n{name=N("");email=N("");avatars=R(ud);initials(){return this.name().trim().split(/\s+/).slice(0,2).map(t=>t[0]??"").join("").toUpperCase()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({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(e,i){if(e&1&&(E(0,bk,1,1,"img",0),Ti(1,"async"),Xs(2,yk,2,1,"span",1)),e&2){let r;D((r=Eh(1,1,i.avatars.get(i.email())))?0:2,r)}},dependencies:[Hh],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 xk(n,t){if(n&1&&(b(0,"mark",1),p(1),y()),n&2){let e=d(2).$implicit;c(),P(e.text)}}function Ck(n,t){if(n&1&&p(0),n&2){let e=d(2).$implicit;H(" ",e.text," ")}}function wk(n,t){if(n&1){let e=I();b(0,"a",2),F("click",function(r){return m(e),g(r.stopPropagation())}),E(1,xk,2,1,"mark",1)(2,Ck,1,1),y()}if(n&2){let e=d().$implicit;$("href",e.href,yr),c(),D(e.match?1:2)}}function Ek(n,t){if(n&1&&(b(0,"mark",1),p(1),y()),n&2){let e=d().$implicit;c(),P(e.text)}}function Dk(n,t){if(n&1&&p(0),n&2){let e=d().$implicit;H(" ",e.text," ")}}function Sk(n,t){if(n&1&&E(0,wk,3,2,"a",0)(1,Ek,2,1,"mark",1)(2,Dk,1,1),n&2){let e=t.$implicit;D(e.href?0:e.match?1:2)}}var Io=class n{text=N("");search=N("");linking=N(null);segments=O(()=>{let t=this.text(),e=this.linking(),i=[];if(!e)i.push({text:t});else try{let o=new RegExp(e.regex,"g"),s=0;for(let a of t.matchAll(o)){let l=a.index??0;l>s&&i.push({text:t.slice(s,l)});let h=e.url.replace(/\$(\d+)/g,(_,w)=>a[Number(w)]??"");if(i.push(z({text:a[0]},/^https?:\/\//i.test(h)?{href:h}:{})),s=l+a[0].length,a[0].length===0)break}s<t.length&&i.push({text:t.slice(s)})}catch{i.push({text:t})}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 h=a.indexOf(r,l);if(h===-1){s.push(ie(z({},o),{text:o.text.slice(l),match:!1}));break}h>l&&s.push(ie(z({},o),{text:o.text.slice(l,h),match:!1})),s.push(ie(z({},o),{text:o.text.slice(h,h+r.length),match:!0})),l=h+r.length}return s}):i.map(o=>ie(z({},o),{match:!1}))});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({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(e,i){e&1&&W(0,Sk,3,1,null,null,Zn),e&2&&q(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 wn="__working__",Wy=[{value:"default",label:"Default order"},{value:"name-asc",label:"Name A\u2013Z"},{value:"name-desc",label:"Name Z\u2013A"}],qy=[{value:"newest",label:"Newest first"},{value:"oldest",label:"Oldest first"},{value:"title-asc",label:"Title A\u2013Z"},{value:"title-desc",label:"Title Z\u2013A"}],Ii=[{value:"",label:"Claude Code's default"},{value:"opus",label:"Opus (latest)"},{value:"sonnet",label:"Sonnet (latest)"},{value:"haiku",label:"Haiku (latest)"}],pd=[{value:"haiku",label:"Haiku (latest)"},{value:"sonnet",label:"Sonnet (latest)"},{value:"opus",label:"Opus (latest)"}],Zy=[{value:"oneliner",label:"Oneliner"},{value:"brief",label:"Brief"},{value:"descriptive",label:"Descriptive"}],xa=[{value:"",label:"Claude Code's default"},{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"},{value:"xhigh",label:"Extra high"},{value:"max",label:"Max"}];var et=class n{http=R(ko);base="/api";mutating=v(!1);mutate(t){return Lu(()=>this.mutating()?Nu(()=>({status:400,error:{error:"Another Git operation is in progress."}})):(this.mutating.set(!0),t().pipe(ui(()=>this.mutating.set(!1)))))}getRepositoryState(){return this.http.get(`${this.base}/repository-state`)}getRepoInfo(){return this.http.get(`${this.base}/repo`)}getCommits(t,e=0){let i=new ut;return t!==void 0&&(i=i.set("limit",String(t))),e>0&&(i=i.set("skip",String(e))),this.http.get(`${this.base}/commits`,{params:i})}searchCommits(t,e=!1){let i=new ut().set("query",t);return e&&(i=i.set("caseSensitive","1")),this.http.get(`${this.base}/commits/search`,{params:i})}getCommitDetail(t){return this.http.post(`${this.base}/commit/detail`,{hash:t})}getAllBranches(){return this.http.get(`${this.base}/branches/all`)}getCommitDiff(t){return this.http.post(`${this.base}/commit/diff`,{hash:t})}getWorkingChanges(){return this.http.get(`${this.base}/working-changes`)}getConflict(t){return this.http.get(`${this.base}/conflict`,{params:new ut().set("path",t)})}resolveConflict(t,e,i){return this.mutate(()=>this.http.post(`${this.base}/conflict/resolve`,{path:t,resolution:e,content:i}))}getFileContent(t,e){return this.http.post(`${this.base}/file-content`,{path:t,ref:e})}fetch(t=!1){let e=t?new ut().set("prune","1"):void 0;return this.mutate(()=>this.http.get(`${this.base}/fetch`,{params:e}))}pull(t){return this.mutate(()=>this.http.post(`${this.base}/pull`,{remote:t?.remote,branch:t?.branch,mode:t?.mode}))}push(t=!1){return this.mutate(()=>this.http.post(`${this.base}/push`,{force:t}))}sync(){return this.mutate(()=>this.http.post(`${this.base}/sync`,{}))}checkoutRef(t){return this.mutate(()=>this.http.post(`${this.base}/checkout`,t))}revertCommit(t){return this.mutate(()=>this.http.post(`${this.base}/revert`,t))}cherryPick(t){return this.mutate(()=>this.http.post(`${this.base}/cherry-pick`,t))}dropCommit(t){return this.mutate(()=>this.http.post(`${this.base}/commit/drop`,{commit:t}))}resetToCommit(t,e="soft"){return this.mutate(()=>this.http.post(`${this.base}/reset-commit`,{commit:t,mode:e}))}commit(t,e){return this.mutate(()=>this.http.post(`${this.base}/commit`,{message:t,description:e}))}generateCommitMessage(t=""){return this.http.post(`${this.base}/commit-message`,{model:t})}stage(t){return this.mutate(()=>this.http.post(`${this.base}/stage`,{files:t}))}unstage(t){return this.mutate(()=>this.http.post(`${this.base}/unstage`,{files:t}))}discard(t,e){return this.mutate(()=>this.http.post(`${this.base}/discard`,{files:t,mode:e}))}resetWorking(){return this.mutate(()=>this.http.post(`${this.base}/reset`,{}))}cleanUntracked(){return this.mutate(()=>this.http.post(`${this.base}/clean`,{}))}stashSave(t){return this.mutate(()=>this.http.post(`${this.base}/stash/save`,t))}getStashes(){return this.http.get(`${this.base}/stash/list`).pipe(Oe(t=>(t.all??[]).map((e,i)=>({index:i,hash:e.hash,message:e.message,date:e.date,author_name:e.author_name,author_email:e.author_email}))))}stashApply(t,e=!1){return this.mutate(()=>this.http.post(`${this.base}/stash/apply`,{index:t,restoreIndex:e}))}stashPop(t,e=!1){return this.mutate(()=>this.http.post(`${this.base}/stash/pop`,{index:t,restoreIndex:e}))}stashDrop(t){return this.mutate(()=>this.http.post(`${this.base}/stash/drop`,{index:t}))}getWorktrees(){return this.http.get(`${this.base}/worktrees`)}createWorktree(t,e){return this.mutate(()=>this.http.post(`${this.base}/worktrees`,{path:t,branch:e}))}removeWorktree(t){return this.mutate(()=>this.http.post(`${this.base}/worktrees/remove`,{path:t}))}getTags(){return this.http.get(`${this.base}/tags`)}createBranch(t){return this.mutate(()=>this.http.post(`${this.base}/branch/create`,t))}deleteBranch(t){return this.mutate(()=>this.http.post(`${this.base}/branch/delete`,t))}deleteRemoteBranch(t,e){return this.mutate(()=>this.http.post(`${this.base}/branch/delete-remote`,{remote:t,branch:e}))}renameBranch(t){return this.mutate(()=>this.http.post(`${this.base}/branch/rename`,t))}mergeRef(t){return this.mutate(()=>this.http.post(`${this.base}/merge`,t))}rebaseRef(t){return this.mutate(()=>this.http.post(`${this.base}/rebase`,t))}createTag(t){return this.mutate(()=>this.http.post(`${this.base}/tag/create`,t))}deleteTag(t){return this.mutate(()=>this.http.post(`${this.base}/tag/delete`,t))}pushTag(t){return this.mutate(()=>this.http.post(`${this.base}/tag/push`,t))}getSettings(){return this.http.get(`${this.base}/settings`)}saveSettings(t){return this.http.post(`${this.base}/settings`,t)}getRemotes(){return this.http.get(`${this.base}/remotes`)}saveIdentity(t){return this.http.post(`${this.base}/identity`,t)}removeIdentity(){return this.http.delete(`${this.base}/identity`)}saveRemote(t){return this.http.post(`${this.base}/remotes`,t)}removeRemote(t){return this.http.delete(`${this.base}/remotes/${encodeURIComponent(t)}`)}createPr(t){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequest`,t))}searchReviewers(t){return this.http.get(`${this.base}/azure-devops/reviewers`,{params:new ut().set("query",t)}).pipe(Oe(e=>e.reviewers))}searchWorkItems(t){return this.http.get(`${this.base}/azure-devops/workitems`,{params:new ut().set("query",t)}).pipe(Oe(e=>e.workItems))}getPrTags(){return this.http.get(`${this.base}/azure-devops/tags`).pipe(Oe(t=>t.tags.map(e=>({name:e}))))}getAzureMe(){return this.http.get(`${this.base}/azure-devops/me`)}getMyPullRequests(t="active"){let e=new ut().set("status",t);return this.http.get(`${this.base}/azure-devops/pullrequests`,{params:e}).pipe(Oe(i=>i.pullRequests))}getPrDetail(t){return this.http.get(`${this.base}/azure-devops/pullrequests/${t}`)}updatePr(t,e){return this.mutate(()=>this.http.patch(`${this.base}/azure-devops/pullrequests/${t}`,e))}votePr(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/vote`,{vote:e}))}updatePrReviewer(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/reviewers`,e))}setPrAutoComplete(t,e,i){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/autocomplete`,z({enabled:e},i)))}completePr(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/complete`,e??{}))}getPrThreads(t){return this.http.get(`${this.base}/azure-devops/pullrequests/${t}/threads`).pipe(Oe(e=>e.threads))}addPrComment(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/threads`,e))}setPrThreadStatus(t,e,i){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/threads/${e}/status`,{status:i}))}getPrChanges(t){return this.http.get(`${this.base}/azure-devops/pullrequests/${t}/changes`).pipe(Oe(e=>e.files))}getPrFileDiff(t,e){let i=new ut().set("path",e.path).set("oldPath",e.oldPath||"").set("changeType",e.changeType);return this.http.get(`${this.base}/azure-devops/pullrequests/${t}/file-diff`,{params:i})}getPrWorkItems(t){return this.http.get(`${this.base}/azure-devops/pullrequests/${t}/workitems`).pipe(Oe(e=>e.workItems))}addPrTag(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/labels`,{name:e}))}removePrTag(t,e){return this.mutate(()=>this.http.delete(`${this.base}/azure-devops/pullrequests/${t}/labels/${encodeURIComponent(e)}`))}linkPrWorkItem(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/workitems`,{id:e}))}unlinkPrWorkItem(t,e){return this.mutate(()=>this.http.delete(`${this.base}/azure-devops/pullrequests/${t}/workitems/${e}`))}getPrChecks(t){return this.http.get(`${this.base}/azure-devops/pullrequests/${t}/checks`)}requeuePrCheck(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/checks/${encodeURIComponent(e)}/requeue`,{}))}abandonPr(t){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/abandon`,{}))}getAiReviewOverview(){return this.http.get(`${this.base}/azure-devops/ai-review`)}pollAiReviews(){return this.http.post(`${this.base}/azure-devops/ai-review/poll`,{}).pipe(Oe(t=>t.reviewed))}getAiReview(t){return this.http.get(`${this.base}/azure-devops/pullrequests/${t}/ai-review`).pipe(Oe(e=>e.state))}runAiReview(t,e=!1,i="",r){return this.http.post(`${this.base}/azure-devops/pullrequests/${t}/ai-review`,{force:e,model:i,effort:r}).pipe(Oe(o=>o.state))}postAiReviewFindings(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/ai-review/post`,{findingIds:e}).pipe(Oe(i=>i.state)))}dismissAiReviewFindings(t,e){return this.http.post(`${this.base}/azure-devops/pullrequests/${t}/ai-review/dismiss`,{findingIds:e}).pipe(Oe(i=>i.state))}resetAiReview(t){return this.http.delete(`${this.base}/azure-devops/pullrequests/${t}/ai-review`)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})};var ln=class n{git=R(et);inVsCode=typeof window<"u"&&window.parent!==window;diffViewer=v("vscode");settingsVersion=v(0);folderRequest=0;folderResolvers=new Map;canPickFolder=this.inVsCode;pullRequestRequest=v(null);constructor(){this.inVsCode&&(this.takeInitialPullRequest(),window.addEventListener("message",t=>{let e=t.data;if(e?.type==="guito/openPullRequest"&&Number.isInteger(e.pullRequestId)&&this.pullRequestRequest.set({id:e.pullRequestId}),e?.type==="guito/config"&&((e.diffViewer==="guito"||e.diffViewer==="vscode")&&this.diffViewer.set(e.diffViewer),this.settingsVersion.update(i=>i+1)),e?.type==="guito/folderSelected"&&typeof e.requestId=="number"){let i=this.folderResolvers.get(e.requestId);i&&(this.folderResolvers.delete(e.requestId),i(typeof e.path=="string"&&e.path?e.path:null))}}),this.git.getSettings().subscribe({next:t=>{t.diffViewer&&this.diffViewer.set(t.diffViewer)},error:()=>{}}))}takeInitialPullRequest(){let t=new URL(window.location.href),e=Number(t.searchParams.get("guitoPullRequest"));t.searchParams.has("guitoPullRequest")&&(t.searchParams.delete("guitoPullRequest"),window.history.replaceState(window.history.state,"",t.toString()),Number.isInteger(e)&&e>0&&this.pullRequestRequest.set({id:e}))}pickFolder(){if(!this.inVsCode)return Promise.resolve(null);let t=++this.folderRequest;return window.parent.postMessage({type:"guito/pickFolder",requestId:t},"*"),new Promise(e=>this.folderResolvers.set(t,e))}openSettings(){return this.inVsCode?(window.parent.postMessage({type:"guito/openSettings"},"*"),!0):!1}openSourceControl(){return this.inVsCode?(window.parent.postMessage({type:"guito/openSourceControl"},"*"),!0):!1}openExternal(t){if(this.inVsCode){window.parent.postMessage({type:"guito/openExternal",url:t},"*");return}window.open(t,"_blank","noopener")}canOpenFile(){return this.inVsCode}canOpenRepository(){return this.inVsCode}switchRepository(t){return this.requestRepository(t,"switch")}openRepository(t){return this.requestRepository(t,"tab")}openRepositoryWindow(t){return this.requestRepository(t,"window")}requestRepository(t,e){return this.inVsCode?(window.parent.postMessage({type:"guito/openRepository",path:t,disposition:e},"*"),!0):!1}openFile(t){return this.inVsCode?(window.parent.postMessage({type:"guito/openFile",path:t},"*"),!0):!1}openMergeConflict(t){return this.inVsCode?(window.parent.postMessage({type:"guito/openMergeConflict",path:t},"*"),!0):!1}openDiff(t,e,i,r=!1){if(!this.inVsCode||this.diffViewer()!=="vscode"||t.status==="binary")return!1;let o=!r&&t.status==="added"&&!t.oldPath?"EMPTY":e;return window.parent.postMessage({type:"guito/openDiff",path:t.path,oldPath:t.oldPath,status:t.status,originalRef:o,modifiedRef:i,exactOriginal:r},"*"),!0}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})};var Mk=(n,t)=>n.name.toLowerCase().localeCompare(t.name.toLowerCase()),Yy=n=>n.split("/").pop()??n,Tk=(n,t)=>Yy(n.path).toLowerCase().localeCompare(Yy(t.path).toLowerCase());function Po(n,t){let e={name:"",dirs:new Map,files:[],additions:0,deletions:0};for(let o of n){let s=o.path.split("/").filter(Boolean),a=e;for(let l of s.slice(0,-1)){let h=a.dirs.get(l);h||(h={name:l,dirs:new Map,files:[],additions:0,deletions:0},a.dirs.set(l,h)),h.additions+=o.additions??0,h.deletions+=o.deletions??0,a=h}a.files.push(o)}let i=[],r=(o,s,a)=>{for(let l of[...o.dirs.values()].sort(Mk)){let h=s?`${s}/${l.name}`:l.name,_=t.has(h);i.push({kind:"dir",path:h,name:l.name,depth:a,collapsed:_,additions:l.additions,deletions:l.deletions}),_||r(l,h,a+1)}for(let l of[...o.files].sort(Tk))i.push({kind:"file",path:l.path,name:l.path.split("/").pop()??l.path,depth:a,file:l})};return r(e,"",0),i}function Oo(n,t){if(typeof localStorage>"u")return t;try{let e=localStorage.getItem(n);return e===null?t:JSON.parse(e)}catch{return t}}function Ro(n,t){if(!(typeof localStorage>"u"))try{localStorage.setItem(n,JSON.stringify(t))}catch{}}var kk=400;function No(n){let t=Oo(n,null);return typeof t=="number"&&Number.isFinite(t)&&t>0?t:null}function Kn(n,t){Ro(n,Math.round(t))}function Ao(n){if(!(typeof localStorage>"u"))try{localStorage.removeItem(n)}catch{}}function Pi(n,t){let e=Math.max(t,window.innerWidth-kk);return Math.max(t,Math.min(e,n))}function Lo(n,t){n.preventDefault(),n.stopPropagation();let e=n.clientX,i=Pi(t.startWidth,t.min);document.body.style.userSelect="none",document.body.style.cursor="col-resize";let r=a=>{let l=(a.clientX-e)*t.direction;i=Pi(t.startWidth+l,t.min),t.onResize(i)},o=()=>{document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",s),document.body.style.userSelect="",document.body.style.cursor=""},s=()=>{o(),t.onEnd(i)};return document.addEventListener("mousemove",r),document.addEventListener("mouseup",s),o}var Fo=class n{loading=null;load(){return this.loading||(this.loading=new Promise((t,e)=>{let i=window;if(i.monaco){t(i.monaco);return}let r=document.createElement("script");r.src="vs/loader.js",r.async=!0,r.onload=()=>{let o=i.require;if(!o){e(new Error("Monaco AMD loader not found."));return}o.config({paths:{vs:"vs"}}),o(["vs/editor/editor.main"],()=>{this.applyTheme(i.monaco),t(i.monaco)})},r.onerror=()=>{this.loading=null,e(new Error("Failed to load the Monaco editor."))},document.head.appendChild(r)})),this.loading}applyTheme(t){t.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(e){return new(e||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})};var Ik="#89d185",Pk="#f48771";function fd(n){return{enabled:n,renderCharacters:!0,showSlider:"always",size:"fit"}}function hd(n){let t=[];for(let e of n??[]){let i=e.modifiedStartLineNumber,r=e.modifiedEndLineNumber;if(r===0){let o=Math.max(1,i);t.push({range:{startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1},options:{minimap:{position:2,color:Pk}}})}else r>=i&&t.push({range:{startLineNumber:i,startColumn:1,endLineNumber:r,endColumn:1},options:{minimap:{position:1,color:Ik}}})}return t}var Ok=["host"];function Rk(n,t){if(n&1&&(u(0,"span",6),p(1),f()),n&2){let e=d();c(),H("+",e.file().additions)}}function Nk(n,t){if(n&1&&(u(0,"span",7),p(1),f()),n&2){let e=d();c(),H("\u2212",e.file().deletions)}}function Ak(n,t){n&1&&(V(),j(0,"line",17))}function Lk(n,t){n&1&&(V(),j(0,"line",18))}function Fk(n,t){n&1&&(u(0,"div",24),p(1,"Loading diff\u2026"),f())}function Vk(n,t){if(n&1&&j(0,"app-error-banner",25),n&2){let e=d();S("message",e.error())}}function Bk(n,t){n&1&&(u(0,"div",24),p(1,"Binary file not shown."),f())}var jk=0,Vo=class n{git=R(et);monacoService=R(Fo);file=N.required();originalRef=N.required();modifiedRef=N.required();exactOriginal=N(!1);closed=Z();host=dt.required("host");loading=v(!0);error=v("");binary=v(!1);sideBySide=v(!0);minimapEnabled=v(!0);destroyed=!1;editor=null;models=[];minimapMarks=null;onEscape(){this.closed.emit()}ngAfterViewInit(){return Qt(this,null,function*(){this.loading.set(!0),this.error.set(""),this.binary.set(!1);try{let t=yield this.monacoService.load();if(this.destroyed)return;let e=this.file(),i=!this.exactOriginal()&&e.status==="added"&&!e.oldPath?"EMPTY":this.originalRef(),[r,o]=yield Promise.all([xl(this.git.getFileContent(this.exactOriginal()?e.path:e.oldPath||e.path,i)),xl(this.git.getFileContent(e.path,this.modifiedRef()))]);if(this.destroyed)return;if(r.binary||o.binary){this.binary.set(!0),this.loading.set(!1);return}let s=++jk,a=t.editor.createModel(r.content,void 0,t.Uri.parse(`inmemory://diff/${s}/original/${e.oldPath||e.path}`)),l=t.editor.createModel(o.content,void 0,t.Uri.parse(`inmemory://diff/${s}/modified/${e.path}`));this.models=[a,l],this.editor=t.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.minimapMarks=null,this.applyMinimapOptions(),this.editor.onDidUpdateDiff(()=>this.applyMinimapMarks()),this.loading.set(!1)}catch{this.error.set("Failed to load the diff."),this.loading.set(!1)}})}ngOnDestroy(){this.destroyed=!0,this.minimapMarks=null,this.editor?.dispose(),this.editor=null;for(let t of this.models)t.dispose();this.models=[]}toggleLayout(){this.sideBySide.update(t=>!t),this.editor?.updateOptions({renderSideBySide:this.sideBySide()}),queueMicrotask(()=>this.applyMinimapOptions())}toggleMinimap(){this.minimapEnabled.update(t=>!t),this.applyMinimapOptions()}applyMinimapOptions(){this.editor&&this.editor.getModifiedEditor().updateOptions({minimap:fd(this.minimapEnabled())})}applyMinimapMarks(){this.editor&&(this.minimapMarks||(this.minimapMarks=this.editor.getModifiedEditor().createDecorationsCollection()),this.minimapMarks.set(hd(this.editor.getLineChanges()??[])))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-diff-dialog"]],viewQuery:function(e,i){e&1&&st(i.host,Ok,5),e&2&&Rt()},hostBindings:function(e,i){e&1&&C("keydown.escape",function(){return i.onEscape()},qe)},inputs:{file:[1,"file"],originalRef:[1,"originalRef"],modifiedRef:[1,"modifiedRef"],exactOriginal:[1,"exactOriginal"]},outputs:{closed:"closed"},decls:32,vars:13,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 minimap",1,"icon-btn",3,"click"],["viewBox","0 0 24 24","aria-hidden","true"],["x","5","y","3","width","14","height","18","rx","2"],["x1","8","y1","7","x2","16","y2","7"],["x1","8","y1","10","x2","13","y2","10"],["x1","8","y1","13","x2","16","y2","13"],["x1","8","y1","16","x2","11","y2","16"],["type","button","title","Toggle diff layout",1,"icon-btn",3,"click"],["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(e,i){if(e&1){let r=I();u(0,"div",1),C("click",function(){return m(r),g(i.closed.emit())}),f(),u(1,"div",2)(2,"header",3)(3,"span"),p(4),f(),u(5,"span",4),p(6),f(),u(7,"span",5),E(8,Rk,2,1,"span",6),E(9,Nk,2,1,"span",7),f(),u(10,"button",8),C("click",function(){return m(r),g(i.toggleMinimap())}),V(),u(11,"svg",9),j(12,"rect",10)(13,"line",11)(14,"line",12)(15,"line",13)(16,"line",14),f()(),fe(),u(17,"button",15),C("click",function(){return m(r),g(i.toggleLayout())}),V(),u(18,"svg",9),j(19,"rect",16),E(20,Ak,1,0,":svg:line",17)(21,Lk,1,0,":svg:line",18),f()(),fe(),u(22,"button",19),C("click",function(){return m(r),g(i.closed.emit())}),V(),u(23,"svg",9),j(24,"line",20)(25,"line",21),f()()(),fe(),u(26,"div",22),j(27,"div",23,0),E(29,Fk,2,0,"div",24)(30,Vk,1,1,"app-error-banner",25)(31,Bk,2,0,"div",24),f()()}e&2&&(c(3),Xe("status status-"+i.file().status),c(),P(i.file().status),c(),S("title",i.file().path),c(),P(i.file().path),c(2),D(i.file().additions>0?8:-1),c(),D(i.file().deletions>0?9:-1),c(),J("on",i.minimapEnabled()),Q("aria-pressed",i.minimapEnabled()),c(7),Q("aria-label",i.sideBySide()?"Switch to inline view":"Switch to side-by-side view"),c(3),D(i.sideBySide()?20:21),c(9),D(i.loading()?29:i.error()?30:i.binary()?31:-1))},dependencies:[pt],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.on[_ngcontent-%COMP%]{background:var(--bg-hover);color:var(--accent)}.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 $k=(n,t)=>t.path;function Hk(n,t){if(n&1&&(u(0,"span",17),p(1,"\u2022"),f(),u(2,"span"),p(3),Ti(4,"date"),f(),u(5,"span",17),p(6,"\u2022"),f(),u(7,"code",18),p(8),f()),n&2){let e=d();c(3),P(Eo(4,2,e.commit().date,"d MMM y HH:mm")),c(5),P(e.commit().hash.slice(0,8))}}function zk(n,t){if(n&1&&(u(0,"pre",11),j(1,"app-issue-text",7),f()),n&2){let e=d();c(),S("text",e.body())("linking",e.issueLinking())}}function Uk(n,t){n&1&&(u(0,"div",13),p(1,"Loading changes\u2026"),f())}function Gk(n,t){if(n&1&&j(0,"app-error-banner",14),n&2){let e=d();S("message",e.error())}}function Wk(n,t){n&1&&(u(0,"div",13),p(1,"No changes."),f())}function qk(n,t){n&1&&(V(),j(0,"polyline",24))}function Zk(n,t){n&1&&(V(),j(0,"polyline",25))}function Yk(n,t){if(n&1&&(u(0,"span",28),p(1),f()),n&2){let e=d(2).$implicit;c(),H("+",e.additions)}}function Qk(n,t){if(n&1&&(u(0,"span",29),p(1),f()),n&2){let e=d(2).$implicit;c(),H("\u2212",e.deletions)}}function Kk(n,t){if(n&1){let e=I();u(0,"button",22),C("click",function(){m(e);let r=d().$implicit,o=d(3);return g(o.toggleDir(r.path))}),V(),u(1,"svg",23),E(2,qk,1,0,":svg:polyline",24)(3,Zk,1,0,":svg:polyline",25),f(),fe(),u(4,"span",26),p(5),f(),u(6,"span",27),E(7,Yk,2,1,"span",28),E(8,Qk,2,1,"span",29),f()()}if(n&2){let e=d().$implicit;ne("padding-left",e.depth*14+8,"px"),S("title",e.path),Q("aria-expanded",!e.collapsed),c(2),D(e.collapsed?2:3),c(2),S("title",e.path),c(),P(e.name),c(2),D(e.additions>0?7:-1),c(),D(e.deletions>0?8:-1)}}function Xk(n,t){if(n&1&&(u(0,"span",28),p(1),f()),n&2){let e=d(2).$implicit;c(),H("+",e.file.additions)}}function Jk(n,t){if(n&1&&(u(0,"span",29),p(1),f()),n&2){let e=d(2).$implicit;c(),H("\u2212",e.file.deletions)}}function eI(n,t){if(n&1){let e=I();u(0,"button",30),C("click",function(){m(e);let r=d().$implicit,o=d(3);return g(o.openFile(r.file))}),u(1,"span"),p(2),f(),u(3,"span",31),p(4),f(),u(5,"span",27),E(6,Xk,2,1,"span",28),E(7,Jk,2,1,"span",29),f(),V(),u(8,"svg",32),j(9,"polyline",33),f()()}if(n&2){let e=d().$implicit;ne("padding-left",e.depth*14+8,"px"),c(),Xe("file-status status-"+e.file.status),c(),P(e.file.status),c(),S("title",e.file.path),c(),P(e.name),c(2),D(e.file.additions>0?6:-1),c(),D(e.file.deletions>0?7:-1)}}function tI(n,t){if(n&1&&E(0,Kk,9,9,"button",20)(1,eI,10,9,"button",21),n&2){let e=t.$implicit;D(e.kind==="dir"?0:1)}}function nI(n,t){if(n&1&&(u(0,"div",19),W(1,tI,2,1,null,null,$k),f()),n&2){let e=d(2);c(),q(e.rows())}}function iI(n,t){n&1&&E(0,Wk,2,0,"div",13)(1,nI,3,0,"div",19),n&2&&D(t.files.length===0?0:1)}function rI(n,t){if(n&1){let e=I();u(0,"app-diff-dialog",34),C("closed",function(){m(e);let r=d();return g(r.dialogFile.set(null))}),f()}if(n&2){let e=d();S("file",t)("originalRef",e.originalRef())("modifiedRef",e.modifiedRef())}}var md="guito.detailPanelWidth",Qy=300,gd=class n{git=R(et);vscode=R(ln);host=R(Ot);commit=N.required();issueLinking=N(null);fileListView=N("flat");closed=Z();diff=v(null);loading=v(!1);error=v("");dialogFile=v(null);collapsed=v(new Set);rows=O(()=>{let t=this.diff()?.files??[];return this.fileListView()!=="tree"?t.map(e=>({kind:"file",path:e.path,name:e.path,depth:0,file:e})):Po(t,this.collapsed())});body=v("");bodySub=null;workingHash=wn;isWorking=O(()=>this.commit().hash===this.workingHash);originalRef=O(()=>this.isWorking()?"HEAD":`${this.commit().hash}^`);modifiedRef=O(()=>this.isWorking()?"WORKING":this.commit().hash);constructor(){ge(()=>{this.loadDiff(this.commit().hash),this.loadBody(this.commit())})}ngOnDestroy(){this.bodySub?.unsubscribe(),this.detachResize?.(),this.detachResize=null}openFile(t){this.vscode.openDiff(t,this.originalRef(),this.modifiedRef())||this.dialogFile.set(t)}toggleDir(t){this.collapsed.update(e=>{let i=new Set(e);return i.has(t)?i.delete(t):i.add(t),i})}loadBody(t){if(this.bodySub?.unsubscribe(),this.body.set(""),t.body!==void 0){this.body.set(t.body);return}this.bodySub=this.git.getCommitDetail(t.hash).subscribe({next:e=>this.body.set(e.body??""),error:()=>this.body.set("")})}loadDiff(t){if(this.loading.set(!0),this.error.set(""),this.diff.set(null),this.dialogFile.set(null),t===wn){this.git.getWorkingChanges().subscribe({next:e=>{this.loading.set(!1),this.diff.set({hash:wn,files:e.files})},error:()=>{this.loading.set(!1),this.error.set("Failed to load the working changes.")}});return}this.git.getCommitDiff(t).subscribe({next:e=>{this.loading.set(!1),this.diff.set(e)},error:()=>{this.loading.set(!1),this.error.set("Failed to load the commit diff.")}})}panelWidth=v(No(md));resizing=v(!1);panelWidthCss=O(()=>{let t=this.panelWidth();return t===null?null:`${t}px`});detachResize=null;startResize(t){this.detachResize||(this.resizing.set(!0),this.detachResize=Lo(t,{direction:-1,startWidth:this.effectiveWidth(),min:Qy,onResize:e=>this.panelWidth.set(e),onEnd:e=>{this.detachResize=null,this.resizing.set(!1),this.panelWidth.set(e),Kn(md,e)}}))}resizeKeydown(t){let e=t.shiftKey?50:10,i=t.key==="ArrowRight"?e:t.key==="ArrowLeft"?-e:0;if(i===0)return;t.preventDefault();let r=Pi(this.effectiveWidth()-i,Qy);this.panelWidth.set(r),Kn(md,r)}resetWidth(){this.panelWidth.set(null),Ao(md)}effectiveWidth(){return this.panelWidth()??this.host.nativeElement.offsetWidth}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-commit-detail"]],hostVars:4,hostBindings:function(e,i){e&2&&(ne("--panel-width",i.panelWidthCss()),J("resizing",i.resizing()))},inputs:{commit:[1,"commit"],issueLinking:[1,"issueLinking"],fileListView:[1,"fileListView"]},outputs:{closed:"closed"},decls:20,vars:10,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"],["role","separator","aria-orientation","vertical","aria-label","Resize commit detail panel","tabindex","0",1,"panel-resizer",3,"mousedown","dblclick","keydown"],[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(e,i){if(e&1&&(u(0,"aside",0)(1,"header",1)(2,"button",2),C("click",function(){return i.closed.emit()}),V(),u(3,"svg",3),j(4,"line",4)(5,"line",5),f()(),fe(),u(6,"h2",6),j(7,"app-issue-text",7),f(),u(8,"div",8),j(9,"app-author-avatar",9),u(10,"span",10),p(11),f(),E(12,Hk,9,5),f(),E(13,zk,2,2,"pre",11),f(),u(14,"div",12),E(15,Uk,2,0,"div",13)(16,Gk,1,1,"app-error-banner",14)(17,iI,2,1),f()(),u(18,"div",15),C("mousedown",function(o){return i.startResize(o)})("dblclick",function(){return i.resetWidth()})("keydown",function(o){return i.resizeKeydown(o)}),f(),E(19,rI,1,3,"app-diff-dialog",16)),e&2){let r,o;c(7),S("text",i.commit().message)("linking",i.issueLinking()),c(2),S("name",i.commit().author_name)("email",i.commit().author_email),c(2),P(i.commit().author_name),c(),D(i.isWorking()?-1:12),c(),D(i.body().trim()?13:-1),c(2),D(i.loading()?15:i.error()?16:(r=i.diff())?17:-1,r),c(3),Q("aria-valuenow",i.panelWidth()),c(),D((o=i.dialogFile())?19:-1,o)}},dependencies:[pt,Vn,Vo,Io,pa],styles:["[_nghost-%COMP%]{--panel-width: 480px;display:block;position:relative;flex:none;width:var(--panel-width);min-height:0;overflow:hidden}.detail[_ngcontent-%COMP%]{position:absolute;inset:0 auto 0 0;width:var(--panel-width);display:flex;flex-direction:column;min-height:0;background:var(--bg-alt);border-left:1px solid var(--border)}@keyframes _ngcontent-%COMP%_panel-enter{0%{width:0}to{width:var(--panel-width)}}@keyframes _ngcontent-%COMP%_panel-leave{0%{width:var(--panel-width)}to{width:0}}.panel-enter[_nghost-%COMP%]{animation:_ngcontent-%COMP%_panel-enter .18s cubic-bezier(.05,.7,.1,1)}.panel-leave[_nghost-%COMP%]{animation:_ngcontent-%COMP%_panel-leave .15s cubic-bezier(.3,0,.8,.15) forwards}.resizing[_nghost-%COMP%]{animation:none}.panel-resizer[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:5px;height:100%;cursor:col-resize;z-index:5}.panel-resizer[_ngcontent-%COMP%]:hover, .panel-resizer[_ngcontent-%COMP%]:focus-visible{background:var(--accent);outline:none}@media(prefers-reduced-motion:reduce){.panel-enter[_nghost-%COMP%], .panel-leave[_nghost-%COMP%]{animation:none}}.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 Ca(n,t=0){return oI(n)?Number(n):arguments.length===2?t:0}function oI(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}function Ky(n){return n instanceof Ot?n.nativeElement:n}var om;try{om=typeof Intl<"u"&&Intl.v8BreakIterator}catch{om=!1}var _d=(()=>{class n{_platformId=R(br);isBrowser=this._platformId?xy(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||om)&&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=ce({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var sI=new se("cdk-dir-doc",{providedIn:"root",factory:aI});function aI(){return R(mt)}var lI=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function cI(n){let t=n?.toLowerCase()||"";return t==="auto"&&typeof navigator<"u"&&navigator?.language?lI.test(navigator.language)?"rtl":"ltr":t==="rtl"?"rtl":"ltr"}var Xy=(()=>{class n{get value(){return this.valueSignal()}valueSignal=v("ltr");change=new yn;constructor(){let e=R(sI,{optional:!0});if(e){let i=e.body?e.body.dir:null,r=e.documentElement?e.documentElement.dir:null;this.valueSignal.set(cI(i||r||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var En=(function(n){return n[n.NORMAL=0]="NORMAL",n[n.NEGATED=1]="NEGATED",n[n.INVERTED=2]="INVERTED",n})(En||{}),vd,Sr;function Jy(){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 Bo(){if(typeof document!="object"||!document)return En.NORMAL;if(vd==null){let n=document.createElement("div"),t=n.style;n.dir="rtl",t.width="1px",t.overflow="auto",t.visibility="hidden",t.pointerEvents="none",t.position="absolute";let e=document.createElement("div"),i=e.style;i.width="2px",i.height="1px",n.appendChild(e),document.body.appendChild(n),vd=En.NORMAL,n.scrollLeft===0&&(n.scrollLeft=1,vd=n.scrollLeft===0?En.NEGATED:En.INVERTED),n.remove()}return vd}var bd=class{};function ex(n){return n&&typeof n.connect=="function"&&!(n instanceof ns)}var yd=class extends bd{_data;constructor(t){super(),this._data=t}connect(){return ls(this._data)?this._data:Ee(this._data)}disconnect(){}},wa=(function(n){return n[n.REPLACED=0]="REPLACED",n[n.INSERTED=1]="INSERTED",n[n.MOVED=2]="MOVED",n[n.REMOVED=3]="REMOVED",n})(wa||{}),sm=new se("_ViewRepeater"),xd=class{viewCacheSize=20;_viewCache=[];applyChanges(t,e,i,r,o){t.forEachOperation((s,a,l)=>{let h,_;if(s.previousIndex==null){let w=()=>i(s,a,l);h=this._insertView(w,l,e,r(s)),_=h?wa.INSERTED:wa.REPLACED}else l==null?(this._detachAndCacheView(a,e),_=wa.REMOVED):(h=this._moveView(a,l,e,r(s)),_=wa.MOVED);o&&o({context:h?.context,operation:_,record:s})})}detach(){for(let t of this._viewCache)t.destroy();this._viewCache=[]}_insertView(t,e,i,r){let o=this._insertViewFromCache(e,i);if(o){o.context.$implicit=r;return}let s=t();return i.createEmbeddedView(s.templateRef,s.context,s.index)}_detachAndCacheView(t,e){let i=e.detach(t);this._maybeCacheView(i,e)}_moveView(t,e,i,r){let o=i.get(t);return i.move(o,e),o.context.$implicit=r,o}_maybeCacheView(t,e){if(this._viewCache.length<this.viewCacheSize)this._viewCache.push(t);else{let i=e.indexOf(t);i===-1?t.destroy():e.remove(i)}}_insertViewFromCache(t,e){let i=this._viewCache.pop();return i&&e.insert(i,t),i||null}};var dI=["contentWrapper"],uI=["*"],ix=new se("VIRTUAL_SCROLL_STRATEGY"),am=class{_scrolledIndexChange=new ze;scrolledIndexChange=this._scrolledIndexChange.pipe(us());_viewport=null;_itemSize;_minBufferPx;_maxBufferPx;constructor(t,e,i){this._itemSize=t,this._minBufferPx=e,this._maxBufferPx=i}attach(t){this._viewport=t,this._updateTotalContentSize(),this._updateRenderedRange()}detach(){this._scrolledIndexChange.complete(),this._viewport=null}updateItemAndBufferSize(t,e,i){i<e,this._itemSize=t,this._minBufferPx=e,this._maxBufferPx=i,this._updateTotalContentSize(),this._updateRenderedRange()}onContentScrolled(){this._updateRenderedRange()}onDataLengthChanged(){this._updateTotalContentSize(),this._updateRenderedRange()}onContentRendered(){}onRenderedOffsetChanged(){}scrollToIndex(t,e){this._viewport&&this._viewport.scrollToOffset(t*this._itemSize,e)}_updateTotalContentSize(){this._viewport&&this._viewport.setTotalContentSize(this._viewport.getDataLength()*this._itemSize)}_updateRenderedRange(){if(!this._viewport)return;let t=this._viewport.getRenderedRange(),e={start:t.start,end:t.end},i=this._viewport.getViewportSize(),r=this._viewport.getDataLength(),o=this._viewport.measureScrollOffset(),s=this._itemSize>0?o/this._itemSize:0;if(e.end>r){let l=Math.ceil(i/this._itemSize),h=Math.max(0,Math.min(s,r-l));s!=h&&(s=h,o=h*this._itemSize,e.start=Math.floor(s)),e.end=Math.max(0,Math.min(r,e.start+l))}let a=o-e.start*this._itemSize;if(a<this._minBufferPx&&e.start!=0){let l=Math.ceil((this._maxBufferPx-a)/this._itemSize);e.start=Math.max(0,e.start-l),e.end=Math.min(r,Math.ceil(s+(i+this._minBufferPx)/this._itemSize))}else{let l=e.end*this._itemSize-(o+i);if(l<this._minBufferPx&&e.end!=r){let h=Math.ceil((this._maxBufferPx-l)/this._itemSize);h>0&&(e.end=Math.min(r,e.end+h),e.start=Math.max(0,Math.floor(s-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(e),this._viewport.setRenderedContentOffset(Math.round(this._itemSize*e.start)),this._scrolledIndexChange.next(Math.floor(s))}};function pI(n){return n._scrollStrategy}var rx=(()=>{class n{get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=Ca(e)}_itemSize=20;get minBufferPx(){return this._minBufferPx}set minBufferPx(e){this._minBufferPx=Ca(e)}_minBufferPx=100;get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(e){this._maxBufferPx=Ca(e)}_maxBufferPx=200;_scrollStrategy=new am(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=Si({type:n,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[ea([{provide:ix,useFactory:pI,deps:[to(()=>n)]}]),zs]})}return n})(),fI=20,hI=(()=>{class n{_ngZone=R(we);_platform=R(_d);_renderer=R(An).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new ze;_scrolledCount=0;scrollContainers=new Map;register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){let i=this.scrollContainers.get(e);i&&(i.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=fI){return this._platform.isBrowser?new pe(i=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let r=e>0?this._scrolled.pipe(ds(e)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):Ee()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((e,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(e,i){let r=this.getAncestorScrollContainers(e);return this.scrolled(i).pipe(cs(o=>!o||r.indexOf(o)>-1))}getAncestorScrollContainers(e){let i=[];return this.scrollContainers.forEach((r,o)=>{this._scrollableContainsElement(o,e)&&i.push(o)}),i}_scrollableContainsElement(e,i){let r=Ky(i),o=e.getElementRef().nativeElement;do if(r==o)return!0;while(r=r.parentElement);return!1}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),ox=(()=>{class n{elementRef=R(Ot);scrollDispatcher=R(hI);ngZone=R(we);dir=R(Xy,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new ze;_renderer=R(Bc);_cleanupScroll;_elementScrolled=new ze;constructor(){}ngOnInit(){this._cleanupScroll=this.ngZone.runOutsideAngular(()=>this._renderer.listen(this._scrollElement,"scroll",e=>this._elementScrolled.next(e))),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(e){let i=this.elementRef.nativeElement,r=this.dir&&this.dir.value=="rtl";e.left==null&&(e.left=r?e.end:e.start),e.right==null&&(e.right=r?e.start:e.end),e.bottom!=null&&(e.top=i.scrollHeight-i.clientHeight-e.bottom),r&&Bo()!=En.NORMAL?(e.left!=null&&(e.right=i.scrollWidth-i.clientWidth-e.left),Bo()==En.INVERTED?e.left=e.right:Bo()==En.NEGATED&&(e.left=e.right?-e.right:e.right)):e.right!=null&&(e.left=i.scrollWidth-i.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){let i=this.elementRef.nativeElement;Jy()?i.scrollTo(e):(e.top!=null&&(i.scrollTop=e.top),e.left!=null&&(i.scrollLeft=e.left))}measureScrollOffset(e){let i="left",r="right",o=this.elementRef.nativeElement;if(e=="top")return o.scrollTop;if(e=="bottom")return o.scrollHeight-o.clientHeight-o.scrollTop;let s=this.dir&&this.dir.value=="rtl";return e=="start"?e=s?r:i:e=="end"&&(e=s?i:r),s&&Bo()==En.INVERTED?e==i?o.scrollWidth-o.clientWidth-o.scrollLeft:o.scrollLeft:s&&Bo()==En.NEGATED?e==i?o.scrollLeft+o.scrollWidth-o.clientWidth:-o.scrollLeft:e==i?o.scrollLeft:o.scrollWidth-o.clientWidth-o.scrollLeft}static \u0275fac=function(i){return new(i||n)};static \u0275dir=Si({type:n,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return n})(),mI=20,gI=(()=>{class n{_platform=R(_d);_listeners;_viewportSize;_change=new ze;_document=R(mt);constructor(){let e=R(we),i=R(An).createRenderer(null,null);e.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(e=>e()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){let e=this.getViewportScrollPosition(),{width:i,height:r}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+r,right:e.left+i,height:r,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,i=this._getWindow(),r=e.documentElement,o=r.getBoundingClientRect(),s=-o.top||e.body.scrollTop||i.scrollY||r.scrollTop||0,a=-o.left||e.body.scrollLeft||i.scrollX||r.scrollLeft||0;return{top:s,left:a}}change(e=mI){return e>0?this._change.pipe(ds(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),tx=new se("VIRTUAL_SCROLLABLE"),_I=(()=>{class n extends ox{constructor(){super()}measureViewportSize(e){let i=this.elementRef.nativeElement;return e==="horizontal"?i.clientWidth:i.clientHeight}static \u0275fac=function(i){return new(i||n)};static \u0275dir=Si({type:n,features:[Ys]})}return n})();function vI(n,t){return n.start==t.start&&n.end==t.end}var bI=typeof requestAnimationFrame<"u"?Ru:Ou,Ea=(()=>{class n extends _I{elementRef=R(Ot);_changeDetectorRef=R(Zc);_scrollStrategy=R(ix,{optional:!0});scrollable=R(tx,{optional:!0});_platform=R(_d);_detachedSubject=new ze;_renderedRangeSubject=new ze;get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this._calculateSpacerSize())}_orientation="vertical";appendOnly=!1;scrolledIndexChange=new pe(e=>this._scrollStrategy.scrolledIndexChange.subscribe(i=>Promise.resolve().then(()=>this.ngZone.run(()=>e.next(i)))));_contentWrapper;renderedRangeStream=this._renderedRangeSubject;_totalContentSize=0;_totalContentWidth=v("");_totalContentHeight=v("");_renderedContentTransform;_renderedRange={start:0,end:0};_dataLength=0;_viewportSize=0;_forOf;_renderedContentOffset=0;_renderedContentOffsetNeedsRewrite=!1;_changeDetectionNeeded=v(!1);_runAfterChangeDetection=[];_viewportChanges=Be.EMPTY;_injector=R(kt);_isDestroyed=!1;constructor(){super();let e=R(gI);this._scrollStrategy,this._viewportChanges=e.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this);let i=ge(()=>{this._changeDetectionNeeded()&&this._doChangeDetection()},{injector:R(xr).injector});R(ot).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(wl(null),ds(0,bI),Zi(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(e){this._forOf,this.ngZone.runOutsideAngular(()=>{this._forOf=e,this._forOf.dataStream.pipe(Zi(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(e){return this.getElementRef().nativeElement.getBoundingClientRect()[e]}setTotalContentSize(e){this._totalContentSize!==e&&(this._totalContentSize=e,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(e){vI(this._renderedRange,e)||(this.appendOnly&&(e={start:0,end:Math.max(this._renderedRange.end,e.end)}),this._renderedRangeSubject.next(this._renderedRange=e),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(e,i="to-start"){e=this.appendOnly&&i==="to-start"?0:e;let r=this.dir&&this.dir.value=="rtl",o=this.orientation=="horizontal",s=o?"X":"Y",l=`translate${s}(${Number((o&&r?-1:1)*e)}px)`;this._renderedContentOffset=e,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(e,i="auto"){let r={behavior:i};this.orientation==="horizontal"?r.start=e:r.top=e,this.scrollable.scrollTo(r)}scrollToIndex(e,i="auto"){this._scrollStrategy.scrollToIndex(e,i)}measureScrollOffset(e){let i;return this.scrollable==this?i=r=>super.measureScrollOffset(r):i=r=>this.scrollable.measureScrollOffset(r),Math.max(0,i(e??(this.orientation==="horizontal"?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(e){let i,r="left",o="right",s=this.dir?.value=="rtl";e=="start"?i=s?o:r:e=="end"?i=s?r:o:e?i=e:i=this.orientation==="horizontal"?"left":"top";let a=this.scrollable.measureBoundingClientRectWithScrollOffset(i);return this.elementRef.nativeElement.getBoundingClientRect()[i]-a}measureRenderedContentSize(){let e=this._contentWrapper.nativeElement;return this.orientation==="horizontal"?e.offsetWidth:e.offsetHeight}measureRangeSize(e){return this._forOf?this._forOf.measureRangeSize(e,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){this._viewportSize=this.scrollable.measureViewportSize(this.orientation)}_markChangeDetectionNeeded(e){e&&this._runAfterChangeDetection.push(e),!je(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,Pc(()=>{this._changeDetectionNeeded.set(!1);let e=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(let i of e)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=ue({type:n,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(i,r){if(i&1&&yh(dI,7),i&2){let o;xh(o=Ch())&&(r._contentWrapper=o.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(i,r){i&2&&J("cdk-virtual-scroll-orientation-horizontal",r.orientation==="horizontal")("cdk-virtual-scroll-orientation-vertical",r.orientation!=="horizontal")},inputs:{orientation:"orientation",appendOnly:[2,"appendOnly","appendOnly",iy]},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[ea([{provide:ox,useFactory:(e,i)=>e||i,deps:[[new Of,new Pf(tx)],n]}]),Ys],ngContentSelectors:uI,decls:4,vars:4,consts:[["contentWrapper",""],[1,"cdk-virtual-scroll-content-wrapper"],[1,"cdk-virtual-scroll-spacer"]],template:function(i,r){i&1&&(vh(),b(0,"div",1,0),bh(2),y(),te(3,"div",2)),i&2&&(c(3),ne("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 nx(n,t,e){let i=e;if(!i.getBoundingClientRect)return 0;let r=i.getBoundingClientRect();return n==="horizontal"?t==="start"?r.left:r.right:t==="start"?r.top:r.bottom}var sx=(()=>{class n{_viewContainerRef=R(Di);_template=R(wi);_differs=R(Yc);_viewRepeater=R(sm);_viewport=R(Ea,{skipSelf:!0});viewChange=new ze;_dataSourceChanges=new ze;get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(e){this._cdkVirtualForOf=e,ex(e)?this._dataSourceChanges.next(e):this._dataSourceChanges.next(new yd(ls(e)?e:Array.from(e||[])))}_cdkVirtualForOf;get cdkVirtualForTrackBy(){return this._cdkVirtualForTrackBy}set cdkVirtualForTrackBy(e){this._needsUpdate=!0,this._cdkVirtualForTrackBy=e?(i,r)=>e(i+(this._renderedRange?this._renderedRange.start:0),r):void 0}_cdkVirtualForTrackBy;set cdkVirtualForTemplate(e){e&&(this._needsUpdate=!0,this._template=e)}get cdkVirtualForTemplateCacheSize(){return this._viewRepeater.viewCacheSize}set cdkVirtualForTemplateCacheSize(e){this._viewRepeater.viewCacheSize=Ca(e)}dataStream=this._dataSourceChanges.pipe(wl(null),Bu(),St(([e,i])=>this._changeDataSource(e,i)),Jr(1));_differ=null;_data;_renderedItems;_renderedRange;_needsUpdate=!1;_destroyed=new ze;constructor(){let e=R(we);this.dataStream.subscribe(i=>{this._data=i,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe(Zi(this._destroyed)).subscribe(i=>{this._renderedRange=i,this.viewChange.observers.length&&e.run(()=>this.viewChange.next(this._renderedRange)),this._onRenderedDataChange()}),this._viewport.attach(this)}measureRangeSize(e,i){if(e.start>=e.end)return 0;e.start<this._renderedRange.start||e.end>this._renderedRange.end;let r=e.start-this._renderedRange.start,o=e.end-e.start,s,a;for(let l=0;l<o;l++){let h=this._viewContainerRef.get(l+r);if(h&&h.rootNodes.length){s=a=h.rootNodes[0];break}}for(let l=o-1;l>-1;l--){let h=this._viewContainerRef.get(l+r);if(h&&h.rootNodes.length){a=h.rootNodes[h.rootNodes.length-1];break}}return s&&a?nx(i,"end",a)-nx(i,"start",s):0}ngDoCheck(){if(this._differ&&this._needsUpdate){let e=this._differ.diff(this._renderedItems);e?this._applyChanges(e):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((e,i)=>this.cdkVirtualForTrackBy?this.cdkVirtualForTrackBy(e,i):i)),this._needsUpdate=!0)}_changeDataSource(e,i){return e&&e.disconnect(this),this._needsUpdate=!0,i?i.connect(this):Ee()}_updateContext(){let e=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=e,this._updateComputedContextProperties(r.context),r.detectChanges()}}_applyChanges(e){this._viewRepeater.applyChanges(e,this._viewContainerRef,(o,s,a)=>this._getEmbeddedViewArgs(o,a),o=>o.item),e.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(e){e.first=e.index===0,e.last=e.index===e.count-1,e.even=e.index%2===0,e.odd=!e.even}_getEmbeddedViewArgs(e,i){return{templateRef:this._template,context:{$implicit:e.item,cdkVirtualForOf:this._cdkVirtualForOf,index:-1,count:-1,first:!1,last:!1,odd:!1,even:!1},index:i}}static ngTemplateContextGuard(e,i){return!0}static \u0275fac=function(i){return new(i||n)};static \u0275dir=Si({type:n,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},features:[ea([{provide:sm,useClass:xd}])]})}return n})();function Cd(n){let t=[],e=new Int32Array(n.length),i=r=>{let o=t.indexOf(r);return o===-1&&(o=t.indexOf(null),o===-1&&(t.push(null),o=t.length-1),t[o]=r),o};for(let r=0;r<n.length;r++){let{hash:o,parents:s}=n[r],a=t.map((h,_)=>h===o?_:-1).filter(h=>h!==-1),l;if(a.length>0){l=a[0];for(let h=1;h<a.length;h++)t[a[h]]=null}else l=i(o);t[l]=s[0]??null;for(let h=1;h<s.length;h++)i(s[h]);e[r]=l}return e}var ax=["#3794ff","#4ec9b0","#d7ba7d","#c586c0","#89d185","#ce9178","#d16969","#569cd6","#b5cea8","#dcdcaa"];function lm(n){return ax[Math.abs(n)%ax.length]}var yI=2e3,wd=class n{worker=null;workerBroken=!1;nextId=0;pending=new Map;compute(t){return t.length<=yI?Ee(Cd(t)):new pe(e=>{let i=this.ensureWorker();if(!i){e.next(Cd(t)),e.complete();return}let r=++this.nextId;this.pending.set(r,{rows:t,subscriber:e});let o=setTimeout(()=>this.fallback(),15e3);try{i.postMessage({id:r,hashes:t.map(s=>s.hash),parents:t.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[t,e]of this.pending)this.pending.delete(t),e.subscriber.next(Cd(e.rows)),e.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=t=>{let e=this.pending.get(t.data.id);if(e){if(!(t.data.lanes instanceof Int32Array)||t.data.lanes.length!==e.rows.length){this.fallback();return}e.subscriber.next(t.data.lanes),e.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 t of this.pending.values())t.subscriber.complete();this.pending.clear()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})};function lx(n){return n?n.split(",").map(t=>t.trim()).filter(Boolean).map(t=>t.startsWith("HEAD -> ")?{type:"head",name:t.slice(8)}:t==="HEAD"?{type:"head",name:"HEAD"}:t.startsWith("tag: ")?{type:"tag",name:t.slice(5)}:t.includes("/")?{type:"remote",name:t}:{type:"local",name:t}):[]}function cm(n){let t=n.refs;return t?t==="HEAD"||t.startsWith("HEAD,")||t.startsWith("HEAD ->"):!1}var xI=(n,t)=>t.index,CI=(n,t)=>t.hash,wI=(n,t)=>t.name;function EI(n,t){if(n&1){let e=I();u(0,"div",20)(1,"span",5),p(2,"Graph"),f(),u(3,"div",6),C("mousedown",function(r){m(e);let o=d();return g(o.startResize("graph",r))}),f()()}if(n&2){let e=d();ne("width",e.graphColumnWidth(),"px")}}function DI(n,t){if(n&1&&(u(0,"div",35),V(),u(1,"svg",36),j(2,"path",37)(3,"path",38),f()()),n&2){let e=d(2);ne("width",e.graphColumnWidth(),"px")}}function SI(n,t){if(n&1&&(u(0,"span",39),p(1),f()),n&2){let e=d();c(),H("",e.staged.length," staged")}}function MI(n,t){if(n&1&&(u(0,"span",40),p(1),f()),n&2){let e=d();c(),H("",e.unstaged.length," unstaged")}}function TI(n,t){if(n&1&&(u(0,"span",41),p(1),f()),n&2){let e=d();c(),H("",e.untracked.length," untracked")}}function kI(n,t){if(n&1&&(E(0,SI,2,1,"span",39),E(1,MI,2,1,"span",40),E(2,TI,2,1,"span",41)),n&2){let e=t;D(e.staged.length>0?0:-1),c(),D(e.unstaged.length>0?1:-1),c(),D(e.untracked.length>0?2:-1)}}function II(n,t){if(n&1){let e=I();u(0,"div",21),C("click",function(){m(e);let r=d();return g(r.commitClick.emit(r.workingCommit()))})("contextmenu",function(r){m(e);let o=d();return g(o.onWorkingContextMenu(r))}),E(1,DI,4,2,"div",22),u(2,"div",23)(3,"span",24),V(),u(4,"svg",25),j(5,"circle",26)(6,"path",27)(7,"path",28)(8,"path",29)(9,"path",30),f(),fe(),u(10,"span",31),p(11,"Uncommitted changes"),f()(),E(12,kI,3,3),f(),u(13,"div",32),p(14,"\u2014"),f(),u(15,"div",33),p(16),f(),u(17,"div",34),p(18,"\u2014"),f()()}if(n&2){let e,i=d();ne("width",i.tableWidth(),"px")("transform",i.horizontalTransform()),J("selected",i.selectedHash()===i.workingHash),c(),D(i.showGraph()?1:-1),c(),ne("width",i.descriptionWidth(),"px"),c(10),D((e=i.workingChanges())?12:-1,e),c(),ne("width",i.columnWidths().date,"px"),c(2),ne("width",i.columnWidths().author,"px"),c(),P(i.identity().name||"You"),c(),ne("width",i.columnWidths().commit,"px")}}function PI(n,t){if(n&1&&(u(0,"div",35),V(),u(1,"svg",49),j(2,"path",44)(3,"line",45),f()()),n&2){let e=d(2);ne("width",e.graphColumnWidth(),"px")}}function OI(n,t){if(n&1&&(u(0,"mark",50),p(1),f()),n&2){let e=d().$implicit;c(),P(e.text)}}function RI(n,t){if(n&1&&p(0),n&2){let e=d().$implicit;H(" ",e.text," ")}}function NI(n,t){if(n&1&&E(0,OI,2,1,"mark",50)(1,RI,1,1),n&2){let e=t.$implicit;D(e.match?0:1)}}function AI(n,t){if(n&1&&(j(0,"app-author-avatar",51),p(1)),n&2){let e=d().$implicit;S("name",e.author_name)("email",e.author_email??""),c(),H(" ",e.author_name," ")}}function LI(n,t){if(n&1){let e=I();u(0,"div",42),C("click",function(){let r=m(e).$implicit,o=d();return g(o.commitClick.emit(o.stashCommit(r)))})("contextmenu",function(r){let o=m(e).$implicit,s=d();return g(s.onStashContextMenu(r,o))}),E(1,PI,4,2,"div",22),u(2,"div",23)(3,"span",43),V(),u(4,"svg",25),j(5,"path",44)(6,"line",45),f(),fe(),u(7,"span",31),p(8),f()(),u(9,"span",46),W(10,NI,2,1,null,null,Zn),f()(),u(12,"div",32),p(13),Ti(14,"date"),f(),u(15,"div",47),E(16,AI,2,3),f(),u(17,"div",48),p(18),f()()}if(n&2){let e=t.$implicit,i=d();ne("width",i.tableWidth(),"px")("transform",i.horizontalTransform()),J("selected",i.selectedHash()===e.hash),c(),D(i.showGraph()?1:-1),c(),ne("width",i.descriptionWidth(),"px"),c(),S("title",i.stashLabel(e)),c(5),P(i.stashLabel(e)),c(),S("title",e.message),c(),q(i.highlight(e.message)),c(2),ne("width",i.columnWidths().date,"px"),c(),H(" ",e.date?Eo(14,23,e.date,"d MMM y HH:mm"):"\u2014"," "),c(2),ne("width",i.columnWidths().author,"px"),S("title",e.author_name),c(),D(e.author_name?16:-1),c(),ne("width",i.columnWidths().commit,"px"),S("title",e.hash),c(),H(" ",e.hash.slice(0,8)," ")}}function FI(n,t){if(n&1&&(u(0,"div",13),j(1,"span",52),p(2),f()),n&2){let e=d();c(2),P(e.pendingLabel())}}function VI(n,t){if(n&1&&(V(),j(0,"path",55)),n&2){let e=t.$implicit;Q("d",e.d)("stroke",e.color)}}function BI(n,t){if(n&1&&(V(),j(0,"circle",56)),n&2){let e=d().$implicit;Q("cx",e.x)("cy",e.y)("stroke",e.color)}}function jI(n,t){if(n&1&&(V(),j(0,"circle",57)),n&2){let e=d().$implicit;Q("cx",e.x)("cy",e.y)("fill",e.color)}}function $I(n,t){if(n&1&&E(0,BI,1,3,":svg:circle",56)(1,jI,1,3,":svg:circle",57),n&2){let e=t.$implicit;D(e.isHead?0:1)}}function HI(n,t){if(n&1&&(u(0,"div",53),V(),u(1,"svg",54)(2,"g"),W(3,VI,1,2,":svg:path",55,Zn),W(5,$I,2,1,null,null,CI),f()()()),n&2){let e=d();ne("width",e.viewportWidth(),"px"),c(),ne("transform",e.horizontalTransform()),Q("width",e.graphWidth()),c(),Q("transform","translate(0 "+-e.scrollTop()+")"),c(),q(e.edges()),c(2),q(e.nodes())}}function zI(n,t){if(n&1&&j(0,"div",35),n&2){let e=d(2);ne("width",e.graphColumnWidth(),"px")}}function UI(n,t){n&1&&(V(),u(0,"svg",25),j(1,"line",63)(2,"circle",64)(3,"circle",65)(4,"path",66),f())}function GI(n,t){n&1&&(V(),u(0,"svg",25),j(1,"path",67)(2,"line",68),f())}function WI(n,t){if(n&1){let e=I();u(0,"span",62),C("contextmenu",function(r){let o=m(e).$implicit,s=d().$implicit,a=d();return g(a.onBadgeContextMenu(r,s.commit,o))}),E(1,UI,5,0,":svg:svg",25)(2,GI,3,0,":svg:svg",25),u(3,"span",31),p(4),f()()}if(n&2){let e=t.$implicit;Xe("badge badge-"+e.type),c(),D(e.type==="head"||e.type==="local"?1:e.type==="tag"?2:-1),c(3),P(e.name)}}function qI(n,t){if(n&1&&(u(0,"mark",50),p(1),f()),n&2){let e=d().$implicit;c(),P(e.text)}}function ZI(n,t){if(n&1&&p(0),n&2){let e=d().$implicit;H(" ",e.text," ")}}function YI(n,t){if(n&1&&E(0,qI,2,1,"mark",50)(1,ZI,1,1),n&2){let e=t.$implicit;D(e.match?0:1)}}function QI(n,t){if(n&1){let e=I();u(0,"div",58),C("click",function(){let r=m(e).$implicit,o=d();return g(o.commitClick.emit(r.commit))})("contextmenu",function(r){let o=m(e).$implicit,s=d();return g(s.onRowContextMenu(r,o.commit))}),E(1,zI,1,2,"div",22),u(2,"div",23),W(3,WI,5,4,"span",59,wI),u(5,"span",60),j(6,"app-issue-text",61),f()(),u(7,"div",32),p(8),Ti(9,"date"),f(),u(10,"div",47),j(11,"app-author-avatar",51),W(12,YI,2,1,null,null,Zn),f(),u(14,"div",48),p(15),f()()}if(n&2){let e=t.$implicit,i=d();ne("width",i.tableWidth(),"px"),J("selected",e.commit.hash===i.selectedHash()),c(),D(i.showGraph()?1:-1),c(),ne("width",i.descriptionWidth(),"px"),c(),q(i.badges(e.commit)),c(2),J("head",i.isHead(e.commit)),c(),S("text",e.commit.message)("search",i.search())("linking",i.issueLinking()),c(),ne("width",i.columnWidths().date,"px"),c(),H(" ",Eo(9,24,e.commit.date,"d MMM y HH:mm")," "),c(2),ne("width",i.columnWidths().author,"px"),S("title",e.commit.author_name),c(),S("name",e.commit.author_name)("email",e.commit.author_email),c(),q(i.highlight(e.commit.author_name)),c(2),ne("width",i.columnWidths().commit,"px"),S("title",e.commit.hash),c(),H(" ",e.commit.hash.slice(0,8)," ")}}function KI(n,t){if(n&1&&(u(0,"div",18),p(1),f()),n&2){let e=d();c(),P(e.search().trim()?"No matching commits":"No commits to show")}}function XI(n,t){if(n&1){let e=I();u(0,"div",19)(1,"button",69),C("click",function(){m(e);let r=d();return g(r.onLoadMoreCommits())}),p(2,"Load more commits"),f(),u(3,"button",69),C("click",function(){m(e);let r=d();return g(r.onLoadAllCommits())}),p(4),f()()}if(n&2){let e=d();c(4),H("Load all (",e.unloaded(),")")}}var cn=34,dm=14,cx=10,JI=72,dx=10,px="guito.columnWidths",ux={graph:0,description:480,date:132,author:150,commit:84},eP={graph:0,description:48,date:48,author:48,commit:48};function tP(){let n=Oo(px,{}),t=z({},ux);for(let e of Object.keys(ux)){let i=n[e];typeof i=="number"&&Number.isFinite(i)&&i>=eP[e]&&(t[e]=i)}return t}var Ed=class n{commits=N.required();selectedHash=N.required();identity=N({name:"",email:""});search=N("");showGraph=N(!0);selectedBranches=N([]);showRemote=N(!0);workingChanges=N(null);stashes=N([]);showStashes=N(!1);showTags=N(!0);issueLinking=N(null);unloaded=N(0);historyLoading=N(!1);loadingLabel=N("");scrollToHash=N(null);graphLoading=v(!1);pendingLabel=O(()=>this.loadingLabel()||(this.graphLoading()?"Drawing commit graph...":""));commitClick=Z();contextMenu=Z();loadMoreRequested=Z();loadAllRequested=Z();rowHeight=cn;graph=R(wd);viewport=dt(Ea);zone=R(we);scrollTop=v(0);scrollLeft=v(0);viewportWidth=v(0);viewportHeight=v(0);constructor(){ge(()=>{let t=this.commits();this.updateGraph(t)}),ra(()=>{this.graphCommits(),this.columnWidths();let t=this.viewport();t&&je(()=>{t.checkViewportSize(),this.measureViewport()})}),ra(()=>{this.selectedBranches(),this.showRemote(),this.showGraph(),this.showGraph()||this.search();let t=this.viewport();t&&je(()=>{t.scrollToOffset(0),this.measureViewport()})}),ge(()=>{let t=this.scrollToHash();if(!t)return;let e=this.graphCommits().findIndex(r=>r.commit.hash===t.hash);if(e===-1)return;let i=this.viewport();i&&je(()=>this.scrollToIndex(i,e))}),ge(t=>{let e=this.viewport();if(!e)return;let i=new ResizeObserver(()=>{this.zone.run(()=>{e.checkViewportSize(),this.measureViewport()})});i.observe(e.elementRef.nativeElement);let r=e.elementScrolled().subscribe(()=>{this.zone.run(()=>{this.measureViewport(),this.autoLoadMore(e.elementRef.nativeElement)})});t(()=>{i.disconnect(),r.unsubscribe()})}),ge(()=>{this.viewportWidth(),this.graphCommits(),je(()=>{let t=this.viewportWidth()-this.graphColumnWidth()-this.columnWidths().date-this.columnWidths().author-this.columnWidths().commit-this.columnWidths().description;this.fillerWidth.set(Math.max(0,t))})})}measureViewport(){let t=this.viewport()?.elementRef.nativeElement;t&&(this.scrollTop.set(t.scrollTop),this.scrollLeft.set(t.scrollLeft),this.viewportWidth.set(t.clientWidth),this.viewportHeight.set(t.clientHeight))}autoLoadMore(t){if(this.unloaded()<=0||this.historyLoading()||t.clientHeight===0)return;t.scrollHeight-t.scrollTop-t.clientHeight<=t.clientHeight&&this.loadMoreRequested.emit()}scrollToIndex(t,e){let i=t.elementRef.nativeElement,r=i.clientHeight||this.viewportHeight(),o=Math.max(0,e*cn-(r-cn)/2),s=0,a=()=>{t.scrollToOffset(o),this.measureViewport(),Math.abs(i.scrollTop-o)>1&&++s<10&&requestAnimationFrame(a)};a()}columnWidths=v(tP());graphCommits=v([]);graphSubscription=null;updateGraph(t){if(this.graphSubscription?.unsubscribe(),!this.showGraph()){this.graphLoading.set(!1),this.graphCommits.set(t.map(e=>({commit:e,lane:0,parents:[]})));return}this.graphLoading.set(!0),this.graphSubscription=this.graph.compute(t).subscribe(e=>{e.length===t.length&&(this.graphLoading.set(!1),this.graphCommits.set(t.map((i,r)=>({commit:i,lane:e[r],parents:i.parents??[]}))))})}graphWidth=O(()=>{let t=this.graphCommits().reduce((e,i)=>Math.max(e,i.lane),0)+1;return Math.max(JI,cx*2+t*dm)});graphColumnWidth=O(()=>this.showGraph()?Math.max(this.graphWidth(),this.columnWidths().graph):0);fillerWidth=v(0);descriptionWidth=O(()=>this.columnWidths().description+this.fillerWidth());tableWidth=O(()=>this.graphColumnWidth()+this.columnWidths().date+this.columnWidths().author+this.columnWidths().commit+this.descriptionWidth());horizontalTransform=O(()=>"translateX("+-this.scrollLeft()+"px)");graphHeight=O(()=>this.graphCommits().length*cn);allEdges=O(()=>{let t=this.graphCommits(),e=new Map,i=new Map;t.forEach((o,s)=>{e.set(o.commit.hash,s),i.set(o.commit.hash,o.lane)});let r=[];for(let o=0;o<t.length;o++){let s=t[o];for(let a of s.parents){let l=e.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=O(()=>{let t=this.graphCommits().length;if(t===0||this.viewportHeight()===0)return{start:0,end:0};let e=Math.max(0,Math.floor(this.scrollTop()/cn)-dx),i=Math.min(t,Math.ceil((this.scrollTop()+this.viewportHeight())/cn)+dx);return{start:e,end:i}});nodes=O(()=>{let{start:t,end:e}=this.visibleRange(),i=[];for(let r=t;r<e;r++){let o=this.graphCommits()[r];i.push({hash:o.commit.hash,x:this.laneX(o.lane),y:r*cn+cn/2,color:lm(o.lane),isHead:cm(o.commit)})}return i});edges=O(()=>{let t=this.allEdges(),{start:e,end:i}=this.visibleRange(),r=this.graphHeight(),o=[];for(let s of t){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))<e||l>=i)continue;let _=lm(s.childLane),w=this.laneX(s.childLane),M=s.childRow*cn+cn/2;if(a<0){o.push({d:`M ${w} ${M} L ${w} ${r}`,color:_});continue}let T=this.laneX(s.parentLane),A=a*cn+cn/2;if(w===T)o.push({d:`M ${w} ${M} L ${T} ${A}`,color:_});else{let U=(M+A)/2;o.push({d:`M ${w} ${M} C ${w} ${U} ${T} ${U} ${T} ${A}`,color:_})}}return o});hasWorkingChanges=O(()=>{let t=this.workingChanges();return!!t&&t.staged.length+t.unstaged.length+t.untracked.length+t.conflicted.length>0});workingHash=wn;workingCommit=O(()=>({hash:wn,date:new Date().toISOString(),message:"Uncommitted changes",refs:"",body:"",author_name:this.identity().name||"You",author_email:this.identity().email,parents:[]}));visibleStashes=O(()=>this.showStashes()?this.stashes():[]);stashCommit(t){return{hash:t.hash,date:t.date??"",message:t.message,refs:"",author_name:t.author_name??"",author_email:t.author_email??"",parents:[]}}stashLabel(t){return`stash@{${t.index}}`}resizeState=null;startResize(t,e){if(e.preventDefault(),e.stopPropagation(),t==="graph")this.resizeState={column:t,startX:e.clientX,startWidth:this.graphColumnWidth()};else if(t==="description"){let i=this.descriptionWidth();this.columnWidths.update(r=>ie(z({},r),{description:i})),this.fillerWidth.set(0),this.resizeState={column:t,startX:e.clientX,startWidth:i}}else this.resizeState={column:t,startX:e.clientX,startWidth:this.columnWidths()[t]};document.addEventListener("mousemove",this.onResizeMove),document.addEventListener("mouseup",this.onResizeEnd)}onResizeMove=t=>{let e=this.resizeState;if(!e)return;let i=t.clientX-e.startX,r=e.column==="graph"?this.graphWidth():48,o=Math.max(r,e.startWidth+i);this.columnWidths.update(s=>ie(z({},s),{[e.column]:o}))};onResizeEnd=()=>{this.resizeState&&Ro(px,this.columnWidths()),this.resizeState=null,document.removeEventListener("mousemove",this.onResizeMove),document.removeEventListener("mouseup",this.onResizeEnd)};ngOnDestroy(){this.onResizeEnd(),this.graphSubscription?.unsubscribe()}onRowContextMenu(t,e){t.preventDefault(),t.stopPropagation(),this.contextMenu.emit({x:t.clientX,y:t.clientY,target:{kind:"commit",commit:e}})}onBadgeContextMenu(t,e,i){t.preventDefault(),t.stopPropagation(),this.contextMenu.emit({x:t.clientX,y:t.clientY,target:{kind:i.type==="tag"?"tag":"branch",commit:e,branch:i}})}onWorkingContextMenu(t){t.preventDefault(),t.stopPropagation(),this.contextMenu.emit({x:t.clientX,y:t.clientY,target:{kind:"working"}})}onStashContextMenu(t,e){t.preventDefault(),t.stopPropagation(),this.contextMenu.emit({x:t.clientX,y:t.clientY,target:{kind:"stash",stash:e}})}highlight(t){let e=this.search().trim().toLowerCase();if(!e||!t)return[{text:t,match:!1}];let i=[],r=t.toLowerCase(),o=0,s=r.indexOf(e);for(;s!==-1;)s>o&&i.push({text:t.slice(o,s),match:!1}),i.push({text:t.slice(s,s+e.length),match:!0}),o=s+e.length,s=r.indexOf(e,o);return o<t.length&&i.push({text:t.slice(o),match:!1}),i.length>0?i:[{text:t,match:!1}]}onLoadMoreCommits(){this.loadMoreRequested.emit()}onLoadAllCommits(){this.loadAllRequested.emit()}trackByHash(t,e){return e.commit.hash}badges(t){let e=this.selectedBranches(),i=this.showRemote();return lx(t.refs).filter(r=>r.type==="tag"&&!this.showTags()||r.type==="remote"&&!i?!1:!e.length||r.type==="tag"?!0:e.includes(r.name))}isHead(t){return cm(t)}laneX(t){return cx+dm/2+t*dm}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-commit-table"]],viewQuery:function(e,i){e&1&&st(i.viewport,Ea,5),e&2&&Rt()},inputs:{commits:[1,"commits"],selectedHash:[1,"selectedHash"],identity:[1,"identity"],search:[1,"search"],showGraph:[1,"showGraph"],selectedBranches:[1,"selectedBranches"],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(e,i){e&1&&(u(0,"div",0)(1,"div",1)(2,"div",2),E(3,EI,4,2,"div",3),u(4,"div",4)(5,"span",5),p(6,"Description"),f(),u(7,"div",6),C("mousedown",function(o){return i.startResize("description",o)}),f()(),u(8,"div",7)(9,"span",5),p(10,"Date"),f(),u(11,"div",6),C("mousedown",function(o){return i.startResize("date",o)}),f()(),u(12,"div",8)(13,"span",5),p(14,"Author"),f(),u(15,"div",6),C("mousedown",function(o){return i.startResize("author",o)}),f()(),u(16,"div",9)(17,"span",5),p(18,"Commit"),f(),u(19,"div",6),C("mousedown",function(o){return i.startResize("commit",o)}),f()()(),E(20,II,19,17,"div",10),W(21,LI,19,26,"div",11,xI),f(),u(23,"div",12),E(24,FI,3,1,"div",13),u(25,"div",14),E(26,HI,7,6,"div",15),u(27,"cdk-virtual-scroll-viewport",16),xt(28,QI,16,27,"div",17),f(),E(29,KI,2,1,"div",18),f(),E(30,XI,5,1,"div",19),f()()),e&2&&(Q("aria-busy",!!i.pendingLabel()),c(),ne("width",i.viewportWidth(),"px"),c(),ne("width",i.tableWidth(),"px")("transform",i.horizontalTransform()),c(),D(i.showGraph()?3:-1),c(),ne("width",i.descriptionWidth(),"px"),c(4),ne("width",i.columnWidths().date,"px"),c(4),ne("width",i.columnWidths().author,"px"),c(4),ne("width",i.columnWidths().commit,"px"),c(4),D(i.hasWorkingChanges()?20:-1),c(),q(i.visibleStashes()),c(3),D(i.pendingLabel()?24:-1),c(2),D(i.showGraph()?26:-1),c(),S("itemSize",i.rowHeight),c(),S("cdkVirtualForOf",i.graphCommits())("cdkVirtualForTrackBy",i.trackByHash),c(),D(!i.pendingLabel()&&i.graphCommits().length===0?29:-1),c(),D(i.unloaded()>0&&!i.historyLoading()?30:-1))},dependencies:[Vn,rx,sx,Ea,Io,pa],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 nP(n,t){n&1&&te(0,"div",2)}function iP(n,t){if(n&1){let e=I();b(0,"button",4),F("click",function(){m(e);let r=d().$implicit,o=d(2);return g(o.onSelect(r))}),p(1),y()}if(n&2){let e=d().$implicit;J("danger",e.danger),$("disabled",e.disabled),c(),H(" ",e.label," ")}}function rP(n,t){if(n&1&&E(0,nP,1,0,"div",2)(1,iP,2,4,"button",3),n&2){let e=t.$implicit;D(e.separator?0:1)}}function oP(n,t){if(n&1){let e=I();b(0,"div",0),F("click",function(){m(e);let r=d();return g(r.closed.emit())})("contextmenu",function(r){m(e);let o=d();return r.preventDefault(),g(o.closed.emit())}),y(),b(1,"div",1),W(2,rP,2,1,null,null,Zn),y()}if(n&2){let e=d();c(),ne("left",e.left(),"px")("top",e.top(),"px"),c(),q(t.items)}}var jo=class n{menu=N.required();select=Z();closed=Z();left=O(()=>{let t=this.menu();return t?Math.max(4,Math.min(t.x,window.innerWidth-250)):0});top=O(()=>{let t=this.menu();if(!t)return 0;let e=t.items.length*30+12;return Math.max(4,Math.min(t.y,window.innerHeight-e-8))});onEscape(){this.menu()&&this.closed.emit()}onSelect(t){t.disabled||!t.action||(this.select.emit(t.action),this.closed.emit())}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-context-menu"]],hostBindings:function(e,i){e&1&&C("keydown.escape",function(){return i.onEscape()},qe)},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(e,i){if(e&1&&E(0,oP,4,4),e&2){let r;D((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 tt(n){n||(n=R(ot));let t=new pe(e=>{if(n.destroyed){e.next();return}return n.onDestroy(e.next.bind(e))});return e=>e.pipe(Zi(t))}function Mr(n,t){let e=t?.injector??R(kt),i=new Wi(1),r=ge(()=>{let o;try{o=n()}catch(s){je(()=>i.error(s));return}je(()=>i.next(o))},{injector:e,manualCleanup:!0});return e.get(ot).onDestroy(()=>{r.destroy(),i.complete()}),i.asObservable()}var fx=(n,t)=>t.id;function sP(n,t){if(n&1){let e=I();u(0,"span",2)(1,"span",7),p(2),f(),u(3,"button",8),C("click",function(){let r=m(e).$implicit,o=d();return g(o.remove.emit(r))}),p(4," \xD7 "),f()()}if(n&2){let e=t.$implicit,i=d();c(),S("title",e.description??e.label),c(),P(e.label),c(),S("disabled",i.disabled()),Q("aria-label","Remove "+e.label)}}function aP(n,t){if(n&1){let e=I();u(0,"button",9),C("mousedown",function(r){return m(e),g(r.preventDefault())})("click",function(){m(e);let r=d();return g(r.trailingAction.emit())}),p(1),f()}if(n&2){let e=d();J("on",e.trailingPressed()),S("title",e.trailingLabel())("disabled",e.disabled()),Q("aria-pressed",e.trailingPressed())("aria-label",e.trailingLabel()),c(),H(" ",e.trailingIcon()," ")}}function lP(n,t){if(n&1&&j(0,"app-error-banner",5),n&2){let e=d();S("message",e.error())}}function cP(n,t){n&1&&(u(0,"li",10),p(1,"Searching..."),f())}function dP(n,t){n&1&&(u(0,"li",10),p(1,"No matches"),f())}function uP(n,t){if(n&1&&(u(0,"span",14),p(1),f()),n&2){let e=d().$implicit;c(),P(e.description)}}function pP(n,t){if(n&1){let e=I();u(0,"li",12),C("mousedown",function(r){let o=m(e).$implicit,s=d(2);return g(s.onSuggestionMouseDown(r,o))}),u(1,"span",13),p(2),f(),E(3,uP,2,1,"span",14),f()}if(n&2){let e=t.$implicit,i=t.$index,r=d(2);J("active",i===r.highlight()),Q("aria-selected",i===r.highlight()),c(2),P(e.label),c(),D(e.description?3:-1)}}function fP(n,t){if(n&1&&(u(0,"ul",6),E(1,cP,2,0,"li",10),E(2,dP,2,0,"li",10),W(3,pP,4,5,"li",11,fx),f()),n&2){let e=d();c(),D(e.loading()?1:-1),c(),D(!e.loading()&&!e.error()&&!e.suggestions().length?2:-1),c(),q(e.suggestions())}}var $o=class n{placeholder=N("");chips=N([]);suggestions=N([]);loading=N(!1);query=N("");disabled=N(!1);allowFreeText=N(!1);error=N("");trailingIcon=N("");trailingLabel=N("");trailingPressed=N(!1);queryChange=Z();select=Z();remove=Z();trailingAction=Z();open=v(!1);highlight=v(0);onInput(t){this.queryChange.emit(t.target.value),this.open.set(!0),this.highlight.set(0)}onKeydown(t){let e=this.suggestions();if(t.key==="ArrowDown"&&e.length)t.preventDefault(),this.highlight.update(i=>Math.min(i+1,e.length-1));else if(t.key==="ArrowUp"&&e.length)t.preventDefault(),this.highlight.update(i=>Math.max(i-1,0));else if(t.key==="Enter"){t.preventDefault();let i=e[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 t.key==="Escape"&&this.open()&&(t.stopPropagation(),this.open.set(!1))}pick(t){this.open.set(!1),this.select.emit(t)}onSuggestionMouseDown(t,e){t.preventDefault(),this.pick(e)}onBlur(){setTimeout(()=>this.open.set(!1),120)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({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"],trailingIcon:[1,"trailingIcon"],trailingLabel:[1,"trailingLabel"],trailingPressed:[1,"trailingPressed"]},outputs:{queryChange:"queryChange",select:"select",remove:"remove",trailingAction:"trailingAction"},decls:8,vars:6,consts:[[1,"chip-input"],[1,"chip-row"],[1,"chip"],["type","text",1,"chip-query",3,"input","keydown","focus","blur","value","disabled"],["type","button",1,"chip-trailing",3,"on","title","disabled"],[3,"message"],["role","listbox",1,"suggestions"],[1,"chip-label",3,"title"],["type","button",1,"chip-remove",3,"click","disabled"],["type","button",1,"chip-trailing",3,"mousedown","click","title","disabled"],[1,"suggestion-hint"],["role","option",3,"active"],["role","option",3,"mousedown"],[1,"suggestion-label"],[1,"suggestion-desc"]],template:function(e,i){e&1&&(u(0,"div",0)(1,"div",1),W(2,sP,5,4,"span",2,fx),u(4,"input",3),C("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()}),f(),E(5,aP,2,7,"button",4),f(),E(6,lP,1,1,"app-error-banner",5),E(7,fP,5,2,"ul",6),f()),e&2&&(c(2),q(i.chips()),c(2),S("value",i.query())("disabled",i.disabled()),Q("placeholder",i.chips().length?"":i.placeholder()),c(),D(i.trailingIcon()?5:-1),c(),D(i.error()?6:-1),c(),D(i.open()&&(i.loading()||i.suggestions().length>0||i.query().trim())?7:-1))},dependencies:[pt],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}.chip-trailing[_ngcontent-%COMP%]{flex:none;width:22px;height:22px;padding:0;border:none;border-radius:3px;background:transparent;color:var(--text-dim);font-size:14px;line-height:1;cursor:pointer}.chip-trailing[_ngcontent-%COMP%]:hover:not(:disabled), .chip-trailing.on[_ngcontent-%COMP%]{color:#dcb67a;background:#dcb67a1f}.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})};function hm(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var kr=hm();function bx(n){kr=n}var Ma={exec:()=>null};function Se(n,t=""){let e=typeof n=="string"?n:n.source,i={replace:(r,o)=>{let s=typeof o=="string"?o:o.source;return s=s.replace(Nt.caret,"$1"),e=e.replace(r,s),i},getRegex:()=>new RegExp(e,t)};return i}var Nt={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")},hP=/^(?:[ \t]*(?:\n|$))+/,mP=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,gP=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ta=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,_P=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,mm=/(?:[*+-]|\d{1,9}[.)])/,yx=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,xx=Se(yx).replace(/bull/g,mm).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(),vP=Se(yx).replace(/bull/g,mm).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(),gm=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,bP=/^[^\n]+/,_m=/(?!\s*\])(?:\\.|[^\[\]\\])+/,yP=Se(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",_m).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),xP=Se(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,mm).getRegex(),Id="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",vm=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,CP=Se("^ {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",vm).replace("tag",Id).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Cx=Se(gm).replace("hr",Ta).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",Id).getRegex(),wP=Se(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Cx).getRegex(),bm={blockquote:wP,code:mP,def:yP,fences:gP,heading:_P,hr:Ta,html:CP,lheading:xx,list:xP,newline:hP,paragraph:Cx,table:Ma,text:bP},hx=Se("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ta).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",Id).getRegex(),EP=ie(z({},bm),{lheading:vP,table:hx,paragraph:Se(gm).replace("hr",Ta).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",hx).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",Id).getRegex()}),DP=ie(z({},bm),{html:Se(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",vm).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:Ma,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Se(gm).replace("hr",Ta).replace("heading",` *#{1,6} *[^
7
+ ]`).replace("lheading",xx).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),SP=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,MP=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,wx=/^( {2,}|\\)\n(?!\s*$)/,TP=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Pd=/[\p{P}\p{S}]/u,ym=/[\s\p{P}\p{S}]/u,Ex=/[^\s\p{P}\p{S}]/u,kP=Se(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ym).getRegex(),Dx=/(?!~)[\p{P}\p{S}]/u,IP=/(?!~)[\s\p{P}\p{S}]/u,PP=/(?:[^\s\p{P}\p{S}]|~)/u,OP=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Sx=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,RP=Se(Sx,"u").replace(/punct/g,Pd).getRegex(),NP=Se(Sx,"u").replace(/punct/g,Dx).getRegex(),Mx="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",AP=Se(Mx,"gu").replace(/notPunctSpace/g,Ex).replace(/punctSpace/g,ym).replace(/punct/g,Pd).getRegex(),LP=Se(Mx,"gu").replace(/notPunctSpace/g,PP).replace(/punctSpace/g,IP).replace(/punct/g,Dx).getRegex(),FP=Se("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ex).replace(/punctSpace/g,ym).replace(/punct/g,Pd).getRegex(),VP=Se(/\\(punct)/,"gu").replace(/punct/g,Pd).getRegex(),BP=Se(/^<(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(),jP=Se(vm).replace("(?:-->|$)","-->").getRegex(),$P=Se("^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",jP).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Md=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,HP=Se(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Md).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Tx=Se(/^!?\[(label)\]\[(ref)\]/).replace("label",Md).replace("ref",_m).getRegex(),kx=Se(/^!?\[(ref)\](?:\[\])?/).replace("ref",_m).getRegex(),zP=Se("reflink|nolink(?!\\()","g").replace("reflink",Tx).replace("nolink",kx).getRegex(),xm={_backpedal:Ma,anyPunctuation:VP,autolink:BP,blockSkip:OP,br:wx,code:MP,del:Ma,emStrongLDelim:RP,emStrongRDelimAst:AP,emStrongRDelimUnd:FP,escape:SP,link:HP,nolink:kx,punctuation:kP,reflink:Tx,reflinkSearch:zP,tag:$P,text:TP,url:Ma},UP=ie(z({},xm),{link:Se(/^!?\[(label)\]\((.*?)\)/).replace("label",Md).getRegex(),reflink:Se(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Md).getRegex()}),um=ie(z({},xm),{emStrongRDelimAst:LP,emStrongLDelim:NP,url:Se(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),GP=ie(z({},um),{br:Se(wx).replace("{2,}","*").getRegex(),text:Se(um.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Dd={normal:bm,gfm:EP,pedantic:DP},Da={normal:xm,gfm:um,breaks:GP,pedantic:UP},WP={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},mx=n=>WP[n];function Bn(n,t){if(t){if(Nt.escapeTest.test(n))return n.replace(Nt.escapeReplace,mx)}else if(Nt.escapeTestNoEncode.test(n))return n.replace(Nt.escapeReplaceNoEncode,mx);return n}function gx(n){try{n=encodeURI(n).replace(Nt.percentDecode,"%")}catch{return null}return n}function _x(n,t){let e=n.replace(Nt.findPipe,(o,s,a)=>{let l=!1,h=s;for(;--h>=0&&a[h]==="\\";)l=!l;return l?"|":" |"}),i=e.split(Nt.splitPipe),r=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;r<i.length;r++)i[r]=i[r].trim().replace(Nt.slashPipe,"|");return i}function Sa(n,t,e){let i=n.length;if(i===0)return"";let r=0;for(;r<i;){let o=n.charAt(i-r-1);if(o===t&&!e)r++;else if(o!==t&&e)r++;else break}return n.slice(0,i-r)}function qP(n,t){if(n.indexOf(t[1])===-1)return-1;let e=0;for(let i=0;i<n.length;i++)if(n[i]==="\\")i++;else if(n[i]===t[0])e++;else if(n[i]===t[1]&&(e--,e<0))return i;return e>0?-2:-1}function vx(n,t,e,i,r){let o=t.href,s=t.title||null,a=n[1].replace(r.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:n[0].charAt(0)==="!"?"image":"link",raw:e,href:o,title:s,text:a,tokens:i.inlineTokens(a)};return i.state.inLink=!1,l}function ZP(n,t,e){let i=n.match(e.other.indentCodeCompensation);if(i===null)return t;let r=i[1];return t.split(`
8
+ `).map(o=>{let s=o.match(e.other.beginningSpace);if(s===null)return o;let[a]=s;return a.length>=r.length?o.slice(r.length):o}).join(`
9
+ `)}var Td=class{options;rules;lexer;constructor(n){this.options=n||kr}space(n){let t=this.rules.block.newline.exec(n);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(n){let t=this.rules.block.code.exec(n);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Sa(e,`
10
+ `)}}}fences(n){let t=this.rules.block.fences.exec(n);if(t){let e=t[0],i=ZP(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(n){let t=this.rules.block.heading.exec(n);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let i=Sa(e,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(e=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(n){let t=this.rules.block.hr.exec(n);if(t)return{type:"hr",raw:Sa(t[0],`
11
+ `)}}blockquote(n){let t=this.rules.block.blockquote.exec(n);if(t){let e=Sa(t[0],`
12
+ `).split(`
13
+ `),i="",r="",o=[];for(;e.length>0;){let s=!1,a=[],l;for(l=0;l<e.length;l++)if(this.rules.other.blockquoteStart.test(e[l]))a.push(e[l]),s=!0;else if(!s)a.push(e[l]);else break;e=e.slice(l);let h=a.join(`
14
+ `),_=h.replace(this.rules.other.blockquoteSetextReplace,`
15
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
16
+ ${h}`:h,r=r?`${r}
17
+ ${_}`:_;let w=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(_,o,!0),this.lexer.state.top=w,e.length===0)break;let M=o.at(-1);if(M?.type==="code")break;if(M?.type==="blockquote"){let T=M,A=T.raw+`
18
+ `+e.join(`
19
+ `),U=this.blockquote(A);o[o.length-1]=U,i=i.substring(0,i.length-T.raw.length)+U.raw,r=r.substring(0,r.length-T.text.length)+U.text;break}else if(M?.type==="list"){let T=M,A=T.raw+`
20
+ `+e.join(`
21
+ `),U=this.list(A);o[o.length-1]=U,i=i.substring(0,i.length-M.raw.length)+U.raw,r=r.substring(0,r.length-T.raw.length)+U.raw,e=A.substring(o.at(-1).raw.length).split(`
22
+ `);continue}}return{type:"blockquote",raw:i,tokens:o,text:r}}}list(n){let t=this.rules.block.list.exec(n);if(t){let e=t[1].trim(),i=e.length>1,r={type:"list",raw:"",ordered:i,start:i?+e.slice(0,-1):"",loose:!1,items:[]};e=i?`\\d{1,9}\\${e.slice(-1)}`:`\\${e}`,this.options.pedantic&&(e=i?e:"[*+-]");let o=this.rules.other.listItemRegex(e),s=!1;for(;n;){let l=!1,h="",_="";if(!(t=o.exec(n))||this.rules.block.hr.test(n))break;h=t[0],n=n.substring(h.length);let w=t[2].split(`
23
+ `,1)[0].replace(this.rules.other.listReplaceTabs,G=>" ".repeat(3*G.length)),M=n.split(`
24
+ `,1)[0],T=!w.trim(),A=0;if(this.options.pedantic?(A=2,_=w.trimStart()):T?A=t[1].length+1:(A=t[2].search(this.rules.other.nonSpaceChar),A=A>4?1:A,_=w.slice(A),A+=t[1].length),T&&this.rules.other.blankLine.test(M)&&(h+=M+`
25
+ `,n=n.substring(M.length+1),l=!0),!l){let G=this.rules.other.nextBulletRegex(A),be=this.rules.other.hrRegex(A),Zt=this.rules.other.fencesBeginRegex(A),$e=this.rules.other.headingBeginRegex(A),ht=this.rules.other.htmlBeginRegex(A);for(;n;){let lt=n.split(`
26
+ `,1)[0],Yt;if(M=lt,this.options.pedantic?(M=M.replace(this.rules.other.listReplaceNesting," "),Yt=M):Yt=M.replace(this.rules.other.tabCharGlobal," "),Zt.test(M)||$e.test(M)||ht.test(M)||G.test(M)||be.test(M))break;if(Yt.search(this.rules.other.nonSpaceChar)>=A||!M.trim())_+=`
27
+ `+Yt.slice(A);else{if(T||w.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Zt.test(w)||$e.test(w)||be.test(w))break;_+=`
28
+ `+M}!T&&!M.trim()&&(T=!0),h+=lt+`
29
+ `,n=n.substring(lt.length+1),w=Yt.slice(A)}}r.loose||(s?r.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(s=!0));let U=null,K;this.options.gfm&&(U=this.rules.other.listIsTask.exec(_),U&&(K=U[0]!=="[ ] ",_=_.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:h,task:!!U,checked:K,loose:!1,text:_,tokens:[]}),r.raw+=h}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 h=r.items[l].tokens.filter(w=>w.type==="space"),_=h.length>0&&h.some(w=>this.rules.other.anyLine.test(w.raw));r.loose=_}if(r.loose)for(let l=0;l<r.items.length;l++)r.items[l].loose=!0;return r}}html(n){let t=this.rules.block.html.exec(n);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(n){let t=this.rules.block.def.exec(n);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:i,title:r}}}table(n){let t=this.rules.block.table.exec(n);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let e=_x(t[1]),i=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
30
+ `):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(e.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<e.length;s++)o.header.push({text:e[s],tokens:this.lexer.inline(e[s]),header:!0,align:o.align[s]});for(let s of r)o.rows.push(_x(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 t=this.rules.block.lheading.exec(n);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(n){let t=this.rules.block.paragraph.exec(n);if(t){let e=t[1].charAt(t[1].length-1)===`
31
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(n){let t=this.rules.block.text.exec(n);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(n){let t=this.rules.inline.escape.exec(n);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(n){let t=this.rules.inline.tag.exec(n);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(n){let t=this.rules.inline.link.exec(n);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let o=Sa(e.slice(0,-1),"\\");if((e.length-o.length)%2===0)return}else{let o=qP(t[2],"()");if(o===-2)return;if(o>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let i=t[2],r="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(i);o&&(i=o[1],r=o[3])}else r=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?i=i.slice(1):i=i.slice(1,-1)),vx(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(n,t){let e;if((e=this.rules.inline.reflink.exec(n))||(e=this.rules.inline.nolink.exec(n))){let i=(e[2]||e[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[i.toLowerCase()];if(!r){let o=e[0].charAt(0);return{type:"text",raw:o,text:o}}return vx(e,r,e[0],this.lexer,this.rules)}}emStrong(n,t,e=""){let i=this.rules.inline.emStrongLDelim.exec(n);if(!i||i[3]&&e.match(this.rules.other.unicodeAlphaNumeric))return;if(!(i[1]||i[2]||"")||!e||this.rules.inline.punctuation.exec(e)){let o=[...i[0]].length-1,s,a,l=o,h=0,_=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(_.lastIndex=0,t=t.slice(-1*n.length+o);(i=_.exec(t))!=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)){h+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+h);let w=[...i[0]][0].length,M=n.slice(0,o+i.index+w+a);if(Math.min(o,a)%2){let A=M.slice(1,-1);return{type:"em",raw:M,text:A,tokens:this.lexer.inlineTokens(A)}}let T=M.slice(2,-2);return{type:"strong",raw:M,text:T,tokens:this.lexer.inlineTokens(T)}}}}codespan(n){let t=this.rules.inline.code.exec(n);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return i&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(n){let t=this.rules.inline.br.exec(n);if(t)return{type:"br",raw:t[0]}}del(n){let t=this.rules.inline.del.exec(n);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(n){let t=this.rules.inline.autolink.exec(n);if(t){let e,i;return t[2]==="@"?(e=t[1],i="mailto:"+e):(e=t[1],i=e),{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}url(n){let t;if(t=this.rules.inline.url.exec(n)){let e,i;if(t[2]==="@")e=t[0],i="mailto:"+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(r!==t[0]);e=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(n){let t=this.rules.inline.text.exec(n);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},Xn=class pm{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||kr,this.options.tokenizer=this.options.tokenizer||new Td,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 e={other:Nt,block:Dd.normal,inline:Da.normal};this.options.pedantic?(e.block=Dd.pedantic,e.inline=Da.pedantic):this.options.gfm&&(e.block=Dd.gfm,this.options.breaks?e.inline=Da.breaks:e.inline=Da.gfm),this.tokenizer.rules=e}static get rules(){return{block:Dd,inline:Da}}static lex(t,e){return new pm(e).lex(t)}static lexInline(t,e){return new pm(e).inlineTokens(t)}lex(t){t=t.replace(Nt.carriageReturn,`
32
+ `),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let i=this.inlineQueue[e];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],i=!1){for(this.options.pedantic&&(t=t.replace(Nt.tabCharGlobal," ").replace(Nt.spaceLine,""));t;){let r;if(this.options.extensions?.block?.some(s=>(r=s.call({lexer:this},t,e))?(t=t.substring(r.raw.length),e.push(r),!0):!1))continue;if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length);let s=e.at(-1);r.raw.length===1&&s!==void 0?s.raw+=`
33
+ `:e.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length);let s=e.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):e.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length);let s=e.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(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),e.push(r);continue}let o=t;if(this.options.extensions?.startBlock){let s=1/0,a=t.slice(1),l;this.options.extensions.startBlock.forEach(h=>{l=h.call({lexer:this},a),typeof l=="number"&&l>=0&&(s=Math.min(s,l))}),s<1/0&&s>=0&&(o=t.substring(0,s+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){let s=e.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):e.push(r),i=o.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length);let s=e.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):e.push(r);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let i=t,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(;t;){o||(s=""),o=!1;let a;if(this.options.extensions?.inline?.some(h=>(a=h.call({lexer:this},t,e))?(t=t.substring(a.raw.length),e.push(a),!0):!1))continue;if(a=this.tokenizer.escape(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.tag(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.link(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(a.raw.length);let h=e.at(-1);a.type==="text"&&h?.type==="text"?(h.raw+=a.raw,h.text+=a.text):e.push(a);continue}if(a=this.tokenizer.emStrong(t,i,s)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.codespan(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.br(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.del(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.autolink(t)){t=t.substring(a.raw.length),e.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(t))){t=t.substring(a.raw.length),e.push(a);continue}let l=t;if(this.options.extensions?.startInline){let h=1/0,_=t.slice(1),w;this.options.extensions.startInline.forEach(M=>{w=M.call({lexer:this},_),typeof w=="number"&&w>=0&&(h=Math.min(h,w))}),h<1/0&&h>=0&&(l=t.substring(0,h+1))}if(a=this.tokenizer.inlineText(l)){t=t.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(s=a.raw.slice(-1)),o=!0;let h=e.at(-1);h?.type==="text"?(h.raw+=a.raw,h.text+=a.text):e.push(a);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return e}},kd=class{options;parser;constructor(n){this.options=n||kr}space(n){return""}code({text:n,lang:t,escaped:e}){let i=(t||"").match(Nt.notSpaceStart)?.[0],r=n.replace(Nt.endingNewline,"")+`
42
+ `;return i?'<pre><code class="language-'+Bn(i)+'">'+(e?r:Bn(r,!0))+`</code></pre>
43
+ `:"<pre><code>"+(e?r:Bn(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:t}){return`<h${t}>${this.parser.parseInline(n)}</h${t}>
47
+ `}hr(n){return`<hr>
48
+ `}list(n){let t=n.ordered,e=n.start,i="";for(let s=0;s<n.items.length;s++){let a=n.items[s];i+=this.listitem(a)}let r=t?"ol":"ul",o=t&&e!==1?' start="'+e+'"':"";return"<"+r+o+`>
49
+ `+i+"</"+r+`>
50
+ `}listitem(n){let t="";if(n.task){let e=this.checkbox({checked:!!n.checked});n.loose?n.tokens[0]?.type==="paragraph"?(n.tokens[0].text=e+" "+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=e+" "+Bn(n.tokens[0].tokens[0].text),n.tokens[0].tokens[0].escaped=!0)):n.tokens.unshift({type:"text",raw:e+" ",text:e+" ",escaped:!0}):t+=e+" "}return t+=this.parser.parse(n.tokens,!!n.loose),`<li>${t}</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 t="",e="";for(let r=0;r<n.header.length;r++)e+=this.tablecell(n.header[r]);t+=this.tablerow({text:e});let i="";for(let r=0;r<n.rows.length;r++){let o=n.rows[r];e="";for(let s=0;s<o.length;s++)e+=this.tablecell(o[s]);i+=this.tablerow({text:e})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
53
+ <thead>
54
+ `+t+`</thead>
55
+ `+i+`</table>
56
+ `}tablerow({text:n}){return`<tr>
57
+ ${n}</tr>
58
+ `}tablecell(n){let t=this.parser.parseInline(n.tokens),e=n.header?"th":"td";return(n.align?`<${e} align="${n.align}">`:`<${e}>`)+t+`</${e}>
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>${Bn(n,!0)}</code>`}br(n){return"<br>"}del({tokens:n}){return`<del>${this.parser.parseInline(n)}</del>`}link({href:n,title:t,tokens:e}){let i=this.parser.parseInline(e),r=gx(n);if(r===null)return i;n=r;let o='<a href="'+n+'"';return t&&(o+=' title="'+Bn(t)+'"'),o+=">"+i+"</a>",o}image({href:n,title:t,text:e,tokens:i}){i&&(e=this.parser.parseInline(i,this.parser.textRenderer));let r=gx(n);if(r===null)return Bn(e);n=r;let o=`<img src="${n}" alt="${e}"`;return t&&(o+=` title="${Bn(t)}"`),o+=">",o}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:Bn(n.text)}},Cm=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""}},Jn=class fm{options;renderer;textRenderer;constructor(t){this.options=t||kr,this.options.renderer=this.options.renderer||new kd,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Cm}static parse(t,e){return new fm(e).parse(t)}static parseInline(t,e){return new fm(e).parseInline(t)}parse(t,e=!0){let i="";for(let r=0;r<t.length;r++){let o=t[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<t.length&&t[r+1].type==="text";)a=t[++r],l+=`
60
+ `+this.renderer.text(a);e?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(t,e=this.renderer){let i="";for(let r=0;r<t.length;r++){let o=t[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+=e.text(s);break}case"html":{i+=e.html(s);break}case"link":{i+=e.link(s);break}case"image":{i+=e.image(s);break}case"strong":{i+=e.strong(s);break}case"em":{i+=e.em(s);break}case"codespan":{i+=e.codespan(s);break}case"br":{i+=e.br(s);break}case"del":{i+=e.del(s);break}case"text":{i+=e.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}},Sd=class{options;block;constructor(t){this.options=t||kr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?Xn.lex:Xn.lexInline}provideParser(){return this.block?Jn.parse:Jn.parseInline}},YP=class{defaults=hm();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Jn;Renderer=kd;TextRenderer=Cm;Lexer=Xn;Tokenizer=Td;Hooks=Sd;constructor(...n){this.use(...n)}walkTokens(n,t){let e=[];for(let i of n)switch(e=e.concat(t.call(this,i)),i.type){case"table":{let r=i;for(let o of r.header)e=e.concat(this.walkTokens(o.tokens,t));for(let o of r.rows)for(let s of o)e=e.concat(this.walkTokens(s.tokens,t));break}case"list":{let r=i;e=e.concat(this.walkTokens(r.items,t));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);e=e.concat(this.walkTokens(s,t))}):r.tokens&&(e=e.concat(this.walkTokens(r.tokens,t)))}}return e}use(...n){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(e=>{let i=z({},e);if(i.async=this.defaults.async||i.async||!1,e.extensions&&(e.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let o=t.renderers[r.name];o?t.renderers[r.name]=function(...s){let a=r.renderer.apply(this,s);return a===!1&&(a=o.apply(this,s)),a}:t.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=t[r.level];o?o.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),i.extensions=t),e.renderer){let r=this.defaults.renderer||new kd(this.defaults);for(let o in e.renderer){if(!(o in r))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let s=o,a=e.renderer[s],l=r[s];r[s]=(...h)=>{let _=a.apply(r,h);return _===!1&&(_=l.apply(r,h)),_||""}}i.renderer=r}if(e.tokenizer){let r=this.defaults.tokenizer||new Td(this.defaults);for(let o in e.tokenizer){if(!(o in r))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let s=o,a=e.tokenizer[s],l=r[s];r[s]=(...h)=>{let _=a.apply(r,h);return _===!1&&(_=l.apply(r,h)),_}}i.tokenizer=r}if(e.hooks){let r=this.defaults.hooks||new Sd;for(let o in e.hooks){if(!(o in r))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let s=o,a=e.hooks[s],l=r[s];Sd.passThroughHooks.has(o)?r[s]=h=>{if(this.defaults.async)return Promise.resolve(a.call(r,h)).then(w=>l.call(r,w));let _=a.call(r,h);return l.call(r,_)}:r[s]=(...h)=>{let _=a.apply(r,h);return _===!1&&(_=l.apply(r,h)),_}}i.hooks=r}if(e.walkTokens){let r=this.defaults.walkTokens,o=e.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=z(z({},this.defaults),i)}),this}setOptions(n){return this.defaults=z(z({},this.defaults),n),this}lexer(n,t){return Xn.lex(n,t??this.defaults)}parser(n,t){return Jn.parse(n,t??this.defaults)}parseMarkdown(n){return(e,i)=>{let r=z({},i),o=z(z({},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 e>"u"||e===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=n);let a=o.hooks?o.hooks.provideLexer():n?Xn.lex:Xn.lexInline,l=o.hooks?o.hooks.provideParser():n?Jn.parse:Jn.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(e):e).then(h=>a(h,o)).then(h=>o.hooks?o.hooks.processAllTokens(h):h).then(h=>o.walkTokens?Promise.all(this.walkTokens(h,o.walkTokens)).then(()=>h):h).then(h=>l(h,o)).then(h=>o.hooks?o.hooks.postprocess(h):h).catch(s);try{o.hooks&&(e=o.hooks.preprocess(e));let h=a(e,o);o.hooks&&(h=o.hooks.processAllTokens(h)),o.walkTokens&&this.walkTokens(h,o.walkTokens);let _=l(h,o);return o.hooks&&(_=o.hooks.postprocess(_)),_}catch(h){return s(h)}}}onError(n,t){return e=>{if(e.message+=`
61
+ Please report this to https://github.com/markedjs/marked.`,n){let i="<p>An error occurred:</p><pre>"+Bn(e.message+"",!0)+"</pre>";return t?Promise.resolve(i):i}if(t)return Promise.reject(e);throw e}}},Tr=new YP;function De(n,t){return Tr.parse(n,t)}De.options=De.setOptions=function(n){return Tr.setOptions(n),De.defaults=Tr.defaults,bx(De.defaults),De};De.getDefaults=hm;De.defaults=kr;De.use=function(...n){return Tr.use(...n),De.defaults=Tr.defaults,bx(De.defaults),De};De.walkTokens=function(n,t){return Tr.walkTokens(n,t)};De.parseInline=Tr.parseInline;De.Parser=Jn;De.parser=Jn.parse;De.Renderer=kd;De.TextRenderer=Cm;De.Lexer=Xn;De.lexer=Xn.lex;De.Tokenizer=Td;De.Hooks=Sd;De.parse=De;var LQ=De.options,FQ=De.setOptions,VQ=De.use,BQ=De.walkTokens,jQ=De.parseInline;var $Q=Jn.parse,HQ=Xn.lex;function Ix(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,i=Array(t);e<t;e++)i[e]=n[e];return i}function QP(n){if(Array.isArray(n))return n}function KP(n,t){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var i,r,o,s,a=[],l=!0,h=!1;try{if(o=(e=e.call(n)).next,t!==0)for(;!(l=(i=o.call(e)).done)&&(a.push(i.value),a.length!==t);l=!0);}catch(_){h=!0,r=_}finally{try{if(!l&&e.return!=null&&(s=e.return(),Object(s)!==s))return}finally{if(h)throw r}}return a}}function XP(){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 JP(n,t){return QP(n)||KP(n,t)||eO(n,t)||XP()}function eO(n,t){if(n){if(typeof n=="string")return Ix(n,t);var e={}.toString.call(n).slice(8,-1);return e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set"?Array.from(n):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Ix(n,t):void 0}}var Gx=Object.entries,Px=Object.setPrototypeOf,tO=Object.isFrozen,nO=Object.getPrototypeOf,iO=Object.getOwnPropertyDescriptor,at=Object.freeze,ft=Object.seal,Ho=Object.create,Wx=typeof Reflect<"u"&&Reflect,km=Wx.apply,Im=Wx.construct;at||(at=function(t){return t});ft||(ft=function(t){return t});km||(km=function(t,e){for(var i=arguments.length,r=new Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];return t.apply(e,r)});Im||(Im=function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];return new t(...i)});var Pr=nt(Array.prototype.forEach),rO=nt(Array.prototype.lastIndexOf),Ox=nt(Array.prototype.pop),ka=nt(Array.prototype.push),oO=nt(Array.prototype.splice),zo=Array.isArray,Oa=nt(String.prototype.toLowerCase),wm=nt(String.prototype.toString),Rx=nt(String.prototype.match),Ia=nt(String.prototype.replace),Nx=nt(String.prototype.indexOf),sO=nt(String.prototype.trim),aO=nt(Number.prototype.toString),lO=nt(Boolean.prototype.toString),Ax=typeof BigInt>"u"?null:nt(BigInt.prototype.toString),Lx=typeof Symbol>"u"?null:nt(Symbol.prototype.toString),Ht=nt(Object.prototype.hasOwnProperty),Pa=nt(Object.prototype.toString),Et=nt(RegExp.prototype.test),Ir=cO(TypeError);function nt(n){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];return km(n,t,i)}}function cO(n){return function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return Im(n,e)}}function ye(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Oa;if(Px&&Px(n,null),!zo(t))return n;let i=t.length;for(;i--;){let r=t[i];if(typeof r=="string"){let o=e(r);o!==r&&(tO(t)||(t[i]=o),r=o)}n[r]=!0}return n}function dO(n){for(let t=0;t<n.length;t++)Ht(n,t)||(n[t]=null);return n}function qt(n){let t=Ho(null);for(let i of Gx(n)){var e=JP(i,2);let r=e[0],o=e[1];Ht(n,r)&&(zo(o)?t[r]=dO(o):o&&typeof o=="object"&&o.constructor===Object?t[r]=qt(o):t[r]=o)}return t}function uO(n){switch(typeof n){case"string":return n;case"number":return aO(n);case"boolean":return lO(n);case"bigint":return Ax?Ax(n):"0";case"symbol":return Lx?Lx(n):"Symbol()";case"undefined":return Pa(n);case"function":case"object":{if(n===null)return Pa(n);let t=n,e=dn(t,"toString");if(typeof e=="function"){let i=e(t);return typeof i=="string"?i:Pa(i)}return Pa(n)}default:return Pa(n)}}function dn(n,t){for(;n!==null;){let i=iO(n,t);if(i){if(i.get)return nt(i.get);if(typeof i.value=="function")return nt(i.value)}n=nO(n)}function e(){return null}return e}function pO(n){try{return Et(n,""),!0}catch{return!1}}var Fx=at(["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"]),Em=at(["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"]),Dm=at(["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"]),fO=at(["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"]),Sm=at(["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"]),hO=at(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Vx=at(["#text"]),Bx=at(["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"]),Mm=at(["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"]),jx=at(["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"]),Od=at(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),mO=ft(/{{[\w\W]*|^[\w\W]*}}/g),gO=ft(/<%[\w\W]*|^[\w\W]*%>/g),_O=ft(/\${[\w\W]*/g),vO=ft(/^data-[\-\w.\u00B7-\uFFFF]+$/),bO=ft(/^aria-[\-\w]+$/),$x=ft(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),yO=ft(/^(?:\w+script|data):/i),xO=ft(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),CO=ft(/^html$/i),wO=ft(/^[a-z][.\w]*(-[.\w]+)+$/i),Hx=ft(/<[/\w!]/g),zx=ft(/<[/\w]/g),EO=ft(/<\/no(script|embed|frames)/i),DO=ft(/\/>/i),Wt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},qx=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],SO=at(ye({},qx)),MO=(function(){let n={};return Pr(qx,t=>{n[t]=ft(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),at(n)})(),TO=function(){return typeof window>"u"?null:window},kO=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null,r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(i=e.getAttribute(r));let o="dompurify"+(i?"#"+i:"");try{return t.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Ux=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Oi=function(t,e,i,r){return Ht(t,e)&&zo(t[e])?ye(r.base?qt(r.base):{},t[e],r.transform):i},Tm=function(t,e,i){let r=Ht(t,e)?t[e]:void 0;return r&&typeof r=="object"?qt(r):i()};function Zx(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:TO(),t=B=>Zx(B);if(t.version="3.4.15",t.removed=[],!n||!n.document||n.document.nodeType!==Wt.document||!n.Element)return t.isSupported=!1,t;let e=n.document,i=e,r=i.currentScript;n.DocumentFragment;let o=n.HTMLTemplateElement,s=n.Node,a=n.Element,l=n.NodeFilter,h=n.NamedNodeMap;h===void 0&&(n.NamedNodeMap||n.MozNamedAttrMap),n.HTMLFormElement;let _=n.DOMParser,w=n.trustedTypes,M=a.prototype,T=dn(M,"cloneNode"),A=dn(M,"remove"),U=dn(M,"removeAttributeNode"),K=dn(M,"nextSibling"),G=dn(M,"childNodes"),be=dn(M,"parentNode"),Zt=dn(M,"shadowRoot"),$e=dn(M,"attributes"),ht=s&&s.prototype?dn(s.prototype,"nodeType"):null,lt=s&&s.prototype?dn(s.prototype,"nodeName"):null,Yt=s&&s.prototype?dn(s.prototype,"ownerDocument"):null,Wo=function(x){return ht?ht(x):x.nodeType},Xd=function(x){return lt?lt(x):x.nodeName};if(typeof o=="function"){let B=e.createElement("template");B.content&&B.content.ownerDocument&&(e=B.content.ownerDocument)}let At,Ai="",Jd,Rm=!1,qo=0,Nm=function(){if(qo>0)throw Ir('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.')},Nr=function(x){Nm(),qo++;try{return At.createHTML(x)}finally{qo--}},aC=function(x){Nm(),qo++;try{return At.createScriptURL(x)}finally{qo--}},lC=function(){return Rm||(Jd=kO(w,r),Rm=!0),Jd},Na=e,eu=Na.implementation,Am=Na.createNodeIterator,cC=Na.createDocumentFragment,dC=Na.getElementsByTagName,uC=i.importNode,Le=Ux();t.isSupported=typeof Gx=="function"&&typeof be=="function"&&eu&&eu.createHTMLDocument!==void 0;let pC=mO,fC=gO,hC=_O,mC=vO,gC=bO,_C=yO,Lm=xO,vC=wO,Fm=$x,Fe=null,tu=ye({},[...Fx,...Em,...Dm,...Sm,...Vx]),Ve=null,nu=ye({},[...Bx,...Mm,...jx,...Od]),Dn=Object.seal(Ho(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}})),Zo=null,Vm=null,ti=Object.seal(Ho(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Bm=!0,iu=!0,jm=!1,$m=!0,ni=!1,Li=!0,Fi=!1,ru=!1,Aa=null,La=null,ou=!1,Ar=!1,Fa=!1,Va=!1,Hm=!0,zm=!1,Um="user-content-",su=!0,au=!1,Lr={},Fr=null,Gm=ye({},["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"]),Wm=null,qm=ye({},["audio","video","img","source","image","track"]),Zm=null,Ym=ye({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ba="http://www.w3.org/1998/Math/MathML",ja="http://www.w3.org/2000/svg",Sn="http://www.w3.org/1999/xhtml",Vr=Sn,lu=!1,cu=null,bC=ye({},[Ba,ja,Sn],wm),Qm=at(["mi","mo","mn","ms","mtext"]),du=ye({},Qm),Km=at(["annotation-xml"]),uu=ye({},Km),yC=ye({},["title","style","font","a","script"]),Yo=null,xC=["application/xhtml+xml","text/html"],CC="text/html",Ye=null,Br=null,wC=e.createElement("form"),Xm=function(x){return x instanceof RegExp||x instanceof Function},pu=function(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Br&&Br===x)return;(!x||typeof x!="object")&&(x={}),x=qt(x),Yo=xC.indexOf(x.PARSER_MEDIA_TYPE)===-1?CC:x.PARSER_MEDIA_TYPE,Ye=Yo==="application/xhtml+xml"?wm:Oa,Fe=Oi(x,"ALLOWED_TAGS",tu,{transform:Ye}),Ve=Oi(x,"ALLOWED_ATTR",nu,{transform:Ye}),cu=Oi(x,"ALLOWED_NAMESPACES",bC,{transform:wm}),Zm=Oi(x,"ADD_URI_SAFE_ATTR",Ym,{transform:Ye,base:Ym}),Wm=Oi(x,"ADD_DATA_URI_TAGS",qm,{transform:Ye,base:qm}),Fr=Oi(x,"FORBID_CONTENTS",Gm,{transform:Ye}),Zo=Oi(x,"FORBID_TAGS",qt({}),{transform:Ye}),Vm=Oi(x,"FORBID_ATTR",qt({}),{transform:Ye}),Lr=Ht(x,"USE_PROFILES")?x.USE_PROFILES&&typeof x.USE_PROFILES=="object"?qt(x.USE_PROFILES):x.USE_PROFILES:!1,Bm=x.ALLOW_ARIA_ATTR!==!1,iu=x.ALLOW_DATA_ATTR!==!1,jm=x.ALLOW_UNKNOWN_PROTOCOLS||!1,$m=x.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ni=x.SAFE_FOR_TEMPLATES||!1,Li=x.SAFE_FOR_XML!==!1,Fi=x.WHOLE_DOCUMENT||!1,Ar=x.RETURN_DOM||!1,Fa=x.RETURN_DOM_FRAGMENT||!1,Va=x.RETURN_TRUSTED_TYPE||!1,ou=x.FORCE_BODY||!1,Hm=x.SANITIZE_DOM!==!1,zm=x.SANITIZE_NAMED_PROPS||!1,su=x.KEEP_CONTENT!==!1,au=x.IN_PLACE||!1,Fm=pO(x.ALLOWED_URI_REGEXP)?x.ALLOWED_URI_REGEXP:$x,Vr=typeof x.NAMESPACE=="string"?x.NAMESPACE:Sn,du=Tm(x,"MATHML_TEXT_INTEGRATION_POINTS",()=>ye({},Qm)),uu=Tm(x,"HTML_INTEGRATION_POINTS",()=>ye({},Km));let k=Tm(x,"CUSTOM_ELEMENT_HANDLING",()=>Ho(null));if(Dn=Ho(null),Ht(k,"tagNameCheck")&&Xm(k.tagNameCheck)&&(Dn.tagNameCheck=k.tagNameCheck),Ht(k,"attributeNameCheck")&&Xm(k.attributeNameCheck)&&(Dn.attributeNameCheck=k.attributeNameCheck),Ht(k,"allowCustomizedBuiltInElements")&&typeof k.allowCustomizedBuiltInElements=="boolean"&&(Dn.allowCustomizedBuiltInElements=k.allowCustomizedBuiltInElements),ft(Dn),ni&&(iu=!1),Fa&&(Ar=!0),Lr&&(Fe=ye({},Vx),Ve=Ho(null),Lr.html===!0&&(ye(Fe,Fx),ye(Ve,Bx)),Lr.svg===!0&&(ye(Fe,Em),ye(Ve,Mm),ye(Ve,Od)),Lr.svgFilters===!0&&(ye(Fe,Dm),ye(Ve,Mm),ye(Ve,Od)),Lr.mathMl===!0&&(ye(Fe,Sm),ye(Ve,jx),ye(Ve,Od))),ti.tagCheck=null,ti.attributeCheck=null,Ht(x,"ADD_TAGS")&&(typeof x.ADD_TAGS=="function"?ti.tagCheck=x.ADD_TAGS:zo(x.ADD_TAGS)&&(Fe===tu&&(Fe=qt(Fe)),ye(Fe,x.ADD_TAGS,Ye))),Ht(x,"ADD_ATTR")&&(typeof x.ADD_ATTR=="function"?ti.attributeCheck=x.ADD_ATTR:zo(x.ADD_ATTR)&&(Ve===nu&&(Ve=qt(Ve)),ye(Ve,x.ADD_ATTR,Ye))),Ht(x,"ADD_FORBID_CONTENTS")&&zo(x.ADD_FORBID_CONTENTS)&&(Fr===Gm&&(Fr=qt(Fr)),ye(Fr,x.ADD_FORBID_CONTENTS,Ye)),su&&(Fe["#text"]=!0),Fi&&ye(Fe,["html","head","body"]),Fe.table&&(ye(Fe,["tbody"]),delete Zo.tbody),x.TRUSTED_TYPES_POLICY){if(typeof x.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ir('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof x.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ir('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let L=At;At=x.TRUSTED_TYPES_POLICY;try{Ai=Nr("")}catch(Y){throw At=L,Y}}else x.TRUSTED_TYPES_POLICY===null?(At=void 0,Ai=""):(At===void 0&&(At=lC()),At&&typeof Ai=="string"&&(Ai=Nr("")));at&&at(x),Br=x},Jm=ye({},[...Em,...Dm,...fO]),eg=ye({},[...Sm,...hO]),EC=function(x,k,L){return k.namespaceURI===Sn?x==="svg":k.namespaceURI===Ba?x==="svg"&&(L==="annotation-xml"||du[L]):!!Jm[x]},DC=function(x,k,L){return k.namespaceURI===Sn?x==="math":k.namespaceURI===ja?x==="math"&&uu[L]:!!eg[x]},SC=function(x,k,L){return k.namespaceURI===ja&&!uu[L]||k.namespaceURI===Ba&&!du[L]?!1:!eg[x]&&(yC[x]||!Jm[x])},MC=function(x){let k=be(x);(!k||!k.tagName)&&(k={namespaceURI:Vr,tagName:"template"});let L=Oa(x.tagName),Y=Oa(k.tagName);return cu[x.namespaceURI]?x.namespaceURI===ja?EC(L,k,Y):x.namespaceURI===Ba?DC(L,k,Y):x.namespaceURI===Sn?SC(L,k,Y):!!(Yo==="application/xhtml+xml"&&cu[x.namespaceURI]):!1},ii=function(x){ka(t.removed,{element:x});try{be(x).removeChild(x)}catch{if(A(x),!be(x))throw Ir("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},tg=function(x,k,L){try{U(x,k)}catch{try{x.removeAttribute(L)}catch{}}},$a=function(x){Ha(x);let k=G(x);if(k){let Y=[];Pr(k,ee=>{ka(Y,ee)}),Pr(Y,ee=>{try{A(ee)}catch{}})}let L=$e(x);if(L)for(let Y=L.length-1;Y>=0;--Y){let ee=L[Y],de=ee&&ee.name;typeof de=="string"&&tg(x,ee,de)}},Vi=function(x,k,L){if(!L)try{L=k.getAttributeNode(x)}catch{L=null}ka(t.removed,{attribute:L||null,from:k});try{L?U(k,L):k.removeAttribute(x)}catch{try{k.removeAttribute(x)}catch{}}if(x==="is")if(Ar||Fa)try{ii(k)}catch{}else try{k.setAttribute(x,"")}catch{}},TC=function(x){let k=$e(x);if(k)for(let L=k.length-1;L>=0;--L){let Y=k[L],ee=Y&&Y.name;typeof ee!="string"||Ve[Ye(ee)]||tg(x,Y,ee)}},Ha=function(x){let k=[x];for(;k.length>0;){let L=k.pop();Wo(L)===Wt.element&&TC(L);let ee=G(L);if(ee)for(let de=ee.length-1;de>=0;--de)k.push(ee[de])}},ng=function(x,k){return Li?x==="patchsrc"?!0:x==="for"&&k!=="label"&&k!=="output":!1},kC=function(x){if(!Li)return;let k=[x];for(;k.length>0;){let L=k.pop(),Y=Wo(L);if(Y===Wt.processingInstruction||Y===Wt.comment&&Et(zx,L.data)){try{A(L)}catch{}continue}if(Y===Wt.element){let de=L,Pe=Ye(Xd(L));try{de.hasAttribute&&de.hasAttribute("patchsrc")&&de.removeAttribute("patchsrc"),de.hasAttribute&&de.hasAttribute("for")&&ng("for",Pe)&&de.removeAttribute("for")}catch{}}let ee=G(L);if(ee)for(let de=ee.length-1;de>=0;--de)k.push(ee[de])}},ig=function(x){let k=null,L=null;if(ou)x="<remove></remove>"+x;else{let de=Rx(x,/^[\r\n\t ]+/);L=de&&de[0]}Yo==="application/xhtml+xml"&&Vr===Sn&&(x='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+x+"</body></html>");let Y=At?Nr(x):x;if(Vr===Sn)try{k=new _().parseFromString(Y,Yo)}catch{}if(!k||!k.documentElement){k=eu.createDocument(Vr,"template",null);try{k.documentElement.innerHTML=lu?Ai:Y}catch{}}let ee=k.body||k.documentElement;return x&&L&&ee.insertBefore(e.createTextNode(L),ee.childNodes[0]||null),Vr===Sn?dC.call(k,Fi?"html":"body")[0]:Fi?k.documentElement:ee},rg=function(x){let k=Yt?Yt(x):x.ownerDocument;return Am.call(k||x,x,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},za=function(x){return x=Ia(x,pC," "),x=Ia(x,fC," "),x=Ia(x,hC," "),x},fu=function(x){var k;x.normalize();let L=Yt?Yt(x):x.ownerDocument,Y=Am.call(L||x,x,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),ee=Y.nextNode();for(;ee;)ee.data=za(ee.data),ee=Y.nextNode();let de=(k=x.querySelectorAll)===null||k===void 0?void 0:k.call(x,"template");de&&Pr(de,Pe=>{jr(Pe.content)&&fu(Pe.content)})},Ua=function(x){let k=lt?lt(x):null;return typeof k!="string"||Ye(k)!=="form"?!1:typeof x.nodeName!="string"||typeof x.textContent!="string"||typeof x.removeChild!="function"||x.attributes!==$e(x)||typeof x.removeAttribute!="function"||typeof x.removeAttributeNode!="function"||typeof x.getAttributeNode!="function"||typeof x.setAttribute!="function"||typeof x.namespaceURI!="string"||typeof x.insertBefore!="function"||typeof x.hasChildNodes!="function"||x.nodeType!==ht(x)||x.childNodes!==G(x)},jr=function(x){if(!ht||typeof x!="object"||x===null)return!1;try{return ht(x)===Wt.documentFragment}catch{return!1}},Qo=function(x){if(!ht||typeof x!="object"||x===null)return!1;try{return typeof ht(x)=="number"}catch{return!1}};function Mn(B,x,k){B.length!==0&&Pr(B,L=>{L.call(t,x,k,Br)})}let IC=function(x,k){return!!(Li&&x.hasChildNodes()&&!Qo(x.firstElementChild)&&Et(Hx,x.textContent)&&Et(Hx,x.innerHTML)||Li&&x.namespaceURI===Sn&&SO[k]&&(Qo(x.firstElementChild)||typeof x.textContent=="string"&&Et(MO[k],x.textContent))||x.nodeType===Wt.processingInstruction||Li&&x.nodeType===Wt.comment&&Et(zx,x.data))},Ga=function(x,k){if(x instanceof RegExp)return Et(x,k);if(x instanceof Function){for(var L=arguments.length,Y=new Array(L>2?L-2:0),ee=2;ee<L;ee++)Y[ee-2]=arguments[ee];return!!x(k,...Y)}return!1},PC=function(x,k,L){if(!Zo[k]&&cg(k)&&Ga(Dn.tagNameCheck,k))return!1;if(su&&!Fr[k]){let Y=be(x),ee=G(x);if(ee&&Y){let de=ee.length;for(let Pe=de-1;Pe>=0;--Pe){let He=x===L?T(ee[Pe],!0):ee[Pe];Y.insertBefore(He,K(x))}}}return ii(x),!0},og=function(x,k,L,Y){return x.length===0?k:k===L||k===Y?qt(k):k},sg=function(x,k){return x===k||be(x)!==null?!1:(au&&Ha(x),!0)},ag=function(x,k){if(Mn(Le.beforeSanitizeElements,x,null),sg(x,k))return!0;if(Ua(x))return ii(x),!0;let L=Ye(Xd(x));if(Fe=og(Le.uponSanitizeElement,Fe,tu,Aa),Mn(Le.uponSanitizeElement,x,{tagName:L,allowedTags:Fe}),sg(x,k))return!0;if(IC(x,L))return ii(x),!0;if(Zo[L]||!(ti.tagCheck instanceof Function&&ti.tagCheck(L))&&!Fe[L]){let ee=PC(x,L,k);return ee===!1&&Mn(Le.afterSanitizeElements,x,null),ee}if(Wo(x)===Wt.element&&!MC(x)||(L==="noscript"||L==="noembed"||L==="noframes")&&Et(EO,x.innerHTML))return ii(x),!0;if(ni&&x.nodeType===Wt.text){let ee=za(x.textContent);x.textContent!==ee&&(ka(t.removed,{element:x.cloneNode()}),x.textContent=ee)}return Mn(Le.afterSanitizeElements,x,null),!1},lg=function(x,k,L){if(Vm[k]||ng(k,x)||Hm&&(k==="id"||k==="name")&&(L in e||L in wC))return!1;let Y=Ve[k]||ti.attributeCheck instanceof Function&&ti.attributeCheck(k,x);return iu&&Et(mC,k)||Bm&&Et(gC,k)?!0:Y?Zm[k]||Et(Fm,Ia(L,Lm,""))||(k==="src"||k==="xlink:href"||k==="href")&&x!=="script"&&Nx(L,"data:")===0&&Wm[x]||jm&&!Et(_C,Ia(L,Lm,""))?!0:!L:cg(x)&&Ga(Dn.tagNameCheck,x)&&Ga(Dn.attributeNameCheck,k,x)||k==="is"&&Dn.allowCustomizedBuiltInElements&&Ga(Dn.tagNameCheck,L)},OC=ye({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),cg=function(x){return!OC[Oa(x)]&&Et(vC,x)},RC=function(x,k,L,Y){if(At&&typeof w=="object"&&typeof w.getAttributeType=="function"&&!L)switch(w.getAttributeType(x,k)){case"TrustedHTML":return Nr(Y);case"TrustedScriptURL":return aC(Y)}return Y},NC=function(x,k,L,Y){try{return L?x.setAttributeNS(L,k,Y):x.setAttribute(k,Y),Ua(x)?(ii(x),!1):!0}catch{return Vi(k,x),!1}},dg=function(x){Mn(Le.beforeSanitizeAttributes,x,null);let k=x.attributes;if(!k||Ua(x))return;Ve=og(Le.uponSanitizeAttribute,Ve,nu,La);let L={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ve,forceKeepAttr:void 0},Y=k.length,ee=Ye(x.nodeName);for(;Y--;){let de=k[Y],Pe=de.name,He=de.namespaceURI,Lt=de.value,Ft=Ye(Pe),mu=Lt,Dt=Pe==="value"?mu:sO(mu),ug=!1;if(L.attrName=Ft,L.attrValue=Dt,L.keepAttr=!0,L.forceKeepAttr=void 0,Mn(Le.uponSanitizeAttribute,x,L),Dt=L.attrValue,zm&&(Ft==="id"||Ft==="name")&&Nx(Dt,Um)!==0&&(Vi(Pe,x,de),Dt=Um+Dt,ug=!0),Li&&Et(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Dt)){Vi(Pe,x,de);continue}if(Ft==="attributename"&&Rx(Dt,"href")){Vi(Pe,x,de);continue}if(!L.forceKeepAttr){if(!L.keepAttr){Vi(Pe,x,de);continue}if(!$m&&Et(DO,Dt)){Vi(Pe,x,de);continue}if(ni&&(Dt=za(Dt)),!lg(ee,Ft,Dt)){Vi(Pe,x,de);continue}Dt=RC(ee,Ft,He,Dt),Dt!==mu&&NC(x,Pe,He,Dt)&&ug&&Ox(t.removed)}}Mn(Le.afterSanitizeAttributes,x,null)},Wa=function(x){let k=null,L=rg(x);for(Mn(Le.beforeSanitizeShadowDOM,x,null);k=L.nextNode();)if(Mn(Le.uponSanitizeShadowNode,k,null),ag(k,x),dg(k),jr(k.content)&&Wa(k.content),Wo(k)===Wt.element){let Y=Zt(k);jr(Y)&&(hu(Y),Wa(Y))}Mn(Le.afterSanitizeShadowDOM,x,null)},hu=function(x){let k=[{node:x,shadow:null}];for(;k.length>0;){let L=k.pop();if(L.shadow){Wa(L.shadow);continue}let Y=L.node,de=Wo(Y)===Wt.element,Pe=G(Y);if(Pe)for(let He=Pe.length-1;He>=0;--He)k.push({node:Pe[He],shadow:null});if(de){let He=lt?lt(Y):null;if(typeof He=="string"&&Ye(He)==="template"){let Lt=Y.content;jr(Lt)&&k.push({node:Lt,shadow:null})}}if(de){let He=Zt(Y);jr(He)&&k.push({node:null,shadow:He},{node:He,shadow:null})}}};return t.sanitize=function(B){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=null,L=null,Y=null,ee=null;if(lu=!B,lu&&(B="<!-->"),typeof B!="string"&&!Qo(B)&&(B=uO(B),typeof B!="string"))throw Ir("dirty is not a string, aborting");if(!t.isSupported)return B;ru?(Fe=Aa,Ve=La):pu(x),(Le.uponSanitizeElement.length>0||Le.uponSanitizeAttribute.length>0)&&(Fe=qt(Fe)),Le.uponSanitizeAttribute.length>0&&(Ve=qt(Ve)),t.removed=[];let de=au&&typeof B!="string"&&Qo(B);if(de){kC(B);let Lt=Xd(B);if(typeof Lt=="string"){let Ft=Ye(Lt);if(!Fe[Ft]||Zo[Ft])throw $a(B),Ir("root node is forbidden and cannot be sanitized in-place")}if(Ua(B))throw $a(B),Ir("root node is clobbered and cannot be sanitized in-place");try{hu(B)}catch(Ft){throw $a(B),Ft}}else if(Qo(B))k=ig("<!---->"),L=k.ownerDocument.importNode(B,!0),L.nodeType===Wt.element&&L.nodeName==="BODY"||L.nodeName==="HTML"?k=L:k.appendChild(L),hu(k);else{if(!Ar&&!ni&&!Fi&&B.indexOf("<")===-1)return At&&Va?Nr(B):B;if(k=ig(B),!k)return Ar?null:Va?Ai:""}k&&ou&&ii(k.firstChild);let Pe=de?B:k;try{let Lt=rg(Pe);for(;Y=Lt.nextNode();)ag(Y,Pe),dg(Y),jr(Y.content)&&Wa(Y.content)}catch(Lt){throw de&&($a(B),Pr(t.removed,Ft=>{Ft.element&&Ha(Ft.element)})),Lt}if(de)return Pr(t.removed,Lt=>{Lt.element&&Ha(Lt.element)}),ni&&fu(B),B;if(Ar){if(ni&&fu(k),Fa)for(ee=cC.call(k.ownerDocument);k.firstChild;)ee.appendChild(k.firstChild);else ee=k;return(Ve.shadowroot||Ve.shadowrootmode)&&(ee=uC.call(i,ee,!0)),ee}let He=Fi?k.outerHTML:k.innerHTML;return Fi&&Fe["!doctype"]&&k.ownerDocument&&k.ownerDocument.doctype&&k.ownerDocument.doctype.name&&Et(CO,k.ownerDocument.doctype.name)&&(He="<!DOCTYPE "+k.ownerDocument.doctype.name+`>
63
+ `+He),ni&&(He=za(He)),At&&Va?Nr(He):He},t.setConfig=function(){let B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};pu(B),ru=!0,Aa=Fe,La=Ve},t.clearConfig=function(){Br=null,ru=!1,Aa=null,La=null,At=Jd,Ai=""},t.isValidAttribute=function(B,x,k){Br||pu({});let L=Ye(B),Y=Ye(x);return lg(L,Y,k)},t.addHook=function(B,x){typeof x=="function"&&Ht(Le,B)&&ka(Le[B],x)},t.removeHook=function(B,x){if(Ht(Le,B)){if(x!==void 0){let k=rO(Le[B],x);return k===-1?void 0:oO(Le[B],k,1)[0]}return Ox(Le[B])}},t.removeHooks=function(B){Ht(Le,B)&&(Le[B]=[])},t.removeAllHooks=function(){Le=Ux()},t}var Yx=Zx();var Ri=class n{markdown=N.required();html=O(()=>{let t=(this.markdown()??"").trim();return t?Yx.sanitize(De.parse(t,{async:!1})):""});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-markdown-text"]],inputs:{markdown:[1,"markdown"]},decls:1,vars:1,consts:[[1,"markdown",3,"innerHTML"]],template:function(e,i){e&1&&te(0,"div",0),e&2&&$("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 Pm=(n,t)=>t.name;function IO(n,t){if(n&1&&(u(0,"a",10),p(1," Open in Azure DevOps "),f()),n&2){let e=d();S("href",e.url,yr)}}function PO(n,t){if(n&1&&(u(0,"p",14),p(1),f()),n&2){let e=t.$implicit;c(),P(e)}}function OO(n,t){if(n&1&&W(0,PO,2,1,"p",14,jt),n&2){let e=d();q(e.warnings)}}function RO(n,t){if(n&1){let e=I();u(0,"div",8)(1,"p",9),p(2),f(),E(3,IO,2,1,"a",10),u(4,"p",11),p(5),f(),E(6,OO,2,0),f(),u(7,"div",12)(8,"button",13),C("click",function(){m(e);let r=d();return g(r.closed.emit())}),p(9,"Close"),f()()}if(n&2){let e=t;c(2),H("\u2714 Pull Request #",e.id," created"),c(),D(e.url?3:-1),c(2),H("Source branch: ",e.branch),c(),D(e.warnings!=null&&e.warnings.length?6:-1)}}function NO(n,t){if(n&1){let e=I();u(0,"textarea",37),C("input",function(r){m(e);let o=d(2);return g(o.onDescriptionInput(r))}),f()}if(n&2){let e=d(2);S("value",e.description())}}function AO(n,t){if(n&1&&j(0,"app-markdown-text",38),n&2){let e=d(3);S("markdown",e.description())}}function LO(n,t){n&1&&(u(0,"span",39),p(1,"Nothing to preview"),f())}function FO(n,t){if(n&1&&(u(0,"div",23),E(1,AO,1,1,"app-markdown-text",38)(2,LO,2,0,"span",39),f()),n&2){let e=d(2);c(),D(e.description().trim()?1:2)}}function VO(n,t){if(n&1&&(u(0,"option",26),p(1),f()),n&2){let e=t.$implicit,i=d(2);S("value",e.name)("selected",i.source()===e.name),c(),H(" ",e.name," ")}}function BO(n,t){if(n&1&&(u(0,"option",26),p(1),f()),n&2){let e=t.$implicit,i=d(2);S("value",e.name)("selected",i.source()===e.name),c(),H(" ",e.name," ")}}function jO(n,t){n&1&&(u(0,"p",11),p(1," A new branch (pr/xxxxxx) will be created from the current HEAD and pushed before the pull request is created. "),f())}function $O(n,t){if(n&1&&(u(0,"option",26),p(1),f()),n&2){let e=t.$implicit,i=d(2);S("value",e.name)("selected",i.target()===e.name),c(),H(" ",e.name," ")}}function HO(n,t){if(n&1&&(u(0,"p",11),p(1),f()),n&2){let e=d(2);c(),H('Press Enter to add "',e.tagQuery().trim(),'" as a new tag.')}}function zO(n,t){if(n&1&&j(0,"app-error-banner",34),n&2){let e=d(2);S("message",e.error())}}function UO(n,t){if(n&1){let e=I();u(0,"div",15)(1,"label",16)(2,"span",17),p(3,"Title"),f(),u(4,"input",18),C("input",function(r){m(e);let o=d();return g(o.onTitleInput(r))}),f()(),u(5,"div",16)(6,"div",19)(7,"span",17),p(8,"Description"),f(),u(9,"div",20)(10,"button",21),C("click",function(){m(e);let r=d();return g(r.descriptionMode.set("write"))}),p(11," Write "),f(),u(12,"button",21),C("click",function(){m(e);let r=d();return g(r.descriptionMode.set("preview"))}),p(13," Preview "),f()()(),E(14,NO,1,1,"textarea",22)(15,FO,3,1,"div",23),f(),u(16,"label",16)(17,"span",17),p(18,"Source branch"),f(),u(19,"select",24),C("change",function(r){m(e);let o=d();return g(o.onSourceChange(r))}),u(20,"optgroup",25)(21,"option",26),p(22," \u2795 Create new branch (random name) "),f()(),u(23,"optgroup",27),W(24,VO,2,3,"option",26,Pm),f(),u(26,"optgroup",28),W(27,BO,2,3,"option",26,Pm),f()()(),E(29,jO,2,0,"p",11),u(30,"label",16)(31,"span",17),p(32,"Target branch"),f(),u(33,"select",24),C("change",function(r){m(e);let o=d();return g(o.onTargetChange(r))}),W(34,$O,2,3,"option",26,Pm),f()(),u(36,"label",29)(37,"input",30),C("change",function(r){m(e);let o=d();return g(o.isDraft.set(r.target.checked))}),f(),p(38," Create as draft "),f(),u(39,"label",16)(40,"span",17),p(41,"Required reviewers"),f(),u(42,"app-chip-input",31),C("queryChange",function(r){m(e);let o=d();return g(o.requiredReviewerQuery.set(r))})("select",function(r){m(e);let o=d();return g(o.addRequiredReviewer(r))})("remove",function(r){m(e);let o=d();return g(o.removeRequiredReviewer(r))}),f()(),u(43,"label",16)(44,"span",17),p(45,"Optional reviewers"),f(),u(46,"app-chip-input",31),C("queryChange",function(r){m(e);let o=d();return g(o.optionalReviewerQuery.set(r))})("select",function(r){m(e);let o=d();return g(o.addOptionalReviewer(r))})("remove",function(r){m(e);let o=d();return g(o.removeOptionalReviewer(r))}),f()(),u(47,"label",16)(48,"span",17),p(49,"Work items"),f(),u(50,"app-chip-input",32),C("queryChange",function(r){m(e);let o=d();return g(o.workItemQuery.set(r))})("select",function(r){m(e);let o=d();return g(o.addWorkItem(r))})("remove",function(r){m(e);let o=d();return g(o.removeWorkItem(r))}),f()(),u(51,"label",16)(52,"span",17),p(53,"Tags"),f(),u(54,"app-chip-input",33),C("queryChange",function(r){m(e);let o=d();return g(o.tagQuery.set(r))})("select",function(r){m(e);let o=d();return g(o.addTag(r))})("remove",function(r){m(e);let o=d();return g(o.removeTag(r))}),f()(),E(55,HO,2,1,"p",11),E(56,zO,1,1,"app-error-banner",34),f(),u(57,"div",12)(58,"button",35),C("click",function(){m(e);let r=d();return g(r.closed.emit())}),p(59," Cancel "),f(),u(60,"button",36),C("click",function(){m(e);let r=d();return g(r.create())}),p(61),f()()}if(n&2){let e=d();c(4),S("value",e.title()),c(6),J("active",e.descriptionMode()==="write"),S("disabled",e.creating()),Q("aria-selected",e.descriptionMode()==="write"),c(2),J("active",e.descriptionMode()==="preview"),S("disabled",e.creating()),Q("aria-selected",e.descriptionMode()==="preview"),c(2),D(e.descriptionMode()==="write"?14:15),c(7),S("value",e.newBranchValue)("selected",e.source()===e.newBranchValue),c(3),q(e.localBranches()),c(3),q(e.remoteBranches()),c(2),D(e.source()===e.newBranchValue?29:-1),c(5),q(e.remoteBranches()),c(3),S("checked",e.isDraft())("disabled",e.creating()),c(5),S("chips",e.requiredReviewers())("suggestions",e.requiredReviewerSuggestions())("loading",e.requiredReviewersLoading())("error",e.requiredReviewersError())("query",e.requiredReviewerQuery()),c(4),S("chips",e.optionalReviewers())("suggestions",e.optionalReviewerSuggestions())("loading",e.optionalReviewersLoading())("error",e.optionalReviewersError())("query",e.optionalReviewerQuery()),c(4),S("chips",e.workItemChips())("suggestions",e.workItemSuggestions())("loading",e.workItemsLoading())("error",e.workItemsError())("query",e.workItemQuery()),c(4),S("chips",e.tagChips())("suggestions",e.filteredTagSuggestions())("loading",e.tagsLoading())("error",e.tagsError())("query",e.tagQuery())("allowFreeText",!0),c(),D(e.tagQuery().trim()&&!e.tagSuggestions().length&&!e.tagsLoading()?55:-1),c(),D(e.error()?56:-1),c(2),S("disabled",e.creating()),c(2),S("disabled",!e.canCreate()),c(),H(" ",e.creating()?"Creating...":"Create Pull Request"," ")}}var Qx="__new__",Rd=class n{git=R(et);destroyRef=R(ot);branches=N.required();closed=Z();created=Z();newBranchValue=Qx;isDraft=v(!1);title=v("");description=v("");descriptionMode=v("write");source=v("");target=v("");creating=v(!1);error=v("");result=v(null);requiredReviewers=v([]);optionalReviewers=v([]);workItemChips=v([]);tagChips=v([]);requiredReviewerQuery=v("");optionalReviewerQuery=v("");workItemQuery=v("");tagQuery=v("");requiredReviewerSuggestions=v([]);optionalReviewerSuggestions=v([]);workItemSuggestions=v([]);tagSuggestions=v([]);requiredReviewersLoading=v(!1);optionalReviewersLoading=v(!1);requiredReviewersError=v("");optionalReviewersError=v("");workItemsError=v("");tagsError=v("");workItemsLoading=v(!1);tagsLoading=v(!1);localBranches=O(()=>this.branches().filter(t=>!t.remote));remoteBranches=O(()=>this.branches().filter(t=>t.remote));canCreate=O(()=>!this.creating()&&!!this.target()&&!!this.source());filteredTagSuggestions=O(()=>{let t=this.tagQuery().trim().toLowerCase();return t?this.tagSuggestions().filter(e=>e.label.toLowerCase().includes(t)):this.tagSuggestions()});constructor(){this.bindLookup(this.requiredReviewerQuery,this.requiredReviewerSuggestions,this.requiredReviewersLoading,this.requiredReviewersError,t=>this.git.searchReviewers(t),t=>({id:t.id,label:t.label,description:t.description}),2),this.bindLookup(this.optionalReviewerQuery,this.optionalReviewerSuggestions,this.optionalReviewersLoading,this.optionalReviewersError,t=>this.git.searchReviewers(t),t=>({id:t.id,label:t.label,description:t.description}),2),this.bindLookup(this.workItemQuery,this.workItemSuggestions,this.workItemsLoading,this.workItemsError,t=>this.git.searchWorkItems(t),t=>({id:String(t.id),label:`#${t.id} ${t.title}`,description:t.state}),1)}bindLookup(t,e,i,r,o,s,a){Mr(t).pipe(St(l=>(e.set([]),r.set(""),i.set(l.trim().length>=a),l.trim().length<a?Ee([]):new pe(h=>{let _=setTimeout(()=>{h.next(l.trim()),h.complete()},300);return()=>clearTimeout(_)}).pipe(St(o),ct(h=>(r.set(h?.error?.error||"Unable to load suggestions. Try searching again."),Ee([])))))),tt(this.destroyRef)).subscribe(l=>{e.set(l.map(s)),i.set(!1)})}ngOnInit(){let t=this.branches(),e=t.find(s=>s.current&&!s.remote),i=t.find(s=>!s.remote);this.source.set(e?.name??i?.name??""),this.title()||this.title.set(e?.name??"");let r=t.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(tt(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(t){this.title.set(t.target.value)}onDescriptionInput(t){this.description.set(t.target.value)}onSourceChange(t){this.source.set(t.target.value)}onTargetChange(t){this.target.set(t.target.value)}isReviewerSelected(t){return[...this.requiredReviewers(),...this.optionalReviewers()].some(e=>e.id===t)}addRequiredReviewer(t){this.requiredReviewerQuery.set(""),this.requiredReviewerSuggestions.set([]),this.isReviewerSelected(t.id)||this.requiredReviewers.update(e=>[...e,t])}addOptionalReviewer(t){this.optionalReviewerQuery.set(""),this.optionalReviewerSuggestions.set([]),this.isReviewerSelected(t.id)||this.optionalReviewers.update(e=>[...e,t])}removeRequiredReviewer(t){this.requiredReviewers.update(e=>e.filter(i=>i.id!==t.id))}removeOptionalReviewer(t){this.optionalReviewers.update(e=>e.filter(i=>i.id!==t.id))}addWorkItem(t){this.workItemQuery.set(""),this.workItemSuggestions.set([]),this.workItemChips().some(e=>e.id===t.id)||this.workItemChips.update(e=>[...e,t])}removeWorkItem(t){this.workItemChips.update(e=>e.filter(i=>i.id!==t.id))}addTag(t){this.tagQuery.set(""),this.tagChips().some(e=>e.id===t.id)||this.tagChips.update(e=>[...e,t])}removeTag(t){this.tagChips.update(e=>e.filter(i=>i.id!==t.id))}create(){if(!this.canCreate())return;let t=this.source()===Qx;this.creating.set(!0),this.error.set("");let e=[...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:t?"":this.source(),targetBranch:this.target(),title:this.title().trim()||void 0,description:this.description().trim()||void 0,newBranch:t,isDraft:this.isDraft(),reviewers:e.length?e: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(t){let e=t;return e?.status===400&&e.error?.error?e.error.error:"Failed to communicate with the Guito server."}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-create-pr-dialog"]],hostBindings:function(e,i){e&1&&C("keydown.escape",function(){return i.onEscape()},qe)},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"],[1,"field-head"],["role","tablist","aria-label","Description editor mode",1,"segmented"],["type","button","role","tab",3,"click","disabled"],["rows","3","placeholder","Optional description",1,"input","description",3,"value"],[1,"description-preview","input"],[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"],["rows","3","placeholder","Optional description",1,"input","description",3,"input","value"],[3,"markdown"],[1,"preview-empty"]],template:function(e,i){if(e&1&&(u(0,"div",0),C("click",function(){return i.onBackdropClick()}),f(),u(1,"div",1)(2,"header",2)(3,"h3",3),p(4,"Create Pull Request"),f(),u(5,"button",4),C("click",function(){return i.closed.emit()}),V(),u(6,"svg",5),j(7,"line",6)(8,"line",7),f()()(),E(9,RO,10,4)(10,UO,62,41),f()),e&2){let r;c(5),S("disabled",i.creating()),c(4),D((r=i.result())?9:10,r)}},dependencies:[pt,$o,Ri],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-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px}.segmented[_ngcontent-%COMP%]{display:inline-flex;border:1px solid var(--border);border-radius:4px;overflow:hidden}.segmented[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:2px 10px;border:none;background:transparent;color:var(--text-dim);font-size:11px;font-family:inherit;cursor:pointer}.segmented[_ngcontent-%COMP%] button[_ngcontent-%COMP%] + button[_ngcontent-%COMP%]{border-left:1px solid var(--border)}.segmented[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background:var(--accent);color:var(--bg)}.segmented[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}.description-preview[_ngcontent-%COMP%]{min-height:74px;max-height:320px;overflow-y:auto}.preview-empty[_ngcontent-%COMP%]{color:var(--text-dim);font-style:italic}.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 GO=["focusEl"],WO=(n,t)=>t.name,Uo=(n,t)=>t.value;function qO(n,t){if(n&1&&(u(0,"p",8),p(1),f()),n&2){let e=d();c(),P(e.contextLine())}}function ZO(n,t){if(n&1&&(u(0,"option",19),p(1),f()),n&2){let e=t.$implicit,i=d(2);S("value",e.name)("selected",e.name===i.remote()),c(),P(e.name)}}function YO(n,t){n&1&&(u(0,"p",20),p(1,"No remotes configured"),f())}function QO(n,t){if(n&1){let e=I();u(0,"label",17),p(1,"Remote"),f(),u(2,"select",18),C("change",function(r){m(e);let o=d();return g(o.onRemote(r))}),W(3,ZO,2,3,"option",19,WO),f(),E(5,YO,2,0,"p",20)}if(n&2){let e=d();c(2),S("disabled",e.busy()||!e.hasRemotes()),c(),q(e.remotes()),c(2),D(e.noRemotes()?5:-1)}}function KO(n,t){if(n&1){let e=I();u(0,"label",25),p(1,"Message"),f(),u(2,"textarea",26),C("input",function(r){m(e);let o=d(2);return g(o.setText(r,o.tagMessage))}),f()}if(n&2){let e=d(2);c(2),S("value",e.tagMessage())("disabled",e.busy())}}function XO(n,t){n&1&&Ct(0)}function JO(n,t){if(n&1&&xt(0,XO,1,0,"ng-container",27),n&2){d(2);let e=_t(11);S("ngTemplateOutlet",e)}}function e2(n,t){if(n&1){let e=I();u(0,"label",21),p(1,"Tag name"),f(),u(2,"input",22,1),C("input",function(r){m(e);let o=d();return g(o.setText(r,o.tagName))}),f(),u(4,"label",12)(5,"input",23),C("change",function(r){m(e);let o=d();return g(o.tagAnnotated.set(o.check(r)))}),f(),u(6,"span"),p(7,"Annotate tag"),f()(),E(8,KO,3,2),u(9,"label",12)(10,"input",24),C("change",function(r){m(e);let o=d();return g(o.pushAfter.set(o.check(r)))}),f(),u(11,"span"),p(12,"Push tag after creation"),f()(),E(13,JO,1,1,"ng-container")}if(n&2){let e=d();c(2),S("value",e.tagName())("disabled",e.busy()),c(3),S("checked",e.tagAnnotated())("disabled",e.busy()),c(3),D(e.tagAnnotated()?8:-1),c(2),S("checked",e.pushAfter())("disabled",e.busy()||e.noRemotes()),c(3),D(e.pushAfter()?13:-1)}}function t2(n,t){n&1&&Ct(0)}function n2(n,t){if(n&1&&xt(0,t2,1,0,"ng-container",27),n&2){d(2);let e=_t(11);S("ngTemplateOutlet",e)}}function i2(n,t){if(n&1){let e=I();u(0,"label",28),p(1,"Branch name"),f(),u(2,"input",29,1),C("input",function(r){m(e);let o=d();return g(o.setText(r,o.branchName))}),f(),u(4,"label",12)(5,"input",30),C("change",function(r){m(e);let o=d();return g(o.checkoutAfter.set(o.check(r)))}),f(),u(6,"span"),p(7,"Check out after creation"),f()(),u(8,"label",12)(9,"input",31),C("change",function(r){m(e);let o=d();return g(o.publishBranch.set(o.check(r)))}),f(),u(10,"span"),p(11,"Publish and set upstream"),f()(),E(12,n2,1,1,"ng-container")}if(n&2){let e=d();c(2),S("value",e.branchName())("disabled",e.busy()),c(3),S("checked",e.checkoutAfter())("disabled",e.busy()),c(4),S("checked",e.publishBranch())("disabled",e.busy()||e.noRemotes()),c(3),D(e.publishBranch()?12:-1)}}function r2(n,t){n&1&&Ct(0)}function o2(n,t){if(n&1&&xt(0,r2,1,0,"ng-container",27),n&2){d(3);let e=_t(11);S("ngTemplateOutlet",e)}}function s2(n,t){if(n&1){let e=I();u(0,"label",38),p(1,"Branch name"),f(),u(2,"input",39),C("input",function(r){m(e);let o=d(2);return g(o.setText(r,o.remoteBranchName))}),f(),u(3,"label",12)(4,"input",40),C("change",function(r){m(e);let o=d(2);return g(o.publishBranch.set(o.check(r)))}),f(),u(5,"span"),p(6,"Publish and set upstream"),f()(),E(7,o2,1,1,"ng-container")}if(n&2){let e=d(2);c(2),S("value",e.remoteBranchName())("disabled",e.busy()),c(2),S("checked",e.publishBranch())("disabled",e.busy()||e.noRemotes()),c(3),D(e.publishBranch()?7:-1)}}function a2(n,t){if(n&1){let e=I();u(0,"div",32)(1,"button",33,1),C("click",function(){m(e);let r=d();return g(r.checkoutMode.set("detach"))}),j(3,"span",34),u(4,"span",35)(5,"span",36),p(6,"Detached HEAD"),f(),u(7,"span",37),p(8," Check out the commit without a branch. New commits will not belong to any branch. "),f()()(),u(9,"button",33),C("click",function(){m(e);let r=d();return g(r.checkoutMode.set("branch"))}),j(10,"span",34),u(11,"span",35)(12,"span",36),p(13,"New branch"),f(),u(14,"span",37),p(15,"Create and check out a branch at this commit."),f()()()(),E(16,s2,8,5)}if(n&2){let e=d();c(),J("selected",e.checkoutMode()==="detach"),S("disabled",e.busy()),Q("aria-checked",e.checkoutMode()==="detach"),c(8),J("selected",e.checkoutMode()==="branch"),S("disabled",e.busy()),Q("aria-checked",e.checkoutMode()==="branch"),c(7),D(e.checkoutMode()==="branch"?16:-1)}}function l2(n,t){if(n&1&&(u(0,"p",20),p(1),f()),n&2){let e=d(4);c(),Fn(' A local branch "',e.existingTrackingBranch(),'" already exists. Checkout will switch to it and sync it with ',e.state().ref,". ")}}function c2(n,t){if(n&1){let e=I();u(0,"label",38),p(1,"Local branch name"),f(),u(2,"input",41),C("input",function(r){m(e);let o=d(3);return g(o.setText(r,o.remoteBranchName))}),f(),E(3,l2,2,2,"p",20)}if(n&2){let e=d(3);c(2),S("value",e.remoteBranchName())("disabled",e.busy()),c(),D(e.existingTrackingBranch()?3:-1)}}function d2(n,t){if(n&1){let e=I();u(0,"div",32)(1,"button",33,1),C("click",function(){m(e);let r=d(2);return g(r.remoteCheckoutMode.set("track"))}),j(3,"span",34),u(4,"span",35)(5,"span",36),p(6,"Create local tracking branch"),f(),u(7,"span",37),p(8),f()()(),u(9,"button",33),C("click",function(){m(e);let r=d(2);return g(r.remoteCheckoutMode.set("detach"))}),j(10,"span",34),u(11,"span",35)(12,"span",36),p(13,"Detached checkout"),f(),u(14,"span",37),p(15," Check out the commit without creating a branch. "),f()()()(),E(16,c2,4,3)}if(n&2){let e=d(2);c(),J("selected",e.remoteCheckoutMode()==="track"),S("disabled",e.busy()),Q("aria-checked",e.remoteCheckoutMode()==="track"),c(7),H(" Creates a local branch that tracks ",e.state().ref,". "),c(),J("selected",e.remoteCheckoutMode()==="detach"),S("disabled",e.busy()),Q("aria-checked",e.remoteCheckoutMode()==="detach"),c(7),D(e.remoteCheckoutMode()==="track"?16:-1)}}function u2(n,t){if(n&1&&E(0,d2,17,10),n&2){let e=d();D(e.state().isRemote?0:-1)}}function p2(n,t){if(n&1&&(u(0,"span",37),p(1),f()),n&2){let e=d().$implicit;c(),P(e.description)}}function f2(n,t){if(n&1){let e=I();u(0,"button",33),C("click",function(){let r=m(e).$implicit,o=d(3);return g(o.mainline.set(+r.value))}),j(1,"span",34),u(2,"span",35)(3,"span",36),p(4),f(),E(5,p2,2,1,"span",37),f()()}if(n&2){let e=t.$implicit,i=d(3);J("selected",i.mainline()===+e.value),S("disabled",i.busy()),Q("aria-checked",i.mainline()===+e.value),c(4),P(e.label),c(),D(e.description?5:-1)}}function h2(n,t){if(n&1&&(u(0,"p",20),p(1,"This commit is a merge commit. Choose the parent to pick the changes from:"),f(),u(2,"div",45),W(3,f2,6,6,"button",46,Uo),f()),n&2){let e=d(2);c(3),q(e.mainlineChoices())}}function m2(n,t){if(n&1){let e=I();u(0,"label",12)(1,"input",42,1),C("change",function(r){m(e);let o=d();return g(o.noCommit.set(o.check(r)))}),f(),u(3,"span"),p(4,"No commit \u2014 stage the picked changes only"),f()(),u(5,"label",12)(6,"input",43),C("change",function(r){m(e);let o=d();return g(o.recordSource.set(o.check(r)))}),f(),u(7,"span"),p(8,"Append source commit hash to the message"),f()(),u(9,"label",12)(10,"input",44),C("change",function(r){m(e);let o=d();return g(o.signoff.set(o.check(r)))}),f(),u(11,"span"),p(12,"Sign off"),f()(),E(13,h2,5,0)}if(n&2){let e=d();c(),S("checked",e.noCommit())("disabled",e.busy()),c(5),S("checked",e.recordSource())("disabled",e.busy()),c(4),S("checked",e.signoff())("disabled",e.busy()),c(3),D(e.isMerge()?13:-1)}}function g2(n,t){if(n&1&&(u(0,"span",37),p(1),f()),n&2){let e=d().$implicit;c(),P(e.description)}}function _2(n,t){if(n&1){let e=I();u(0,"button",33),C("click",function(){let r=m(e).$implicit,o=d(3);return g(o.mainline.set(+r.value))}),j(1,"span",34),u(2,"span",35)(3,"span",36),p(4),f(),E(5,g2,2,1,"span",37),f()()}if(n&2){let e=t.$implicit,i=d(3);J("selected",i.mainline()===+e.value),S("disabled",i.busy()),Q("aria-checked",i.mainline()===+e.value),c(4),P(e.label),c(),D(e.description?5:-1)}}function v2(n,t){if(n&1&&(u(0,"p",20),p(1,"This commit is a merge commit. Choose the parent to revert changes against:"),f(),u(2,"div",45),W(3,_2,6,6,"button",46,Uo),f()),n&2){let e=d(2);c(3),q(e.mainlineChoices())}}function b2(n,t){if(n&1){let e=I();u(0,"label",12)(1,"input",42,1),C("change",function(r){m(e);let o=d();return g(o.noCommit.set(o.check(r)))}),f(),u(3,"span"),p(4,"No commit \u2014 stage the reverted changes only"),f()(),u(5,"label",12)(6,"input",44),C("change",function(r){m(e);let o=d();return g(o.signoff.set(o.check(r)))}),f(),u(7,"span"),p(8,"Sign off"),f()(),E(9,v2,5,0)}if(n&2){let e=d();c(),S("checked",e.noCommit())("disabled",e.busy()),c(5),S("checked",e.signoff())("disabled",e.busy()),c(3),D(e.isMerge()?9:-1)}}function y2(n,t){if(n&1&&(u(0,"p",9),p(1),f()),n&2){let e=d();c(),H(" This removes the selected commit and rewrites the history of ",e.state().currentBranch||"the current branch",". Descendant commits are replayed and their hashes change. ")}}function x2(n,t){if(n&1&&(u(0,"span",37),p(1),f()),n&2){let e=d().$implicit;c(),P(e.description)}}function C2(n,t){if(n&1){let e=I();u(0,"button",33,1),C("click",function(){let r=m(e).$implicit,o=d(2);return g(o.mergeMode.set(r.value))}),j(2,"span",34),u(3,"span",35)(4,"span",36),p(5),f(),E(6,x2,2,1,"span",37),f()()}if(n&2){let e=t.$implicit,i=d(2);J("selected",i.mergeMode()===e.value)("danger",e.danger),S("disabled",i.busy()),Q("aria-checked",i.mergeMode()===e.value),c(5),P(e.label),c(),D(e.description?6:-1)}}function w2(n,t){if(n&1){let e=I();u(0,"label",12)(1,"input",50),C("change",function(r){m(e);let o=d(2);return g(o.mergeNoCommit.set(o.check(r)))}),f(),u(2,"span"),p(3,"No commit \u2014 leave the merge staged"),f()()}if(n&2){let e=d(2);c(),S("checked",e.mergeNoCommit())("disabled",e.busy())}}function E2(n,t){if(n&1){let e=I();u(0,"div",47),W(1,C2,7,8,"button",48,Uo),f(),E(3,w2,4,2,"label",12),u(4,"label",12)(5,"input",49),C("change",function(r){m(e);let o=d();return g(o.autostash.set(o.check(r)))}),f(),u(6,"span"),p(7,"Autostash \u2014 stash uncommitted changes during the merge"),f()()}if(n&2){let e=d();c(),q(e.mergeChoices),c(2),D(e.mergeMode()==="default"||e.mergeMode()==="no-ff"?3:-1),c(2),S("checked",e.autostash())("disabled",e.busy())}}function D2(n,t){if(n&1){let e=I();u(0,"p",8),p(1,"Rebasing rewrites the current branch's commits on top of the target."),f(),u(2,"label",12)(3,"input",51,1),C("change",function(r){m(e);let o=d();return g(o.autostash.set(o.check(r)))}),f(),u(5,"span"),p(6,"Autostash \u2014 stash uncommitted changes during the rebase"),f()(),u(7,"label",12)(8,"input",52),C("change",function(r){m(e);let o=d();return g(o.preserveMerges.set(o.check(r)))}),f(),u(9,"span"),p(10,"Preserve merges \u2014 keep merge commits while rebasing"),f()()}if(n&2){let e=d();c(3),S("checked",e.autostash())("disabled",e.busy()),c(5),S("checked",e.preserveMerges())("disabled",e.busy())}}function S2(n,t){if(n&1&&(u(0,"span",37),p(1),f()),n&2){let e=d().$implicit;c(),P(e.description)}}function M2(n,t){if(n&1){let e=I();u(0,"button",33,1),C("click",function(){let r=m(e).$implicit,o=d(2);return g(o.resetMode.set(r.value))}),j(2,"span",34),u(3,"span",35)(4,"span",36),p(5),f(),E(6,S2,2,1,"span",37),f()()}if(n&2){let e=t.$implicit,i=d(2);J("selected",i.resetMode()===e.value)("danger",e.danger),S("disabled",i.busy()),Q("aria-checked",i.resetMode()===e.value),c(5),P(e.label),c(),D(e.description?6:-1)}}function T2(n,t){if(n&1&&(u(0,"div",10),W(1,M2,7,8,"button",48,Uo),f()),n&2){let e=d();c(),q(e.resetChoices)}}function k2(n,t){n&1&&Ct(0)}function I2(n,t){if(n&1){let e=I();xt(0,k2,1,0,"ng-container",27),u(1,"label",12)(2,"input",53),C("change",function(r){m(e);let o=d();return g(o.pushForce.set(o.check(r)))}),f(),u(3,"span",54),p(4,"Force update \u2014 overwrite the remote tag"),f()()}if(n&2){let e=d(),i=_t(11);S("ngTemplateOutlet",i),c(2),S("checked",e.pushForce())("disabled",e.busy()||!e.hasRemotes())}}function P2(n,t){n&1&&Ct(0)}function O2(n,t){if(n&1&&xt(0,P2,1,0,"ng-container",27),n&2){d(2);let e=_t(11);S("ngTemplateOutlet",e)}}function R2(n,t){if(n&1){let e=I();u(0,"p",9),p(1,"The tag will be deleted locally."),f(),u(2,"label",12)(3,"input",55),C("change",function(r){m(e);let o=d();return g(o.deleteRemoteToo.set(o.check(r)))}),f(),u(4,"span"),p(5,"Also delete the tag on the remote"),f()(),E(6,O2,1,1,"ng-container")}if(n&2){let e=d();c(3),S("checked",e.deleteRemoteToo())("disabled",e.busy()||e.noRemotes()),c(3),D(e.deleteRemoteToo()?6:-1)}}function N2(n,t){n&1&&Ct(0)}function A2(n,t){if(n&1&&xt(0,N2,1,0,"ng-container",27),n&2){d(2);let e=_t(11);S("ngTemplateOutlet",e)}}function L2(n,t){if(n&1){let e=I();u(0,"label",56),p(1,"New branch name"),f(),u(2,"input",57,1),C("input",function(r){m(e);let o=d();return g(o.renameName.set(r.target.value))}),f(),u(4,"label",12)(5,"input",58),C("change",function(r){m(e);let o=d();return g(o.publishRename.set(o.check(r)))}),f(),u(6,"span"),p(7,"Publish the new branch name"),f()(),u(8,"label",12)(9,"input",59),C("change",function(r){m(e);let o=d();return g(o.deleteRemoteOld.set(o.check(r)))}),f(),u(10,"span"),p(11,"Delete the old branch on the remote"),f()(),E(12,A2,1,1,"ng-container")}if(n&2){let e=d();c(2),S("value",e.renameName())("disabled",e.busy()),c(3),S("checked",e.publishRename())("disabled",e.busy()||e.noRemotes()),c(4),S("checked",e.deleteRemoteOld())("disabled",e.busy()||e.noRemotes()),c(3),D(e.publishRename()||e.deleteRemoteOld()?12:-1)}}function F2(n,t){n&1&&Ct(0)}function V2(n,t){if(n&1&&xt(0,F2,1,0,"ng-container",27),n&2){d(2);let e=_t(11);S("ngTemplateOutlet",e)}}function B2(n,t){if(n&1){let e=I();u(0,"div",60)(1,"button",33,1),C("click",function(){m(e);let r=d();return g(r.deleteForce.set(!1))}),j(3,"span",34),u(4,"span",35)(5,"span",36),p(6,"Safe delete"),f(),u(7,"span",37),p(8," Git refuses when the branch contains commits that are not merged. "),f()()(),u(9,"button",33),C("click",function(){m(e);let r=d();return g(r.deleteForce.set(!0))}),j(10,"span",34),u(11,"span",35)(12,"span",61),p(13,"Force delete"),f(),u(14,"span",37),p(15," Delete even when the branch contains unmerged commits. "),f()()()(),u(16,"label",12)(17,"input",62),C("change",function(r){m(e);let o=d();return g(o.deleteRemoteToo.set(o.check(r)))}),f(),u(18,"span"),p(19,"Also delete the branch on the remote"),f()(),E(20,V2,1,1,"ng-container")}if(n&2){let e=d();c(),J("selected",!e.deleteForce()),S("disabled",e.busy()),Q("aria-checked",!e.deleteForce()),c(8),J("selected",e.deleteForce()),S("disabled",e.busy()),Q("aria-checked",e.deleteForce()),c(8),S("checked",e.deleteRemoteToo())("disabled",e.busy()||e.noRemotes()),c(3),D(e.deleteRemoteToo()?20:-1)}}function j2(n,t){n&1&&Ct(0)}function $2(n,t){if(n&1&&(u(0,"p",9),p(1),f(),xt(2,j2,1,0,"ng-container",27)),n&2){let e=d(),i=_t(11);c(),H("This deletes ",e.state().ref," on the selected remote."),c(),S("ngTemplateOutlet",i)}}function H2(n,t){if(n&1&&(u(0,"span",37),p(1),f()),n&2){let e=d().$implicit;c(),P(e.description)}}function z2(n,t){if(n&1){let e=I();u(0,"button",33,1),C("click",function(){let r=m(e).$implicit,o=d(2);return g(o.pullMode.set(r.value))}),j(2,"span",34),u(3,"span",35)(4,"span",36),p(5),f(),E(6,H2,2,1,"span",37),f()()}if(n&2){let e=t.$implicit,i=d(2);J("selected",i.pullMode()===e.value),S("disabled",i.busy()),Q("aria-checked",i.pullMode()===e.value),c(5),P(e.label),c(),D(e.description?6:-1)}}function U2(n,t){if(n&1&&(u(0,"div",11),W(1,z2,7,6,"button",46,Uo),f()),n&2){let e=d();c(),q(e.pullChoices)}}function G2(n,t){if(n&1&&(u(0,"span",37),p(1),f()),n&2){let e=d().$implicit;c(),P(e.description)}}function W2(n,t){if(n&1){let e=I();u(0,"button",33),C("click",function(){let r=m(e).$implicit,o=d(2);return g(o.onStashScope(r.value))}),j(1,"span",34),u(2,"span",35)(3,"span",36),p(4),f(),E(5,G2,2,1,"span",37),f()()}if(n&2){let e=t.$implicit,i=d(2);J("selected",i.stashScope()===e.value),S("disabled",i.busy()),Q("aria-checked",i.stashScope()===e.value),c(4),P(e.label),c(),D(e.description?5:-1)}}function q2(n,t){if(n&1){let e=I();u(0,"label",63),p(1,"Stash message (optional)"),f(),u(2,"input",64,1),C("input",function(r){m(e);let o=d();return g(o.setText(r,o.stashMessage))}),f(),u(4,"div",65),W(5,W2,6,6,"button",46,Uo),f(),u(7,"label",12)(8,"input",66),C("change",function(r){m(e);let o=d();return g(o.includeUntracked.set(o.check(r)))}),f(),u(9,"span"),p(10,"Include untracked files"),f()()}if(n&2){let e=d();c(2),S("value",e.stashMessage())("disabled",e.busy()),c(3),q(e.stashChoices),c(3),S("checked",e.includeUntracked())("disabled",e.busy()||e.stashScope()==="staged")}}function Z2(n,t){if(n&1){let e=I();u(0,"label",12)(1,"input",67,1),C("change",function(r){m(e);let o=d();return g(o.restoreIndex.set(o.check(r)))}),f(),u(3,"span"),p(4,"Restore staged state \u2014 keep files staged as they were when stashed"),f()()}if(n&2){let e=d();c(),S("checked",e.restoreIndex())("disabled",e.busy())}}function Y2(n,t){if(n&1){let e=I();u(0,"label",12)(1,"input",67,1),C("change",function(r){m(e);let o=d();return g(o.restoreIndex.set(o.check(r)))}),f(),u(3,"span"),p(4,"Restore staged state \u2014 keep files staged as they were when stashed"),f()()}if(n&2){let e=d();c(),S("checked",e.restoreIndex())("disabled",e.busy())}}function Q2(n,t){if(n&1&&(u(0,"p",13),p(1),f()),n&2){let e=d();c(),P(e.error())}}var K2=new Set(["add-tag","create-branch","checkout-commit","push-tag","delete-tag","rename-branch","delete-branch","delete-remote-branch"]),Nd=class n{git=R(et);state=N.required();busy=N(!1);error=N("");confirmed=Z();closed=Z();focusEl=dt("focusEl");remote=v("");remotes=v([]);remotesLoaded=v(!1);tagName=v("");tagAnnotated=v(!1);tagMessage=v("");pushAfter=v(!1);branchName=v("");checkoutAfter=v(!1);publishBranch=v(!1);checkoutMode=v("detach");remoteCheckoutMode=v("track");remoteBranchName=v("");localBranches=v([]);noCommit=v(!1);recordSource=v(!1);signoff=v(!1);mainline=v(1);mergeMode=v("default");mergeNoCommit=v(!1);autostash=v(!1);preserveMerges=v(!1);resetMode=v("soft");pushForce=v(!1);deleteRemoteToo=v(!1);deleteForce=v(!1);publishRename=v(!1);deleteRemoteOld=v(!1);renameName=v("");pullMode=v("merge");stashMessage=v("");stashScope=v("all");includeUntracked=v(!0);restoreIndex=v(!1);mergeChoices=[{value:"default",label:"Default",description:"Fast-forward when possible, otherwise create a merge commit"},{value:"no-ff",label:"No fast-forward",description:"Always create a merge commit"},{value:"ff-only",label:"Fast-forward only",description:"Refuse the merge when it cannot be fast-forwarded"},{value:"squash",label:"Squash",description:"Stage the merged changes without a merge commit"}];pullChoices=[{value:"merge",label:"Merge",description:"Create a merge commit when needed (default Git behavior)"},{value:"rebase",label:"Rebase",description:"Replay local commits on top of the pulled commits"},{value:"ff-only",label:"Fast-forward only",description:"Only update when the branch can be fast-forwarded"}];resetChoices=[{value:"soft",label:"Soft",description:"Move the branch pointer; keep the index and working tree"},{value:"mixed",label:"Mixed",description:"Unstage the changes; keep them in the working tree"},{value:"hard",label:"Hard",description:"Discard all index and working-tree changes",danger:!0}];constructor(){ge(()=>{let t=this.state();je(()=>{this.resetDefaults(t),queueMicrotask(()=>this.focusEl()?.nativeElement.focus())})}),ge(()=>{let t=this.remotes();t.length&&(t.some(e=>e.name===this.remote())||this.remote.set(t.some(e=>e.name==="origin")?"origin":t[0].name))})}onEscape(){this.busy()||this.closed.emit()}action=O(()=>this.state().action);title=O(()=>{switch(this.action()){case"add-tag":return"Add Tag";case"create-branch":return"Create Branch";case"checkout-commit":return"Checkout Commit";case"checkout-branch":return"Checkout Branch";case"cherry-pick":return"Cherry Pick";case"revert":return"Revert Commit";case"drop-commit":return"Drop Commit";case"merge":return"Merge";case"rebase":return"Rebase";case"reset-commit":return"Reset Branch";case"push-tag":return"Push Tag";case"delete-tag":return"Delete Tag";case"rename-branch":return"Rename Branch";case"delete-branch":return"Delete Branch";case"delete-remote-branch":return"Delete Remote Branch";case"pull-branch":return"Pull";case"stash-save":return"Stash Changes";case"stash-apply":return"Apply Stash";case"stash-pop":return"Pop Stash"}});okLabel=O(()=>{switch(this.action()){case"checkout-commit":case"checkout-branch":return"Checkout";case"cherry-pick":return"Cherry Pick";case"revert":return"Revert";case"push-tag":return"Push Tag";case"delete-tag":return"Delete Tag";case"rename-branch":return"Rename";case"delete-branch":return"Delete Branch";case"delete-remote-branch":return"Delete Remote Branch";case"stash-save":return"Stash";case"stash-apply":return"Apply";case"stash-pop":return"Pop";default:return this.title()}});danger=O(()=>["revert","drop-commit","reset-commit","delete-tag","delete-branch","delete-remote-branch"].includes(this.action()));targetSummary=O(()=>{let t=this.state();return t.commit?`${t.commit.hash.slice(0,8)} ${t.commit.message}`:t.stash?`stash@{${t.stash.index}} ${t.stash.message}`:t.ref??""});targetKind=O(()=>{let t=this.state();return t.commit?"Commit":t.stash?"Stash":t.action==="add-tag"||t.action==="push-tag"||t.action==="delete-tag"?"Tag":"Branch"});contextLine=O(()=>{let t=this.state(),e=t.currentBranch||"detached HEAD";switch(t.action){case"merge":return`Merge ${this.targetSummary()} into ${e}`;case"rebase":return`Rebase ${e} onto ${this.targetSummary()}`;case"pull-branch":return`Pull ${t.ref??""} into ${e}`;case"checkout-branch":return t.isRemote?`Currently on ${e}`:`Switch the working tree from ${e} to ${t.ref??""}`;default:return""}});isMerge=O(()=>(this.state().commit?.parents.length??0)>1);existingTrackingBranch=O(()=>{let t=this.state();if(t.action!=="checkout-branch"||!t.isRemote||this.remoteCheckoutMode()!=="track")return"";let e=this.remoteBranchName().trim();return e&&this.localBranches().includes(e)?e:""});parentCount=O(()=>this.state().commit?.parents.length??0);mainlineChoices=O(()=>{let t=Math.max(this.parentCount(),2);return Array.from({length:t},(e,i)=>({value:String(i+1),label:`Parent ${i+1}`,description:i===0?"First parent (the branch merged into)":"Side parent (the branch merged in)"}))});stashChoices=[{value:"all",label:"All changes",description:"Stash staged and unstaged changes"},{value:"staged",label:"Staged only",description:"Stash the index without the working tree"},{value:"unstaged",label:"Unstaged only",description:"Stash working-tree changes, keeping staged files staged"}];showRemoteSelect=O(()=>{switch(this.action()){case"add-tag":return this.pushAfter();case"create-branch":return this.publishBranch();case"checkout-commit":return this.checkoutMode()==="branch"&&this.publishBranch();case"push-tag":case"delete-remote-branch":return!0;case"delete-tag":return this.deleteRemoteToo();case"rename-branch":return this.publishRename()||this.deleteRemoteOld();case"delete-branch":return this.deleteRemoteToo();default:return!1}});hasRemotes=O(()=>this.remotes().length>0);noRemotes=O(()=>this.remotesLoaded()&&!this.hasRemotes());canSubmit=O(()=>{if(this.busy())return!1;switch(this.action()){case"add-tag":return!!this.tagName().trim()&&(!this.tagAnnotated()||!!this.tagMessage().trim())&&(!this.pushAfter()||this.hasRemotes());case"create-branch":return!!this.branchName().trim()&&(!this.publishBranch()||this.hasRemotes());case"checkout-commit":return this.checkoutMode()==="detach"||!!this.remoteBranchName().trim()&&(!this.publishBranch()||this.hasRemotes());case"checkout-branch":return this.state().isRemote?this.remoteCheckoutMode()==="detach"||!!this.remoteBranchName().trim():!0;case"delete-remote-branch":return this.hasRemotes();case"rename-branch":return!!this.renameName().trim();default:return!0}});setText(t,e){e.set(t.target.value)}check(t){return t.target.checked}onRemote(t){this.remote.set(t.target.value)}onStashScope(t){this.stashScope.set(t),this.includeUntracked.set(t!=="staged")}submit(){let t=this.state();if(!t||!this.canSubmit())return;let e=t.commit,i;switch(t.action){case"add-tag":i=z({action:"add-tag",name:this.tagName().trim(),annotate:this.tagAnnotated(),message:this.tagAnnotated()?this.tagMessage().trim():"",push:this.pushAfter(),remote:this.remote()},e?{commit:e.hash}:{});break;case"create-branch":i=z({action:"create-branch",name:this.branchName().trim(),checkout:this.checkoutAfter(),publish:this.publishBranch(),remote:this.remote()},e?{commit:e.hash}:{});break;case"checkout-commit":i={action:"checkout-commit",hash:e?.hash??"",mode:this.checkoutMode(),branchName:this.remoteBranchName().trim(),publish:this.publishBranch(),remote:this.remote()};break;case"checkout-branch":i={action:"checkout-branch",branch:t.ref??"",isRemote:!!t.isRemote,mode:t.isRemote?this.remoteCheckoutMode():"switch",branchName:this.remoteBranchName().trim()};break;case"cherry-pick":i=z({action:"cherry-pick",hash:e?.hash??"",noCommit:this.noCommit(),recordSource:this.recordSource(),signoff:this.signoff()},this.isMerge()?{mainline:this.mainline()}:{});break;case"revert":i=z({action:"revert",hash:e?.hash??"",noCommit:this.noCommit(),signoff:this.signoff()},this.isMerge()?{mainline:this.mainline()}:{});break;case"drop-commit":i={action:"drop-commit",hash:e?.hash??""};break;case"merge":i={action:"merge",source:e?.hash??t.ref??"",mode:this.mergeMode(),noCommit:this.mergeNoCommit(),autostash:this.autostash()};break;case"rebase":i={action:"rebase",onto:e?.hash??t.ref??"",autostash:this.autostash(),preserveMerges:this.preserveMerges()};break;case"reset-commit":i={action:"reset-commit",hash:e?.hash??"",mode:this.resetMode()};break;case"push-tag":i={action:"push-tag",name:t.ref??"",force:this.pushForce(),remote:this.remote()};break;case"delete-tag":i={action:"delete-tag",name:t.ref??"",deleteRemote:this.deleteRemoteToo(),remote:this.remote()};break;case"rename-branch":i={action:"rename-branch",oldName:t.ref??"",newName:this.renameName().trim(),publish:this.publishRename(),deleteRemoteOld:this.deleteRemoteOld(),remote:this.remote()};break;case"delete-branch":i={action:"delete-branch",name:t.ref??"",force:this.deleteForce(),deleteRemote:this.deleteRemoteToo(),remote:this.remote()};break;case"delete-remote-branch":i={action:"delete-remote-branch",branch:(t.ref??"").slice((t.ref??"").indexOf("/")+1),remote:this.remote()};break;case"pull-branch":i={action:"pull-branch",branch:(t.ref??"").slice((t.ref??"").indexOf("/")+1),remote:t.remote??this.remote(),mode:this.pullMode()};break;case"stash-save":i={action:"stash-save",message:this.stashMessage().trim(),scope:this.stashScope(),includeUntracked:this.stashScope()==="staged"?!1:this.includeUntracked()};break;case"stash-apply":case"stash-pop":i={action:t.action,index:t.stash?.index??0,restoreIndex:this.restoreIndex()};break}this.confirmed.emit(i)}resetDefaults(t){this.remote.set(t.remote??""),this.remotes.set([]),this.remotesLoaded.set(!1),this.tagName.set(""),this.tagAnnotated.set(!1),this.tagMessage.set(""),this.pushAfter.set(!1),this.branchName.set(""),this.checkoutAfter.set(!1),this.publishBranch.set(!1),this.checkoutMode.set("detach"),this.remoteCheckoutMode.set("track"),this.localBranches.set([]);let e=t.ref??"",i=e.indexOf("/");this.remoteBranchName.set(t.isRemote&&i>0?e.slice(i+1):""),this.renameName.set(t.action==="rename-branch"?e:""),this.noCommit.set(!1),this.recordSource.set(!1),this.signoff.set(!1),this.mainline.set(1),this.mergeMode.set("default"),this.mergeNoCommit.set(!1),this.autostash.set(!1),this.preserveMerges.set(!1),this.resetMode.set("soft"),this.pushForce.set(!1),this.deleteRemoteToo.set(!1),this.deleteForce.set(!1),this.publishRename.set(!1),this.deleteRemoteOld.set(!1),this.pullMode.set("merge");let r=t.stashScope??"all";this.stashMessage.set(""),this.stashScope.set(r),this.includeUntracked.set(r!=="staged"),this.restoreIndex.set(!1),this.loadRemotes(t.action),t.action==="checkout-branch"&&t.isRemote&&this.loadLocalBranches()}loadRemotes(t){K2.has(t)&&this.git.getRemotes().subscribe({next:e=>{this.remotes.set(e),this.remotesLoaded.set(!0)},error:()=>{this.remotes.set([]),this.remotesLoaded.set(!0)}})}loadLocalBranches(){this.git.getAllBranches().subscribe({next:t=>this.localBranches.set(t.filter(e=>!e.remote).map(e=>e.name)),error:()=>this.localBranches.set([])})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-git-operation-dialog"]],viewQuery:function(e,i){e&1&&st(i.focusEl,GO,5),e&2&&Rt()},hostBindings:function(e,i){e&1&&C("keydown.escape",function(){return i.onEscape()},qe)},inputs:{state:[1,"state"],busy:[1,"busy"],error:[1,"error"]},outputs:{confirmed:"confirmed",closed:"closed"},decls:37,vars:12,consts:[["remoteSelect",""],["focusEl",""],[1,"backdrop",3,"click"],["role","dialog","aria-modal","true","aria-labelledby","git-op-title",1,"dialog",3,"submit"],["id","git-op-title",1,"title"],[1,"target"],[1,"target-kind"],[1,"target-value",3,"title"],[1,"context"],[1,"warning"],["role","radiogroup","aria-label","Reset mode",1,"choices"],["role","radiogroup","aria-label","Integration mode",1,"choices"],[1,"checkbox-row"],["role","alert",1,"error"],[1,"actions"],["type","button",1,"btn",3,"click","disabled"],["type","submit",1,"btn","btn-primary",3,"disabled"],["for","git-op-remote",1,"field-label"],["id","git-op-remote",1,"input","select",3,"change","disabled"],[3,"value","selected"],[1,"notice"],["for","git-op-tag-name",1,"field-label"],["id","git-op-tag-name","type","text","autocomplete","off","placeholder","v1.0.0",1,"input",3,"input","value","disabled"],["id","git-op-tag-annotated","type","checkbox",3,"change","checked","disabled"],["id","git-op-tag-push","type","checkbox",3,"change","checked","disabled"],["for","git-op-tag-message",1,"field-label"],["id","git-op-tag-message","rows","3","placeholder","Release notes",1,"input",3,"input","value","disabled"],[4,"ngTemplateOutlet"],["for","git-op-branch-name",1,"field-label"],["id","git-op-branch-name","type","text","autocomplete","off","placeholder","feature/my-branch",1,"input",3,"input","value","disabled"],["id","git-op-branch-checkout","type","checkbox",3,"change","checked","disabled"],["id","git-op-branch-publish","type","checkbox",3,"change","checked","disabled"],["role","radiogroup","aria-label","Checkout mode",1,"choices"],["type","button","role","radio",1,"choice",3,"click","disabled"],["aria-hidden","true",1,"option-radio"],[1,"option-text"],[1,"option-label"],[1,"option-description"],["for","git-op-checkout-name",1,"field-label"],["id","git-op-checkout-name","type","text","autocomplete","off","placeholder","feature/my-branch",1,"input",3,"input","value","disabled"],["id","git-op-checkout-publish","type","checkbox",3,"change","checked","disabled"],["id","git-op-checkout-name","type","text","autocomplete","off",1,"input",3,"input","value","disabled"],["id","git-op-nocommit","type","checkbox",3,"change","checked","disabled"],["id","git-op-record-source","type","checkbox",3,"change","checked","disabled"],["id","git-op-signoff","type","checkbox",3,"change","checked","disabled"],["role","radiogroup","aria-label","Mainline parent",1,"choices"],["type","button","role","radio",1,"choice",3,"selected","disabled"],["role","radiogroup","aria-label","Merge mode",1,"choices"],["type","button","role","radio",1,"choice",3,"selected","danger","disabled"],["id","git-op-merge-autostash","type","checkbox",3,"change","checked","disabled"],["id","git-op-merge-nocommit","type","checkbox",3,"change","checked","disabled"],["id","git-op-rebase-autostash","type","checkbox",3,"change","checked","disabled"],["id","git-op-rebase-merges","type","checkbox",3,"change","checked","disabled"],["id","git-op-tag-force","type","checkbox",3,"change","checked","disabled"],[1,"danger-text"],["id","git-op-tag-remote","type","checkbox",3,"change","checked","disabled"],["for","git-op-rename-name",1,"field-label"],["id","git-op-rename-name","type","text","autocomplete","off",1,"input",3,"input","value","disabled"],["id","git-op-rename-publish","type","checkbox",3,"change","checked","disabled"],["id","git-op-rename-delete-old","type","checkbox",3,"change","checked","disabled"],["role","radiogroup","aria-label","Deletion mode",1,"choices"],[1,"option-label","danger-text"],["id","git-op-branch-remote","type","checkbox",3,"change","checked","disabled"],["for","git-op-stash-message",1,"field-label"],["id","git-op-stash-message","type","text","autocomplete","off","placeholder","WIP",1,"input",3,"input","value","disabled"],["role","radiogroup","aria-label","Stash scope",1,"choices"],["id","git-op-stash-untracked","type","checkbox",3,"change","checked","disabled"],["id","git-op-stash-index","type","checkbox",3,"change","checked","disabled"]],template:function(e,i){if(e&1){let r=I();u(0,"div",2),C("click",function(){return m(r),g(!i.busy()&&i.closed.emit())}),f(),u(1,"form",3),C("submit",function(s){return m(r),s.preventDefault(),g(i.submit())}),u(2,"h3",4),p(3),f(),u(4,"div",5)(5,"span",6),p(6),f(),u(7,"span",7),p(8),f()(),E(9,qO,2,1,"p",8),xt(10,QO,6,2,"ng-template",null,0,Do),E(12,e2,14,8)(13,i2,13,7)(14,a2,17,9)(15,u2,1,1)(16,m2,14,7)(17,b2,10,5)(18,y2,2,1,"p",9)(19,E2,8,3)(20,D2,11,4)(21,T2,3,0,"div",10)(22,I2,5,3)(23,R2,7,3)(24,L2,13,7)(25,B2,21,11)(26,$2,3,2)(27,U2,3,0,"div",11)(28,q2,11,4)(29,Z2,5,2,"label",12)(30,Y2,5,2,"label",12),E(31,Q2,2,1,"p",13),u(32,"div",14)(33,"button",15),C("click",function(){return m(r),g(i.closed.emit())}),p(34,"Cancel"),f(),u(35,"button",16),p(36),f()()()}if(e&2){let r;c(3),P(i.title()),c(3),P(i.targetKind()),c(),S("title",i.targetSummary()),c(),P(i.targetSummary()),c(),D(i.contextLine()?9:-1),c(3),D((r=i.action())==="add-tag"?12:r==="create-branch"?13:r==="checkout-commit"?14:r==="checkout-branch"?15:r==="cherry-pick"?16:r==="revert"?17:r==="drop-commit"?18:r==="merge"?19:r==="rebase"?20:r==="reset-commit"?21:r==="push-tag"?22:r==="delete-tag"?23:r==="rename-branch"?24:r==="delete-branch"?25:r==="delete-remote-branch"?26:r==="pull-branch"?27:r==="stash-save"?28:r==="stash-apply"?29:r==="stash-pop"?30:-1),c(19),D(i.error()?31:-1),c(2),S("disabled",i.busy()),c(2),J("btn-danger",i.danger()),S("disabled",!i.canSubmit()),c(),H(" ",i.busy()?"Working\u2026":i.okLabel()," ")}},dependencies:[ua],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(480px,calc(100vw - 48px));max-height:calc(100vh - 64px);overflow-y:auto;transform:translate(-50%,-50%);display:flex;flex-direction:column;gap:8px;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}.target[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:8px;padding:7px 10px;border:1px solid var(--border);border-radius:4px;background:var(--bg)}.target-kind[_ngcontent-%COMP%]{flex:none;padding:1px 6px;border-radius:3px;background:var(--bg-hover);color:var(--text-dim);font-size:10px;text-transform:uppercase;letter-spacing:.4px}.target-value[_ngcontent-%COMP%]{min-width:0;overflow:hidden;color:var(--text);font-size:12px;text-overflow:ellipsis;white-space:nowrap}.context[_ngcontent-%COMP%], .notice[_ngcontent-%COMP%], .warning[_ngcontent-%COMP%]{margin:0;color:var(--text-dim);font-size:12px;line-height:1.45}.notice[_ngcontent-%COMP%]{color:#dcb67a}.warning[_ngcontent-%COMP%]{color:var(--red)}.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}.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}.input[_ngcontent-%COMP%]:focus{border-color:var(--accent)}.input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}.select[_ngcontent-%COMP%]{width:100%}textarea.input[_ngcontent-%COMP%]{resize:vertical}.checkbox-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;color:var(--text);font-size:12px;cursor:pointer}.checkbox-row[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{accent-color:var(--accent)}.checkbox-row[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled{cursor:default}.danger-text[_ngcontent-%COMP%]{color:var(--red)}.choices[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;max-height:40vh;overflow-y:auto}.choice[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:9px;padding:7px 10px;border:1px solid transparent;border-radius:4px;background:transparent;color:var(--text);font:12px inherit;text-align:left;cursor:pointer}.choice[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover)}.choice.selected[_ngcontent-%COMP%]{border-color:var(--accent);background:var(--bg-hover)}.choice[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}.choice.danger[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{color:var(--red)}.option-radio[_ngcontent-%COMP%]{flex:none;width:12px;height:12px;margin-top:2px;border:1px solid var(--border);border-radius:50%;background:var(--bg)}.choice.selected[_ngcontent-%COMP%] .option-radio[_ngcontent-%COMP%]{border-color:var(--accent);box-shadow:inset 0 0 0 2.5px var(--bg),inset 0 0 0 6px var(--accent)}.option-text[_ngcontent-%COMP%]{display:flex;min-width:0;flex-direction:column;gap:1px}.option-label[_ngcontent-%COMP%]{color:var(--text-bright);font-weight:500}.option-description[_ngcontent-%COMP%]{color:var(--text-dim);font-size:11px;line-height:1.4}.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-danger[_ngcontent-%COMP%]{border-color:#a1260d;background:#a1260d;color:#fff}.btn-danger[_ngcontent-%COMP%]:hover:not(:disabled){background:#8c2009}.btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}"],changeDetection:0})};var X2=(n,t)=>t.name,Or=(n,t)=>t.value;function J2(n,t){n&1&&(b(0,"p"),p(1,"Repository preferences and Git configuration."),y())}function eR(n,t){if(n&1&&(b(0,"div",5),p(1),y()),n&2){let e=d();c(),P(e.error())}}function tR(n,t){if(n&1){let e=I();b(0,"div",35)(1,"strong",36),p(2),y(),b(3,"span",37),p(4),y(),b(5,"span"),p(6,"Fetch"),y(),b(7,"span",38)(8,"button",39),F("click",function(){let r=m(e).$implicit,o=d(2);return g(o.editRemote(r))}),p(9,"Edit"),y(),b(10,"button",40),F("click",function(){let r=m(e).$implicit,o=d(2);return g(o.removeRemote(r.name))}),p(11,"Remove"),y()()(),b(12,"div",41),te(13,"span"),b(14,"span",37),p(15),y(),b(16,"span"),p(17,"Push"),y(),te(18,"span"),y()}if(n&2){let e=t.$implicit;c(2),P(e.name),c(2),P(e.fetchUrl),c(11),P(e.pushUrl)}}function nR(n,t){n&1&&(b(0,"p",19),p(1,"No remotes configured."),y())}function iR(n,t){if(n&1){let e=I();b(0,"div",13)(1,"span"),p(2,"Issue regex"),y(),b(3,"code"),p(4),y(),b(5,"span"),p(6,"Issue URL"),y(),b(7,"code"),p(8),y(),b(9,"span"),p(10,"Scope"),y(),b(11,"strong"),p(12),y()(),b(13,"div",14)(14,"button",15),F("click",function(){m(e);let r=d(2);return g(r.editIssueLinking())}),p(15,"Edit"),y(),b(16,"button",42),F("click",function(){m(e);let r=d(2);return g(r.removeIssueLinking())}),p(17,"Remove"),y()()}if(n&2){let e=t;c(4),P(e.regex),c(4),P(e.url),c(4),P(e.useGlobally?"Global":"This repository")}}function rR(n,t){if(n&1){let e=I();b(0,"div",14)(1,"button",15),F("click",function(){m(e);let r=d(2);return g(r.editIssueLinking())}),p(2,"+ Add Issue Linking"),y()()}}function oR(n,t){if(n&1&&(b(0,"option",26),p(1),y()),n&2){let e=t.$implicit;$("value",e.value),c(),P(e.label)}}function sR(n,t){if(n&1&&(b(0,"option",26),p(1),y()),n&2){let e=t.$implicit;$("value",e.value),c(),P(e.label)}}function aR(n,t){if(n&1&&(b(0,"option",54),p(1),y()),n&2){let e=t.$implicit,i=d(3);$("value",e.value)("selected",e.value===i.aiReviewModel()),c(),P(e.label)}}function lR(n,t){if(n&1&&(b(0,"option",54),p(1),y()),n&2){let e=t.$implicit,i=d(3);$("value",e.value)("selected",e.value===i.aiReviewEffort()),c(),P(e.label)}}function cR(n,t){if(n&1&&(b(0,"option",54),p(1),y()),n&2){let e=t.$implicit,i=d(3);$("value",e.value)("selected",e.value===i.aiReviewCommitMessageModel()),c(),P(e.label)}}function dR(n,t){if(n&1&&(b(0,"option",54),p(1),y()),n&2){let e=t.$implicit,i=d(3);$("value",e.value)("selected",e.value===i.aiReviewCommitMessageEffort()),c(),P(e.label)}}function uR(n,t){if(n&1&&(b(0,"option",54),p(1),y()),n&2){let e=t.$implicit,i=d(3);$("value",e.value)("selected",e.value===i.aiReviewCommitMessageStyle()),c(),P(e.label)}}function pR(n,t){if(n&1){let e=I();b(0,"label",43)(1,"span")(2,"strong"),p(3,"Which pull requests"),y(),b(4,"small"),p(5,"Only pull requests still open are reviewed."),y()(),b(6,"select",44),F("change",function(r){m(e);let o=d(2);return g(o.changeAiReviewScope(r.target))}),b(7,"option",45),p(8,"Where I am a reviewer"),y(),b(9,"option",46),p(10,"The ones I created"),y(),b(11,"option",47),p(12,"Every open pull request"),y()()(),b(13,"label",48)(14,"span")(15,"strong"),p(16,"Check every"),y(),b(17,"small"),p(18,"Minutes between checks for new commits."),y()(),b(19,"input",49),F("input",function(r){m(e);let o=d(2);return g(o.aiReviewPollMinutes.set(r.target.valueAsNumber))}),y()(),b(20,"label",7)(21,"span")(22,"strong"),p(23,"Include drafts"),y(),b(24,"small"),p(25,"Also review pull requests still marked as drafts."),y()(),b(26,"input",8),F("change",function(r){m(e);let o=d(2);return g(o.setChecked(r.target,"aiReviewIncludeDrafts"))}),y()(),b(27,"label",50)(28,"span")(29,"strong"),p(30,"Claude Code path"),y(),b(31,"small"),p(32,"Leave empty to look on PATH, in the standard install locations, and in the Claude Code VS Code extension's bundled copy."),y()(),b(33,"input",51),F("input",function(r){m(e);let o=d(2);return g(o.aiReviewClaudePath.set(r.target.value))}),y()(),b(34,"label",52)(35,"span")(36,"strong"),p(37,"Claude model"),y(),b(38,"small"),p(39,"Which model reviews your pull requests; opus by default. Claude Code's default uses whatever Claude Code itself is set to, and opus, sonnet and haiku always mean the latest of that family. The model picker in a pull request's Review tab starts from this."),y()(),b(40,"select",53),F("change",function(r){m(e);let o=d(2);return g(o.changeAiReviewModel(r.target))}),W(41,aR,2,3,"option",54,Or),y()(),b(43,"label",55)(44,"span")(45,"strong"),p(46,"Review effort"),y(),b(47,"small"),p(48,"How hard Claude thinks while reviewing; high by default. Higher effort is slower and uses more of your plan, and catches subtler problems. Claude Code's default uses whatever Claude Code itself is set to. The effort picker in a pull request's Review tab starts from this."),y()(),b(49,"select",56),F("change",function(r){m(e);let o=d(2);return g(o.aiReviewEffort.set(r.target.value))}),W(50,lR,2,3,"option",54,Or),y()(),b(52,"label",57)(53,"span")(54,"strong"),p(55,"Commit message model"),y(),b(56,"small"),p(57,"Which model drafts commit messages from your pending changes. Haiku is fast and cheap enough for the job."),y()(),b(58,"select",58),F("change",function(r){m(e);let o=d(2);return g(o.changeAiReviewCommitMessageModel(r.target))}),W(59,cR,2,3,"option",54,Or),y()(),b(61,"label",59)(62,"span")(63,"strong"),p(64,"Commit message effort"),y(),b(65,"small"),p(66,"How hard Claude thinks while drafting commit messages; low by default, which keeps the draft quick."),y()(),b(67,"select",60),F("change",function(r){m(e);let o=d(2);return g(o.aiReviewCommitMessageEffort.set(r.target.value))}),W(68,dR,2,3,"option",54,Or),y()(),b(70,"label",61)(71,"span")(72,"strong"),p(73,"Commit message style"),y(),b(74,"small"),p(75,"Oneliner drafts only the subject line, Brief adds a short description, and Descriptive explains what changed and why in full."),y()(),b(76,"select",62),F("change",function(r){m(e);let o=d(2);return g(o.changeAiReviewCommitMessageStyle(r.target))}),W(77,uR,2,3,"option",54,Or),y()(),b(79,"label",63)(80,"span")(81,"strong"),p(82,"Reviewing instructions"),y(),b(83,"small"),p(84,"Your team's conventions, or the things you never want commented on."),y()(),b(85,"textarea",64),F("input",function(r){m(e);let o=d(2);return g(o.aiReviewInstructions.set(r.target.value))}),y()()}if(n&2){let e=d(2);c(6),$("value",e.aiReviewScope()),c(13),$("value",e.aiReviewPollMinutes()),c(7),$("checked",e.aiReviewIncludeDrafts()),c(7),$("value",e.aiReviewClaudePath()),c(7),$("value",e.aiReviewModel()),c(),q(e.aiReviewModelOptions()),c(8),$("value",e.aiReviewEffort()),c(),q(e.effortOptions),c(8),$("value",e.aiReviewCommitMessageModel()),c(),q(e.commitMessageModelOptions()),c(8),$("value",e.aiReviewCommitMessageEffort()),c(),q(e.effortOptions),c(8),$("value",e.aiReviewCommitMessageStyle()),c(),q(e.commitMessageStyleOptions),c(8),$("value",e.aiReviewInstructions())}}function fR(n,t){if(n&1){let e=I();b(0,"div",6)(1,"fieldset")(2,"legend"),p(3,"Repository"),y(),b(4,"label",7)(5,"span")(6,"strong"),p(7,"Automatically refresh"),y(),b(8,"small"),p(9,"Reload changes made outside Guito."),y()(),b(10,"input",8),F("change",function(r){m(e);let o=d();return g(o.setChecked(r.target,"autoReload"))}),y()(),b(11,"label",7)(12,"span")(13,"strong"),p(14,"Show Git graph"),y(),b(15,"small"),p(16,"Display branch lines beside commit history."),y()(),b(17,"input",8),F("change",function(r){m(e);let o=d();return g(o.setChecked(r.target,"showGraph"))}),y()(),b(18,"label",7)(19,"span")(20,"strong"),p(21,"Show stashes"),y(),b(22,"small"),p(23,"Pin stash entries above commit history."),y()(),b(24,"input",8),F("change",function(r){m(e);let o=d();return g(o.setChecked(r.target,"showStashes"))}),y()(),b(25,"label",7)(26,"span")(27,"strong"),p(28,"Show tags"),y(),b(29,"small"),p(30,"Show tag badges attached to commits."),y()(),b(31,"input",8),F("change",function(r){m(e);let o=d();return g(o.setChecked(r.target,"showTags"))}),y()(),b(32,"label",7)(33,"span")(34,"strong"),p(35,"Show remote branches"),y(),b(36,"small"),p(37,"Include remote branches in the repository panel and branch pills."),y()(),b(38,"input",8),F("change",function(r){m(e);let o=d();return g(o.setChecked(r.target,"showRemoteBranches"))}),y()(),b(39,"label",7)(40,"span")(41,"strong"),p(42,"Expand repository panel sections"),y(),b(43,"small"),p(44,"Open the left-side panel with all sections expanded."),y()(),b(45,"input",8),F("change",function(r){m(e);let o=d();return g(o.setChecked(r.target,"sidePanelSectionsExpanded"))}),y()(),b(46,"label",9)(47,"span")(48,"strong"),p(49,"Search mode"),y(),b(50,"small"),p(51,"Navigate jumps between matches with arrows; filter shows only matching commits."),y()(),b(52,"select",10),F("change",function(r){m(e);let o=d();return g(o.changeSearchMode(r.target))}),b(53,"option",11),p(54,"Navigate matches"),y(),b(55,"option",12),p(56,"Filter matches"),y()()(),b(57,"label",7)(58,"span")(59,"strong"),p(60,"Case-sensitive search"),y(),b(61,"small"),p(62,"Only match commits and repository panel items with the same uppercase and lowercase letters and accents."),y()(),b(63,"input",8),F("change",function(r){m(e);let o=d();return g(o.setChecked(r.target,"searchCaseSensitive"))}),y()()(),b(64,"fieldset")(65,"legend"),p(66,"User details"),y(),b(67,"div",13)(68,"span"),p(69,"User name"),y(),b(70,"strong"),p(71),y(),b(72,"span"),p(73,"User email"),y(),b(74,"strong"),p(75),y()(),b(76,"div",14)(77,"button",15),F("click",function(){m(e);let r=d();return g(r.editIdentity())}),p(78,"Edit"),y(),b(79,"button",16),F("click",function(){m(e);let r=d();return g(r.removeIdentity())}),p(80,"Remove"),y()()(),b(81,"fieldset")(82,"legend"),p(83,"Remote configuration"),y(),b(84,"div",17)(85,"div",18)(86,"strong"),p(87,"Remote"),y(),b(88,"strong"),p(89,"URL"),y(),b(90,"strong"),p(91,"Type"),y(),b(92,"strong"),p(93,"Action"),y()(),W(94,tR,19,3,null,null,X2,!1,nR,2,0,"p",19),y(),b(97,"div",14)(98,"button",15),F("click",function(){m(e);let r=d();return g(r.editRemote())}),p(99,"+ Add Remote"),y()()(),b(100,"fieldset")(101,"legend"),p(102,"Issue linking"),y(),b(103,"p",20),p(104,"Convert issue numbers in commit messages into links to your issue tracking system."),y(),E(105,iR,18,3)(106,rR,3,0,"div",14),y(),b(107,"fieldset")(108,"legend"),p(109,"Branches and tags"),y(),b(110,"label",21)(111,"input",22),F("change",function(){m(e);let r=d();return g(r.refListView.set("flat"))}),y(),b(112,"span")(113,"strong"),p(114,"Flat list"),y(),b(115,"small"),p(116,"Show each branch and tag with its full name."),y()()(),b(117,"label",21)(118,"input",22),F("change",function(){m(e);let r=d();return g(r.refListView.set("tree"))}),y(),b(119,"span")(120,"strong"),p(121,"Directory tree"),y(),b(122,"small"),p(123,"Group branches and tags into collapsible namespace folders."),y()()()(),b(124,"fieldset")(125,"legend"),p(126,"Changed files"),y(),b(127,"label",21)(128,"input",23),F("change",function(){m(e);let r=d();return g(r.fileListView.set("flat"))}),y(),b(129,"span")(130,"strong"),p(131,"Flat list"),y(),b(132,"small"),p(133,"Show each file with its full path."),y()()(),b(134,"label",21)(135,"input",23),F("change",function(){m(e);let r=d();return g(r.fileListView.set("tree"))}),y(),b(136,"span")(137,"strong"),p(138,"Directory tree"),y(),b(139,"small"),p(140,"Group files into collapsible folders."),y()()()(),b(141,"fieldset")(142,"legend"),p(143,"Repository panel sorting"),y(),b(144,"label",24)(145,"span")(146,"strong"),p(147,"Worktree order"),y(),b(148,"small"),p(149,"How worktrees are ordered in the repository panel."),y()(),b(150,"select",25),F("change",function(r){m(e);let o=d();return g(o.changeWorktreeSort(r.target))}),W(151,oR,2,2,"option",26,Or),y()(),b(153,"label",27)(154,"span")(155,"strong"),p(156,"Pull request order"),y(),b(157,"small"),p(158,"How pull requests are ordered in the repository panel."),y()(),b(159,"select",28),F("change",function(r){m(e);let o=d();return g(o.changePrSort(r.target))}),W(160,sR,2,2,"option",26,Or),y()()(),b(162,"fieldset")(163,"legend"),p(164,"Azure DevOps"),y(),b(165,"label",29)(166,"span")(167,"strong"),p(168,"Server URL"),y(),b(169,"small"),p(170,"Enables pull request creation for an on-prem Azure DevOps Server."),y()(),b(171,"input",30),F("input",function(r){m(e);let o=d();return g(o.azureDevOpsUrl.set(r.target.value))}),y()(),b(172,"label",31)(173,"span")(174,"strong"),p(175,"Automatic PR branch name"),y(),b(176,"small"),p(177,"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)."),y()(),b(178,"input",32),F("input",function(r){m(e);let o=d();return g(o.prBranchNameTemplate.set(r.target.value))}),y()(),b(179,"label",7)(180,"span")(181,"strong"),p(182,"Allow merge completion"),y(),b(183,"small"),p(184,'Offer the "No fast-forward (merge commit)" and "Semi-linear merge" pull request completion strategies.'),y()(),b(185,"input",8),F("change",function(r){m(e);let o=d();return g(o.setChecked(r.target,"allowMerge"))}),y()()(),b(186,"fieldset")(187,"legend"),p(188,"Automated pull request review"),y(),b(189,"label",7)(190,"span")(191,"strong"),p(192,"Review pull requests with Claude Code"),y(),b(193,"small"),p(194,"Guito checks for pull requests, reviews every new commit, and queues the comments in the pull request's Review tab. Nothing is posted until you post it. Requires Claude Code installed and signed in on this machine."),y()(),b(195,"input",8),F("change",function(r){m(e);let o=d();return g(o.setChecked(r.target,"aiReviewEnabled"))}),y()(),E(196,pR,86,10),y()(),b(197,"footer")(198,"button",33),F("click",function(){m(e);let r=d();return g(r.closed.emit())}),p(199,"Cancel"),y(),b(200,"button",34),F("click",function(){m(e);let r=d();return g(r.save())}),p(201),y()()}if(n&2){let e,i=d();c(10),$("checked",i.autoReload()),c(7),$("checked",i.showGraph()),c(7),$("checked",i.showStashes()),c(7),$("checked",i.showTags()),c(7),$("checked",i.showRemoteBranches()),c(7),$("checked",i.sidePanelSectionsExpanded()),c(7),$("value",i.searchMode()),c(11),$("checked",i.searchCaseSensitive()),c(8),P(i.identity().name||"Not configured"),c(4),P(i.identity().email||"Not configured"),c(4),$("disabled",i.busy()),c(15),q(i.remotes()),c(11),D((e=i.settings().issueLinking)?105:106,e),c(6),$("checked",i.refListView()==="flat"),c(7),$("checked",i.refListView()==="tree"),c(10),$("checked",i.fileListView()==="flat"),c(7),$("checked",i.fileListView()==="tree"),c(15),$("value",i.worktreeSort()),c(),q(i.worktreeSortOptions),c(8),$("value",i.prSort()),c(),q(i.prSortOptions),c(11),$("value",i.azureDevOpsUrl()),c(7),$("value",i.prBranchNameTemplate()),c(7),$("checked",i.allowMerge()),c(10),$("checked",i.aiReviewEnabled()),c(),D(i.aiReviewEnabled()?196:-1),c(2),$("disabled",i.saving()),c(2),$("disabled",i.saving()||i.busy()),c(),P(i.saving()?"Saving...":"Save settings")}}function hR(n,t){if(n&1){let e=I();b(0,"label",66)(1,"span")(2,"strong"),p(3,"User name"),y()(),b(4,"input",67),F("input",function(r){m(e);let o=d(2);return g(o.userName.set(r.target.value))}),y()(),b(5,"label",66)(6,"span")(7,"strong"),p(8,"User email"),y()(),b(9,"input",68),F("input",function(r){m(e);let o=d(2);return g(o.userEmail.set(r.target.value))}),y()()}if(n&2){let e=d(2);c(4),$("value",e.userName()),c(5),$("value",e.userEmail())}}function mR(n,t){if(n&1){let e=I();b(0,"label",66)(1,"span")(2,"strong"),p(3,"Remote name"),y()(),b(4,"input",69),F("input",function(r){m(e);let o=d(2);return g(o.remoteName.set(r.target.value))}),y()(),b(5,"label",66)(6,"span")(7,"strong"),p(8,"Fetch URL"),y()(),b(9,"input",70),F("input",function(r){m(e);let o=d(2);return g(o.fetchUrl.set(r.target.value))}),y()(),b(10,"label",66)(11,"span")(12,"strong"),p(13,"Push URL"),y(),b(14,"small"),p(15,"Leave blank to use the fetch URL."),y()(),b(16,"input",71),F("input",function(r){m(e);let o=d(2);return g(o.pushUrl.set(r.target.value))}),y()()}if(n&2){let e=d(2);c(4),$("value",e.remoteName()),c(5),$("value",e.fetchUrl()),c(7),$("value",e.pushUrl())}}function gR(n,t){if(n&1){let e=I();b(0,"p",20),p(1,"For example, regex "),b(2,"code"),p(3,"#(\\d+)"),y(),p(4," and URL "),b(5,"code"),p(6,"https://github.com/owner/repo/issues/$1"),y(),p(7," turn #123 into a link."),y(),b(8,"label",66)(9,"span")(10,"strong"),p(11,"Issue regex"),y()(),b(12,"input",72),F("input",function(r){m(e);let o=d(2);return g(o.issueRegex.set(r.target.value))}),y()(),b(13,"label",66)(14,"span")(15,"strong"),p(16,"Issue URL"),y()(),b(17,"input",73),F("input",function(r){m(e);let o=d(2);return g(o.issueUrl.set(r.target.value))}),y()(),b(18,"label",21)(19,"input",8),F("change",function(r){m(e);let o=d(2);return g(o.issueGlobal.set(r.target.checked))}),y(),b(20,"span")(21,"strong"),p(22,"Use globally"),y(),b(23,"small"),p(24,"Apply this rule to repositories without their own rule."),y()()()}if(n&2){let e=d(2);c(12),$("value",e.issueRegex()),c(5),$("value",e.issueUrl()),c(2),$("checked",e.issueGlobal())}}function _R(n,t){if(n&1){let e=I();b(0,"div",65),E(1,hR,10,2)(2,mR,17,3)(3,gR,25,3),y(),b(4,"footer")(5,"button",33),F("click",function(){m(e);let r=d();return g(r.mode.set("main"))}),p(6,"Cancel"),y(),b(7,"button",34),F("click",function(){m(e);let r=d();return g(r.mode()==="identity"?r.saveIdentity():r.mode()==="remote"?r.saveRemote():r.saveIssueLinking())}),p(8),y()()}if(n&2){let e=d();c(),D(e.mode()==="identity"?1:e.mode()==="remote"?2:3),c(4),$("disabled",e.busy()),c(2),$("disabled",e.busy()),c(),P(e.busy()?"Saving...":"Save")}}var Ad=class n{git=R(et);settings=N.required();identity=N.required();saving=N(!1);saved=Z();settingsUpdated=Z();identityChanged=Z();repositoryChanged=Z();closed=Z();azureDevOpsUrl=v("");prBranchNameTemplate=v("pr/${randomstring}");autoReload=v(!0);showGraph=v(!0);showStashes=v(!1);showTags=v(!0);showRemoteBranches=v(!0);fileListView=v("flat");refListView=v("flat");sidePanelSectionsExpanded=v(!0);searchMode=v("navigate");searchCaseSensitive=v(!1);worktreeSort=v("default");prSort=v("newest");worktreeSortOptions=Wy;prSortOptions=qy;allowMerge=v(!0);aiReviewEnabled=v(!1);aiReviewScope=v("reviewer");aiReviewPollMinutes=v(30);aiReviewIncludeDrafts=v(!1);aiReviewClaudePath=v("");aiReviewModel=v("");aiReviewCommitMessageModel=v("haiku");aiReviewEffort=v("high");aiReviewCommitMessageEffort=v("low");aiReviewCommitMessageStyle=v("oneliner");commitMessageStyleOptions=Zy;effortOptions=xa;aiReviewInstructions=v("");remotes=v([]);busy=v(!1);error=v("");mode=v("main");userName=v("");userEmail=v("");originalRemoteName=v("");remoteName=v("");fetchUrl=v("");pushUrl=v("");issueRegex=v("");issueUrl=v("");issueGlobal=v(!1);remotesLoaded=!1;constructor(){ge(()=>{let t=this.settings();this.azureDevOpsUrl.set(t.azureDevOpsUrl??""),this.prBranchNameTemplate.set(t.prBranchNameTemplate??"pr/${randomstring}"),this.autoReload.set(t.autoReload!==!1),this.showGraph.set(t.showGraph!==!1),this.showStashes.set(t.showStashes===!0),this.showTags.set(t.showTags!==!1),this.showRemoteBranches.set(t.showRemoteBranches!==!1),this.fileListView.set(t.fileListView==="tree"?"tree":"flat"),this.refListView.set(t.refListView==="tree"?"tree":"flat"),this.sidePanelSectionsExpanded.set(t.sidePanelSectionsExpanded!==!1),this.searchMode.set(t.searchMode==="filter"?"filter":"navigate"),this.searchCaseSensitive.set(t.searchCaseSensitive===!0),this.worktreeSort.set(t.worktreeSort==="name-asc"||t.worktreeSort==="name-desc"?t.worktreeSort:"default"),this.prSort.set(t.prSort==="oldest"||t.prSort==="title-asc"||t.prSort==="title-desc"?t.prSort:"newest"),this.allowMerge.set(t.allowMerge!==!1);let e=t.aiReview;this.aiReviewEnabled.set(e?.enabled===!0),this.aiReviewScope.set(e?.scope??"reviewer"),this.aiReviewPollMinutes.set(e?.pollMinutes??30),this.aiReviewIncludeDrafts.set(e?.includeDrafts===!0),this.aiReviewClaudePath.set(e?.claudePath??""),this.aiReviewModel.set(e?.model??"opus"),this.aiReviewCommitMessageModel.set(e?.commitMessageModel||"haiku"),this.aiReviewEffort.set(e?.effort??"high"),this.aiReviewCommitMessageEffort.set(e?.commitMessageEffort??"low"),this.aiReviewCommitMessageStyle.set(e?.commitMessageStyle??"oneliner"),this.aiReviewInstructions.set(e?.instructions??""),this.remotesLoaded||(this.remotesLoaded=!0,this.loadRemotes())})}onEscape(){this.saving()||this.busy()||(this.mode()==="main"?this.closed.emit():this.mode.set("main"))}setChecked(t,e){this[e].set(t.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(),refListView:this.refListView(),sidePanelSectionsExpanded:this.sidePanelSectionsExpanded(),searchMode:this.searchMode(),searchCaseSensitive:this.searchCaseSensitive(),worktreeSort:this.worktreeSort(),prSort:this.prSort(),allowMerge:this.allowMerge(),aiReview:{enabled:this.aiReviewEnabled(),scope:this.aiReviewScope(),pollMinutes:Number(this.aiReviewPollMinutes())||30,includeDrafts:this.aiReviewIncludeDrafts(),claudePath:this.aiReviewClaudePath().trim(),model:this.aiReviewModel(),commitMessageModel:this.aiReviewCommitMessageModel(),effort:this.aiReviewEffort(),commitMessageEffort:this.aiReviewCommitMessageEffort(),commitMessageStyle:this.aiReviewCommitMessageStyle(),instructions:this.aiReviewInstructions()}})}changeAiReviewScope(t){let e=t.value;this.aiReviewScope.set(e==="mine"||e==="all"?e:"reviewer")}aiReviewModelOptions=O(()=>{let t=this.aiReviewModel().trim();return t&&!Ii.some(e=>e.value===t)?[...Ii,{value:t,label:t}]:Ii});commitMessageModelOptions=O(()=>{let t=this.aiReviewCommitMessageModel().trim();return t&&!pd.some(e=>e.value===t)?[...pd,{value:t,label:t}]:pd});changeAiReviewModel(t){this.aiReviewModel.set(t.value)}changeAiReviewCommitMessageModel(t){this.aiReviewCommitMessageModel.set(t.value)}changeAiReviewCommitMessageStyle(t){let e=t.value;this.aiReviewCommitMessageStyle.set(e==="brief"||e==="descriptive"?e:"oneliner")}changeSearchMode(t){let e=t.value;this.searchMode.set(e==="filter"?"filter":"navigate")}changeWorktreeSort(t){let e=t.value;this.worktreeSort.set(e==="name-asc"||e==="name-desc"?e:"default")}changePrSort(t){let e=t.value;this.prSort.set(e==="oldest"||e==="title-asc"||e==="title-desc"?e:"newest")}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()}),t=>{this.identityChanged.emit(t),this.repositoryChanged.emit(),this.mode.set("main")})}removeIdentity(){window.confirm("Remove the repository-specific Git user name and email?")&&this.run(this.git.removeIdentity(),t=>{this.identityChanged.emit(t),this.repositoryChanged.emit()})}editRemote(t){this.originalRemoteName.set(t?.name??""),this.remoteName.set(t?.name??""),this.fetchUrl.set(t?.fetchUrl??""),this.pushUrl.set(t?.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()}),t=>{this.remotes.set(t),this.repositoryChanged.emit(),this.mode.set("main")})}removeRemote(t){window.confirm(`Remove the remote "${t}" from this repository?`)&&this.run(this.git.removeRemote(t),e=>{this.remotes.set(e),this.repositoryChanged.emit()})}editIssueLinking(){let t=this.settings().issueLinking;this.issueRegex.set(t?.regex??"#(\\d+)"),this.issueUrl.set(t?.url??""),this.issueGlobal.set(t?.useGlobally??!1),this.error.set(""),this.mode.set("issue")}saveIssueLinking(){let t={regex:this.issueRegex().trim(),url:this.issueUrl().trim(),useGlobally:this.issueGlobal()};this.run(this.git.saveSettings({issueLinking:t}),e=>{this.settingsUpdated.emit(e),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}),t=>this.settingsUpdated.emit(t))}loadRemotes(){this.git.getRemotes().subscribe({next:t=>this.remotes.set(t),error:t=>this.error.set(this.errorMessage(t))})}run(t,e){this.busy()||(this.busy.set(!0),this.error.set(""),t.subscribe({next:i=>{this.busy.set(!1),e(i)},error:i=>{this.busy.set(!1),this.error.set(this.errorMessage(i))}}))}errorMessage(t){return t?.error?.error??t?.message??"The setting could not be saved."}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-settings-dialog"]],hostBindings:function(e,i){e&1&&C("keydown.escape",function(){return i.onEscape()},qe)},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","ref-view",3,"change","checked"],["type","radio","name","file-view",3,"change","checked"],["for","worktree-sort",1,"setting-row"],["id","worktree-sort",3,"change","value"],[3,"value"],["for","pr-sort",1,"setting-row"],["id","pr-sort",3,"change","value"],["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"],["for","ai-review-scope",1,"text-setting"],["id","ai-review-scope",3,"change","value"],["value","reviewer"],["value","mine"],["value","all"],["for","ai-review-poll",1,"text-setting"],["id","ai-review-poll","type","number","min","1","max","240",3,"input","value"],["for","ai-review-path",1,"text-setting"],["id","ai-review-path","type","text","placeholder","claude",3,"input","value"],["for","ai-review-model",1,"text-setting"],["id","ai-review-model",3,"change","value"],[3,"value","selected"],["for","ai-review-effort",1,"text-setting"],["id","ai-review-effort",3,"change","value"],["for","ai-review-message-model",1,"text-setting"],["id","ai-review-message-model",3,"change","value"],["for","ai-review-message-effort",1,"text-setting"],["id","ai-review-message-effort",3,"change","value"],["for","ai-review-message-style",1,"text-setting"],["id","ai-review-message-style",3,"change","value"],["for","ai-review-instructions",1,"text-setting"],["id","ai-review-instructions","rows","3",3,"input","value"],[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(e,i){e&1&&(b(0,"div",0),F("click",function(){return!i.saving()&&!i.busy()&&i.closed.emit()}),y(),b(1,"section",1)(2,"header",2)(3,"div")(4,"h2",3),p(5),y(),E(6,J2,2,0,"p"),y(),b(7,"button",4),F("click",function(){return i.closed.emit()}),p(8,"\xD7"),y()(),E(9,eR,2,1,"div",5),E(10,fR,202,27)(11,_R,9,4),y()),e&2&&(c(5),P(i.mode()==="main"?"Settings":i.mode()==="identity"?"Edit User Details":i.mode()==="remote"?i.originalRemoteName()?"Edit Remote":"Add Remote":"Issue Linking"),c(),D(i.mode()==="main"?6:-1),c(),$("disabled",i.saving()||i.busy()),c(2),D(i.error()?9:-1),c(),D(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 vR=["inputEl"],bR=["searchEl"],yR=(n,t)=>t.value;function xR(n,t){if(n&1&&(b(0,"p",5),p(1),y()),n&2){let e=d();c(),P(e.label)}}function CR(n,t){if(n&1){let e=I();b(0,"input",13,0),F("input",function(r){m(e);let o=d(3);return g(o.onSearch(r))})("keydown.enter",function(r){m(e);let o=d(3);return g(o.onSearchEnter(r))}),y()}if(n&2){let e=d(3);$("value",e.search())}}function wR(n,t){if(n&1&&(b(0,"span",18),p(1),y()),n&2){let e=d().$implicit;c(),P(e.description)}}function ER(n,t){if(n&1){let e=I();b(0,"button",14),F("click",function(){let r=m(e).$implicit,o=d(3);return g(o.choose(r))})("dblclick",function(){m(e);let r=d(3);return g(r.confirm())}),te(1,"span",15),b(2,"span",16)(3,"span",17),p(4),y(),E(5,wR,2,1,"span",18),y()()}if(n&2){let e=t.$implicit,i=d(3);J("selected",i.choice()===e.value)("danger",e.danger),Q("aria-checked",i.choice()===e.value),c(4),P(e.label),c(),D(e.description?5:-1)}}function DR(n,t){n&1&&(b(0,"p",12),p(1,"No matching branches"),y())}function SR(n,t){if(n&1&&(E(0,CR,2,1,"input",9),b(1,"div",10),W(2,ER,6,7,"button",11,yR,!1,DR,2,0,"p",12),y()),n&2){let e=d(),i=d();D(e.searchable?0:-1),c(2),q(i.filteredOptions())}}function MR(n,t){if(n&1){let e=I();b(0,"label",19),p(1),y(),b(2,"input",20,1),F("input",function(r){m(e);let o=d(2);return g(o.onInput(r))})("keydown.enter",function(){m(e);let r=d(2);return g(r.confirm())}),y()}if(n&2){let e=d(),i=d();c(),P(e.label||e.title),c(),$("value",i.value()),Q("placeholder",e.placeholder||" ")("aria-label",e.label||e.title)}}function TR(n,t){if(n&1){let e=I();b(0,"div",2),F("click",function(){m(e);let r=d();return g(r.cancelled.emit())}),y(),b(1,"div",3)(2,"h3",4),p(3),y(),E(4,xR,2,1,"p",5),E(5,SR,5,2)(6,MR,4,4),b(7,"div",6)(8,"button",7),F("click",function(){m(e);let r=d();return g(r.cancelled.emit())}),p(9,"Cancel"),y(),b(10,"button",8),F("click",function(){m(e);let r=d();return g(r.confirm())}),p(11),y()()()}if(n&2){let e=t,i=d();c(3),P(e.title),c(),D(e.label?4:-1),c(),D(i.options().length>0?5:e.confirmOnly?-1:6),c(5),J("btn-danger",e.danger),$("disabled",i.options().length===0&&!e.confirmOnly&&!e.allowEmpty&&!i.value().trim()||e.searchable&&i.filteredOptions().length===0),c(),H(" ",e.okLabel||"OK"," ")}}var Go=class n{state=N.required();confirmed=Z();cancelled=Z();value=v("");choice=v("");options=O(()=>this.state()?.options??[]);search=v("");filteredOptions=O(()=>{let t=this.search().trim().toLowerCase(),e=this.options();return t?e.filter(i=>i.label.toLowerCase().includes(t)||i.value.toLowerCase().includes(t)):e});inputEl=dt("inputEl");searchEl=dt("searchEl");constructor(){ge(()=>{let t=this.state();t&&(this.value.set(t.value??""),this.choice.set(t.options?.[0]?.value??""),this.search.set(""));let e=this.inputEl()??this.searchEl();t&&e&&(e.nativeElement.focus(),e.nativeElement.select())})}onEscape(){this.state()&&this.cancelled.emit()}onInput(t){this.value.set(t.target.value)}choose(t){this.choice.set(t.value)}onSearch(t){this.search.set(t.target.value);let e=this.filteredOptions();e.length&&!e.some(i=>i.value===this.choice())&&this.choice.set(e[0].value)}onSearchEnter(t){t.preventDefault(),this.filteredOptions().length>0&&this.confirm()}confirm(){let t=this.state();if(t){if(t.options?.length){this.confirmed.emit(this.choice());return}!t.confirmOnly&&!t.allowEmpty&&!this.value().trim()||this.confirmed.emit(t.confirmOnly?"":this.value().trim())}}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-prompt-dialog"]],viewQuery:function(e,i){e&1&&(st(i.inputEl,vR,5),st(i.searchEl,bR,5)),e&2&&Rt(2)},hostBindings:function(e,i){e&1&&C("keydown.escape",function(){return i.onEscape()},qe)},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(e,i){if(e&1&&E(0,TR,12,7),e&2){let r;D((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})};var kR=["host"],IR=["composerInput"],Xx=(n,t)=>t.id;function PR(n,t){n&1&&(u(0,"div",3),p(1,"Loading diff..."),f())}function OR(n,t){if(n&1&&(u(0,"div",4),p(1),f()),n&2){let e=d();c(),P(e.error())}}function RR(n,t){if(n&1&&(u(0,"div",4),p(1),f()),n&2){let e=d();c(),P(e.editorError())}}function NR(n,t){n&1&&(u(0,"div",5),p(1,"Binary file not shown."),f())}function AR(n,t){n&1&&(u(0,"div",7),p(1,"Loading diff..."),f())}function LR(n,t){if(n&1){let e=I();u(0,"button",13),C("click",function(){m(e);let r=d(4);return g(r.openComposer())}),p(1," Add comment "),f()}}function FR(n,t){if(n&1&&(u(0,"div",20),j(1,"app-author-avatar",28),u(2,"div",29)(3,"div",30)(4,"span",31),p(5),f(),p(6),f(),j(7,"app-markdown-text",32),f()()),n&2){let e=t.$implicit,i=d(6);c(),S("name",e.author.name)("email",e.author.email||""),c(4),P(e.author.name),c(),H(" ",i.formatDate(e.createdAt)," "),c(),S("markdown",e.content)}}function VR(n,t){if(n&1&&(u(0,"option",27),p(1),f()),n&2){let e=t.$implicit,i=d(2).$implicit,r=d(4);S("value",e)("selected",e===i.status),c(),H(" ",r.statusLabel(e)," ")}}function BR(n,t){if(n&1){let e=I();u(0,"div",19),W(1,FR,8,5,"div",20,Xx),u(3,"div",21)(4,"input",22),C("input",function(r){m(e);let o=d().$implicit,s=d(4);return g(s.setReplyDraft(o.id,r))})("keydown.enter",function(){m(e);let r=d().$implicit,o=d(4);return g(o.sendReply(r.id))}),f(),u(5,"button",23),C("click",function(){m(e);let r=d().$implicit,o=d(4);return g(o.sendReply(r.id))}),p(6," Reply "),f()(),u(7,"div",24)(8,"label",25),p(9," Status "),u(10,"select",26),C("change",function(r){m(e);let o=d().$implicit,s=d(4);return g(s.onStatusChange(o,r))}),W(11,VR,2,3,"option",27,jt),f()()()()}if(n&2){let e=d().$implicit,i=d(4);c(),q(e.comments),c(3),S("value",i.replyDraft(e.id))("disabled",i.posting()),c(),S("disabled",i.posting()||!i.replyDraft(e.id).trim()),c(5),S("value",e.status)("disabled",i.posting()),c(),q(i.threadStatuses)}}function jR(n,t){if(n&1){let e=I();u(0,"div",14)(1,"button",15),C("click",function(){let r=m(e).$implicit,o=d(4);return g(o.toggleThread(r.id))}),u(2,"span",16),p(3),f(),u(4,"span",17),p(5),f(),u(6,"span",18),p(7),f()(),E(8,BR,13,5,"div",19),f()}if(n&2){let e=t.$implicit,i=d(4);J("expanded",i.isExpanded(e.id)),S("id","pr-thread-"+e.id),c(2),Xe("status-"+e.status),c(),H(" ",i.statusLabel(e.status)," "),c(2),H(" ",i.threadPreview(e)," "),c(2),P(e.comments.length),c(),D(i.isExpanded(e.id)?8:-1)}}function $R(n,t){if(n&1){let e=I();u(0,"div",12)(1,"header",33)(2,"span",34),p(3,"New comment"),f(),u(4,"span",35),p(5,"Markdown supported"),f()(),u(6,"div",36)(7,"textarea",37,1),C("input",function(r){m(e);let o=d(4);return g(o.composerText.set(r.target.value))})("keydown",function(r){m(e);let o=d(4);return g(o.onComposerKeydown(r))}),f(),u(9,"div",38)(10,"span",39)(11,"kbd"),p(12,"Ctrl"),f(),p(13,"+"),u(14,"kbd"),p(15,"Enter"),f(),p(16," to comment "),f(),u(17,"span",40)(18,"button",41),C("click",function(){m(e);let r=d(4);return g(r.closeComposer())}),p(19,"Cancel"),f(),u(20,"button",42),C("click",function(){m(e);let r=d(4);return g(r.submitComposer())}),p(21," Comment "),f()()()()()}if(n&2){let e=d(4);c(7),S("value",e.composerText()),c(13),S("disabled",e.posting()||!e.composerText().trim())}}function HR(n,t){if(n&1&&(u(0,"section",8)(1,"header",9)(2,"strong"),p(3),f(),E(4,LR,2,0,"button",10),f(),W(5,jR,9,9,"div",11,Xx),E(7,$R,22,2,"div",12),f()),n&2){let e=d(3);c(3),P(e.selectionLabel()),c(),D(e.composerOpen()?-1:4),c(),q(e.selectedThreads()),c(2),D(e.composerOpen()?7:-1)}}function zR(n,t){if(n&1&&(j(0,"div",6,0),E(2,AR,2,0,"div",7),E(3,HR,8,3,"section",8)),n&2){let e=d(2);c(2),D(e.editorLoading()?2:-1),c(),D(e.selection()?3:-1)}}function UR(n,t){if(n&1&&E(0,NR,2,0,"div",5)(1,zR,4,2),n&2){let e=t;D(e.status==="binary"||e.binary?0:1)}}function GR(n,t){n&1&&(u(0,"div",5),p(1,"Select a file to view its changes."),f())}var WR=0,Kx={active:"Active",fixed:"Resolved",wontFix:"Won't fix",closed:"Closed",byDesign:"By design",pending:"Pending"},Ld=class n{monacoService=R(Fo);host=dt("host");composerInput=dt("composerInput");diff=N(null);threads=N([]);loading=N(!1);error=N("");posting=N(!1);focus=N(null);commentSubmit=Z();replySubmit=Z();statusSubmit=Z();threadStatuses=Object.keys(Kx);editorLoading=v(!1);editorError=v("");selection=v(null);composerOpen=v(!1);composerText=v("");expanded=v({});replyDrafts=v({});viewReady=!1;destroyed=!1;renderVersion=0;editor=null;models=[];disposables=[];decorations=[];minimapMarks=null;threadsByAnchor=O(()=>{let t=new Map;for(let e of this.threads()){if(!e.filePath||e.line===null||!e.side)continue;let i=`${e.side}:${e.line}`;t.set(i,[...t.get(i)??[],e])}return t});selectedThreads=O(()=>{let t=this.selection();if(!t)return[];let e=[];for(let i=t.line;i<=t.endLine;i+=1)e.push(...this.threadsByAnchor().get(`${t.side}:${i}`)??[]);return e});constructor(){ge(()=>{let t=this.diff();this.viewReady&&queueMicrotask(()=>{this.renderDiff(t)})}),ge(()=>{this.threads(),this.viewReady&&this.updateThreadDecorations()}),ge(()=>{let t=this.focus();if(!t)return;let e=this.threadsByAnchor().get(`${t.side}:${t.line}`)??[],i={};for(let r of e)i[r.id]=!0;Object.keys(i).length&&this.expanded.update(r=>z(z({},r),i)),this.selection.set(ie(z({},t),{endLine:t.line})),queueMicrotask(()=>this.revealSelection(t))})}ngAfterViewInit(){this.viewReady=!0,queueMicrotask(()=>{this.renderDiff(this.diff())})}ngOnDestroy(){this.destroyed=!0,this.disposeEditor()}openComposer(){this.selection()&&(this.composerOpen.set(!0),this.composerText.set(""),setTimeout(()=>this.composerInput()?.nativeElement.focus()))}onComposerKeydown(t){t.key==="Enter"&&(t.ctrlKey||t.metaKey)?(t.preventDefault(),this.submitComposer()):t.key==="Escape"&&(t.preventDefault(),t.stopPropagation(),this.closeComposer())}submitComposer(){let t=this.selection(),e=this.composerText().trim();!t||!e||(this.commentSubmit.emit(ie(z({filePath:this.diff()?.path??""},t),{content:e})),this.closeComposer())}closeComposer(){this.composerOpen.set(!1),this.composerText.set("")}selectionLabel(){let t=this.selection();if(!t)return"";let e=t.side==="left"?"original":"modified";return t.line===t.endLine?`${e} line ${t.line}`:`${e} lines ${t.line}-${t.endLine}`}isExpanded(t){return this.expanded()[t]===!0}toggleThread(t){this.expanded.update(e=>ie(z({},e),{[t]:!e[t]}))}replyDraft(t){return this.replyDrafts()[t]??""}setReplyDraft(t,e){let i=e.target.value;this.replyDrafts.update(r=>ie(z({},r),{[t]:i}))}sendReply(t){let e=this.replyDraft(t).trim();e&&this.replySubmit.emit({threadId:t,content:e})}onStatusChange(t,e){let i=e.target.value;i&&i!==t.status&&this.statusSubmit.emit({threadId:t.id,status:i})}statusLabel(t){return Kx[t]??t}threadPreview(t){let e=t.comments[0];return e?`${e.author.name}: ${e.content}`:"Review comment"}formatDate(t){if(!t)return"";let e=new Date(t);return Number.isNaN(e.getTime())?"":e.toLocaleString()}renderDiff(t){return Qt(this,null,function*(){let e=++this.renderVersion;if(this.disposeEditor(),this.selection.set(null),this.composerOpen.set(!1),this.editorError.set(""),!(!t||t.binary||t.status==="binary")){this.editorLoading.set(!0);try{let i=yield this.monacoService.load();if(this.destroyed||e!==this.renderVersion)return;let r=this.host();if(!r)return;let o=++WR,s=(t.oldPath||t.path).replace(/^\/+/,""),a=t.path.replace(/^\/+/,""),l=i.editor.createModel(t.originalContent??this.contentFromLines(t,"left"),void 0,i.Uri.parse(`inmemory://pr-diff/${o}/original/${s}`)),h=i.editor.createModel(t.modifiedContent??this.contentFromLines(t,"right"),void 0,i.Uri.parse(`inmemory://pr-diff/${o}/modified/${a}`));this.models=[l,h],this.editor=i.editor.createDiffEditor(r.nativeElement,{theme:"guito",readOnly:!0,originalEditable:!1,renderSideBySide:!0,ignoreTrimWhitespace:!1,automaticLayout:!0,fontSize:12,fontFamily:"ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace",minimap:{enabled:!1},glyphMargin:!0,scrollBeyondLastLine:!1,renderOverviewRuler:!1,hideUnchangedRegions:{enabled:!0,contextLineCount:3},scrollbar:{verticalScrollbarSize:10,horizontalScrollbarSize:10},padding:{top:8}}),this.editor.setModel({original:l,modified:h}),this.minimapMarks=null,this.applyMinimapOptions(),this.editor.onDidUpdateDiff(()=>this.applyMinimapMarks()),this.watchSelection(this.editor.getOriginalEditor(),"left"),this.watchSelection(this.editor.getModifiedEditor(),"right"),this.updateThreadDecorations();let _=this.focus();_&&(this.selection.set(ie(z({},_),{endLine:_.line})),this.revealSelection(_))}catch{e===this.renderVersion&&this.editorError.set("Failed to load the diff viewer.")}finally{e===this.renderVersion&&this.editorLoading.set(!1)}}})}applyMinimapOptions(){this.editor&&this.editor.getModifiedEditor().updateOptions({minimap:fd(!0)})}applyMinimapMarks(){this.editor&&(this.minimapMarks||(this.minimapMarks=this.editor.getModifiedEditor().createDecorationsCollection()),this.minimapMarks.set(hd(this.editor.getLineChanges()??[])))}watchSelection(t,e){this.disposables.push(t.onDidChangeCursorSelection(i=>{let r=i.selection;this.selection.set({line:Math.min(r.startLineNumber,r.endLineNumber),endLine:Math.max(r.startLineNumber,r.endLineNumber),side:e}),this.composerOpen.set(!1)}))}updateThreadDecorations(){if(!this.editor)return;for(let e of this.decorations)e.clear();let t=e=>this.threads().filter(i=>i.side===e&&i.line!==null).map(i=>({range:{startLineNumber:i.line,startColumn:1,endLineNumber:i.line,endColumn:1},options:{isWholeLine:!0,glyphMarginClassName:"pr-thread-glyph",glyphMarginHoverMessage:{value:"Review comment"}}}));this.decorations=[this.editor.getOriginalEditor().createDecorationsCollection(t("left")),this.editor.getModifiedEditor().createDecorationsCollection(t("right"))]}revealSelection(t){if(!this.editor)return;let e=t.side==="left"?this.editor.getOriginalEditor():this.editor.getModifiedEditor();e.setPosition({lineNumber:t.line,column:1}),e.revealLineInCenter(t.line),e.focus()}contentFromLines(t,e){return t.lines.filter(i=>i.type==="context"||(e==="left"?i.type==="del":i.type==="add")).map(i=>i.text).join(`
64
+ `)}disposeEditor(){for(let t of this.disposables)t.dispose();this.disposables=[];for(let t of this.decorations)t.clear();this.decorations=[],this.minimapMarks=null,this.editor?.dispose(),this.editor=null;for(let t of this.models)t.dispose();this.models=[]}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-pr-file-diff"]],viewQuery:function(e,i){e&1&&(st(i.host,kR,5),st(i.composerInput,IR,5)),e&2&&Rt(2)},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:6,vars:1,consts:[["host",""],["composerInput",""],[1,"file-diff"],["role","status",1,"diff-status"],["role","alert",1,"diff-status","error"],[1,"diff-status"],[1,"editor-host"],["role","status",1,"editor-loading"],["aria-label","Line review",1,"review-panel"],[1,"selection-head"],["type","button",1,"btn","small","primary"],[1,"thread",3,"id","expanded"],[1,"composer"],["type","button",1,"btn","small","primary",3,"click"],[1,"thread",3,"id"],["type","button",1,"thread-head",3,"click"],[1,"thread-status"],[1,"thread-preview"],[1,"thread-count"],[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-head"],[1,"composer-title"],[1,"composer-target"],[1,"composer-body"],["rows","3","placeholder","Leave a comment...",1,"composer-text",3,"input","keydown","value"],[1,"composer-actions"],[1,"composer-hint"],[1,"composer-buttons"],["type","button",1,"btn","small",3,"click"],["type","button",1,"btn","small","primary",3,"click","disabled"]],template:function(e,i){if(e&1&&(u(0,"div",2),E(1,PR,2,0,"div",3)(2,OR,2,1,"div",4)(3,RR,2,1,"div",4)(4,UR,2,1)(5,GR,2,0,"div",5),f()),e&2){let r;c(),D(i.loading()&&!i.diff()?1:i.error()?2:i.editorError()?3:(r=i.diff())?4:5,r)}},dependencies:[Vn,Ri],styles:["[_nghost-%COMP%]{display:block;min-width:0;min-height:0}.file-diff[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;height:100%;min-height:0;background:var(--bg-alt)}.editor-host[_ngcontent-%COMP%]{flex:1;min-height:220px}.editor-loading[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:var(--bg-alt);color:var(--text-dim);font-size:13px}.diff-status[_ngcontent-%COMP%]{padding:16px;color:var(--text-dim);font-size:13px}.diff-status.error[_ngcontent-%COMP%]{color:var(--red)}.review-panel[_ngcontent-%COMP%]{flex:none;max-height:42%;overflow:auto;padding:8px 10px;border-top:1px solid var(--border);background:var(--bg)}.selection-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:28px;color:var(--text-dim);font-size:11px}.thread[_ngcontent-%COMP%], .composer[_ngcontent-%COMP%]{margin-top:6px;border:1px solid var(--border);border-radius:4px;background:var(--bg-alt);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}.thread-head[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.thread-status[_ngcontent-%COMP%]{flex:none;border-radius:3px;padding:1px 5px;font-size:10px;font-weight:600;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;color:var(--text-dim);text-overflow:ellipsis;white-space:nowrap}.thread-count[_ngcontent-%COMP%]{flex:none;color:var(--text-dim);font-size:11px}.thread-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:8px;border-top:1px solid var(--border)}.comment[_ngcontent-%COMP%]{display:flex;gap:8px}.comment-main[_ngcontent-%COMP%]{flex:1;min-width:0}.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);color:var(--text)}.reply-input[_ngcontent-%COMP%]:focus, .composer-text[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 2px #3794ff40}.thread-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:6px}.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;border:1px solid var(--border);border-radius:3px;background:var(--bg);color:var(--text)}.composer[_ngcontent-%COMP%]{border-color:#3794ffa6;box-shadow:0 2px 10px #00000059}.composer-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 10px;border-bottom:1px solid var(--border);background:var(--bg)}.composer-title[_ngcontent-%COMP%]{color:var(--text-bright);font-size:12px;font-weight:600}.composer-target[_ngcontent-%COMP%]{color:var(--text-dim);font-size:11px}.composer-body[_ngcontent-%COMP%]{padding:8px 10px 10px}.composer-text[_ngcontent-%COMP%]{display:block;width:100%;min-height:66px;padding:7px 9px;box-sizing:border-box;border:1px solid var(--border);border-radius:4px;background:var(--bg);color:var(--text);font:inherit;line-height:1.5;resize:vertical;transition:border-color .12s ease,box-shadow .12s ease}.composer-text[_ngcontent-%COMP%]::placeholder{color:var(--text-dim)}.composer-actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px}.composer-hint[_ngcontent-%COMP%]{color:var(--text-dim);font-size:11px}.composer-hint[_ngcontent-%COMP%] kbd[_ngcontent-%COMP%]{padding:1px 4px;border:1px solid var(--border);border-radius:3px;background:var(--bg);font-family:var(--mono);font-size:10px}.composer-buttons[_ngcontent-%COMP%]{display:flex;gap:6px}.btn[_ngcontent-%COMP%]{height:26px;padding:0 11px;border:1px solid var(--border);border-radius:4px;background:var(--bg-alt);color:var(--text);font:inherit;font-size:12px;cursor:pointer}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.btn[_ngcontent-%COMP%]:disabled{opacity:.55;cursor:default}.btn.primary[_ngcontent-%COMP%]:disabled{border-color:var(--border);background:var(--bg-alt);color:var(--text-dim);opacity:1}.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:24px;padding:0 10px;font-size:12px}[_nghost-%COMP%] .pr-thread-glyph{background:var(--accent);border:3px solid var(--bg-alt);border-radius:50%}"],changeDetection:0})};var Om=()=>[],Bd=n=>({$implicit:n}),Fd=(n,t)=>t.value,ei=(n,t)=>t.id,qR=(n,t)=>t.path;function ZR(n,t){n&1&&(u(0,"div",5),p(1,"Loading pull request..."),f())}function YR(n,t){n&1&&(u(0,"span",12),p(1,"Draft"),f())}function QR(n,t){if(n&1){let e=I();u(0,"button",28),C("click",function(){m(e);let r=d(2);return g(r.publishPr())}),p(1," Publish "),f(),u(2,"button",29),C("click",function(){m(e);let r=d(2);return g(r.openAbandonConfirm())}),p(3," Abandon "),f()}if(n&2){let e=d(2);S("disabled",e.busy()),c(2),S("disabled",e.busy())}}function KR(n,t){if(n&1){let e=I();u(0,"button",34),C("click",function(){let r=m(e).$implicit,o=d(4);return g(o.vote(r.value))}),j(1,"span"),p(2),f()}if(n&2){let e=t.$implicit,i=d(3),r=d();J("current",r.voteMeta(i.myVote).cls==="vote-"+e.icon),c(),Xe("vote-dot vote-"+e.icon),c(),H("",e.label," ")}}function XR(n,t){if(n&1&&(u(0,"div",31),W(1,KR,3,5,"button",33,Fd),f()),n&2){let e=d(3);c(),q(e.voteOptions)}}function JR(n,t){if(n&1){let e=I();u(0,"button",29),C("click",function(){m(e);let r=d(3);return g(r.cancelAutoComplete())}),p(1," Cancel auto-complete "),f()}if(n&2){let e=d(3);S("disabled",e.busy())}}function eN(n,t){if(n&1){let e=I();u(0,"button",29),C("click",function(){m(e);let r=d(3);return g(r.openAutoComplete())}),p(1," Set auto-complete "),f()}if(n&2){let e=d(3);S("disabled",e.busy())}}function tN(n,t){if(n&1){let e=I();u(0,"div",30)(1,"button",29),C("click",function(){m(e);let r=d(2);return g(r.reviewMenuOpen.set(!r.reviewMenuOpen()))}),p(2," Review \u25BE "),f(),E(3,XR,3,0,"div",31),f(),E(4,JR,2,1,"button",32)(5,eN,2,1,"button",32),u(6,"button",28),C("click",function(){m(e);let r=d(2);return g(r.openComplete())}),p(7," Complete "),f()}if(n&2){let e=d(),i=d();c(),S("disabled",i.busy()),c(2),D(i.reviewMenuOpen()?3:-1),c(),D(e.autoCompleteSetBy?4:5),c(2),S("disabled",i.busy())}}function nN(n,t){if(n&1&&(u(0,"span",21),p(1),f()),n&2){let e=d(2);c(),P(e.pendingFindings().length)}}function iN(n,t){n&1&&(u(0,"span"),p(1,"..."),f())}function rN(n,t){if(n&1&&j(0,"app-error-banner",22),n&2){let e=d(2);S("message",e.error())}}function oN(n,t){if(n&1){let e=I();u(0,"div",36)(1,"div")(2,"strong"),p(3,"Merge conflicts"),f(),u(4,"p"),p(5," This pull request has conflicts with "),u(6,"code"),p(7),f(),p(8,". Resolve them before it can be completed. "),f()(),u(9,"button",57),C("click",function(){m(e);let r=d(3);return g(r.openInBrowser())}),p(10," Resolve in Azure DevOps "),f()()}if(n&2){let e=d(2);c(7),P(e.targetBranch)}}function sN(n,t){n&1&&(u(0,"div",37)(1,"div")(2,"strong"),p(3,"Blocked by policy"),f(),u(4,"p"),p(5," One or more merge policies reject this pull request. Check the checks below. "),f()()())}function aN(n,t){n&1&&(u(0,"div",37)(1,"div")(2,"strong"),p(3,"Merge failed"),f(),u(4,"p"),p(5," The last merge attempt failed. Check Azure DevOps for details. "),f()()())}function lN(n,t){n&1&&(u(0,"div",38)(1,"div")(2,"strong"),p(3,"Queued for merge"),f(),u(4,"p"),p(5,"The merge is in progress."),f()()())}function cN(n,t){n&1&&(u(0,"div",42),p(1,"Loading checks..."),f())}function dN(n,t){if(n&1){let e=I();u(0,"div",43)(1,"span"),p(2),f(),u(3,"button",41),C("click",function(){m(e);let r=d(3);return g(r.loadChecks())}),p(4," Retry "),f()()}if(n&2){let e=d(3);c(2),P(e.checksError()),c(),S("disabled",e.checksLoading())}}function uN(n,t){if(n&1&&(u(0,"div",58),p(1),f()),n&2){let e=t.$implicit;c(),P(e)}}function pN(n,t){if(n&1&&(u(0,"div",59),p(1),f()),n&2){let e=d(4);c(),P(e.requeueError())}}function fN(n,t){if(n&1&&Ct(0,62),n&2){let e=t.$implicit;d(5);let i=_t(49);S("ngTemplateOutlet",i)("ngTemplateOutletContext",Mi(2,Bd,e))}}function hN(n,t){if(n&1&&(u(0,"ul",60),W(1,fN,1,4,"ng-container",62,ei),f()),n&2){let e=d(5);c(),q(e.requiredChecks())}}function mN(n,t){n&1&&j(0,"hr",61)}function gN(n,t){if(n&1&&Ct(0,62),n&2){let e=t.$implicit;d(5);let i=_t(49);S("ngTemplateOutlet",i)("ngTemplateOutletContext",Mi(2,Bd,e))}}function _N(n,t){if(n&1&&(u(0,"ul",60),W(1,gN,1,4,"ng-container",62,ei),f()),n&2){let e=d(5);c(),q(e.optionalChecks())}}function vN(n,t){if(n&1&&(E(0,hN,3,0,"ul",60),E(1,mN,1,0,"hr",61),E(2,_N,3,0,"ul",60)),n&2){let e=d(4);D(e.requiredChecks().length?0:-1),c(),D(e.requiredChecks().length&&e.optionalChecks().length?1:-1),c(),D(e.optionalChecks().length?2:-1)}}function bN(n,t){n&1&&(u(0,"p",48),p(1,"No checks reported."),f())}function yN(n,t){if(n&1&&(W(0,uN,2,1,"div",58,jt),E(2,pN,2,1,"div",59),E(3,vN,3,3)(4,bN,2,0,"p",48)),n&2){let e=d(3);q(e.checksWarnings()),c(2),D(e.requeueError()?2:-1),c(),D(e.checks().length?3:4)}}function xN(n,t){if(n&1){let e=I();u(0,"button",57),C("click",function(){m(e);let r=d(3);return g(r.startEditing())}),p(1," Edit "),f()}}function CN(n,t){if(n&1){let e=I();u(0,"label"),p(1,"Title"),u(2,"input",63),C("input",function(r){m(e);let o=d(3);return g(o.editTitle.set(r.target.value))}),f()(),u(3,"label"),p(4,"Description"),u(5,"textarea",64),C("input",function(r){m(e);let o=d(3);return g(o.editDescription.set(r.target.value))}),f()(),u(6,"div",65)(7,"button",29),C("click",function(){m(e);let r=d(3);return g(r.editing.set(!1))}),p(8," Cancel "),f(),u(9,"button",28),C("click",function(){m(e);let r=d(3);return g(r.saveEdit())}),p(10," Save "),f()()}if(n&2){let e=d(3);c(2),S("value",e.editTitle()),c(3),S("value",e.editDescription()),c(2),S("disabled",e.busy()),c(2),S("disabled",e.busy()||!e.editTitle().trim())}}function wN(n,t){if(n&1&&j(0,"app-markdown-text",67),n&2){let e=d(3);S("markdown",e.description)}}function EN(n,t){n&1&&(u(0,"p",48),p(1,"No description provided."),f())}function DN(n,t){if(n&1&&(u(0,"h2",66),p(1),f(),E(2,wN,1,1,"app-markdown-text",67)(3,EN,2,0,"p",48)),n&2){let e=d(2);c(),P(e.title),c(),D(e.description?2:3)}}function SN(n,t){if(n&1&&Ct(0,62),n&2){let e=t.$implicit;d(3);let i=_t(51);S("ngTemplateOutlet",i)("ngTemplateOutletContext",Mi(2,Bd,e))}}function MN(n,t){if(n&1&&(u(0,"h3"),p(1,"Required"),f(),W(2,SN,1,4,"ng-container",62,ei)),n&2){let e=d(3);c(2),q(e.requiredReviewers())}}function TN(n,t){if(n&1&&Ct(0,62),n&2){let e=t.$implicit;d(3);let i=_t(51);S("ngTemplateOutlet",i)("ngTemplateOutletContext",Mi(2,Bd,e))}}function kN(n,t){if(n&1&&(u(0,"h3"),p(1,"Optional"),f(),W(2,TN,1,4,"ng-container",62,ei)),n&2){let e=d(3);c(2),q(e.otherReviewers())}}function IN(n,t){n&1&&(u(0,"p",48),p(1,"No reviewers."),f())}function PN(n,t){if(n&1){let e=I();u(0,"button",68),C("click",function(){m(e);let r=d(3);return g(r.toggleDraft())}),p(1," Convert to draft "),f()}if(n&2){let e=d(3);S("disabled",e.busy())}}function ON(n,t){if(n&1){let e=I();u(0,"span",69)(1,"span"),p(2),f(),u(3,"button",70),C("click",function(){let r=m(e).$implicit,o=d(4);return g(o.removeTag(r))}),p(4," \xD7 "),f()()}if(n&2){let e=t.$implicit,i=d(4);c(2),P(e),c(),S("disabled",i.busy()),Q("aria-label","Remove tag "+e)}}function RN(n,t){if(n&1&&(u(0,"div",52),W(1,ON,5,3,"span",69,jt),f()),n&2){let e=d(2);c(),q(e.labels)}}function NN(n,t){n&1&&(u(0,"p",48),p(1,"No tags."),f())}function AN(n,t){if(n&1){let e=I();u(0,"app-chip-input",71),C("queryChange",function(r){m(e);let o=d(3);return g(o.tagQuery.set(r))})("select",function(r){m(e);let o=d(3);return g(o.addTag(r))}),f()}if(n&2){let e=d(3);S("chips",ta(6,Om))("suggestions",e.tagSuggestions())("loading",e.tagsLoading())("query",e.tagQuery())("disabled",e.busy())("allowFreeText",!0)}}function LN(n,t){n&1&&(u(0,"div",42),p(1,"Loading work items..."),f())}function FN(n,t){if(n&1){let e=I();u(0,"div",43)(1,"span"),p(2),f(),u(3,"button",41),C("click",function(){m(e);let r=d(3);return g(r.loadWorkItems())}),p(4," Retry "),f()()}if(n&2){let e=d(3);c(2),P(e.workItemsError()),c(),S("disabled",e.workItemsLoading())}}function VN(n,t){if(n&1&&(u(0,"small"),p(1),f()),n&2){let e=d().$implicit;c(),P(e.state)}}function BN(n,t){if(n&1){let e=I();u(0,"li")(1,"button",72),C("click",function(){let r=m(e).$implicit,o=d(4);return g(o.openExternalLink(r.url))}),u(2,"span",73),p(3),f(),u(4,"span",74),p(5),f()(),E(6,VN,2,1,"small"),u(7,"button",75),C("click",function(){let r=m(e).$implicit,o=d(4);return g(o.unlinkWorkItem(r.id))}),p(8," \xD7 "),f()()}if(n&2){let e=t.$implicit,i=d(4);c(3),H("#",e.id),c(2),P(e.title),c(),D(e.state?6:-1),c(),S("disabled",i.busy()),Q("aria-label","Unlink work item #"+e.id)}}function jN(n,t){if(n&1&&(u(0,"ul",55),W(1,BN,9,5,"li",null,ei),f()),n&2){let e=d(3);c(),q(e.workItems())}}function $N(n,t){n&1&&(u(0,"p",48),p(1,"No related work items."),f())}function HN(n,t){if(n&1){let e=I();u(0,"app-chip-input",76),C("queryChange",function(r){m(e);let o=d(3);return g(o.workItemQuery.set(r))})("select",function(r){m(e);let o=d(3);return g(o.linkWorkItem(r))}),f()}if(n&2){let e=d(3);S("chips",ta(6,Om))("suggestions",e.workItemSuggestions())("loading",e.workItemsSearchLoading())("query",e.workItemQuery())("error",e.workItemsSearchError())("disabled",e.busy())}}function zN(n,t){if(n&1){let e=I();u(0,"div",24)(1,"main",35),E(2,oN,11,1,"div",36)(3,sN,6,0,"div",37)(4,aN,6,0,"div",37)(5,lN,6,0,"div",38),u(6,"section",39)(7,"div",40)(8,"h2"),p(9,"Checks"),f(),u(10,"button",41),C("click",function(){m(e);let r=d(2);return g(r.loadChecks())}),p(11," Refresh "),f()(),E(12,cN,2,0,"div",42)(13,dN,5,2,"div",43)(14,yN,5,2),f(),u(15,"section",44)(16,"div",40)(17,"h2"),p(18,"Details"),f(),E(19,xN,2,0,"button",45),f(),E(20,CN,11,4)(21,DN,4,2),f()(),u(22,"aside",46)(23,"div",40)(24,"h2"),p(25,"Reviewers"),f()(),u(26,"app-chip-input",47),C("trailingAction",function(){m(e);let r=d(2);return g(r.reviewerRequired.set(!r.reviewerRequired()))})("queryChange",function(r){m(e);let o=d(2);return g(o.reviewerQuery.set(r))})("select",function(r){m(e);let o=d(2);return g(o.addReviewer(r))}),f(),E(27,MN,4,0),E(28,kN,4,0),E(29,IN,2,0,"p",48),E(30,PN,2,1,"button",49),u(31,"div",50)(32,"h3"),p(33,"Tags"),f(),u(34,"button",51),C("click",function(){m(e);let r=d(2);return g(r.toggleTagsPicker())}),p(35," + "),f()(),E(36,RN,3,0,"div",52)(37,NN,2,0,"p",48),E(38,AN,1,7,"app-chip-input",53),u(39,"div",50)(40,"h3"),p(41,"Related work items"),f(),u(42,"button",54),C("click",function(){m(e);let r=d(2);return g(r.toggleWorkItemPicker())}),p(43," + "),f()(),E(44,LN,2,0,"div",42)(45,FN,5,2,"div",43)(46,jN,3,0,"ul",55)(47,$N,2,0,"p",48),E(48,HN,1,7,"app-chip-input",56),f()()}if(n&2){let e=d(),i=d();c(2),D(e.mergeStatus==="conflicts"?2:e.mergeStatus==="rejectedByPolicy"?3:e.mergeStatus==="failure"?4:e.mergeStatus==="queued"?5:-1),c(8),S("disabled",i.checksLoading()),c(2),D(i.checksLoading()?12:i.checksError()?13:14),c(7),D(i.editing()?-1:19),c(),D(i.editing()?20:21),c(6),S("chips",ta(22,Om))("suggestions",i.reviewerSuggestions())("loading",i.reviewersLoading())("query",i.reviewerQuery())("error",i.reviewersError())("disabled",i.busy())("trailingPressed",i.reviewerRequired()),c(),D(i.requiredReviewers().length?27:-1),c(),D(i.otherReviewers().length?28:-1),c(),D(e.reviewers.length?-1:29),c(),D(e.isDraft?-1:30),c(4),S("disabled",i.busy()),c(2),D(e.labels.length?36:37),c(2),D(i.tagsPickerOpen()?38:-1),c(4),S("disabled",i.busy()),c(2),D(i.workItemsLoading()?44:i.workItemsError()?45:i.workItems().length?46:47),c(4),D(i.workItemPickerOpen()?48:-1)}}function UN(n,t){if(n&1){let e=I();u(0,"button",87),C("click",function(){m(e);let r=d().$implicit,o=d(3);return g(o.jumpToThread(r))}),p(1),f()}if(n&2){let e=d().$implicit;c(),Fn(" ",e.filePath,":",e.line," ")}}function GN(n,t){if(n&1&&(u(0,"option",83),p(1),f()),n&2){let e=t.$implicit,i=d(4);S("value",e),c(),P(i.statusLabel(e))}}function WN(n,t){if(n&1&&(u(0,"div",84),j(1,"app-author-avatar",14),u(2,"div")(3,"div",88)(4,"strong"),p(5),f(),p(6),f(),j(7,"app-markdown-text",67),f()()),n&2){let e=t.$implicit,i=d(4);c(),S("name",e.author.name)("email",e.author.email||""),c(4),P(e.author.name),c(),H(" \xB7 ",i.formatDate(e.createdAt)," "),c(),S("markdown",e.content)}}function qN(n,t){if(n&1){let e=I();u(0,"article",79)(1,"header")(2,"span"),p(3),f(),E(4,UN,2,2,"button",81),u(5,"select",82),C("change",function(r){let o=m(e).$implicit,s=d(3);return g(s.setThreadStatus(o.id,r.target.value))}),W(6,GN,2,2,"option",83,jt),f()(),W(8,WN,8,5,"div",84,ei),u(10,"div",85)(11,"input",86,2),C("keydown.enter",function(){let r=m(e).$implicit,o=_t(12);return d(3).replyToThread(r.id,o.value),g(o.value="")}),f(),u(13,"button",41),C("click",function(){let r=m(e).$implicit,o=_t(12);return d(3).replyToThread(r.id,o.value),g(o.value="")}),p(14," Reply "),f()()()}if(n&2){let e=t.$implicit,i=d(3);c(2),Xe("thread-status status-"+e.status),c(),P(i.statusLabel(e.status)),c(),D(e.filePath?4:-1),c(),S("value",e.status)("disabled",i.busy()),c(),q(i.threadStatuses),c(2),q(e.comments),c(5),S("disabled",i.busy())}}function ZN(n,t){n&1&&(u(0,"div",80),p(1,"No comments yet."),f())}function YN(n,t){if(n&1){let e=I();u(0,"div",25)(1,"section",77)(2,"h2"),p(3,"Add comment"),f(),u(4,"textarea",78),C("input",function(r){m(e);let o=d(2);return g(o.newComment.set(r.target.value))}),f(),u(5,"div",65)(6,"button",28),C("click",function(){m(e);let r=d(2);return g(r.addGeneralComment())}),p(7," Comment "),f()()(),W(8,qN,15,7,"article",79,ei,!1,ZN,2,0,"div",80),f()}if(n&2){let e=d(2);c(4),S("value",e.newComment()),c(2),S("disabled",e.busy()||!e.newComment().trim()),c(2),q(e.threads())}}function QN(n,t){n&1&&(u(0,"div",42),p(1,"Loading the review..."),f())}function KN(n,t){if(n&1&&p(0),n&2){let e=d();H(" ",e.summary," ")}}function XN(n,t){if(n&1&&p(0),n&2){let e=d();H(" Reviewed at commit ",e.reviewedCommit.slice(0,8),". ")}}function JN(n,t){if(n&1&&(u(0,"span"),p(1),f()),n&2){let e=d();c(),H("\xB7 ",e.model)}}function eA(n,t){if(n&1&&(u(0,"span"),p(1),f()),n&2){let e=d(),i=d(3);c(),H("\xB7 ",i.effortLabel(e.effort))}}function tA(n,t){n&1&&(u(0,"span",103),p(1,"\xB7 new commits since this review"),f())}function nA(n,t){if(n&1&&(u(0,"p",91),E(1,KN,1,1)(2,XN,1,1),f(),u(3,"p",102),p(4),E(5,JN,2,1,"span"),E(6,eA,2,1,"span"),E(7,tA,2,0,"span",103),f()),n&2){let e=t,i=d(3);c(),D(e.summary?1:2),c(3),wo(" ",e.passes," review",e.passes===1?"":"s"," \xB7 last run ",i.formatDate(e.reviewedAt)," "),c(),D(e.model?5:-1),c(),D(e.effort!==void 0?6:-1),c(),D(i.reviewStale()?7:-1)}}function iA(n,t){n&1&&(u(0,"p",91),p(1," This pull request has not been reviewed yet. Guito reviews it automatically while it is waiting on you, or you can run a review now. "),f())}function rA(n,t){if(n&1&&(u(0,"option",95),p(1),f()),n&2){let e=t.$implicit,i=d(3);S("value",e.value)("selected",e.value===i.reviewModel()),c(),H(" ",e.label," ")}}function oA(n,t){if(n&1&&(u(0,"option",95),p(1),f()),n&2){let e=t.$implicit,i=d(3);S("value",e.value)("selected",e.value===i.reviewEffort()),c(),H(" ",i.effortLabel(e.value)," ")}}function sA(n,t){if(n&1){let e=I();u(0,"button",104),C("click",function(){m(e);let r=d(3);return g(r.runReview(!0))}),p(1," Review everything again "),f()}if(n&2){let e=d(3);S("disabled",e.reviewRunning())}}function aA(n,t){if(n&1&&j(0,"app-error-banner",22),n&2){let e=d(3);S("message",e.reviewError())}}function lA(n,t){if(n&1&&j(0,"app-error-banner",22),n&2){let e=d(3);S("message",e.review().error)}}function cA(n,t){if(n&1){let e=I();u(0,"section",99)(1,"label",105)(2,"input",106),C("change",function(){m(e);let r=d(3);return g(r.toggleAllFindings())}),f(),p(3),f(),u(4,"div",65)(5,"button",41),C("click",function(){m(e);let r=d(3);return g(r.dismissFindings())}),p(6," Dismiss "),f(),u(7,"button",107),C("click",function(){m(e);let r=d(3);return g(r.postFindings())}),p(8," Post to pull request "),f()()()}if(n&2){let e=d(3);c(2),S("checked",e.selectedFindings().size===e.pendingFindings().length),c(),Fn(" ",e.selectedFindings().size," of ",e.pendingFindings().length," selected "),c(2),S("disabled",e.reviewRunning()||!e.selectedFindings().size),c(2),S("disabled",e.reviewRunning()||!e.selectedFindings().size)}}function dA(n,t){if(n&1&&(u(0,"span"),p(1),f()),n&2){let e=d(2).$implicit;c(),H(":",e.line)}}function uA(n,t){if(n&1){let e=I();u(0,"button",87),C("click",function(){m(e);let r=d().$implicit,o=d(3);return g(o.jumpToFinding(r))}),p(1),E(2,dA,2,1,"span"),f()}if(n&2){let e=d().$implicit;c(),H(" ",e.file),c(),D(e.line?2:-1)}}function pA(n,t){n&1&&(u(0,"span",110),p(1,"Pull request"),f())}function fA(n,t){if(n&1){let e=I();u(0,"article",108)(1,"header")(2,"label",109)(3,"input",106),C("change",function(){let r=m(e).$implicit,o=d(3);return g(o.toggleFinding(r.id))}),f(),u(4,"span"),p(5),f(),u(6,"strong"),p(7),f()(),E(8,uA,3,2,"button",81)(9,pA,2,0,"span",110),f(),j(10,"app-markdown-text",67),f()}if(n&2){let e=t.$implicit,i=d(3);Xe("severity-"+e.severity),c(3),S("checked",i.findingSelected(e.id)),c(),Xe("severity-badge severity-"+e.severity),c(),P(i.severityLabel(e.severity)),c(2),P(e.title),c(),D(e.file?8:9),c(2),S("markdown",e.comment)}}function hA(n,t){n&1&&p(0," Every finding has been posted or dismissed. ")}function mA(n,t){n&1&&p(0," The review found no problems worth a comment. ")}function gA(n,t){if(n&1&&(u(0,"div",80),p(1," Nothing to post. "),E(2,hA,1,0)(3,mA,1,0),f()),n&2){let e=d(4);c(2),D(e.resolvedFindings().length?2:3)}}function _A(n,t){if(n&1&&E(0,gA,4,1,"div",80),n&2){let e=d(3);D(!e.reviewLoading()&&e.review()?0:-1)}}function vA(n,t){if(n&1&&(u(0,"span"),p(1),f()),n&2){let e=d(2).$implicit;c(),H(":",e.line)}}function bA(n,t){if(n&1){let e=I();u(0,"button",87),C("click",function(){m(e);let r=d().$implicit,o=d(4);return g(o.jumpToFinding(r))}),p(1),E(2,vA,2,1,"span"),f()}if(n&2){let e=d().$implicit;c(),H(" ",e.file),c(),D(e.line?2:-1)}}function yA(n,t){if(n&1&&(u(0,"article",111)(1,"header")(2,"span"),p(3),f(),u(4,"strong"),p(5),f(),u(6,"span",112),p(7),f(),E(8,bA,3,2,"button",81),f()()),n&2){let e=t.$implicit,i=d(4);c(2),Xe("severity-badge severity-"+e.severity),c(),P(i.severityLabel(e.severity)),c(2),P(e.title),c(2),P(e.status==="posted"?"Posted":"Dismissed"),c(),D(e.file?8:-1)}}function xA(n,t){if(n&1&&(u(0,"section",101)(1,"h2"),p(2,"Already handled"),f(),W(3,yA,9,6,"article",111,ei),f()),n&2){let e=d(3);c(3),q(e.resolvedFindings())}}function CA(n,t){if(n&1){let e=I();u(0,"div",26)(1,"section",89)(2,"div",90),E(3,QN,2,0,"div",42)(4,nA,8,7)(5,iA,2,0,"p",91),f(),u(6,"div",92)(7,"label",93)(8,"select",94),C("change",function(r){m(e);let o=d(2);return g(o.changeReviewModel(r.target))}),W(9,rA,2,3,"option",95,Fd),f()(),u(11,"label",96)(12,"select",97),C("change",function(r){m(e);let o=d(2);return g(o.changeReviewEffort(r.target))}),W(13,oA,2,3,"option",95,Fd),f()(),u(15,"button",29),C("click",function(){m(e);let r=d(2);return g(r.runReview(!1))}),p(16),f(),E(17,sA,2,1,"button",98),f()(),E(18,aA,1,1,"app-error-banner",22)(19,lA,1,1,"app-error-banner",22),E(20,cA,9,5,"section",99),W(21,fA,11,9,"article",100,ei,!1,_A,1,1),E(24,xA,5,0,"section",101),f()}if(n&2){let e,i,r=d(2);c(3),D(r.reviewLoading()?3:(e=r.review())?4:5,e),c(5),S("value",r.reviewModel())("disabled",r.reviewRunning()),c(),q(r.reviewModelOptions()),c(3),S("value",r.reviewEffort())("disabled",r.reviewRunning()),c(),q(r.effortOptions),c(2),S("disabled",r.reviewRunning()),c(),H(" ",r.reviewRunning()?"Reviewing...":r.review()?"Review new commits":"Review now"," "),c(),D(r.review()?17:-1),c(),D(r.reviewError()?18:((i=r.review())==null?null:i.status)==="error"&&((i=r.review())!=null&&i.error)?19:-1),c(2),D(r.pendingFindings().length?20:-1),c(),q(r.pendingFindings()),c(3),D(r.resolvedFindings().length?24:-1)}}function wA(n,t){if(n&1){let e=I();u(0,"div",114)(1,"span"),p(2),f(),u(3,"button",41),C("click",function(){m(e);let r=d(3);return g(r.loadFiles())}),p(4," Retry "),f()()}if(n&2){let e=d(3);c(2),P(e.filesError()),c(),S("disabled",e.filesLoading())}}function EA(n,t){n&1&&(u(0,"div",42),p(1,"Loading changed files..."),f())}function DA(n,t){n&1&&(V(),j(0,"polyline",120))}function SA(n,t){n&1&&(V(),j(0,"polyline",121))}function MA(n,t){if(n&1){let e=I();u(0,"button",118),C("click",function(){m(e);let r=d().$implicit,o=d(4);return g(o.toggleFileDirectory(r.path))}),V(),u(1,"svg",119),E(2,DA,1,0,":svg:polyline",120)(3,SA,1,0,":svg:polyline",121),f(),fe(),u(4,"span"),p(5),f()()}if(n&2){let e=d().$implicit;ne("padding-left",e.depth*14+9,"px"),S("title",e.path),Q("aria-expanded",!e.collapsed),c(2),D(e.collapsed?2:3),c(3),P(e.name)}}function TA(n,t){if(n&1){let e=I();u(0,"button",122),C("click",function(){m(e);let r=d().$implicit,o=d(4);return g(o.selectFile(r.file))}),u(1,"span"),p(2),f(),u(3,"span"),p(4),f()()}if(n&2){let e,i=d().$implicit,r=d(4);ne("padding-left",i.depth*14+9,"px"),J("active",((e=r.selectedFile())==null?null:e.path)===i.file.path),S("title",i.file.path),c(),Xe("file-status status-"+i.file.changeType),c(),P(i.file.changeType[0].toUpperCase()),c(2),P(i.name)}}function kA(n,t){if(n&1&&E(0,MA,6,6,"button",116)(1,TA,5,9,"button",117),n&2){let e=t.$implicit;D(e.kind==="dir"?0:1)}}function IA(n,t){n&1&&(u(0,"div",80),p(1,"No changed files."),f())}function PA(n,t){if(n&1&&W(0,kA,2,1,null,null,qR,!1,IA,2,0,"div",80),n&2){let e=d(3);q(e.fileRows())}}function OA(n,t){if(n&1){let e=I();u(0,"div",27)(1,"aside",113),E(2,wA,5,2,"div",114)(3,EA,2,0,"div",42)(4,PA,3,1),f(),u(5,"app-pr-file-diff",115),C("commentSubmit",function(r){m(e);let o=d(2);return g(o.addInlineComment(r))})("replySubmit",function(r){m(e);let o=d(2);return g(o.replyFromDiff(r))})("statusSubmit",function(r){m(e);let o=d(2);return g(o.setStatusFromDiff(r))}),f()()}if(n&2){let e=d(2);c(2),D(e.filesError()?2:e.filesLoading()?3:4),c(3),S("diff",e.selectedFile()?e.fileDiffs()[e.selectedFile().path]??null:null)("threads",e.selectedFileThreads())("loading",e.fileDiffLoading())("error",e.fileDiffError())("posting",e.busy())("focus",e.fileFocus())}}function RA(n,t){n&1&&(u(0,"span",126),p(1,"Required"),f())}function NA(n,t){if(n&1&&(u(0,"small"),p(1),f()),n&2){let e=d().$implicit;c(),P(e.detail)}}function AA(n,t){if(n&1){let e=I();u(0,"button",41),C("click",function(){m(e);let r=d().$implicit,o=d(2);return g(o.requeueCheck(r))}),p(1),f()}if(n&2){let e=d().$implicit,i=d(2);S("disabled",!!i.requeuing()||i.checksLoading()),c(),H(" ",i.requeuing()===e.evaluationId?"Requeuing...":"Requeue"," ")}}function LA(n,t){if(n&1){let e=I();u(0,"button",57),C("click",function(){m(e);let r=d().$implicit,o=d(2);return g(o.openExternalLink(r.url))}),p(1," Open "),f()}}function FA(n,t){if(n&1&&(u(0,"li",123)(1,"span"),p(2),f(),u(3,"div",124)(4,"div",125),p(5),E(6,RA,2,0,"span",126),f(),E(7,NA,2,1,"small"),f(),E(8,AA,2,2,"button",127),E(9,LA,2,0,"button",45),f()),n&2){let e=t.$implicit,i=d(2);c(),Xe("check-state state-"+e.state),c(),P(i.checkStateLabel(e.state)),c(3),H(" ",e.name," "),c(),D(e.required?6:-1),c(),D(e.detail?7:-1),c(),D(e.evaluationId?8:-1),c(),D(e.url?9:-1)}}function VA(n,t){if(n&1){let e=I();u(0,"div",128),j(1,"app-author-avatar",14),u(2,"div",129)(3,"span"),p(4),f(),u(5,"small"),p(6),f()(),u(7,"button",130),C("click",function(){let r=m(e).$implicit,o=d(2);return g(o.toggleReviewerRequired(r))}),p(8),f(),u(9,"button",131),C("click",function(){let r=m(e).$implicit,o=d(2);return g(o.removeReviewer(r))}),p(10," \xD7 "),f()()}if(n&2){let e=t.$implicit,i=d(2);c(),S("name",e.name)("email",e.email||""),c(3),P(e.name),c(),Xe(i.voteMeta(e.vote).cls),c(),P(i.voteMeta(e.vote).label),c(),J("on",e.isRequired),S("title",e.isRequired?"Make optional":"Make required"),c(),H(" ",e.isRequired?"Required":"Optional"," "),c(),Q("aria-label","Remove "+e.name)}}function BA(n,t){if(n&1){let e=I();u(0,"h2"),p(1,"Abandon pull request"),f(),u(2,"p",134),p(3),f(),u(4,"div",65)(5,"button",29),C("click",function(){m(e);let r=d(3);return g(r.abandonOpen.set(!1))}),p(6," Cancel "),f(),u(7,"button",135),C("click",function(){m(e);let r=d(3);return g(r.abandonPr())}),p(8," Abandon "),f()()}if(n&2){let e,i=d(3);c(3),H(" This closes pull request !",(e=i.pr())==null?null:e.id," without merging it. The source branch is kept. "),c(2),S("disabled",i.busy()),c(2),S("disabled",i.busy())}}function jA(n,t){if(n&1&&(u(0,"option",137),p(1),f()),n&2){let e=t.$implicit,i=d(4);S("value",e.value)("disabled",e.disabled)("selected",e.value===i.mergeStrategy()),c(),Fn(" ",e.label,"",e.disabledReason?" ("+e.disabledReason+")":""," ")}}function $A(n,t){n&1&&(u(0,"p",138),p(1," The target branch's policy limits which merge strategies can be used. "),f())}function HA(n,t){if(n&1){let e=I();u(0,"h2"),p(1),f(),u(2,"label"),p(3,"Merge strategy"),u(4,"select",136),C("change",function(r){m(e);let o=d(3);return g(o.mergeStrategy.set(r.target.value))}),W(5,jA,2,5,"option",137,Fd),f()(),E(7,$A,2,0,"p",138),u(8,"label",139)(9,"input",106),C("change",function(r){m(e);let o=d(3);return g(o.deleteSourceBranch.set(r.target.checked))}),f(),p(10,"Delete source branch"),f(),u(11,"label",139)(12,"input",106),C("change",function(r){m(e);let o=d(3);return g(o.completeWorkItems.set(r.target.checked))}),f(),p(13,"Complete associated work items"),f(),u(14,"label",140)(15,"input",141),C("change",function(r){m(e);let o=d(3);return g(o.transitionWorkItems.set(r.target.checked))}),f(),p(16,"Transition linked work items"),f(),u(17,"div",65)(18,"button",17),C("click",function(){m(e);let r=d(3);return r.completeOpen.set(!1),g(r.autoCompleteOpen.set(!1))}),p(19," Cancel"),f(),u(20,"button",28),C("click",function(){m(e);let r=d(3);return g(r.completeOpen()?r.applyComplete():r.applyAutoComplete())}),p(21),f()()}if(n&2){let e=d(3);c(),H(" ",e.completeOpen()?"Complete pull request":"Set auto-complete"," "),c(4),q(e.mergeStrategies()),c(2),D(e.mergePolicyLimited()?7:-1),c(2),S("checked",e.deleteSourceBranch()),c(3),S("checked",e.completeWorkItems()),c(3),S("checked",e.transitionWorkItems())("disabled",!e.completeWorkItems()),c(5),S("disabled",e.busy()),c(),H(" ",e.completeOpen()?"Complete":"Enable"," ")}}function zA(n,t){if(n&1){let e=I();u(0,"div",132),C("click",function(){m(e);let r=d(2);return r.completeOpen.set(!1),r.autoCompleteOpen.set(!1),g(r.abandonOpen.set(!1))}),f(),u(1,"section",133),E(2,BA,9,3)(3,HA,22,8),f()}if(n&2){let e=d(2);c(),Q("aria-label",e.abandonOpen()?"Abandon pull request":e.completeOpen()?"Complete pull request":"Set auto-complete"),c(),D(e.abandonOpen()?2:3)}}function UA(n,t){if(n&1){let e=I();u(0,"header",7)(1,"div",8)(2,"div",9)(3,"span",10),p(4),f(),u(5,"h1"),p(6),f(),u(7,"span",11),p(8),f(),E(9,YR,2,0,"span",12),f(),u(10,"div",13),j(11,"app-author-avatar",14),u(12,"span"),p(13),f(),u(14,"code"),p(15),f(),u(16,"span",15),p(17,"\u2192"),f(),u(18,"code"),p(19),f()()(),u(20,"div",16)(21,"button",17),C("click",function(){m(e);let r=d();return g(r.openInBrowser())}),p(22," Open in Azure DevOps "),f(),E(23,QR,4,2)(24,tN,8,4),u(25,"button",18),C("click",function(){m(e);let r=d();return g(r.closed.emit())}),p(26," \xD7 "),f()()(),u(27,"nav",19)(28,"button",20),C("click",function(){m(e);let r=d();return g(r.tab.set("overview"))}),p(29," Overview "),f(),u(30,"button",20),C("click",function(){m(e);let r=d();return g(r.tab.set("files"))}),p(31," Files "),u(32,"span"),p(33),f()(),u(34,"button",20),C("click",function(){m(e);let r=d();return g(r.tab.set("comments"))}),p(35," Comments "),u(36,"span"),p(37),f()(),u(38,"button",20),C("click",function(){m(e);let r=d();return g(r.tab.set("review"))}),p(39," Review "),E(40,nN,2,1,"span",21)(41,iN,2,0,"span"),f()(),E(42,rN,1,1,"app-error-banner",22),u(43,"div",23),E(44,zN,49,23,"div",24)(45,YN,11,3,"div",25)(46,CA,25,12,"div",26)(47,OA,6,7,"div",27),f(),xt(48,FA,10,8,"ng-template",null,0,Do)(50,VA,11,11,"ng-template",null,1,Do),E(52,zA,4,2)}if(n&2){let e=t,i=d();c(4),H("!",e.id),c(2),P(e.title),c(2),P(e.status),c(),D(e.isDraft?9:-1),c(2),S("name",e.author.name)("email",e.author.email||""),c(2),P(e.author.name),c(2),P(e.sourceBranch),c(4),P(e.targetBranch),c(4),D(e.isDraft?23:24),c(2),S("disabled",i.busy()),c(3),J("active",i.tab()==="overview"),c(2),J("active",i.tab()==="files"),c(3),P(i.files().length),c(),J("active",i.tab()==="comments"),c(3),P(i.threads().length),c(),J("active",i.tab()==="review"),c(2),D(i.pendingFindings().length?40:i.reviewRunning()?41:-1),c(2),D(i.error()?42:-1),c(2),D(i.tab()==="overview"?44:i.tab()==="comments"?45:i.tab()==="review"?46:47),c(8),D(i.completeOpen()||i.autoCompleteOpen()||i.abandonOpen()?52:-1)}}function GA(n,t){if(n&1){let e=I();u(0,"div",6)(1,"div"),p(2),f(),u(3,"button",17),C("click",function(){m(e);let r=d();return g(r.load())}),p(4,"Retry"),f()()}if(n&2){let e=d();c(2),P(e.error()||"Pull request could not be loaded.")}}var WA={blocker:"Blocker",concern:"Concern",suggestion:"Suggestion",nit:"Nit"},Jx={active:"Active",fixed:"Resolved",wontFix:"Won't fix",closed:"Closed",byDesign:"By design",pending:"Pending"},qA={notSet:"Not merged",queued:"Queued for merge",conflicts:"Merge conflicts",succeeded:"Ready to merge",rejectedByPolicy:"Blocked by policy",failure:"Merge failed"},ZA={pending:"Pending",succeeded:"Passed",failed:"Failed",notApplicable:"N/A"},Vd=class n{git=R(et);vscode=R(ln);destroyRef=R(ot);prId=N.required();settings=N(null);initialTab=N("overview");closed=Z();changed=Z();pr=v(null);threads=v([]);files=v([]);loading=v(!0);error=v("");busy=v(!1);workItems=v([]);workItemsLoading=v(!1);workItemsError=v("");checks=v([]);checksLoading=v(!1);checksError=v("");checksWarnings=v([]);requeuing=v("");requeueError=v("");requiredChecks=O(()=>this.checks().filter(t=>t.required));optionalChecks=O(()=>this.checks().filter(t=>!t.required));filesLoading=v(!1);filesError=v("");tab=v("overview");editing=v(!1);editTitle=v("");editDescription=v("");reviewerQuery=v("");reviewerSuggestions=v([]);reviewersLoading=v(!1);reviewersError=v("");reviewerRequired=v(!1);tagsPickerOpen=v(!1);tagQuery=v("");allTags=v([]);tagsLoading=v(!1);tagSuggestions=O(()=>{let t=this.tagQuery().trim().toLowerCase(),e=this.allTags();return t?e.filter(i=>i.label.toLowerCase().includes(t)):e});workItemPickerOpen=v(!1);workItemQuery=v("");workItemSuggestions=v([]);workItemsSearchLoading=v(!1);workItemsSearchError=v("");reviewMenuOpen=v(!1);completeOpen=v(!1);autoCompleteOpen=v(!1);abandonOpen=v(!1);mergeStrategy=v("noFastForward");deleteSourceBranch=v(!1);completeWorkItems=v(!1);transitionWorkItems=v(!1);newComment=v("");review=v(null);reviewLoading=v(!1);reviewRunning=v(!1);reviewError=v("");selectedFindings=v(new Set);reviewModel=v("");reviewModelPicked=!1;reviewEffort=v("high");reviewEffortPicked=!1;effortOptions=xa;pendingFindings=O(()=>(this.review()?.findings??[]).filter(t=>t.status==="pending"));resolvedFindings=O(()=>(this.review()?.findings??[]).filter(t=>t.status!=="pending"));reviewStale=O(()=>{let t=this.review(),e=this.pr()?.lastMergeSourceCommit??"";return!!(t?.reviewedCommit&&e&&t.reviewedCommit!==e)});selectedFile=v(null);fileDiffs=v({});fileDiffLoading=v(!1);fileDiffError=v("");fileFocus=v(null);collapsedFiles=v(new Set);fileRows=O(()=>{let t=this.files();return this.settings()?.fileListView!=="tree"?t.map(e=>({kind:"file",path:e.path,name:e.path,depth:0,file:e})):Po(t,this.collapsedFiles())});mergeStrategies=O(()=>{let t=this.pr()?.mergePolicy,e=this.settings()?.allowMerge!==!1;return n.allMergeStrategies.map(i=>{let r=t&&!t.includes(i.value)?"not allowed by branch policy":!e&&(i.value==="noFastForward"||i.value==="rebaseMerge")?"disabled by settings":"";return ie(z({},i),{disabled:!!r,disabledReason:r})})});mergePolicyLimited=O(()=>{let t=this.pr()?.mergePolicy;return!!(t&&t.length<n.allMergeStrategies.length)});static allMergeStrategies=[{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(Jx);requiredReviewers=O(()=>(this.pr()?.reviewers??[]).filter(t=>t.isRequired));otherReviewers=O(()=>(this.pr()?.reviewers??[]).filter(t=>!t.isRequired));generalThreads=O(()=>this.threads().filter(t=>!t.filePath));inlineThreads=O(()=>this.threads().filter(t=>t.filePath));selectedFileThreads=O(()=>{let t=this.selectedFile();return t?this.inlineThreads().filter(e=>e.filePath===t.path||e.filePath===t.oldPath):[]});constructor(){ge(()=>{let t=this.settings()?.aiReview;this.reviewModelPicked||this.reviewModel.set(t?.model??"opus"),this.reviewEffortPicked||this.reviewEffort.set(t?.effort??"high")}),Mr(this.reviewerQuery).pipe(St(t=>(this.reviewerSuggestions.set([]),this.reviewersError.set(""),this.reviewersLoading.set(t.trim().length>=2),t.trim().length<2?Ee([]):this.git.searchReviewers(t.trim()).pipe(ct(()=>(this.reviewersError.set("Unable to load suggestions."),Ee([])))))),tt(this.destroyRef)).subscribe(t=>{this.reviewerSuggestions.set(t),this.reviewersLoading.set(!1)}),Mr(this.workItemQuery).pipe(St(t=>{let e=t.trim();return this.workItemSuggestions.set([]),this.workItemsSearchError.set(""),this.workItemsSearchLoading.set(e.length>0),e?this.git.searchWorkItems(e).pipe(ct(()=>(this.workItemsSearchError.set("Unable to load suggestions."),Ee([])))):Ee([])}),tt(this.destroyRef)).subscribe(t=>{this.workItemSuggestions.set(t.map(e=>({id:String(e.id),label:`#${e.id} ${e.title}`.trim(),description:e.state}))),this.workItemsSearchLoading.set(!1)})}ngOnInit(){this.tab.set(this.initialTab()),this.load()}load(){this.loading.set(!0),this.error.set(""),this.git.getPrDetail(this.prId()).pipe(St(t=>eC({detail:Ee(t),threads:this.git.getPrThreads(this.prId()).pipe(ct(()=>Ee([])))})),tt(this.destroyRef)).subscribe({next:({detail:t,threads:e})=>{this.pr.set(t),this.threads.set(e),this.loading.set(!1),this.loadFiles(),this.loadWorkItems(),this.loadChecks(),this.loadReview()},error:t=>{this.loading.set(!1),this.error.set(this.errorMessage(t))}})}loadFiles(){this.filesLoading.set(!0),this.filesError.set(""),this.git.getPrChanges(this.prId()).pipe(tt(this.destroyRef)).subscribe({next:t=>{this.files.set(t),this.filesLoading.set(!1);let e=this.selectedFile();e&&!t.some(i=>i.path===e.path)&&this.selectedFile.set(null),!this.selectedFile()&&t.length&&this.selectFile(t[0])},error:t=>{this.filesLoading.set(!1),this.filesError.set(this.errorMessage(t))}})}loadWorkItems(){this.workItemsLoading.set(!0),this.workItemsError.set(""),this.git.getPrWorkItems(this.prId()).pipe(tt(this.destroyRef)).subscribe({next:t=>{this.workItems.set(t),this.workItemsLoading.set(!1)},error:t=>{this.workItemsLoading.set(!1),this.workItemsError.set(this.errorMessage(t))}})}loadChecks(){this.checksLoading.set(!0),this.checksError.set(""),this.checksWarnings.set([]),this.requeueError.set(""),this.git.getPrChecks(this.prId()).pipe(tt(this.destroyRef)).subscribe({next:t=>{this.checks.set(t.checks),this.checksWarnings.set(t.warnings??[]),this.checksLoading.set(!1)},error:t=>{this.checksLoading.set(!1),this.checksError.set(this.errorMessage(t))}})}requeueCheck(t){let e=t.evaluationId??"";!e||this.requeuing()||(this.requeuing.set(e),this.requeueError.set(""),this.git.requeuePrCheck(this.prId(),e).pipe(tt(this.destroyRef)).subscribe({next:()=>{this.requeuing.set(""),this.loadChecks()},error:i=>{this.requeuing.set(""),this.requeueError.set(this.errorMessage(i))}}))}reload(){eC({detail:this.git.getPrDetail(this.prId()),threads:this.git.getPrThreads(this.prId()).pipe(ct(()=>Ee([])))}).subscribe({next:({detail:t,threads:e})=>{this.pr.set(t),this.threads.set(e),this.loadChecks()},error:t=>this.error.set(this.errorMessage(t))})}run(t,e){this.busy()||(this.busy.set(!0),this.error.set(""),t().pipe(tt(this.destroyRef)).subscribe({next:()=>{this.busy.set(!1),this.changed.emit(),e?.()},error:i=>{this.busy.set(!1),this.error.set(this.errorMessage(i))}}))}vote(t){this.reviewMenuOpen.set(!1),this.run(()=>this.git.votePr(this.prId(),t),()=>this.reload())}startEditing(){this.editing.set(!0),this.editTitle.set(this.pr()?.title??""),this.editDescription.set(this.pr()?.description??"")}saveEdit(){let t=this.editTitle().trim();t&&this.run(()=>this.git.updatePr(this.prId(),{title:t,description:this.editDescription()}),()=>{this.editing.set(!1),this.reload()})}toggleDraft(){let t=this.pr();t&&this.run(()=>this.git.updatePr(this.prId(),{isDraft:!t.isDraft}),()=>this.reload())}addReviewer(t){this.reviewerQuery.set(""),this.reviewerSuggestions.set([]),this.run(()=>this.git.updatePrReviewer(this.prId(),{id:t.id,required:this.reviewerRequired()}),()=>this.reload())}toggleReviewerRequired(t){this.run(()=>this.git.updatePrReviewer(this.prId(),{id:t.id,required:!t.isRequired,vote:t.vote}),()=>this.reload())}removeReviewer(t){this.run(()=>this.git.updatePrReviewer(this.prId(),{id:t.id,remove:!0}),()=>this.reload())}toggleTagsPicker(){let t=!this.tagsPickerOpen();this.tagsPickerOpen.set(t),this.tagQuery.set(""),!(!t||this.allTags().length||this.tagsLoading())&&(this.tagsLoading.set(!0),this.git.getPrTags().pipe(tt(this.destroyRef)).subscribe({next:e=>{this.allTags.set(e.map(i=>({id:i.name,label:i.name}))),this.tagsLoading.set(!1)},error:()=>this.tagsLoading.set(!1)}))}addTag(t){let e=t.label.trim();e&&(this.tagQuery.set(""),!(this.pr()?.labels??[]).some(i=>i.toLowerCase()===e.toLowerCase())&&this.run(()=>this.git.addPrTag(this.prId(),e),()=>this.reload()))}removeTag(t){this.run(()=>this.git.removePrTag(this.prId(),t),()=>this.reload())}toggleWorkItemPicker(){let t=!this.workItemPickerOpen();this.workItemPickerOpen.set(t),this.workItemQuery.set(""),this.workItemSuggestions.set([])}linkWorkItem(t){let e=Number(t.id);!Number.isInteger(e)||e<=0||(this.workItemQuery.set(""),this.workItemSuggestions.set([]),this.run(()=>this.git.linkPrWorkItem(this.prId(),e),()=>this.loadWorkItems()))}unlinkWorkItem(t){this.run(()=>this.git.unlinkPrWorkItem(this.prId(),t),()=>this.loadWorkItems())}openComplete(){this.mergeStrategy.set(this.defaultMergeStrategy()),this.deleteSourceBranch.set(!1),this.completeWorkItems.set(!1),this.transitionWorkItems.set(!1),this.completeOpen.set(!0)}openAutoComplete(){this.mergeStrategy.set(this.defaultMergeStrategy()),this.deleteSourceBranch.set(!1),this.completeWorkItems.set(!1),this.transitionWorkItems.set(!1),this.completeOpen.set(!1),this.autoCompleteOpen.set(!0)}defaultMergeStrategy(){return this.mergeStrategies().find(t=>!t.disabled)?.value??"noFastForward"}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 t=this.newComment().trim();t&&this.run(()=>this.git.addPrComment(this.prId(),{content:t}),()=>{this.newComment.set(""),this.reload()})}replyToThread(t,e){e.trim()&&this.run(()=>this.git.addPrComment(this.prId(),{threadId:t,content:e}),()=>this.reload())}setThreadStatus(t,e){this.run(()=>this.git.setPrThreadStatus(this.prId(),t,e),()=>this.reload())}addInlineComment(t){this.run(()=>this.git.addPrComment(this.prId(),t),()=>this.reload())}replyFromDiff(t){this.replyToThread(t.threadId,t.content)}setStatusFromDiff(t){this.setThreadStatus(t.threadId,t.status)}jumpToThread(t){let e=this.files().find(i=>i.path===t.filePath)??this.files().find(i=>i.oldPath===t.filePath);!e||t.line===null||(this.tab.set("files"),this.selectFile(e),this.fileFocus.set({line:t.line,side:t.side??"right"}))}toggleFileDirectory(t){this.collapsedFiles.update(e=>{let i=new Set(e);return i.has(t)?i.delete(t):i.add(t),i})}selectFile(t){this.selectedFile.set(t),this.fileDiffError.set(""),!(this.fileDiffs()[t.path]||t.changeType==="binary")&&(this.fileDiffLoading.set(!0),this.git.getPrFileDiff(this.prId(),t).pipe(tt(this.destroyRef)).subscribe({next:e=>{this.fileDiffs.update(i=>ie(z({},i),{[t.path]:e})),this.fileDiffLoading.set(!1)},error:e=>{this.fileDiffLoading.set(!1),this.fileDiffError.set(this.errorMessage(e))}}))}voteMeta(t){switch(t){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(t){return Jx[t]??t}mergeStatusLabel(t){return qA[t]??t}checkStateLabel(t){return ZA[t]??t}loadReview(){this.reviewLoading.set(!0),this.reviewError.set(""),this.git.getAiReview(this.prId()).pipe(tt(this.destroyRef)).subscribe({next:t=>{this.review.set(t),this.reviewLoading.set(!1),this.syncSelection(t)},error:t=>{this.reviewLoading.set(!1),this.reviewError.set(this.errorMessage(t))}})}runReview(t=!1){this.reviewRunning()||(this.reviewRunning.set(!0),this.reviewError.set(""),this.git.runAiReview(this.prId(),t,this.reviewModel().trim(),this.reviewEffort()).pipe(tt(this.destroyRef)).subscribe({next:e=>{this.review.set(e),this.reviewRunning.set(!1),this.syncSelection(e)},error:e=>{this.reviewRunning.set(!1),this.reviewError.set(this.errorMessage(e))}}))}syncSelection(t){this.selectedFindings.set(new Set((t?.findings??[]).filter(e=>e.status==="pending").map(e=>e.id)))}findingSelected(t){return this.selectedFindings().has(t)}toggleFinding(t){let e=new Set(this.selectedFindings());e.has(t)?e.delete(t):e.add(t),this.selectedFindings.set(e)}toggleAllFindings(){let t=this.pendingFindings();this.selectedFindings.set(this.selectedFindings().size===t.length?new Set:new Set(t.map(e=>e.id)))}postFindings(){let t=[...this.selectedFindings()];t.length&&(this.reviewRunning.set(!0),this.reviewError.set(""),this.git.postAiReviewFindings(this.prId(),t).pipe(tt(this.destroyRef)).subscribe({next:e=>{this.review.set(e),this.reviewRunning.set(!1),this.syncSelection(e),this.reload()},error:e=>{this.reviewRunning.set(!1),this.reviewError.set(this.errorMessage(e))}}))}dismissFindings(){let t=[...this.selectedFindings()];t.length&&(this.reviewRunning.set(!0),this.reviewError.set(""),this.git.dismissAiReviewFindings(this.prId(),t).pipe(tt(this.destroyRef)).subscribe({next:e=>{this.review.set(e),this.reviewRunning.set(!1),this.syncSelection(e)},error:e=>{this.reviewRunning.set(!1),this.reviewError.set(this.errorMessage(e))}}))}jumpToFinding(t){if(!t.file)return;let e=this.files().find(i=>i.path===t.file);e&&(this.tab.set("files"),this.selectFile(e),t.line&&this.fileFocus.set({line:t.line,side:"right"}))}severityLabel(t){return WA[t]??t}reviewModelOptions=O(()=>{let t=this.reviewModel().trim();return t&&!Ii.some(e=>e.value===t)?[...Ii,{value:t,label:t}]:Ii});changeReviewModel(t){this.reviewModelPicked=!0,this.reviewModel.set(t.value)}changeReviewEffort(t){this.reviewEffortPicked=!0,this.reviewEffort.set(t.value)}effortLabel(t){let e=xa.find(i=>i.value===t)?.label??t;return t?`${e} effort`:"Claude Code's default effort"}formatDate(t){if(!t)return"";let e=new Date(t);return Number.isNaN(e.getTime())?"":e.toLocaleString()}openInBrowser(){let t=this.pr()?.webUrl;t&&this.vscode.openExternal(t)}openExternalLink(t){t&&this.vscode.openExternal(t)}publishPr(){this.run(()=>this.git.updatePr(this.prId(),{isDraft:!1}),()=>this.reload())}openAbandonConfirm(){this.abandonOpen.set(!0)}abandonPr(){this.run(()=>this.git.abandonPr(this.prId()),()=>{this.abandonOpen.set(!1),this.changed.emit(),this.closed.emit()})}onEscape(){if(this.editing()){this.editing.set(!1);return}if(this.reviewMenuOpen()||this.completeOpen()||this.autoCompleteOpen()||this.abandonOpen()){this.reviewMenuOpen.set(!1),this.completeOpen.set(!1),this.autoCompleteOpen.set(!1),this.abandonOpen.set(!1);return}this.busy()||this.closed.emit()}onBackdropClick(){!this.busy()&&!this.editing()&&!this.completeOpen()&&!this.autoCompleteOpen()&&!this.abandonOpen()&&this.closed.emit()}errorMessage(t){let e=t;return e?.status===400&&e.error?.error?e.error.error:"Failed to communicate with the Guito server."}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-pr-dialog"]],hostBindings:function(e,i){e&1&&C("keydown.escape",function(){return i.onEscape()},qe)},inputs:{prId:[1,"prId"],settings:[1,"settings"],initialTab:[1,"initialTab"]},outputs:{closed:"closed",changed:"changed"},decls:5,vars:1,consts:[["checkRow",""],["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"],["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"],[1,"badge-pending"],[3,"message"],[1,"dialog-body"],[1,"overview","content-pane"],[1,"comments","content-pane"],[1,"review-pane","content-pane"],[1,"files-pane"],["type","button",1,"btn","primary",3,"click","disabled"],["type","button",1,"btn",3,"click","disabled"],[1,"menu-wrap"],["role","menu",1,"menu"],["type","button",1,"btn",3,"disabled"],["type","button","role","menuitem",3,"current"],["type","button","role","menuitem",3,"click"],[1,"overview-main"],["role","alert",1,"merge-banner","conflict"],["role","alert",1,"merge-banner","blocked"],[1,"merge-banner","queued"],[1,"card","checks-card"],[1,"card-head"],["type","button",1,"btn","small",3,"click","disabled"],["role","status",1,"state","inline"],["role","alert",1,"section-error"],[1,"card","description-card"],["type","button",1,"btn","small"],[1,"reviewers","card"],["placeholder","Add reviewer","trailingIcon","\u2605","trailingLabel","Toggle between adding reviewers as required and optional",3,"trailingAction","queryChange","select","chips","suggestions","loading","query","error","disabled","trailingPressed"],[1,"empty"],["type","button",1,"btn","full",3,"disabled"],[1,"side-head"],["type","button","aria-label","Add tag","title","Add tag",1,"icon-btn","add",3,"click","disabled"],[1,"labels"],["placeholder","Add tag",3,"chips","suggestions","loading","query","disabled","allowFreeText"],["type","button","aria-label","Relate work item","title","Relate work item",1,"icon-btn","add",3,"click","disabled"],[1,"work-item-list"],["placeholder","Search work item by title or ID",3,"chips","suggestions","loading","query","error","disabled"],["type","button",1,"btn","small",3,"click"],[1,"section-warning"],["role","alert",1,"section-warning"],[1,"check-list"],[1,"check-divider"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["type","text",3,"input","value"],["rows","12",3,"input","value"],[1,"form-actions"],[1,"detail-title"],[3,"markdown"],["type","button",1,"btn","full",3,"click","disabled"],[1,"label-chip"],["type","button","title","Remove tag",1,"chip-x",3,"click","disabled"],["placeholder","Add tag",3,"queryChange","select","chips","suggestions","loading","query","disabled","allowFreeText"],["type","button",1,"work-item-link",3,"click"],[1,"work-item-id"],[1,"work-item-title"],["type","button","title","Unlink work item",1,"icon-btn",3,"click","disabled"],["placeholder","Search work item by title or ID",3,"queryChange","select","chips","suggestions","loading","query","error","disabled"],[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,"path-chip",3,"click"],[1,"comment-meta"],[1,"review-header","card"],[1,"review-summary"],[1,"review-line"],[1,"review-actions"],["title","Which Claude model reviews this pull request; Default uses whatever Claude Code itself is set to",1,"review-model"],["aria-label","Review model",3,"change","value","disabled"],[3,"value","selected"],["title","How hard Claude thinks while reviewing this pull request; Claude Code's default uses whatever Claude Code itself is set to",1,"review-model"],["aria-label","Review effort",3,"change","value","disabled"],["type","button","title","Review the whole diff again, ignoring what was already reviewed",1,"btn","small",3,"disabled"],[1,"findings-toolbar","card"],[1,"finding-card","card",3,"class"],[1,"resolved-findings"],[1,"review-meta"],[1,"review-stale"],["type","button","title","Review the whole diff again, ignoring what was already reviewed",1,"btn","small",3,"click","disabled"],[1,"select-all"],["type","checkbox",3,"change","checked"],["type","button",1,"btn","primary","small",3,"click","disabled"],[1,"finding-card","card"],[1,"finding-pick"],[1,"path-chip","muted"],[1,"finding-card","card","resolved"],[1,"finding-state"],[1,"file-list"],["role","alert",1,"section-error","block"],[3,"commentSubmit","replySubmit","statusSubmit","diff","threads","loading","error","posting","focus"],["type","button",1,"dir-row",3,"paddingLeft","title"],["type","button",3,"active","paddingLeft","title"],["type","button",1,"dir-row",3,"click","title"],["viewBox","0 0 24 24","aria-hidden","true",1,"file-chevron"],["points","9 6 15 12 9 18"],["points","6 9 12 15 18 9"],["type","button",3,"click","title"],[1,"check-row"],[1,"check-info"],[1,"check-name"],[1,"required-chip"],["type","button",1,"btn","small",3,"disabled"],[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"],[1,"confirm-text"],["type","button",1,"btn","danger",3,"click","disabled"],[3,"change"],[3,"value","disabled","selected"],[1,"policy-note"],[1,"check"],[1,"check","nested"],["type","checkbox",3,"change","checked","disabled"]],template:function(e,i){if(e&1&&(u(0,"div",3),C("click",function(){return i.onBackdropClick()}),f(),u(1,"section",4),E(2,ZR,2,0,"div",5)(3,UA,53,25)(4,GA,5,1,"div",6),f()),e&2){let r;c(2),D(i.loading()?2:(r=i.pr())?3:4,r)}},dependencies:[Vn,$o,pt,Ri,ua,Ld],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)}.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:2px}.label-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:3px;background:#3794ff24;color:var(--accent)}.label-chip[_ngcontent-%COMP%] .chip-x[_ngcontent-%COMP%]{padding:0;border:none;background:transparent;color:inherit;cursor:pointer;font:inherit;font-size:11px;line-height:1}.label-chip[_ngcontent-%COMP%] .chip-x[_ngcontent-%COMP%]:hover:not(:disabled){color:var(--text-bright)}.reviewers[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:16px 0 5px;color:var(--text-dim);font-size:10px;letter-spacing:.5px;text-transform:uppercase}.side-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;margin:16px 0 7px}.side-head[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;color:var(--text-dim);font-size:10px;letter-spacing:.5px;text-transform:uppercase}.side-head[_ngcontent-%COMP%] .icon-btn.add[_ngcontent-%COMP%]{flex:none;width:20px;height:20px;margin-left:auto;border-color:transparent;background:transparent;color:var(--text-dim);font-size:15px;font-weight:600}.side-head[_ngcontent-%COMP%] .icon-btn.add[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.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-list[_ngcontent-%COMP%] .dir-row[_ngcontent-%COMP%]{color:var(--text-dim);font-weight:600}.file-chevron[_ngcontent-%COMP%]{flex:none;width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.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}.confirm-text[_ngcontent-%COMP%]{margin:-6px 0 14px;color:var(--text-dim);font-size:12px}.policy-note[_ngcontent-%COMP%]{margin:-10px 0 14px;color:var(--text-dim);font-size:11px}.btn.danger[_ngcontent-%COMP%]{border-color:#f14c4c8c;background:#f14c4c29;color:#f48771}.btn.danger[_ngcontent-%COMP%]:hover:not(:disabled){background:#f14c4c42}.checks-card[_ngcontent-%COMP%]{padding:14px;margin-bottom:16px}.merge-banner[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;margin-bottom:16px;padding:10px 14px;border:1px solid rgba(241,76,76,.45);border-radius:5px;background:#f14c4c1f}.merge-banner[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:#f48771;font-size:13px}.merge-banner[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:2px 0 0;color:var(--text-dim);font-size:12px}.merge-banner[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{max-width:none;color:#f48771}.merge-banner.queued[_ngcontent-%COMP%]{border-color:#3794ff66;background:#3794ff1f}.merge-banner.queued[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--accent)}.merge-banner[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{flex:none;margin-left:auto}.check-list[_ngcontent-%COMP%]{margin:0;padding:0;list-style:none}.check-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:9px;min-height:34px;border-bottom:1px solid rgba(255,255,255,.05)}.check-row[_ngcontent-%COMP%]:last-child{border-bottom:none}.check-divider[_ngcontent-%COMP%]{margin:6px 0;border:none;border-top:1px solid rgba(255,255,255,.12)}.check-info[_ngcontent-%COMP%]{flex:1;min-width:0}.check-name[_ngcontent-%COMP%]{color:var(--text);font-size:12px}.check-info[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{display:block;overflow:hidden;color:var(--text-dim);font-size:11px;text-overflow:ellipsis;white-space:nowrap}.check-state[_ngcontent-%COMP%]{flex:none;min-width:52px;padding:2px 6px;border-radius:3px;color:var(--text-dim);font-size:10px;font-weight:600;text-align:center;text-transform:uppercase}.check-state.state-succeeded[_ngcontent-%COMP%]{background:#89d1852e;color:#89d185}.check-state.state-failed[_ngcontent-%COMP%]{background:#f14c4c29;color:#f48771}.check-state.state-pending[_ngcontent-%COMP%]{background:#dcb67a29;color:#dcb67a}.check-state.state-notApplicable[_ngcontent-%COMP%]{background:#80808029;color:var(--text-dim)}.required-chip[_ngcontent-%COMP%]{margin-left:6px;padding:1px 5px;border-radius:3px;background:#dcb67a24;color:#dcb67a;font-size:10px;font-weight:600;text-transform:uppercase}.section-error[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;margin-bottom:8px;padding:8px 10px;border:1px solid rgba(241,76,76,.4);border-radius:4px;background:#f14c4c1a;color:#f48771;font-size:12px}.section-error.block[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start;margin:10px}.section-warning[_ngcontent-%COMP%]{margin-bottom:8px;padding:6px 10px;border:1px solid rgba(220,182,122,.35);border-radius:4px;background:#dcb67a14;color:#dcb67a;font-size:11px}.work-item-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:0;padding:0;list-style:none}.work-item-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:8px;padding:4px 0;border-bottom:1px solid rgba(255,255,255,.05)}.work-item-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{border-bottom:none}.work-item-link[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;align-items:baseline;gap:6px;border:none;background:transparent;color:var(--accent);cursor:pointer;font:inherit;font-size:12px;padding:2px 0;text-align:left}.work-item-id[_ngcontent-%COMP%]{flex:none;color:var(--text-dim);font-family:var(--mono);font-size:11px}.work-item-title[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.work-item-link[_ngcontent-%COMP%]:hover .work-item-title[_ngcontent-%COMP%]{text-decoration:underline}.work-item-list[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{flex:none;color:var(--text-dim);font-size:10px;text-transform:uppercase}.work-item-list[_ngcontent-%COMP%] .icon-btn[_ngcontent-%COMP%]{flex:none;width:18px;height:18px;border:none;background:transparent;color:var(--text-dim);font-size:13px}.work-item-list[_ngcontent-%COMP%] .icon-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}@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)}}.tabs[_ngcontent-%COMP%] .badge-pending[_ngcontent-%COMP%]{background:#dcb67a33;color:#dcb67a}.review-pane[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;padding:14px;overflow:auto}.review-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;padding:12px 14px}.review-summary[_ngcontent-%COMP%]{flex:1;min-width:0}.review-line[_ngcontent-%COMP%]{margin:0;color:var(--text);font-size:13px}.review-meta[_ngcontent-%COMP%]{margin:4px 0 0;color:var(--text-dim);font-size:11px}.review-stale[_ngcontent-%COMP%]{color:#dcb67a}.review-actions[_ngcontent-%COMP%]{display:flex;flex:none;align-items:center;gap:8px}.review-model[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:6px;margin:0}.review-model[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{max-width:150px;height:26px;padding:0 6px;font-size:12px}.findings-toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:8px 14px}.findings-toolbar[_ngcontent-%COMP%] .form-actions[_ngcontent-%COMP%]{margin-left:auto}.select-all[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;color:var(--text-dim);font-size:12px}.finding-card[_ngcontent-%COMP%]{padding:10px 14px;border-left:3px solid var(--text-dim)}.finding-card[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;margin-bottom:6px}.finding-card[_ngcontent-%COMP%] header[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{overflow:hidden;color:var(--text-bright);font-size:13px;text-overflow:ellipsis;white-space:nowrap}.finding-card[_ngcontent-%COMP%] .path-chip[_ngcontent-%COMP%]{margin-left:auto}.finding-pick[_ngcontent-%COMP%]{display:flex;flex:1;align-items:center;gap:8px;min-width:0;cursor:pointer}.finding-card.severity-blocker[_ngcontent-%COMP%]{border-left-color:#f48771}.finding-card.severity-concern[_ngcontent-%COMP%]{border-left-color:#dcb67a}.finding-card.severity-suggestion[_ngcontent-%COMP%]{border-left-color:var(--accent)}.finding-card.severity-nit[_ngcontent-%COMP%]{border-left-color:var(--text-dim)}.severity-badge[_ngcontent-%COMP%]{flex:none;padding:2px 6px;border-radius:3px;font-size:10px;font-weight:600;text-transform:uppercase}.severity-badge.severity-blocker[_ngcontent-%COMP%]{background:#f14c4c29;color:#f48771}.severity-badge.severity-concern[_ngcontent-%COMP%]{background:#dcb67a29;color:#dcb67a}.severity-badge.severity-suggestion[_ngcontent-%COMP%]{background:#3794ff24;color:var(--accent)}.severity-badge.severity-nit[_ngcontent-%COMP%]{background:#80808029;color:var(--text-dim)}.finding-card.resolved[_ngcontent-%COMP%]{opacity:.65}.finding-card.resolved[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{margin-bottom:0}.finding-state[_ngcontent-%COMP%]{flex:none;color:var(--text-dim);font-size:11px}.resolved-findings[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;margin-top:8px}.resolved-findings[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:6px 0 0;color:var(--text-dim);font-size:11px;font-weight:600;text-transform:uppercase}.path-chip.muted[_ngcontent-%COMP%]{color:var(--text-dim);cursor:default}"],changeDetection:0})};function eC(n){return new pe(t=>{let e=Object.keys(n),i={},r=e.length,o=!1;if(!r){t.next({}),t.complete();return}for(let s of e)n[s].subscribe({next:a=>{i[s]=a},error:a=>{o||(o=!0,t.error(a))},complete:()=>{--r===0&&!o&&(t.next(i),t.complete())}})})}var tC=(n,t)=>n.name.toLowerCase().localeCompare(t.name.toLowerCase());function jd(n,t){let e={name:"",dirs:new Map,refs:[]};for(let o of n){let s=o.name.split("/").filter(Boolean),a=e;for(let l of s.slice(0,-1)){let h=a.dirs.get(l);h||(h={name:l,dirs:new Map,refs:[]},a.dirs.set(l,h)),a=h}a.refs.push(o)}let i=[],r=(o,s,a)=>{for(let l of[...o.dirs.values()].sort(tC)){let h=s?`${s}/${l.name}`:l.name,_=t.has(h);i.push({kind:"dir",path:h,name:l.name,depth:a,collapsed:_}),_||r(l,h,a+1)}for(let l of[...o.refs].sort(tC))i.push({kind:"ref",path:l.name,name:l.name.split("/").pop()??l.name,depth:a,ref:l})};return r(e,"",0),i}function Rr(n){return n.map(t=>({kind:"ref",path:t.name,name:t.name,depth:0,ref:t}))}function Ni(n,t){return t?n:n.normalize("NFD").replace(new RegExp("\\p{M}","gu"),"").toLocaleLowerCase()}var YA=["panel"],QA=["branchBody"],KA=["tagBody"],XA=(n,t)=>t.index,JA=(n,t)=>t.path,eL=(n,t)=>t.id;function tL(n,t){if(n&1){let e=I();b(0,"button",26),F("click",function(){m(e);let r=d();return g(r.clearFilter())}),V(),b(1,"svg",12),te(2,"line",27)(3,"line",28),y()()}}function nL(n,t){n&1&&(V(),te(0,"polyline",29)(1,"polyline",30))}function iL(n,t){n&1&&(V(),te(0,"polyline",31)(1,"polyline",32))}function rL(n,t){n&1&&(V(),te(0,"polyline",16))}function oL(n,t){n&1&&(V(),te(0,"polyline",17))}function sL(n,t){if(n&1&&te(0,"div",35),n&2){let e=d(2);ne("height",e.branchPadTop(),"px")}}function aL(n,t){n&1&&(b(0,"div",36),p(1,"Loading..."),y())}function lL(n,t){if(n&1){let e=I();b(0,"button",39),F("click",function(){m(e);let r=d(3);return g(r.selectAllBranches())}),V(),b(1,"svg",40),te(2,"line",41)(3,"line",42)(4,"line",43)(5,"circle",44)(6,"circle",45)(7,"circle",46),y(),fe(),b(8,"span",47),p(9,"All Branches"),y()()}if(n&2){let e=d(3);J("selected",e.selectedBranches().length===0)}}function cL(n,t){if(n&1&&(b(0,"div",38),p(1),y()),n&2){let e=d().$implicit;c(),P(e.text)}}function dL(n,t){n&1&&(V(),te(0,"polyline",17))}function uL(n,t){n&1&&(V(),te(0,"polyline",16))}function pL(n,t){if(n&1){let e=I();b(0,"button",50),F("click",function(){m(e);let r=d(2).$implicit,o=d(2);return g(o.toggleDir(r.group,r.row.path))}),V(),b(1,"svg",51),E(2,dL,1,0,":svg:polyline",17)(3,uL,1,0,":svg:polyline",16),y(),fe(),b(4,"span",47),p(5),y()()}if(n&2){let e=d(2).$implicit;ne("padding-left",e.row.depth*14+8,"px"),$("title",e.row.path),Q("aria-expanded",!e.row.collapsed),c(2),D(e.row.collapsed?2:3),c(3),P(e.row.name)}}function fL(n,t){n&1&&(b(0,"span",57),p(1,"current"),y())}function hL(n,t){if(n&1){let e=I();b(0,"button",52),F("click",function(r){m(e);let o=d(2).$implicit,s=d(2);return g(s.selectBranch(o.row.ref.name,r))})("contextmenu",function(r){m(e);let o=d(2).$implicit,s=d(2);return g(s.onContextMenu(r,{kind:"branch",branch:s.badgeOf(o.row.ref)}))}),V(),b(1,"svg",40),te(2,"line",53)(3,"circle",54)(4,"circle",55)(5,"path",56),y(),fe(),b(6,"span",47),p(7),y(),E(8,fL,2,0,"span",57),y()}if(n&2){let e=d(2).$implicit,i=d(2);ne("padding-left",e.row.depth*14+8,"px"),J("selected",i.selectedBranches().includes(e.row.ref.name)),$("title",e.row.ref.name),c(7),P(e.row.name),c(),D(e.row.ref.current?8:-1)}}function mL(n,t){if(n&1&&E(0,pL,6,6,"button",48)(1,hL,9,7,"button",49),n&2){let e=d().$implicit;D(e.row.kind==="dir"?0:1)}}function gL(n,t){if(n&1&&E(0,aL,2,0,"div",36)(1,lL,10,2,"button",37)(2,cL,2,1,"div",38)(3,mL,2,1),n&2){let e,i=t.$implicit;D((e=i.type)==="loading"?0:e==="all"?1:e==="label"?2:3)}}function _L(n,t){if(n&1&&te(0,"div",35),n&2){let e=d(2);ne("height",e.branchPadBottom(),"px")}}function vL(n,t){n&1&&(b(0,"div",34),p(1,"No matching branches"),y())}function bL(n,t){if(n&1&&(b(0,"div",20,1),E(2,sL,1,2,"div",33),W(3,gL,4,1,null,null,zc().trackBranchItem,!0),E(5,_L,1,2,"div",33),E(6,vL,2,0,"div",34),y()),n&2){let e=d();c(2),D(e.branchPadTop()>0?2:-1),c(),q(e.branchSlice()),c(2),D(e.branchPadBottom()>0?5:-1),c(),D(!e.showLoading()&&e.filtering()&&e.branchCount()===0?6:-1)}}function yL(n,t){n&1&&(V(),te(0,"polyline",16))}function xL(n,t){n&1&&(V(),te(0,"polyline",17))}function CL(n,t){if(n&1&&te(0,"div",35),n&2){let e=d(2);ne("height",e.tagPadTop(),"px")}}function wL(n,t){n&1&&(b(0,"div",36),p(1,"Loading..."),y())}function EL(n,t){n&1&&(V(),te(0,"polyline",17))}function DL(n,t){n&1&&(V(),te(0,"polyline",16))}function SL(n,t){if(n&1){let e=I();b(0,"button",50),F("click",function(){m(e);let r=d().$implicit,o=d(2);return g(o.toggleDir("tag",r.row.path))}),V(),b(1,"svg",51),E(2,EL,1,0,":svg:polyline",17)(3,DL,1,0,":svg:polyline",16),y(),fe(),b(4,"span",47),p(5),y()()}if(n&2){let e=d().$implicit;ne("padding-left",e.row.depth*14+8,"px"),$("title",e.row.path),Q("aria-expanded",!e.row.collapsed),c(2),D(e.row.collapsed?2:3),c(3),P(e.row.name)}}function ML(n,t){if(n&1){let e=I();b(0,"button",52),F("click",function(){m(e);let r=d().$implicit,o=d(2);return g(o.selectTag(r.row.ref))})("contextmenu",function(r){m(e);let o=d().$implicit,s=d(2);return g(s.onContextMenu(r,{kind:"tag",branch:{type:"tag",name:o.row.ref.name}}))}),V(),b(1,"svg",40),te(2,"path",58)(3,"line",59),y(),fe(),b(4,"span",47),p(5),y()()}if(n&2){let e=d().$implicit,i=d(2);ne("padding-left",e.row.depth*14+8,"px"),J("selected",i.selectedCommitHash()===e.row.ref.hash),$("title",e.row.ref.name),c(5),P(e.row.name)}}function TL(n,t){if(n&1&&E(0,wL,2,0,"div",36)(1,SL,6,6,"button",48)(2,ML,6,6,"button",49),n&2){let e=t.$implicit;D(e.type==="loading"?0:e.row.kind==="dir"?1:2)}}function kL(n,t){if(n&1&&(b(0,"div",34),p(1),y()),n&2){let e=d(2);c(),P(e.filtering()?"No matching tags":"No tags")}}function IL(n,t){if(n&1&&te(0,"div",35),n&2){let e=d(2);ne("height",e.tagPadBottom(),"px")}}function PL(n,t){if(n&1&&(b(0,"div",20,2),E(2,CL,1,2,"div",33),W(3,TL,3,1,null,null,zc().trackTagItem,!0,kL,2,1,"div",34),E(6,IL,1,2,"div",33),y()),n&2){let e=d();c(2),D(e.tagPadTop()>0?2:-1),c(),q(e.tagSlice()),c(3),D(e.tagPadBottom()>0?6:-1)}}function OL(n,t){n&1&&(V(),te(0,"polyline",16))}function RL(n,t){n&1&&(V(),te(0,"polyline",17))}function NL(n,t){n&1&&(b(0,"div",36),p(1,"Loading..."),y())}function AL(n,t){if(n&1){let e=I();b(0,"button",52),F("click",function(){let r=m(e).$implicit,o=d(2);return g(o.stashSelect.emit(r))})("contextmenu",function(r){let o=m(e).$implicit,s=d(2);return g(s.onContextMenu(r,{kind:"stash",stash:o}))}),V(),b(1,"svg",40),te(2,"path",61)(3,"line",62),y(),fe(),b(4,"span",47),p(5),y(),b(6,"span",63),p(7),y()()}if(n&2){let e=t.$implicit,i=d(2);J("selected",i.selectedCommitHash()===e.hash),$("title",e.message),c(5),P(i.stashLabel(e)),c(2),P(e.message)}}function LL(n,t){if(n&1&&(b(0,"div",34),p(1),y()),n&2){let e=d(3);c(),P(e.filtering()?"No matching stashes":"No stashes")}}function FL(n,t){if(n&1&&E(0,LL,2,1,"div",34),n&2){let e=d(2);D(e.showLoading()?-1:0)}}function VL(n,t){if(n&1&&(b(0,"div",20),E(1,NL,2,0,"div",36),W(2,AL,8,5,"button",60,XA,!1,FL,1,1),y()),n&2){let e=d();c(),D(e.showLoading()?1:-1),c(),q(e.filteredStashes())}}function BL(n,t){n&1&&(V(),te(0,"polyline",16))}function jL(n,t){n&1&&(V(),te(0,"polyline",17))}function $L(n,t){n&1&&(b(0,"div",36),p(1,"Loading..."),y())}function HL(n,t){if(n&1&&(b(0,"span",66),p(1),y()),n&2){let e=d().$implicit;c(),P(e.branch)}}function zL(n,t){if(n&1){let e=I();b(0,"button",64),F("dblclick",function(){let r=m(e).$implicit,o=d(2);return g(o.openWorktree(r))})("contextmenu",function(r){let o=m(e).$implicit,s=d(2);return g(s.onContextMenu(r,{kind:"worktree",worktree:o}))}),V(),b(1,"svg",40),te(2,"path",65),y(),fe(),b(3,"span",47),p(4),y(),E(5,HL,2,1,"span",66),y()}if(n&2){let e=t.$implicit,i=d(2);J("selected",e.current),$("title",e.path),c(4),P(i.worktreeLabel(e)),c(),D(e.branch?5:-1)}}function UL(n,t){if(n&1&&(b(0,"div",34),p(1),y()),n&2){let e=d(3);c(),P(e.filtering()?"No matching worktrees":"No worktrees")}}function GL(n,t){if(n&1&&E(0,UL,2,1,"div",34),n&2){let e=d(2);D(e.showLoading()?-1:0)}}function WL(n,t){if(n&1&&(b(0,"div",20),E(1,$L,2,0,"div",36),W(2,zL,6,5,"button",60,JA,!1,GL,1,1),y()),n&2){let e=d();c(),D(e.showLoading()?1:-1),c(),q(e.filteredWorktrees())}}function qL(n,t){n&1&&(V(),te(0,"polyline",16))}function ZL(n,t){n&1&&(V(),te(0,"polyline",17))}function YL(n,t){if(n&1&&(b(0,"div",70),p(1),y()),n&2){let e=d(3);c(),P(e.prError())}}function QL(n,t){n&1&&(b(0,"div",34),p(1,"Loading pull requests..."),y())}function KL(n,t){n&1&&(V(),te(0,"polyline",74))}function XL(n,t){n&1&&(V(),te(0,"polyline",74)(1,"line",82))}function JL(n,t){n&1&&(V(),te(0,"circle",83)(1,"polyline",84))}function eF(n,t){n&1&&(V(),te(0,"line",85)(1,"line",86))}function tF(n,t){n&1&&(V(),te(0,"circle",75))}function nF(n,t){n&1&&(b(0,"span",79),p(1,"Draft"),y())}function iF(n,t){n&1&&(b(0,"span",80),p(1,"Required"),y())}function rF(n,t){if(n&1){let e=I();b(0,"button",72),F("click",function(){let r=m(e).$implicit,o=d(4);return g(o.prSelect.emit(r.id))}),V(),b(1,"svg",73),E(2,KL,1,0,":svg:polyline",74)(3,XL,2,0)(4,JL,2,0)(5,eF,2,0)(6,tF,1,0,":svg:circle",75),y(),fe(),b(7,"span",76)(8,"span",77)(9,"span",78),p(10),y(),E(11,nF,2,0,"span",79),E(12,iF,2,0,"span",80),y(),b(13,"span",81),p(14),y()()()}if(n&2){let e,i=t.$implicit,r=d(4);$("title",r.prTooltip(i)),c(),Xe(r.voteClass(i)),c(),D((e=i.myVote)===10?2:e===5?3:e===-5?4:e===-10?5:6),c(8),P(i.title),c(),D(i.isDraft?11:-1),c(),D(i.requiresMe?12:-1),c(2),wo(" ",i.author.name," \xB7 ",i.sourceBranch," \u2192 ",i.targetBranch," ")}}function oF(n,t){if(n&1&&(b(0,"div",34),p(1),y()),n&2){let e=d(4);c(),P(e.filtering()?"No matching pull requests":"No active pull requests")}}function sF(n,t){if(n&1&&W(0,rF,15,10,"button",71,eL,!1,oF,2,1,"div",34),n&2){let e=d(3);q(e.filteredPullRequests())}}function aF(n,t){if(n&1&&(b(0,"div",20),E(1,YL,2,1,"div",70)(2,QL,2,0,"div",34)(3,sF,3,1),y()),n&2){let e=d(2);c(),D(e.prError()?1:e.pullRequests()===null?2:3)}}function lF(n,t){if(n&1){let e=I();b(0,"section",13)(1,"div",21)(2,"button",14),F("click",function(){m(e);let r=d();return g(r.prsOpen.set(!r.prsOpen()))}),V(),b(3,"svg",15),E(4,qL,1,0,":svg:polyline",16)(5,ZL,1,0,":svg:polyline",17),y(),fe(),b(6,"span",18),p(7,"Pull Requests"),y(),b(8,"span",19),p(9),y()(),b(10,"button",67),F("click",function(){m(e);let r=d();return g(r.prRefresh.emit())}),V(),b(11,"svg",12),te(12,"polyline",68)(13,"path",69),y()()(),E(14,aF,4,1,"div",20),y()}if(n&2){let e=d();c(2),Q("aria-expanded",e.prsExpanded()),c(2),D(e.prsExpanded()?4:5),c(5),P(e.prCount()),c(5),D(e.prsExpanded()?14:-1)}}var $d=24,nC=10,Hd="guito.sidePanelWidth",iC=200;function rC(n,t,e,i){let r=Math.floor((n-e)/$d)-nC,o=Math.ceil((n+t-e)/$d)+nC,s=Math.max(0,Math.min(r,i)),a=Math.max(s,Math.min(Math.max(o,0),i));return{start:s,end:a,padTop:s*$d,padBottom:(i-a)*$d}}var zd=class n{branches=N.required();selectedBranches=N.required();showRemote=N.required();stashes=N.required();worktrees=N.required();tags=N.required();refListView=N("flat");searchCaseSensitive=N(!1);worktreeSort=N("default");prSort=N("newest");sectionsExpandedByDefault=N(!0);selectedCommitHash=N("");loading=N(!1);showLoading=v(!1);azureEnabled=N(!1);pullRequests=N(null);prError=N("");branchChange=Z();tagSelect=Z();stashSelect=Z();contextMenu=Z();worktreeCreate=Z();worktreeOpen=Z();prSelect=Z();prRefresh=Z();prsOpen=Cr(()=>this.sectionsExpandedByDefault());branchesOpen=Cr(()=>this.sectionsExpandedByDefault());tagsOpen=Cr(()=>this.sectionsExpandedByDefault());stashesOpen=Cr(()=>this.sectionsExpandedByDefault());worktreesOpen=Cr(()=>this.sectionsExpandedByDefault());filter=v("");filterText=O(()=>Ni(this.filter().trim(),this.searchCaseSensitive()));filtering=O(()=>this.filterText()!=="");onFilterInput(t){this.filter.set(t.target.value)}clearFilter(){this.filter.set("")}branchesExpanded=O(()=>this.filtering()||this.branchesOpen());tagsExpanded=O(()=>this.filtering()||this.tagsOpen());stashesExpanded=O(()=>this.filtering()||this.stashesOpen());worktreesExpanded=O(()=>this.filtering()||this.worktreesOpen());prsExpanded=O(()=>this.filtering()||this.prsOpen());allSectionsOpen=O(()=>this.branchesOpen()&&this.tagsOpen()&&this.stashesOpen()&&this.worktreesOpen()&&(!this.azureEnabled()||this.prsOpen()));toggleAllSections(){let t=!this.allSectionsOpen();this.branchesOpen.set(t),this.tagsOpen.set(t),this.stashesOpen.set(t),this.worktreesOpen.set(t),this.prsOpen.set(t)}localBranches=O(()=>this.branches().filter(t=>!t.remote));remoteBranches=O(()=>this.branches().filter(t=>t.remote));localDirsCollapsed=v(new Set);remoteDirsCollapsed=v(new Set);tagDirsCollapsed=v(new Set);filterRefs(t){return this.filtering()?t.filter(e=>this.matchesFilter(e.name)):t}matchesFilter(t){return Ni(t,this.searchCaseSensitive()).includes(this.filterText())}localBranchRows=O(()=>this.filtering()?Rr(this.filterRefs(this.localBranches())):this.refListView()==="tree"?jd(this.localBranches(),this.localDirsCollapsed()):Rr(this.localBranches()));remoteBranchRows=O(()=>this.filtering()?Rr(this.filterRefs(this.remoteBranches())):this.refListView()==="tree"?jd(this.remoteBranches(),this.remoteDirsCollapsed()):Rr(this.remoteBranches()));tagRows=O(()=>this.filtering()?Rr(this.filterRefs(this.tags())):this.refListView()==="tree"?jd(this.tags(),this.tagDirsCollapsed()):Rr(this.tags()));branchSectionRows=O(()=>{let t=[];this.showLoading()&&t.push({type:"loading"}),t.push({type:"all"});let e=this.localBranchRows();(!this.filtering()||e.length>0)&&t.push({type:"label",text:"Local"});for(let i of e)t.push({type:"row",group:"local",row:i});if(this.showRemote()){let i=this.remoteBranchRows();(!this.filtering()||i.length>0)&&t.push({type:"label",text:"Remote"});for(let r of i)t.push({type:"row",group:"remote",row:r})}return t});tagSectionRows=O(()=>{let t=this.tagRows().map(e=>({type:"row",row:e}));return this.showLoading()?[{type:"loading"},...t]:t});zone=R(we);panelEl=dt.required("panel");branchBodyEl=dt("branchBody");tagBodyEl=dt("tagBody");scrollTop=v(0);panelHeight=v(0);branchBodyTop=v(0);tagBodyTop=v(0);branchWindow=O(()=>rC(this.scrollTop(),this.panelHeight(),this.branchBodyTop(),this.branchSectionRows().length));tagWindow=O(()=>rC(this.scrollTop(),this.panelHeight(),this.tagBodyTop(),this.tagSectionRows().length));branchSlice=O(()=>{let t=this.branchWindow();return this.branchSectionRows().slice(t.start,t.end)});branchPadTop=O(()=>this.branchWindow().padTop);branchPadBottom=O(()=>this.branchWindow().padBottom);tagSlice=O(()=>{let t=this.tagWindow();return this.tagSectionRows().slice(t.start,t.end)});tagPadTop=O(()=>this.tagWindow().padTop);tagPadBottom=O(()=>this.tagWindow().padBottom);constructor(){ge(t=>{if(!this.loading()){this.showLoading.set(!1);return}let e=setTimeout(()=>this.zone.run(()=>this.showLoading.set(!0)),200);t(()=>clearTimeout(e))}),ge(t=>{let e=this.panelEl().nativeElement,i=()=>this.measureScroll(),r=new ResizeObserver(()=>this.zone.run(i));r.observe(e),e.addEventListener("scroll",i,{passive:!0}),t(()=>{r.disconnect(),e.removeEventListener("scroll",i)})}),ra(()=>{this.branchesExpanded(),this.tagsExpanded(),this.filtering(),this.branchCount(),this.branchSectionRows().length,this.tagSectionRows().length,this.panelHeight(),je(()=>this.measureOffsets())})}trackBranchItem(t,e){switch(e.type){case"loading":return"loading";case"all":return"all";case"label":return`label:${e.text}`;default:return`${e.group}:${e.row.kind}:${e.row.path}`}}trackTagItem(t,e){return e.type==="loading"?"loading":`${e.row.kind}:${e.row.path}`}measureScroll(){let t=this.panelEl().nativeElement;this.scrollTop.set(t.scrollTop),this.panelHeight.set(t.clientHeight)}measureOffsets(){let t=this.branchBodyEl(),e=this.tagBodyEl();t&&this.branchBodyTop.set(t.nativeElement.offsetTop),e&&this.tagBodyTop.set(e.nativeElement.offsetTop)}branchCount=O(()=>{if(!this.filtering())return this.branches().length;let t=i=>i.filter(r=>r.kind==="ref").length,e=t(this.localBranchRows());return this.showRemote()&&(e+=t(this.remoteBranchRows())),e});tagCount=O(()=>this.filtering()?this.tagRows().length:this.tags().length);filteredStashes=O(()=>{let t=this.stashes();return this.filtering()?t.filter(e=>this.matchesFilter(this.stashLabel(e))||this.matchesFilter(e.message)):t});stashCount=O(()=>this.filtering()?this.filteredStashes().length:this.stashes().length);filteredWorktrees=O(()=>{let t=this.worktrees(),e=this.filtering()?t.filter(r=>this.matchesFilter(this.worktreeLabel(r))||this.matchesFilter(r.branch??"")||this.matchesFilter(r.path)):[...t],i=this.worktreeSort();if(i==="name-asc"||i==="name-desc"){let r=i==="name-asc"?1:-1;e.sort((o,s)=>r*this.worktreeLabel(o).localeCompare(this.worktreeLabel(s),void 0,{sensitivity:"base"}))}return e});worktreeCount=O(()=>this.filtering()?this.filteredWorktrees().length:this.worktrees().length);filteredPullRequests=O(()=>{let t=this.pullRequests();if(t===null)return t;let e=this.filtering()?t.filter(r=>this.matchesFilter(r.title)||this.matchesFilter(r.sourceBranch)||this.matchesFilter(r.targetBranch)||this.matchesFilter(r.author.name)):[...t],i=this.prSort();if(i==="oldest")e.sort((r,o)=>String(r.createdAt).localeCompare(String(o.createdAt)));else if(i==="title-asc"||i==="title-desc"){let r=i==="title-asc"?1:-1;e.sort((o,s)=>r*o.title.localeCompare(s.title,void 0,{sensitivity:"base"})||o.id-s.id)}else e.sort((r,o)=>String(o.createdAt).localeCompare(String(r.createdAt)));return e});prCount=O(()=>this.filtering()?(this.filteredPullRequests()??[]).length:(this.pullRequests()??[]).length);toggleDir(t,e){(t==="local"?this.localDirsCollapsed:t==="remote"?this.remoteDirsCollapsed:this.tagDirsCollapsed).update(r=>{let o=new Set(r);return o.has(e)?o.delete(e):o.add(e),o})}selectionAnchor=null;branchOrder=O(()=>{let t=e=>e.filter(i=>i.kind==="ref").map(i=>i.ref.name);return[...t(this.localBranchRows()),...t(this.remoteBranchRows())]});selectBranch(t,e){let i=this.selectedBranches(),r=this.branchOrder(),o;if(e.shiftKey){let s=this.selectionAnchor??t,a=r.indexOf(s),l=r.indexOf(t);o=a===-1||l===-1?[t]:r.slice(Math.min(a,l),Math.max(a,l)+1)}else e.ctrlKey||e.metaKey?(o=i.includes(t)?i.filter(s=>s!==t):[...i,t],this.selectionAnchor=t):(o=i.length===1&&i[0]===t?[]:[t],this.selectionAnchor=t);this.branchChange.emit(o)}selectAllBranches(){this.selectionAnchor=null,this.branchChange.emit([])}selectTag(t){this.tagSelect.emit(t)}voteClass(t){switch(t.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(t){let e=t.reviewers.map(i=>`${i.name}${i.isRequired?" (required)":""}`).join(", ");return[`!${t.id} ${t.title}`,`By ${t.author.name}${t.isDraft?" \xB7 draft":""}`,`${t.sourceBranch} \u2192 ${t.targetBranch}`,e?`Reviewers: ${e}`:""].filter(Boolean).join(`
65
+ `)}badgeOf(t){return{type:t.current?"head":t.remote?"remote":"local",name:t.name}}onContextMenu(t,e){t.preventDefault(),this.contextMenu.emit({x:t.clientX,y:t.clientY,target:e})}openWorktree(t){t.bare||this.worktreeOpen.emit(t)}worktreeLabel(t){let e=t.path.split(/[\\/]/).filter(Boolean).pop()??t.path;return t.bare?`${e} (bare)`:t.detached?`${e} (detached)`:e}stashLabel(t){return`stash@{${t.index}}`}panelWidth=v(No(Hd));resizing=v(!1);panelWidthCss=O(()=>{let t=this.panelWidth();return t===null?null:`${t}px`});detachResize=null;startResize(t){this.detachResize||(this.resizing.set(!0),this.detachResize=Lo(t,{direction:1,startWidth:this.effectiveWidth(),min:iC,onResize:e=>this.panelWidth.set(e),onEnd:e=>{this.detachResize=null,this.resizing.set(!1),this.panelWidth.set(e),Kn(Hd,e)}}))}resizeKeydown(t){let e=t.shiftKey?50:10,i=t.key==="ArrowRight"?e:t.key==="ArrowLeft"?-e:0;if(i===0)return;t.preventDefault();let r=Pi(this.effectiveWidth()+i,iC);this.panelWidth.set(r),Kn(Hd,r)}resetWidth(){this.panelWidth.set(null),Ao(Hd)}effectiveWidth(){return this.panelWidth()??this.panelEl().nativeElement.offsetWidth}ngOnDestroy(){this.detachResize?.(),this.detachResize=null}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-side-panel"]],viewQuery:function(e,i){e&1&&(st(i.panelEl,YA,5),st(i.branchBodyEl,QA,5),st(i.tagBodyEl,KA,5)),e&2&&Rt(3)},hostVars:4,hostBindings:function(e,i){e&2&&(ne("--panel-width",i.panelWidthCss()),J("resizing",i.resizing()))},inputs:{branches:[1,"branches"],selectedBranches:[1,"selectedBranches"],showRemote:[1,"showRemote"],stashes:[1,"stashes"],worktrees:[1,"worktrees"],tags:[1,"tags"],refListView:[1,"refListView"],searchCaseSensitive:[1,"searchCaseSensitive"],worktreeSort:[1,"worktreeSort"],prSort:[1,"prSort"],sectionsExpandedByDefault:[1,"sectionsExpandedByDefault"],selectedCommitHash:[1,"selectedCommitHash"],loading:[1,"loading"],azureEnabled:[1,"azureEnabled"],pullRequests:[1,"pullRequests"],prError:[1,"prError"]},outputs:{branchChange:"branchChange",tagSelect:"tagSelect",stashSelect:"stashSelect",contextMenu:"contextMenu",worktreeCreate:"worktreeCreate",worktreeOpen:"worktreeOpen",prSelect:"prSelect",prRefresh:"prRefresh"},decls:60,vars:25,consts:[["panel",""],["branchBody",""],["tagBody",""],["aria-label","Repository panel",1,"side-panel"],[1,"panel-filter"],["role","search",1,"filter-field"],["viewBox","0 0 24 24","aria-hidden","true",1,"filter-icon"],["cx","11","cy","11","r","7"],["x1","16.25","y1","16.25","x2","21","y2","21"],["type","search","placeholder","Search","aria-label","Search branches, tags, stashes, worktrees and pull requests","autocomplete","off","spellcheck","false",1,"filter-input",3,"input","keydown.escape","value"],["type","button","title","Clear search","aria-label","Clear search",1,"filter-clear"],["type","button",1,"sections-toggle",3,"click","title","disabled"],["viewBox","0 0 24 24","aria-hidden","true"],[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"],["x1","12","y1","5","x2","12","y2","19"],["x1","5","y1","12","x2","19","y2","12"],["role","separator","aria-orientation","vertical","aria-label","Resize repository panel","tabindex","0",1,"panel-resizer",3,"mousedown","dblclick","keydown"],["type","button","title","Clear search","aria-label","Clear search",1,"filter-clear",3,"click"],["x1","18","y1","6","x2","6","y2","18"],["x1","6","y1","6","x2","18","y2","18"],["points","7 11 12 6 17 11"],["points","7 18 12 13 17 18"],["points","7 6 12 11 17 6"],["points","7 13 12 18 17 13"],[1,"scroll-pad",3,"height"],[1,"empty"],[1,"scroll-pad"],["role","status",1,"empty","section-loading"],["type","button","title","Show commits from all branches",1,"row",3,"selected"],[1,"group-label"],["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"],["type","button",1,"row","dir-row",3,"paddingLeft","title"],["type","button",1,"row",3,"selected","paddingLeft","title"],["type","button",1,"row","dir-row",3,"click","title"],["viewBox","0 0 24 24","aria-hidden","true",1,"row-chevron"],["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"],["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,"selected","title"],["d","M21 8v13H3V8M1 3h22v5H1z"],["x1","10","y1","12","x2","14","y2","12"],[1,"row-tag","stash-message"],["type","button",1,"row",3,"dblclick","contextmenu","title"],["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(e,i){if(e&1){let r=I();b(0,"aside",3,0)(2,"div",4)(3,"div",5),V(),b(4,"svg",6),te(5,"circle",7)(6,"line",8),y(),fe(),b(7,"input",9),F("input",function(s){return m(r),g(i.onFilterInput(s))})("keydown.escape",function(){return m(r),g(i.clearFilter())}),y(),E(8,tL,4,0,"button",10),y(),b(9,"button",11),F("click",function(){return m(r),g(i.toggleAllSections())}),V(),b(10,"svg",12),E(11,nL,2,0)(12,iL,2,0),y()()(),fe(),b(13,"section",13)(14,"button",14),F("click",function(){return m(r),g(i.branchesOpen.set(!i.branchesOpen()))}),V(),b(15,"svg",15),E(16,rL,1,0,":svg:polyline",16)(17,oL,1,0,":svg:polyline",17),y(),fe(),b(18,"span",18),p(19,"Branches"),y(),b(20,"span",19),p(21),y()(),E(22,bL,7,3,"div",20),y(),b(23,"section",13)(24,"button",14),F("click",function(){return m(r),g(i.tagsOpen.set(!i.tagsOpen()))}),V(),b(25,"svg",15),E(26,yL,1,0,":svg:polyline",16)(27,xL,1,0,":svg:polyline",17),y(),fe(),b(28,"span",18),p(29,"Tags"),y(),b(30,"span",19),p(31),y()(),E(32,PL,7,3,"div",20),y(),b(33,"section",13)(34,"button",14),F("click",function(){return m(r),g(i.stashesOpen.set(!i.stashesOpen()))}),V(),b(35,"svg",15),E(36,OL,1,0,":svg:polyline",16)(37,RL,1,0,":svg:polyline",17),y(),fe(),b(38,"span",18),p(39,"Stashes"),y(),b(40,"span",19),p(41),y()(),E(42,VL,5,2,"div",20),y(),b(43,"section",13)(44,"div",21)(45,"button",14),F("click",function(){return m(r),g(i.worktreesOpen.set(!i.worktreesOpen()))}),V(),b(46,"svg",15),E(47,BL,1,0,":svg:polyline",16)(48,jL,1,0,":svg:polyline",17),y(),fe(),b(49,"span",18),p(50,"Worktrees"),y(),b(51,"span",19),p(52),y()(),b(53,"button",22),F("click",function(){return m(r),g(i.worktreeCreate.emit())}),V(),b(54,"svg",12),te(55,"line",23)(56,"line",24),y()()(),E(57,WL,5,2,"div",20),y(),E(58,lF,15,4,"section",13),y(),fe(),b(59,"div",25),F("mousedown",function(s){return m(r),g(i.startResize(s))})("dblclick",function(){return m(r),g(i.resetWidth())})("keydown",function(s){return m(r),g(i.resizeKeydown(s))}),y()}e&2&&(c(7),$("value",i.filter()),c(),D(i.filter()?8:-1),c(),$("title",i.filtering()?"Clear search to collapse or expand all sections":i.allSectionsOpen()?"Collapse all sections":"Expand all sections")("disabled",i.filtering()),Q("aria-label",i.allSectionsOpen()?"Collapse all sections":"Expand all sections")("aria-expanded",i.allSectionsOpen()),c(2),D(i.allSectionsOpen()?11:12),c(3),Q("aria-expanded",i.branchesExpanded()),c(2),D(i.branchesExpanded()?16:17),c(5),P(i.branchCount()),c(),D(i.branchesExpanded()?22:-1),c(2),Q("aria-expanded",i.tagsExpanded()),c(2),D(i.tagsExpanded()?26:27),c(5),P(i.tagCount()),c(),D(i.tagsExpanded()?32:-1),c(2),Q("aria-expanded",i.stashesExpanded()),c(2),D(i.stashesExpanded()?36:37),c(5),P(i.stashCount()),c(),D(i.stashesExpanded()?42:-1),c(3),Q("aria-expanded",i.worktreesExpanded()),c(2),D(i.worktreesExpanded()?47:48),c(5),P(i.worktreeCount()),c(5),D(i.worktreesExpanded()?57:-1),c(),D(i.azureEnabled()?58:-1),c(),Q("aria-valuenow",i.panelWidth()))},styles:["[_nghost-%COMP%]{--panel-width: 260px;display:block;position:relative;width:0;flex:none;min-height:0;overflow:hidden;background:var(--bg-alt);transition:width .15s cubic-bezier(.3,0,.8,.15)}[hidden][_nghost-%COMP%]{display:none}.side-panel[_ngcontent-%COMP%]{position:absolute;inset:0 0 0 auto;width:var(--panel-width);overflow-y:auto;border-right:1px solid var(--border)}.panel-open[_nghost-%COMP%]{width:var(--panel-width);transition-duration:.18s;transition-timing-function:cubic-bezier(.05,.7,.1,1)}@media(prefers-reduced-motion:reduce){[_nghost-%COMP%]{transition:none}}.panel-resizer[_ngcontent-%COMP%]{position:absolute;top:0;right:0;width:5px;height:100%;cursor:col-resize;z-index:3}.panel-resizer[_ngcontent-%COMP%]:hover, .panel-resizer[_ngcontent-%COMP%]:focus-visible{background:var(--accent);outline:none}.resizing[_nghost-%COMP%]{transition:none}.tree[_ngcontent-%COMP%]{border-bottom:1px solid var(--border)}.panel-filter[_ngcontent-%COMP%]{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:6px;padding:7px 8px 8px;background:var(--bg-alt);border-bottom:1px solid var(--border)}.filter-field[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1;min-width:0;height:30px;border:1px solid var(--border);border-radius:5px;background:var(--bg);transition:border-color .12s ease,box-shadow .12s ease,background-color .12s ease}.filter-field[_ngcontent-%COMP%]:hover{border-color:var(--text-dim)}.filter-field[_ngcontent-%COMP%]:focus-within{border-color:var(--accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 35%,transparent)}.filter-icon[_ngcontent-%COMP%]{width:14px;height:14px;margin-left:8px;fill:none;stroke:var(--text-dim);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none;pointer-events:none;transition:stroke .12s ease}.filter-field[_ngcontent-%COMP%]:focus-within .filter-icon[_ngcontent-%COMP%]{stroke:var(--text)}.filter-input[_ngcontent-%COMP%]{-webkit-appearance:none;appearance:none;flex:1;min-width:0;height:100%;padding:0 7px;border:0;outline:0;background:transparent;color:var(--text);font-size:12px}.filter-input[_ngcontent-%COMP%]::placeholder{color:var(--text-dim);opacity:.9}.filter-input[_ngcontent-%COMP%]::-webkit-search-cancel-button{display:none}.filter-clear[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;margin-right:3px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--text-dim);cursor:pointer;flex:none}.filter-clear[_ngcontent-%COMP%]:hover{color:var(--text);background:var(--bg-hover)}.filter-clear[_ngcontent-%COMP%]:focus-visible{outline:1px solid var(--accent);outline-offset:-1px}.filter-clear[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}.sections-toggle[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;padding:0;border:1px solid var(--border);border-radius:5px;background:var(--bg);color:var(--text-dim);cursor:pointer;flex:none;transition:color .12s ease,border-color .12s ease,background-color .12s ease}.sections-toggle[_ngcontent-%COMP%]:hover:not(:disabled){color:var(--text);border-color:var(--text-dim);background:var(--bg-hover)}.sections-toggle[_ngcontent-%COMP%]:focus-visible{outline:1px solid var(--accent);outline-offset:1px}.sections-toggle[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:default}.sections-toggle[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.group-label[_ngcontent-%COMP%]{height:24px;box-sizing:border-box;padding:0 6px 0 22px;line-height:24px;color:var(--text-dim);font-size:10px;font-weight:600;letter-spacing:.5px;text-transform:uppercase;-webkit-user-select:none;user-select:none}.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}.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.dir-row[_ngcontent-%COMP%]{color:var(--text-bright)}.row[_ngcontent-%COMP%] .row-chevron[_ngcontent-%COMP%]{width:10px;height:10px;fill:none;stroke:var(--text-dim);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;flex:none}.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}.empty.section-loading[_ngcontent-%COMP%]{height:24px;box-sizing:border-box;padding:0 8px 0 24px;line-height:24px}.scroll-pad[_ngcontent-%COMP%]{width:100%}.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})};function Ud(n){return Qt(this,null,function*(){try{if(navigator.clipboard?.writeText)return yield navigator.clipboard.writeText(n),!0}catch{}try{let t=document.createElement("textarea");t.value=n,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="0",t.style.opacity="0",document.body.appendChild(t),t.select(),t.setSelectionRange(0,n.length);let e=document.execCommand("copy");return t.remove(),e}catch{return!1}})}function cF(n,t){n&1&&(u(0,"div",5),p(1,"Loading conflict\u2026"),f())}function dF(n,t){n&1&&(u(0,"p"),p(1,"Binary file"),f())}function uF(n,t){n&1&&(u(0,"p"),p(1,"File deleted"),f())}function pF(n,t){if(n&1&&(u(0,"pre"),p(1),f()),n&2){let e=d();c(),P(e.ours.content)}}function fF(n,t){n&1&&(u(0,"p"),p(1,"Binary file"),f())}function hF(n,t){n&1&&(u(0,"p"),p(1,"File deleted"),f())}function mF(n,t){if(n&1&&(u(0,"pre"),p(1),f()),n&2){let e=d();c(),P(e.theirs.content)}}function gF(n,t){if(n&1){let e=I();u(0,"div",15),p(1,"The resolved change will delete this file. "),u(2,"button",11),C("click",function(){m(e);let r=d(3);return g(r.deleted.set(!1))}),p(3,"Keep file"),f()()}}function _F(n,t){if(n&1){let e=I();u(0,"textarea",17),C("input",function(r){m(e);let o=d(3);return g(o.updateResult(r))}),f()}if(n&2){let e=d(3);S("value",e.result())}}function vF(n,t){if(n&1){let e=I();u(0,"div",9)(1,"div",13)(2,"h3"),p(3,"Result"),f(),u(4,"div",14)(5,"button",8),C("click",function(){m(e);let r=d(2);return g(r.useBoth())}),p(6,"Use both"),f(),u(7,"button",8),C("click",function(){m(e);let r=d(2);return g(r.deleted.set(!0))}),p(8,"Delete file"),f()()(),E(9,gF,4,0,"div",15)(10,_F,1,1,"textarea",16),f()}if(n&2){let e=d(2);c(5),S("disabled",e.saving()),c(2),S("disabled",e.saving()),c(2),D(e.deleted()?9:10)}}function bF(n,t){if(n&1&&j(0,"app-error-banner",10),n&2){let e=d(2);S("message",e.error())}}function yF(n,t){if(n&1){let e=I();u(0,"button",18),C("click",function(){m(e);let r=d(2);return g(r.resolve())}),p(1),f()}if(n&2){let e=d(2);S("disabled",e.saving()),c(),H(" ",e.saving()?"Saving\u2026":"Mark as resolved"," ")}}function xF(n,t){if(n&1){let e=I();u(0,"div",7)(1,"section")(2,"h3"),p(3,"Current (ours)"),f(),E(4,dF,2,0,"p")(5,uF,2,0,"p")(6,pF,2,1,"pre"),u(7,"button",8),C("click",function(){let r=m(e),o=d();return g(r.ours.binary?o.resolve("ours"):o.use("ours"))}),p(8),f()(),u(9,"section")(10,"h3"),p(11,"Incoming (theirs)"),f(),E(12,fF,2,0,"p")(13,hF,2,0,"p")(14,mF,2,1,"pre"),u(15,"button",8),C("click",function(){let r=m(e),o=d();return g(r.theirs.binary?o.resolve("theirs"):o.use("theirs"))}),p(16),f()()(),E(17,vF,11,3,"div",9),E(18,bF,1,1,"app-error-banner",10),u(19,"footer")(20,"button",11),C("click",function(){m(e);let r=d();return g(r.closed.emit())}),p(21,"Cancel"),f(),E(22,yF,2,2,"button",12),f()}if(n&2){let e=t,i=d();c(4),D(e.ours.binary?4:e.ours.content===null?5:6),c(3),S("disabled",i.saving()),c(),H(" ",e.ours.binary?"Resolve with current":"Use current"," "),c(4),D(e.theirs.binary?12:e.theirs.content===null?13:14),c(3),S("disabled",i.saving()),c(),H(" ",e.theirs.binary?"Resolve with incoming":"Use incoming"," "),c(),D(!e.ours.binary&&!e.theirs.binary?17:-1),c(),D(i.error()?18:-1),c(4),D(!e.ours.binary&&!e.theirs.binary?22:-1)}}function CF(n,t){if(n&1){let e=I();u(0,"app-error-banner",19),C("retry",function(){m(e);let r=d();return g(r.load())}),f()}if(n&2){let e=d();S("message",e.error())}}var Gd=class n{git=R(et);path=N.required();resolved=Z();closed=Z();conflict=v(null);result=v("");deleted=v(!1);loading=v(!0);saving=v(!1);error=v("");ngOnInit(){this.load()}load(){this.loading.set(!0),this.error.set(""),this.git.getConflict(this.path()).subscribe({next:t=>{this.conflict.set(t),this.result.set(t.result.content??""),this.deleted.set(t.result.content===null&&!t.result.binary),this.loading.set(!1)},error:t=>{this.error.set(t?.error?.error||"Failed to load the merge conflict."),this.loading.set(!1)}})}use(t){let e=this.conflict()?.[t];!e||e.binary||(this.deleted.set(e.content===null),this.result.set(e.content??""))}useBoth(){let t=this.conflict();if(!t||t.ours.binary||t.theirs.binary)return;this.deleted.set(!1);let e=t.ours.content??"",i=t.theirs.content??"";this.result.set(e&&i&&!e.endsWith(`
66
+ `)?`${e}
67
+ ${i}`:`${e}${i}`)}updateResult(t){this.deleted.set(!1),this.result.set(t.target.value)}resolve(t="content"){if(this.saving())return;this.saving.set(!0),this.error.set("");let e=this.deleted()?"delete":t;this.git.resolveConflict(this.path(),e,e==="content"?this.result():void 0).pipe(ui(()=>this.saving.set(!1))).subscribe({next:()=>this.resolved.emit(),error:i=>this.error.set(i?.error?.error||"Failed to save the conflict resolution.")})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-conflict-dialog"]],inputs:{path:[1,"path"]},outputs:{resolved:"resolved",closed:"closed"},decls:13,vars:3,consts:[[1,"backdrop",3,"click"],["role","dialog","aria-modal","true","aria-labelledby","conflict-title",1,"dialog"],["id","conflict-title"],[1,"path",3,"title"],["type","button","aria-label","Close conflict resolver",3,"click"],[1,"state"],["retryLabel","Retry",3,"message"],[1,"sources"],["type","button",3,"click","disabled"],[1,"result"],[3,"message"],["type","button",3,"click"],["type","button",1,"primary",3,"disabled"],[1,"result-head"],[1,"actions"],[1,"deleted"],["aria-label","Resolved file content","spellcheck","false",3,"value"],["aria-label","Resolved file content","spellcheck","false",3,"input","value"],["type","button",1,"primary",3,"click","disabled"],["retryLabel","Retry",3,"retry","message"]],template:function(e,i){if(e&1&&(u(0,"div",0),C("click",function(){return i.closed.emit()}),f(),u(1,"div",1)(2,"header")(3,"div")(4,"h2",2),p(5,"Resolve merge conflict"),f(),u(6,"div",3),p(7),f()(),u(8,"button",4),C("click",function(){return i.closed.emit()}),p(9,"\xD7"),f()(),E(10,cF,2,0,"div",5)(11,xF,23,9)(12,CF,1,1,"app-error-banner",6),f()),e&2){let r;c(6),S("title",i.path()),c(),P(i.path()),c(3),D(i.loading()?10:(r=i.conflict())?11:i.error()?12:-1,r)}},dependencies:[pt],styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#00000094;z-index:210}.dialog[_ngcontent-%COMP%]{position:fixed;inset:4vh 4vw;z-index:211;display:flex;flex-direction:column;min-height:0;background:var(--bg);color:var(--text);border:1px solid var(--border);border-radius:8px;box-shadow:0 12px 48px #0009;overflow:hidden}header[_ngcontent-%COMP%], footer[_ngcontent-%COMP%], .result-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px}header[_ngcontent-%COMP%]{padding:10px 14px;background:var(--bg-alt);border-bottom:1px solid var(--border)}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%]{margin:0}h2[_ngcontent-%COMP%]{font-size:15px}h3[_ngcontent-%COMP%]{font-size:12px}.path[_ngcontent-%COMP%]{margin-top:3px;font:12px var(--mono);color:var(--text-dim)}button[_ngcontent-%COMP%]{font:inherit;color:var(--text);border:1px solid var(--border);border-radius:3px;background:var(--bg);padding:5px 8px;cursor:pointer}button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover)}button[_ngcontent-%COMP%]:disabled{opacity:.5}.sources[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;min-height:0;height:38%;border-bottom:1px solid var(--border)}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0;min-height:0;padding:10px;gap:7px}section[_ngcontent-%COMP%] + section[_ngcontent-%COMP%]{border-left:1px solid var(--border)}pre[_ngcontent-%COMP%]{flex:1;min-height:0;overflow:auto;margin:0;padding:8px;white-space:pre;background:var(--bg-alt);border:1px solid var(--border);font:12px/1.5 var(--mono)}section[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .deleted[_ngcontent-%COMP%]{flex:1;margin:0;display:flex;align-items:center;justify-content:center;color:var(--text-dim);font-size:12px}.result[_ngcontent-%COMP%]{flex:1;min-height:0;display:flex;flex-direction:column;padding:10px;gap:7px}.actions[_ngcontent-%COMP%], footer[_ngcontent-%COMP%]{display:flex;gap:7px}textarea[_ngcontent-%COMP%]{flex:1;min-height:100px;resize:none;padding:8px;box-sizing:border-box;color:var(--text);background:var(--bg-alt);border:1px solid var(--border);border-radius:3px;font:12px/1.5 var(--mono);tab-size:2}.deleted[_ngcontent-%COMP%]{border:1px dashed var(--border);gap:10px}.state[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;justify-content:center;color:var(--text-dim)}footer[_ngcontent-%COMP%]{justify-content:flex-end;padding:10px 14px;border-top:1px solid var(--border);background:var(--bg-alt)}.primary[_ngcontent-%COMP%]{color:#fff;background:var(--accent)}@media(max-width:700px){.sources[_ngcontent-%COMP%]{grid-template-columns:1fr;height:45%;overflow:auto}section[_ngcontent-%COMP%] + section[_ngcontent-%COMP%]{border-left:0;border-top:1px solid var(--border)}}"],changeDetection:0})};var wF=(n,t)=>t.path;function EF(n,t){if(n&1&&(u(0,"div",4),j(1,"span",14),p(2),f()),n&2){let e=d();c(2),P(e.statusLoading()?"Refreshing changes\u2026":"Updating repository\u2026")}}function DF(n,t){if(n&1){let e=I();u(0,"app-error-banner",26),C("retry",function(){m(e);let r=d();return g(r.retry.emit())}),f()}if(n&2){let e=d();S("message",e.statusError())("busy",e.statusLoading())}}function SF(n,t){if(n&1){let e=I();u(0,"button",30),C("click",function(){let r=m(e).$implicit,o=d(2);return g(o.openConflict(r))}),u(1,"span",31),p(2,"!"),f(),u(3,"span",32),p(4),f(),u(5,"span"),p(6,"Resolve"),f()()}if(n&2){let e=t.$implicit,i=d(2);S("disabled",i.disabled()),c(3),S("title",e),c(),P(e)}}function MF(n,t){if(n&1&&(u(0,"section",7)(1,"h3"),p(2),f(),u(3,"p",27),p(4,"Choose a file to resolve it before committing."),f(),u(5,"div",28),W(6,SF,7,3,"button",29,jt),f()()),n&2){let e=d();c(2),H("Merge conflicts (",e.changes().conflicted.length,")"),c(4),q(e.changes().conflicted)}}function TF(n,t){if(n&1){let e=I();u(0,"button",37),C("click",function(){m(e);let r=d(2);return g(r.discardSelected())}),p(1,"Discard selected"),f(),u(2,"button",37),C("click",function(){m(e);let r=d(2);return g(r.discardAll())}),p(3,"Discard all"),f()}if(n&2){let e=d().$implicit,i=d();S("disabled",i.disabled()||!i.selected()[e].size),c(2),S("disabled",i.disabled()||!i.files(e).length)}}function kF(n,t){n&1&&(V(),j(0,"polyline",42))}function IF(n,t){n&1&&(V(),j(0,"polyline",43))}function PF(n,t){if(n&1){let e=I();u(0,"button",40),C("click",function(){m(e);let r=d().$implicit,o=d(2);return g(o.toggleDir(r.path))}),V(),u(1,"svg",41),E(2,kF,1,0,":svg:polyline",42)(3,IF,1,0,":svg:polyline",43),f(),fe(),u(4,"span",44),p(5),f(),u(6,"span",45)(7,"span",46),p(8),f(),u(9,"span",47),p(10),f()()()}if(n&2){let e=d().$implicit;ne("padding-left",e.depth*14+8,"px"),S("title",e.path),Q("aria-expanded",!e.collapsed)("aria-label","Directory "+e.path),c(2),D(e.collapsed?2:3),c(3),P(e.name),c(3),H("+",e.additions),c(2),H("\u2212",e.deletions)}}function OF(n,t){if(n&1){let e=I();u(0,"div",48),C("click",function(r){m(e);let o=d().$implicit,s=d().$implicit,a=d();return g(a.select(s,o.file.path,r))})("dblclick",function(){m(e);let r=d().$implicit,o=d().$implicit,s=d();return g(s.openDiff(o,r.file))})("contextmenu",function(r){m(e);let o=d().$implicit,s=d().$implicit,a=d();return g(a.openContextMenu(r,s,o.file))})("keydown",function(r){m(e);let o=d().$implicit,s=d().$implicit,a=d();return g(a.keySelect(s,o.file.path,r))}),u(1,"span",49),p(2),f(),u(3,"span",32),p(4),f(),u(5,"span",45)(6,"span",46),p(7),f(),u(8,"span",47),p(9),f()()()}if(n&2){let e=d().$implicit,i=d().$implicit,r=d();ne("padding-left",e.depth*14+4,"px"),J("selected",r.selected()[i].has(e.file.path)),Q("role",r.fileListView()==="tree"?"treeitem":"option")("aria-selected",r.selected()[i].has(e.file.path))("aria-label",e.file.path),c(),S("title",e.file.status),c(),P(e.file.status.slice(0,1).toUpperCase()),c(),S("title",e.file.oldPath&&e.file.oldPath!==e.file.path?e.file.oldPath+" \u2192 "+e.file.path:e.file.path),c(),P(e.name),c(3),H("+",e.file.additions),c(2),H("\u2212",e.file.deletions)}}function RF(n,t){if(n&1&&E(0,PF,11,9,"button",38)(1,OF,10,13,"div",39),n&2){let e=t.$implicit;D(e.kind==="dir"?0:1)}}function NF(n,t){if(n&1&&(u(0,"p",36),p(1),f()),n&2){let e=d().$implicit;c(),P(e==="staged"?"No staged changes.":"No unstaged changes.")}}function AF(n,t){if(n&1){let e=I();u(0,"section")(1,"h3"),p(2),f(),u(3,"div",33)(4,"span",34),p(5),f(),u(6,"button",3),C("click",function(){let r=m(e).$implicit,o=d();return g(o.moveSelected(r))}),p(7),f(),u(8,"button",3),C("click",function(){let r=m(e).$implicit,o=d();return g(o.moveAll(r))}),p(9),f(),E(10,TF,4,2),f(),u(11,"div",35),W(12,RF,2,1,null,null,wF,!1,NF,2,1,"p",36),f()()}if(n&2){let e=t.$implicit,i=d();Q("aria-label",e==="staged"?"Staged changes":"Unstaged changes"),c(2),Fn("",e==="staged"?"Staged changes":"Unstaged changes"," (",i.files(e).length,")"),c(3),H("",i.selected()[e].size," selected"),c(),S("disabled",i.disabled()||!i.selected()[e].size),c(),P(e==="staged"?"Unstage selected":"Stage selected"),c(),S("disabled",i.disabled()||!i.files(e).length),c(),P(e==="staged"?"Unstage all":"Stage all"),c(),D(e==="unstaged"?10:-1),c(),Q("role",i.fileListView()==="tree"?"tree":"listbox")("aria-label",e+" files"),c(),q(i.rows(e))}}function LF(n,t){n&1&&(u(0,"p",9),p(1,"Resolve conflicts before committing."),f())}function FF(n,t){n&1&&j(0,"span",14)}function VF(n,t){n&1&&(V(),u(0,"svg",15),j(1,"path",50)(2,"path",51),f())}function BF(n,t){if(n&1&&(u(0,"span",19),p(1),f()),n&2){let e=d();S("title",e.generateError()),c(),P(e.generateError())}}function jF(n,t){if(n&1){let e=I();u(0,"app-diff-dialog",52),C("closed",function(){m(e);let r=d();return g(r.dialog.set(null))}),f()}if(n&2){let e=t;S("file",e.file)("originalRef",e.originalRef)("modifiedRef",e.modifiedRef)("exactOriginal",e.exactOriginal)}}function $F(n,t){if(n&1){let e=I();u(0,"app-conflict-dialog",53),C("resolved",function(){m(e);let r=d();return g(r.onConflictResolved())})("closed",function(){m(e);let r=d();return g(r.selectedConflict.set(null))}),f()}n&2&&S("path",t)}var Wd="guito.detailPanelWidth",oC=300,qd=class n{vscode=R(ln);host=R(Ot);changes=N(null);branches=N.required();busy=N(!1);statusLoading=N(!1);statusError=N("");subject=N("");description=N("");fileListView=N("flat");subjectChange=Z();descriptionChange=Z();generateMessage=Z();stageChange=Z();stashChange=Z();discardRequest=Z();commitRequested=Z();conflictResolved=Z();retry=Z();closed=Z();groups=["staged","unstaged"];selected=v({staged:new Set,unstaged:new Set});anchors={staged:null,unstaged:null};dialog=v(null);comparePrompt=v(null);compareTarget=null;selectedConflict=v(null);contextMenu=v(null);contextMenuTarget=null;collapsed=v(new Set);disabled=O(()=>this.busy()||!!this.statusError()||!this.changes());generating=N(!1);generateError=N("");canGenerate=O(()=>!this.disabled()&&!this.generating()&&!!this.changes()?.files.length);canCommit=O(()=>!this.disabled()&&!!this.subject().trim()&&!!this.changes()?.staged.length&&!this.changes()?.conflicted.length);constructor(){ge(()=>{let t=this.changes();this.selected.update(e=>{let i=z({},e);for(let r of this.groups){let o=new Set((r==="staged"?t?.stagedFiles:t?.unstagedFiles)?.map(s=>s.path));i[r]=new Set([...e[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(t){return(t==="staged"?this.changes()?.stagedFiles:this.changes()?.unstagedFiles)??[]}rows(t){let e=this.files(t);return this.fileListView()!=="tree"?e.map(i=>({kind:"file",path:i.path,name:i.path,depth:0,file:i})):Po(e,this.collapsed())}orderedPaths(t){return this.rows(t).filter(e=>e.kind==="file").map(e=>e.path)}toggleDir(t){this.collapsed.update(e=>{let i=new Set(e);return i.has(t)?i.delete(t):i.add(t),i})}openDiff(t,e){if(this.busy())return;let i=t==="staged"?"HEAD":"INDEX",r=t==="staged"?"INDEX":"WORKING";this.vscode.openDiff(e,i,r)||this.dialog.set({file:e,originalRef:i,modifiedRef:r,exactOriginal:!1})}comparisonBranches(){return this.branches().filter(t=>!t.current&&!t.name.endsWith("/HEAD"))}openBranchComparison(t,e){let i=this.comparisonBranches();this.busy()||!i.length||(this.compareTarget={file:e,group:t},this.comparePrompt.set({title:"Compare with Branch",label:`Select the branch version to compare with ${e.path}.`,okLabel:"Compare",searchable:!0,options:i.map(r=>({value:r.name,label:r.name,description:r.remote?"Remote branch":"Local branch"}))}))}compareWithBranch(t){let e=this.compareTarget;if(this.closeComparePrompt(),!e||!this.comparisonBranches().some(r=>r.name===t))return;let i=e.group==="staged"?"INDEX":"WORKING";this.vscode.openDiff(e.file,t,i,!0)||this.dialog.set({file:e.file,originalRef:t,modifiedRef:i,exactOriginal:!0})}closeComparePrompt(){this.comparePrompt.set(null),this.compareTarget=null}openContextMenu(t,e,i){t.preventDefault(),this.contextMenuTarget={file:i,group:e},this.contextMenu.set({x:t.clientX,y:t.clientY,items:[{label:"Open Diff",action:"open-diff",disabled:this.busy()},{label:"Compare with Branch...",action:"compare-branch",disabled:this.busy()||!this.comparisonBranches().length},{label:"Open File",action:"open-file",disabled:!this.vscode.canOpenFile()},{label:"Copy File Path",action:"copy-file-path"}]})}runContextAction(t){let e=this.contextMenuTarget;e&&(t==="open-diff"?this.openDiff(e.group,e.file):t==="compare-branch"?this.openBranchComparison(e.group,e.file):t==="open-file"?this.vscode.openFile(e.file.path):t==="copy-file-path"&&Ud(e.file.path))}closeContextMenu(){this.contextMenu.set(null),this.contextMenuTarget=null}select(t,e,i){let r=i.ctrlKey||i.metaKey,o=this.orderedPaths(t),s=this.anchors[t],a=i.shiftKey&&s!==null&&o.includes(s),l=r?new Set(this.selected()[t]):new Set;if(a){let h=o.indexOf(s),_=o.indexOf(e);for(let w of o.slice(Math.min(h,_),Math.max(h,_)+1))l.add(w)}else r&&l.has(e)?l.delete(e):l.add(e),this.anchors[t]=e;this.selected.update(h=>ie(z({},h),{[t]:l}))}keySelect(t,e,i){if((i.key===" "||i.key==="Enter")&&(i.preventDefault(),this.select(t,e,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(t,this.orderedPaths(t)[s],i)}}move(t,e){this.disabled()||!e.length||this.stageChange.emit({staged:t==="staged",files:e})}openConflict(t){this.disabled()||this.vscode.openMergeConflict(t)||this.selectedConflict.set(t)}onConflictResolved(){this.selectedConflict.set(null),this.conflictResolved.emit()}moveSelected(t){this.move(t,[...this.selected()[t]])}moveAll(t){this.move(t,this.files(t).map(e=>e.path))}stash(t){this.disabled()||this.stashChange.emit(t)}discard(t){this.disabled()||!t.length||this.discardRequest.emit(t)}discardSelected(){this.discard([...this.selected().unstaged])}discardAll(){this.discard(this.files("unstaged").map(t=>t.path))}updateSubject(t){this.subjectChange.emit(t.target.value)}updateDescription(t){this.descriptionChange.emit(t.target.value)}generate(){this.canGenerate()&&this.generateMessage.emit()}commit(t){t.preventDefault(),this.canCommit()&&this.commitRequested.emit()}panelWidth=v(No(Wd));resizing=v(!1);panelWidthCss=O(()=>{let t=this.panelWidth();return t===null?null:`${t}px`});detachResize=null;startResize(t){this.detachResize||(this.resizing.set(!0),this.detachResize=Lo(t,{direction:-1,startWidth:this.effectiveWidth(),min:oC,onResize:e=>this.panelWidth.set(e),onEnd:e=>{this.detachResize=null,this.resizing.set(!1),this.panelWidth.set(e),Kn(Wd,e)}}))}resizeKeydown(t){let e=t.shiftKey?50:10,i=t.key==="ArrowRight"?e:t.key==="ArrowLeft"?-e:0;if(i===0)return;t.preventDefault();let r=Pi(this.effectiveWidth()-i,oC);this.panelWidth.set(r),Kn(Wd,r)}resetWidth(){this.panelWidth.set(null),Ao(Wd)}effectiveWidth(){return this.panelWidth()??this.host.nativeElement.offsetWidth}ngOnDestroy(){this.detachResize?.(),this.detachResize=null}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-working-panel"]],hostVars:4,hostBindings:function(e,i){e&2&&(ne("--panel-width",i.panelWidthCss()),J("resizing",i.resizing()))},inputs:{changes:[1,"changes"],branches:[1,"branches"],busy:[1,"busy"],statusLoading:[1,"statusLoading"],statusError:[1,"statusError"],subject:[1,"subject"],description:[1,"description"],fileListView:[1,"fileListView"],generating:[1,"generating"],generateError:[1,"generateError"]},outputs:{subjectChange:"subjectChange",descriptionChange:"descriptionChange",generateMessage:"generateMessage",stageChange:"stageChange",stashChange:"stashChange",discardRequest:"discardRequest",commitRequested:"commitRequested",conflictResolved:"conflictResolved",retry:"retry",closed:"closed"},decls:41,vars:20,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"],["aria-label","Merge conflicts",1,"conflicts"],[3,"submit"],[1,"error"],["for","commit-subject"],[1,"subject-wrap"],["id","commit-subject","placeholder","Summary of your changes","required","",3,"input","value","disabled"],["type","button","title","Generate message","aria-label","Generate message",1,"generate-button",3,"click","disabled"],[1,"spinner"],["viewBox","0 0 24 24","aria-hidden","true"],["for","commit-description"],[1,"optional"],["id","commit-description","rows","3",3,"input","value","disabled"],["role","alert",1,"generate-error",3,"title"],["type","submit",1,"commit-button",3,"disabled"],["role","separator","aria-orientation","vertical","aria-label","Resize working panel","tabindex","0",1,"panel-resizer",3,"mousedown","dblclick","keydown"],[3,"file","originalRef","modifiedRef","exactOriginal"],[3,"select","closed","menu"],[3,"confirmed","cancelled","state"],[3,"path"],["retryLabel","Retry status",3,"retry","message","busy"],[1,"conflict-help"],[1,"file-list"],["type","button",1,"conflict-row",3,"disabled"],["type","button",1,"conflict-row",3,"click","disabled"],[1,"conflict-status"],[1,"file-path",3,"title"],[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"],["d","M12 2c.8 5.5 4.5 9.2 10 10-5.5.8-9.2 4.5-10 10-.8-5.5-4.5-9.2-10-10 5.5-.8 9.2-4.5 10-10Z"],["d","M19 3v3M17.5 4.5h3"],[3,"closed","file","originalRef","modifiedRef","exactOriginal"],[3,"resolved","closed","path"]],template:function(e,i){if(e&1&&(u(0,"aside",0)(1,"header")(2,"h2"),p(3,"Uncommitted changes"),f(),u(4,"button",1),C("click",function(){return i.closed.emit()}),p(5,"\xD7"),f()(),u(6,"div",2)(7,"button",3),C("click",function(){return i.stash("all")}),p(8,"Stash all"),f(),u(9,"button",3),C("click",function(){return i.stash("staged")}),p(10,"Stash staged"),f(),u(11,"button",3),C("click",function(){return i.stash("unstaged")}),p(12,"Stash unstaged"),f()(),E(13,EF,3,1,"div",4),E(14,DF,1,2,"app-error-banner",5),u(15,"div",6),E(16,MF,8,1,"section",7),W(17,AF,15,12,"section",null,jt),f(),u(19,"form",8),C("submit",function(o){return i.commit(o)}),E(20,LF,2,0,"p",9),u(21,"label",10),p(22,"Commit message"),f(),u(23,"div",11)(24,"input",12),C("input",function(o){return i.updateSubject(o)}),f(),u(25,"button",13),C("click",function(){return i.generate()}),E(26,FF,1,0,"span",14)(27,VF,3,0,":svg:svg",15),f()(),u(28,"label",16),p(29,"Description "),u(30,"span",17),p(31,"(optional)"),f()(),u(32,"textarea",18),C("input",function(o){return i.updateDescription(o)}),f(),E(33,BF,2,2,"span",19),u(34,"button",20),p(35,"Commit staged changes"),f()()(),u(36,"div",21),C("mousedown",function(o){return i.startResize(o)})("dblclick",function(){return i.resetWidth()})("keydown",function(o){return i.resizeKeydown(o)}),f(),E(37,jF,1,4,"app-diff-dialog",22),u(38,"app-context-menu",23),C("select",function(o){return i.runContextAction(o)})("closed",function(){return i.closeContextMenu()}),f(),u(39,"app-prompt-dialog",24),C("confirmed",function(o){return i.compareWithBranch(o)})("cancelled",function(){return i.closeComparePrompt()}),f(),E(40,$F,1,1,"app-conflict-dialog",25)),e&2){let r,o,s,a;c(7),S("disabled",i.disabled()||!i.files("staged").length&&!i.files("unstaged").length),c(2),S("disabled",i.disabled()||!i.files("staged").length),c(2),S("disabled",i.disabled()||!i.files("unstaged").length),c(2),D(i.busy()?13:-1),c(),D(i.statusError()?14:-1),c(2),D(!((r=i.changes())==null||r.conflicted==null)&&r.conflicted.length?16:-1),c(),q(i.groups),c(3),D(!((o=i.changes())==null||o.conflicted==null)&&o.conflicted.length?20:-1),c(4),S("value",i.subject())("disabled",i.busy()),c(),S("disabled",!i.canGenerate()),c(),D(i.generating()?26:27),c(6),S("value",i.description())("disabled",i.busy()),c(),D(i.generateError()?33:-1),c(),S("disabled",!i.canCommit()),c(2),Q("aria-valuenow",i.panelWidth()),c(),D((s=i.dialog())?37:-1,s),c(),S("menu",i.contextMenu()),c(),S("state",i.comparePrompt()),c(),D((a=i.selectedConflict())?40:-1,a)}},dependencies:[pt,jo,Gd,Vo,Go],styles:["[_nghost-%COMP%]{--panel-width: max(320px, min(480px, 60vw));display:block;position:relative;flex:none;width:var(--panel-width);min-height:0;overflow:hidden}.resizing[_nghost-%COMP%]{animation:none}.panel-resizer[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:5px;height:100%;cursor:col-resize;z-index:5}.panel-resizer[_ngcontent-%COMP%]:hover, .panel-resizer[_ngcontent-%COMP%]:focus-visible{background:var(--accent);outline:none}.detail[_ngcontent-%COMP%]{position:absolute;inset:0 auto 0 0;width:var(--panel-width);display:flex;flex-direction:column;min-height:0;background:var(--bg-alt);border-left:1px solid var(--border);color:var(--text)}@keyframes _ngcontent-%COMP%_panel-enter{0%{width:0}to{width:var(--panel-width)}}@keyframes _ngcontent-%COMP%_panel-leave{0%{width:var(--panel-width)}to{width:0}}.panel-enter[_nghost-%COMP%]{animation:_ngcontent-%COMP%_panel-enter .18s cubic-bezier(.05,.7,.1,1)}.panel-leave[_nghost-%COMP%]{animation:_ngcontent-%COMP%_panel-leave .15s cubic-bezier(.3,0,.8,.15) forwards}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}.conflicts[_ngcontent-%COMP%]{background:#f487710f}.conflict-help[_ngcontent-%COMP%]{margin:0 0 7px;color:var(--text-dim);font-size:12px}.conflict-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px;width:100%;border:0;background:transparent;text-align:left}.conflict-status[_ngcontent-%COMP%]{flex:none;color:#f48771;font-weight:700}.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}.subject-wrap[_ngcontent-%COMP%]{position:relative}#commit-subject[_ngcontent-%COMP%]{padding-right:30px}.generate-button[_ngcontent-%COMP%]{position:absolute;top:50%;right:4px;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;padding:0;border:none;background:transparent;color:var(--text-dim)}.generate-button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.generate-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.generate-button[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%]{width:10px;height:10px;margin:0}.generate-error[_ngcontent-%COMP%]{color:#f48771;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.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}.panel-enter[_nghost-%COMP%], .panel-leave[_nghost-%COMP%]{animation:none}}"],changeDetection:0})};var HF=(n,t)=>t.name;function zF(n,t){if(n&1&&(b(0,"option",10),p(1),y()),n&2){let e=t.$implicit;$("value",e.name),c(),P(e.name)}}function UF(n,t){n&1&&(b(0,"p",11),p(1,"Every local branch is already checked out in a worktree."),y())}function GF(n,t){if(n&1&&(b(0,"p",12),p(1),y()),n&2){let e=d();c(),P(e.error())}}var Zd=class n{vscode=R(ln);branches=N.required();worktrees=N.required();busy=N(!1);error=N("");created=Z();closed=Z();path=v("");branch=v("");canBrowse=this.vscode.canPickFolder;availableBranches=O(()=>{let t=new Set(this.worktrees().map(e=>e.branch).filter(Boolean));return this.branches().filter(e=>!e.remote&&!t.has(e.name))});constructor(){ge(()=>{let t=this.availableBranches();t.some(e=>e.name===this.branch())||this.branch.set(t[0]?.name??"")})}onEscape(){this.busy()||this.closed.emit()}onPath(t){this.path.set(t.target.value)}onBranch(t){this.branch.set(t.target.value)}browse(){return Qt(this,null,function*(){let t=yield this.vscode.pickFolder();t&&this.path.set(t)})}submit(){let t=this.path().trim(),e=this.branch();t&&e&&!this.busy()&&this.created.emit({path:t,branch:e})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-worktree-dialog"]],hostBindings:function(e,i){e&1&&C("keydown.escape",function(){return i.onEscape()},qe)},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(e,i){e&1&&(b(0,"div",0),F("click",function(){return i.closed.emit()}),y(),b(1,"form",1),F("submit",function(o){return o.preventDefault(),i.submit()}),b(2,"h3",2),p(3,"Create Worktree"),y(),b(4,"p",3),p(5,"Create a linked working folder from an available local branch."),y(),b(6,"label",4),p(7,"Folder"),y(),b(8,"div",5)(9,"input",6),F("input",function(o){return i.onPath(o)}),y(),b(10,"button",7),F("click",function(){return i.browse()}),p(11,"Browse..."),y()(),b(12,"label",8),p(13,"Branch"),y(),b(14,"select",9),F("change",function(o){return i.onBranch(o)}),W(15,zF,2,2,"option",10,HF),y(),E(17,UF,2,0,"p",11),E(18,GF,2,1,"p",12),b(19,"div",13)(20,"button",14),F("click",function(){return i.closed.emit()}),p(21,"Cancel"),y(),b(22,"button",15),p(23),y()()()),e&2&&(c(9),$("value",i.path())("disabled",i.busy()),c(),$("disabled",i.busy()||!i.canBrowse)("title",i.canBrowse?"Browse for a folder":"Folder browsing is available in the VS Code extension"),c(4),$("value",i.branch())("disabled",i.busy()),c(),q(i.availableBranches()),c(2),D(i.availableBranches().length===0?17:-1),c(),D(i.error()?18:-1),c(2),$("disabled",i.busy()),c(2),$("disabled",i.busy()||!i.path().trim()||!i.branch()),c(),H(" ",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 WF=["searchInput"];function qF(n,t){if(n&1){let e=I();b(0,"button",10),F("click",function(){m(e);let r=d(2);return g(r.searchNavigate.emit("prev"))}),V(),b(1,"svg",2),te(2,"polyline",11),y()(),fe(),b(3,"button",12),F("click",function(){m(e);let r=d(2);return g(r.searchNavigate.emit("next"))}),V(),b(4,"svg",2),te(5,"polyline",13),y()()}if(n&2){let e=d(2);$("disabled",e.matchCount()===0),c(3),$("disabled",e.matchCount()===0)}}function ZF(n,t){if(n&1){let e=I();E(0,qF,6,2),b(1,"button",6),F("click",function(){m(e);let r=d();return g(r.clearSearch())}),V(),b(2,"svg",2),te(3,"line",7)(4,"line",8),y()(),fe(),b(5,"span",9),p(6),y()}if(n&2){let e=d();D(e.filterMode()?-1:0),c(6),P(e.badgeText())}}var YF=300,Yd=class n{matchIndex=N(-1);matchCount=N(0);filterMode=N(!1);searchChange=Z();searchNavigate=Z();searchValue=v("");badgeText=O(()=>{let t=this.matchCount(),e=t>99?"99+":String(t);return!this.filterMode()&&this.matchIndex()>=0?`${this.matchIndex()+1}/${e}`:e});searchInput=dt("searchInput");constructor(){Mr(this.searchValue).pipe(Vu(YF),us(),tt()).subscribe(t=>this.searchChange.emit(t))}onSearch(t){this.searchValue.set(t.target.value)}onSearchKeydown(t){t.key==="Enter"&&!this.filterMode()&&(t.preventDefault(),this.searchNavigate.emit(t.shiftKey?"prev":"next"))}clearSearch(){this.searchValue.set(""),this.searchInput()?.nativeElement.focus()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-search-box"]],viewQuery:function(e,i){e&1&&st(i.searchInput,WF,5),e&2&&Rt()},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(e,i){if(e&1){let r=I();b(0,"div",1),V(),b(1,"svg",2),te(2,"circle",3)(3,"line",4),y(),fe(),b(4,"input",5,0),F("input",function(s){return m(r),g(i.onSearch(s))})("keydown",function(s){return m(r),g(i.onSearchKeydown(s))}),y(),E(6,ZF,7,2),y()}e&2&&(c(4),$("value",i.searchValue()),c(2),D(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 QF(n,t){if(n&1){let e=I();u(0,"div",13)(1,"button",34),C("click",function(){m(e);let r=d();return g(r.chooseRemoteAction("fetch"))}),p(2,"Fetch"),f(),u(3,"button",34),C("click",function(){m(e);let r=d();return g(r.chooseRemoteAction("fetch-prune"))}),p(4," Fetch (prune) "),f()()}}function KF(n,t){if(n&1){let e=I();u(0,"div",13)(1,"button",34),C("click",function(){m(e);let r=d();return g(r.chooseRemoteAction("pull"))}),p(2,"Pull"),f(),u(3,"button",34),C("click",function(){m(e);let r=d();return g(r.chooseRemoteAction("pull-rebase"))}),p(4,"Pull (rebase)"),f(),u(5,"button",34),C("click",function(){m(e);let r=d();return g(r.chooseRemoteAction("rebase-from"))}),p(6,"Rebase (from)..."),f()()}}function XF(n,t){if(n&1){let e=I();u(0,"button",34),C("click",function(){m(e);let r=d(2);return g(r.chooseRemoteAction("create-pr"))}),p(1," Create Pull Request... "),f()}}function JF(n,t){if(n&1){let e=I();u(0,"div",13)(1,"button",34),C("click",function(){m(e);let r=d();return g(r.chooseRemoteAction("push"))}),p(2,"Push"),f(),u(3,"button",35),C("click",function(){m(e);let r=d();return g(r.chooseRemoteAction("push-force"))}),p(4," Push (force) "),f(),u(5,"button",34),C("click",function(){m(e);let r=d();return g(r.chooseRemoteAction("sync"))}),p(6,"Sync"),f(),E(7,XF,2,0,"button",36),f()}if(n&2){let e=d();c(7),D(e.prEnabled()?7:-1)}}function e3(n,t){if(n&1){let e=I();u(0,"button",34),C("click",function(){m(e);let r=d(2);return g(r.chooseRemoteAction("create-pr"))}),p(1," Create Pull Request... "),f()}}function t3(n,t){if(n&1){let e=I();u(0,"div",33)(1,"button",34),C("click",function(){m(e);let r=d();return g(r.chooseRemoteAction("fetch"))}),p(2,"Fetch"),f(),u(3,"button",34),C("click",function(){m(e);let r=d();return g(r.chooseRemoteAction("fetch-prune"))}),p(4," Fetch (prune) "),f(),j(5,"div",37),u(6,"button",34),C("click",function(){m(e);let r=d();return g(r.chooseRemoteAction("pull"))}),p(7,"Pull"),f(),u(8,"button",34),C("click",function(){m(e);let r=d();return g(r.chooseRemoteAction("pull-rebase"))}),p(9," Pull (rebase) "),f(),u(10,"button",34),C("click",function(){m(e);let r=d();return g(r.chooseRemoteAction("rebase-from"))}),p(11," Rebase (from)... "),f(),j(12,"div",37),u(13,"button",34),C("click",function(){m(e);let r=d();return g(r.chooseRemoteAction("push"))}),p(14,"Push"),f(),u(15,"button",35),C("click",function(){m(e);let r=d();return g(r.chooseRemoteAction("push-force"))}),p(16," Push (force) "),f(),u(17,"button",34),C("click",function(){m(e);let r=d();return g(r.chooseRemoteAction("sync"))}),p(18,"Sync"),f(),E(19,e3,2,0,"button",36),j(20,"div",37),u(21,"button",34),C("click",function(){m(e);let r=d();return g(r.chooseRefresh())}),p(22,"Refresh"),f(),j(23,"div",37),u(24,"button",34),C("click",function(){m(e);let r=d();return g(r.chooseSettings())}),p(25,"Settings..."),f()()}if(n&2){let e=d();c(19),D(e.prEnabled()?19:-1)}}var Qd=class n{busy=N.required();prEnabled=N(!1);panelOpen=N(!1);matchIndex=N(-1);matchCount=N(0);filterMode=N(!1);menuToggle=Z();refresh=Z();remoteAction=Z();settingsClick=Z();searchChange=Z();searchNavigate=Z();openMenu=v(null);toggleMenu(t,e){e.stopPropagation(),this.openMenu.update(i=>i===t?null:t)}chooseRemoteAction(t){this.openMenu.set(null),this.remoteAction.emit(t)}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(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-toolbar"]],hostBindings:function(e,i){e&1&&C("click",function(){return i.closeMenu()},qe)("keydown.escape",function(){return i.closeMenuOnEscape()},qe)},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(e,i){e&1&&(u(0,"div",0)(1,"div",1)(2,"button",2),C("click",function(){return i.menuToggle.emit()}),V(),u(3,"svg",3),j(4,"line",4)(5,"line",5)(6,"line",6),f()(),fe(),u(7,"span",7),p(8,"Guito"),f()(),u(9,"div",8)(10,"app-search-box",9),C("searchChange",function(o){return i.searchChange.emit(o)})("searchNavigate",function(o){return i.searchNavigate.emit(o)}),f(),u(11,"div",10)(12,"button",11),C("click",function(o){return i.toggleMenu("fetch",o)}),V(),u(13,"svg",3),j(14,"path",12),f()(),E(15,QF,5,0,"div",13),f(),fe(),u(16,"div",10)(17,"button",14),C("click",function(o){return i.toggleMenu("pull",o)}),V(),u(18,"svg",3),j(19,"circle",15)(20,"polyline",16)(21,"line",17),f()(),E(22,KF,7,0,"div",13),f(),fe(),u(23,"div",10)(24,"button",18),C("click",function(o){return i.toggleMenu("push",o)}),V(),u(25,"svg",3),j(26,"circle",15)(27,"polyline",19)(28,"line",20),f()(),E(29,JF,8,1,"div",13),f(),fe(),u(30,"button",21),C("click",function(){return i.refresh.emit()}),V(),u(31,"svg",3),j(32,"polyline",22)(33,"polyline",23)(34,"path",24),f()(),fe(),u(35,"button",25),C("click",function(){return i.settingsClick.emit()}),V(),u(36,"svg",3),j(37,"circle",26)(38,"path",27),f()(),fe(),u(39,"div",28)(40,"button",29),C("click",function(o){return i.toggleMenu("overflow",o)}),V(),u(41,"svg",3),j(42,"circle",30)(43,"circle",31)(44,"circle",32),f()(),E(45,t3,26,1,"div",33),f()()()),e&2&&(c(2),Q("aria-expanded",i.panelOpen()),c(8),S("matchIndex",i.matchIndex())("matchCount",i.matchCount())("filterMode",i.filterMode()),c(2),S("disabled",i.busy()),Q("aria-expanded",i.openMenu()==="fetch"),c(3),D(i.openMenu()==="fetch"?15:-1),c(2),S("disabled",i.busy()),Q("aria-expanded",i.openMenu()==="pull"),c(5),D(i.openMenu()==="pull"?22:-1),c(2),S("disabled",i.busy()),Q("aria-expanded",i.openMenu()==="push"),c(5),D(i.openMenu()==="push"?29:-1),c(11),Q("aria-expanded",i.openMenu()==="overflow"),c(5),D(i.openMenu()==="overflow"?45:-1))},dependencies:[Yd],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})};var n3=n=>[n];function i3(n,t){if(n&1){let e=I();u(0,"app-error-banner",14),C("retry",function(){m(e);let r=d();return g(r.refresh())}),f()}if(n&2){let e=d();S("message",e.error())("busy",e.loading())}}function r3(n,t){if(n&1){let e=I();u(0,"app-error-banner",15),C("retry",function(){m(e);let r=d();return g(r.refreshWorking())}),f()}if(n&2){let e=d();S("message",e.statusError())("busy",e.statusLoading())}}function o3(n,t){if(n&1){let e=I();u(0,"app-side-panel",17),C("transitionend",function(r){m(e);let o=d(2);return g(o.onPanelTransitionEnd(r))})("transitioncancel",function(r){m(e);let o=d(2);return g(o.onPanelTransitionEnd(r))})("branchChange",function(r){m(e);let o=d(2);return g(o.selectedBranches.set(r))})("tagSelect",function(r){m(e);let o=d(2);return g(o.selectTag(r))})("stashSelect",function(r){m(e);let o=d(2);return g(o.selectStash(r))})("contextMenu",function(r){m(e);let o=d(2);return g(o.onContextMenu(r))})("worktreeCreate",function(){m(e);let r=d(2);return g(r.openWorktreeDialog())})("worktreeOpen",function(r){m(e);let o=d(2);return g(o.openWorktree(r))})("prSelect",function(r){m(e);let o=d(2);return g(o.openPrDetail(r))})("prRefresh",function(){m(e);let r=d(2);return g(r.loadPullRequests())}),f()}if(n&2){let e,i=d(2);J("panel-open",i.panelExpanded()),S("hidden",!i.panelRendered())("branches",i.branches())("selectedBranches",i.selectedBranches())("showRemote",i.showRemote())("stashes",i.stashes())("worktrees",i.worktrees())("tags",i.tags())("refListView",i.refListView())("sectionsExpandedByDefault",i.sidePanelSectionsExpanded())("searchCaseSensitive",i.searchCaseSensitive())("worktreeSort",i.worktreeSort())("prSort",i.prSort())("selectedCommitHash",((e=i.selectedCommit())==null?null:e.hash)??"")("loading",i.panelLoading())("azureEnabled",i.hasAzureUrl())("pullRequests",i.pullRequests())("prError",i.pullRequestsError())}}function s3(n,t){if(n&1&&W(0,o3,1,19,"app-side-panel",16,jt),n&2){let e=d();q(Mi(0,n3,e.panelRenderVersion()))}}function a3(n,t){if(n&1){let e=I();u(0,"app-working-panel",20),gr("panel-leave"),mr("panel-enter"),C("subjectChange",function(r){m(e);let o=d(2);return g(o.commitSubject.set(r))})("descriptionChange",function(r){m(e);let o=d(2);return g(o.commitDescription.set(r))})("generateMessage",function(){m(e);let r=d(2);return g(r.generateCommitMessage())})("stageChange",function(r){m(e);let o=d(2);return g(o.changeStage(r))})("stashChange",function(r){m(e);let o=d(2);return g(o.stashChanges(r))})("discardRequest",function(r){m(e);let o=d(2);return g(o.discardUnstaged(r))})("commitRequested",function(){m(e);let r=d(2);return g(r.commitChanges())})("conflictResolved",function(){m(e);let r=d(2);return g(r.refreshWorking())})("retry",function(){m(e);let r=d(2);return g(r.refreshWorking())})("closed",function(){m(e);let r=d(2);return g(r.selectedCommit.set(null))}),f()}if(n&2){let e=d(2);S("changes",e.workingChanges())("branches",e.branches())("busy",e.busy()||e.mutationBusy()||e.statusLoading())("statusLoading",e.statusLoading())("statusError",e.statusError())("subject",e.commitSubject())("description",e.commitDescription())("fileListView",e.fileListView())("generating",e.generatingMessage())("generateError",e.messageError())}}function l3(n,t){if(n&1){let e=I();u(0,"app-commit-detail",21),gr("panel-leave"),mr("panel-enter"),C("closed",function(){m(e);let r=d(2);return g(r.selectedCommit.set(null))}),f()}if(n&2){let e=d(),i=d();S("commit",e)("fileListView",i.fileListView())("issueLinking",i.issueLinking())}}function c3(n,t){if(n&1&&E(0,a3,1,10,"app-working-panel",18)(1,l3,1,3,"app-commit-detail",19),n&2){let e=d();D(t.hash===e.workingHash?0:1)}}function d3(n,t){if(n&1){let e=I();u(0,"app-git-operation-dialog",22),C("confirmed",function(r){m(e);let o=d();return g(o.onGitOperationConfirm(r))})("closed",function(){m(e);let r=d();return g(r.closeGitOperation())}),f()}if(n&2){let e=d();S("state",t)("busy",e.mutationBusy())("error",e.gitOperationError())}}function u3(n,t){if(n&1){let e=I();u(0,"app-worktree-dialog",23),C("created",function(r){m(e);let o=d();return g(o.createWorktree(r))})("closed",function(){m(e);let r=d();return g(r.worktreeDialogOpen.set(!1))}),f()}if(n&2){let e=d();S("branches",e.branches())("worktrees",e.worktrees())("busy",e.mutationBusy())("error",e.worktreeDialogError())}}function p3(n,t){if(n&1){let e=I();u(0,"app-create-pr-dialog",24),C("closed",function(){m(e);let r=d();return g(r.prDialogOpen.set(!1))})("created",function(){m(e);let r=d();return g(r.onPrCreated())}),f()}if(n&2){let e=d();S("branches",e.branches())}}function f3(n,t){if(n&1){let e=I();u(0,"app-pr-dialog",25),C("changed",function(){m(e);let r=d();return g(r.loadPullRequests())})("closed",function(){m(e);let r=d();return g(r.closePrDetail())}),f()}if(n&2){let e=d();S("prId",t)("settings",e.azureSettings())("initialTab",e.prDetailTab())}}function h3(n,t){if(n&1){let e=I();u(0,"app-settings-dialog",26),C("saved",function(r){m(e);let o=d();return g(o.saveSettings(r))})("settingsUpdated",function(r){m(e);let o=d();return g(o.applySettings(r))})("identityChanged",function(r){m(e);let o=d();return g(o.identity.set(r))})("repositoryChanged",function(){m(e);let r=d();return g(r.refresh())})("closed",function(){m(e);let r=d();return g(r.settingsDialogOpen.set(!1))}),f()}if(n&2){let e=d();S("settings",t)("identity",e.identity())("saving",e.settingsSaving())}}var Ra=500,m3=new Set(["add-tag","create-branch","checkout-commit","cherry-pick","revert-commit","drop-commit","merge-commit","rebase-commit","reset-commit","tag-delete","tag-push","checkout-branch","rename-branch","delete-branch","delete-remote-branch","merge-branch","pull-branch","stash-apply","stash-pop","stash-drop","switch-worktree","open-worktree-tab","open-worktree-window","delete-worktree","stash-working","reset-working","clean-untracked"]),sC="guito.commitDraft";function g3(){let n=Oo(sC,{});return{subject:typeof n.subject=="string"?n.subject:"",description:typeof n.description=="string"?n.description:""}}var Kd=class n{git=R(et);vscode=R(ln);workingHash=wn;mutationBusy=this.git.mutating;statusLoading=v(!1);statusError=v("");commitDraft=g3();commitSubject=v(this.commitDraft.subject);commitDescription=v(this.commitDraft.description);generatingMessage=v(!1);messageError=v("");displayedCommits=v([]);searchLoading=v(!1);historyGeneration=v(0);filterFailed=v(!1);tableLoading=O(()=>this.loading()?"Refreshing commits...":this.searchLoading()||this.search().trim()&&this.historyLoading()?"Searching commits...":this.historyLoading()?"Loading history...":"");commits=v([]);branches=v([]);selectedBranches=v([]);showRemote=v(!0);search=v("");selectedCommit=v(null);loading=v(!1);busy=v(!1);error=v("");repoName=v("");identity=v({name:"",email:""});lastRepositoryState=null;stateSub=null;refreshTimer=window.setInterval(()=>this.checkRepository(),3e3);workingChanges=v(null);totalCommits=v(0);historyLoading=v(!1);contextMenuState=v(null);contextMenuTarget=v(null);promptState=v(null);gitOperationState=v(null);gitOperationError=v("");azureSettings=v(null);hasAzureUrl=O(()=>!!this.azureSettings()?.azureDevOpsUrl);autoReload=O(()=>this.azureSettings()?.autoReload!==!1);showGraph=O(()=>this.azureSettings()?.showGraph!==!1);showStashes=O(()=>this.azureSettings()?.showStashes===!0);showTags=O(()=>this.azureSettings()?.showTags!==!1);issueLinking=O(()=>this.azureSettings()?.issueLinking??null);fileListView=O(()=>this.azureSettings()?.fileListView==="tree"?"tree":"flat");refListView=O(()=>this.azureSettings()?.refListView==="tree"?"tree":"flat");sidePanelSectionsExpanded=O(()=>this.azureSettings()?.sidePanelSectionsExpanded!==!1);filterSearch=O(()=>this.azureSettings()?.searchMode==="filter");searchCaseSensitive=O(()=>this.azureSettings()?.searchCaseSensitive===!0);worktreeSort=O(()=>{let t=this.azureSettings()?.worktreeSort;return t==="name-asc"||t==="name-desc"?t:"default"});prSort=O(()=>{let t=this.azureSettings()?.prSort;return t==="oldest"||t==="title-asc"||t==="title-desc"?t:"newest"});prDialogOpen=v(!1);settingsDialogOpen=v(!1);settingsSaving=v(!1);pendingDiscard=v(null);panelOpen=v(!1);panelInitialized=v(!1);panelRenderVersion=v(0);panelRendered=v(!1);panelExpanded=v(!1);panelOpenFrame=null;panelLoading=v(!1);stashes=v([]);worktrees=v([]);worktreeDialogOpen=v(!1);worktreeDialogError=v("");tags=v([]);pullRequests=v(null);pullRequestsError=v("");prDetailId=v(null);prDetailTab=v("overview");searchFocusHash=v("");pendingSearchHash=v("");scrollRequest=v(null);scrollRequestCounter=0;bodyMatches=v([]);searchHistoryIndices=v({});refreshSub=null;historySub=null;workingSub=null;searchSub=null;panelSub=null;prListSub=null;unloadedCommits=O(()=>Math.max(0,this.totalCommits()-this.commits().length));commitIndex=O(()=>{let t=new Map;for(let e of this.commits())t.set(e.hash,e);return t});filteredCommits=O(()=>{let t=this.commits(),e=this.selectedBranches(),i=this.branches().filter(s=>this.showRemote()||!s.remote),r=new Set(e),o=e.length?i.filter(s=>r.has(s.name)):i;if(o.length>0){let s=new Set;for(let a of o)for(let l of this.ancestorsOf(a.commit))s.add(l);t=t.filter(a=>s.has(a.hash))}else t=[];return t});searchMatches=O(()=>{let t=this.search().trim(),e=this.searchCaseSensitive(),i=Ni(t,e);if(!i)return[];let r=new Set(this.bodyMatches()),o=this.filteredCommits().filter(l=>Ni(l.message,e).includes(i)||Ni(l.author_name,e).includes(i)||Ni(l.hash,e).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=O(()=>{let t=this.searchFocusHash();return t?this.searchMatches().indexOf(t):-1});constructor(){this.refresh(),ge(()=>{let t=this.search().trim();this.selectedBranches(),this.historyGeneration(),this.filterSearch();let e=this.searchCaseSensitive();je(()=>{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.selectedBranches().length||t&&this.filterSearch())&&this.unloadedCommits()>0&&this.loadAllCommits(),t&&this.fetchBodyMatches(t,e))})}),ge(()=>{if(!this.loading()&&!this.searchLoading()&&!this.historyLoading()&&!this.filterFailed()){let t=new Set(this.searchMatches());this.displayedCommits.set(this.filterSearch()&&this.search().trim()?this.filteredCommits().filter(e=>t.has(e.hash)):this.filteredCommits())}}),ge(()=>{let t=this.pendingSearchHash();if(!t||this.filterFailed())return;let e=this.displayedCommits().find(i=>i.hash===t);if(e)je(()=>{this.selectedCommit.set(e),this.scrollRequestCounter+=1,this.scrollRequest.set({hash:t,id:this.scrollRequestCounter}),this.pendingSearchHash.set("")});else if(this.unloadedCommits()>0&&!this.historyLoading()&&!this.loading()){let i=this.searchHistoryIndices()[t],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)/Ra)*Ra;je(()=>this.loadHistory(this.git.getCommits(o,r)))}else!this.historyLoading()&&!this.loading()&&this.pendingSearchHash.set("")}),ge(()=>{Ro(sC,{subject:this.commitSubject(),description:this.commitDescription()})}),ge(()=>{this.vscode.settingsVersion()!==0&&je(()=>{this.git.getSettings().subscribe({next:t=>this.applySettings(t),error:t=>this.error.set(this.errorMessage(t))})})}),ge(()=>{let t=this.vscode.pullRequestRequest();t&&je(()=>this.openPrReview(t.id))})}ngOnDestroy(){window.clearInterval(this.refreshTimer),this.panelOpenFrame!==null&&window.cancelAnimationFrame(this.panelOpenFrame),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:t=>{if(this.loading()||this.historyLoading()||this.statusLoading()||this.busy()||this.mutationBusy())return;let e=this.lastRepositoryState;this.lastRepositoryState=t,!e||e.history!==t.history?this.refresh(!0):e.working!==t.working&&this.refreshWorking()},error:()=>{}}))}toggleSidePanel(){let t=!this.panelOpen();if(this.panelOpen.set(t),t){this.panelInitialized.set(!0);let e=this.panelRendered();if(this.panelRendered.set(!0),e)this.panelExpanded.set(!0);else if(this.panelAnimationsEnabled()){let i=()=>{if(this.panelOpenFrame=null,!this.panelOpen()||!this.panelRendered())return;let r=document.querySelector("app-side-panel");if(!r||r.hidden){this.panelOpenFrame=window.requestAnimationFrame(i);return}r.offsetWidth,this.panelExpanded.set(!0)};this.panelOpenFrame=window.requestAnimationFrame(i)}else this.panelExpanded.set(!0);this.loadSidePanelData()}else if(this.panelInitialized()){this.panelOpenFrame!==null&&(window.cancelAnimationFrame(this.panelOpenFrame),this.panelOpenFrame=null);let e=this.panelExpanded();this.panelExpanded.set(!1),(!e||!this.panelAnimationsEnabled())&&this.panelRendered.set(!1)}}onPanelTransitionEnd(t){t.target!==t.currentTarget||t.propertyName!=="width"||this.panelOpen()||this.panelRendered.set(!1)}panelAnimationsEnabled(){return typeof matchMedia>"u"||!matchMedia("(prefers-reduced-motion: reduce)").matches}loadSidePanelData(){this.panelSub?.unsubscribe(),this.panelLoading.set(!0),this.panelSub=Cl({stashes:this.git.getStashes(),worktrees:this.git.getWorktrees(),tags:this.git.getTags().pipe(ct(()=>Ee([])))}).subscribe({next:({stashes:t,worktrees:e,tags:i})=>{this.stashes.set(t),this.worktrees.set(e),this.tags.set(i),this.panelLoading.set(!1)},error:t=>{this.panelLoading.set(!1),this.error.set(this.errorMessage(t))}}),this.loadPullRequests()}loadPullRequests(){if(!this.hasAzureUrl()){this.pullRequests.set(null),this.pullRequestsError.set("");return}this.prListSub?.unsubscribe(),this.prListSub=this.git.getMyPullRequests().subscribe({next:t=>{this.pullRequests.set(t),this.pullRequestsError.set("")},error:t=>{this.pullRequests()===null&&this.pullRequests.set([]),this.pullRequestsError.set(this.errorMessage(t))}})}openPrDetail(t){this.prDetailTab.set("overview"),this.prDetailId.set(t)}openPrReview(t){if(this.prDetailTab.set("review"),this.prDetailId()===null){this.prDetailId.set(t);return}this.prDetailId.set(null),setTimeout(()=>this.prDetailId.set(t))}closePrDetail(){this.prDetailId.set(null),this.loadPullRequests()}refresh(t=!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=Cl({history:this.git.getCommits(t?Math.max(Ra,this.commits().length):Ra),repositoryState:this.git.getRepositoryState().pipe(ct(()=>Ee(null))),branches:this.git.getAllBranches(),repo:this.git.getRepoInfo(),settings:this.git.getSettings().pipe(ct(()=>Ee(null))),stashes:this.git.getStashes().pipe(ct(()=>Ee([]))),working:this.git.getWorkingChanges().pipe(ct(e=>(this.lastRepositoryState=null,this.statusError.set(this.errorMessage(e)),Ee(null))))}).subscribe({next:({history:e,repositoryState:i,branches:r,repo:o,settings:s,stashes:a,working:l})=>{this.commits.set(e.commits),this.totalCommits.set(Math.max(e.total,e.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);let h=this.selectedBranches();if(h.length){let w=new Set(r.map(T=>T.name)),M=h.filter(T=>w.has(T));M.length!==h.length&&this.selectedBranches.set(M)}let _=this.selectedCommit();if(_&&_.hash!==wn){let w=e.commits.find(M=>M.hash===_.hash);w&&this.selectedCommit.set(z(z({},_),w))}s&&this.applySettings(s,!1),l&&(this.workingChanges.set(l),this.statusError.set("")),this.statusLoading.set(!1),this.loading.set(!1),this.historyGeneration.update(w=>w+1),this.panelOpen()&&this.loadSidePanelData()},error:e=>{this.lastRepositoryState=null,this.error.set(this.errorMessage(e)),this.filterFailed.set(!0),this.statusError.set(this.errorMessage(e)),this.statusLoading.set(!1),this.loading.set(!1)}})}refreshWorking(){this.workingSub?.unsubscribe(),this.statusLoading.set(!0),this.workingSub=this.git.getWorkingChanges().subscribe({next:t=>{this.workingChanges.set(t),this.statusError.set(""),this.statusLoading.set(!1)},error:t=>{this.lastRepositoryState=null,this.statusError.set(this.errorMessage(t)),this.statusLoading.set(!1)}})}changeStage(t){this.busy()||this.mutationBusy()||this.statusLoading()||this.statusError()||(this.busy.set(!0),this.error.set(""),(t.staged?this.git.unstage(t.files):this.git.stage(t.files)).subscribe({next:()=>{this.refreshWorking(),this.busy.set(!1)},error:e=>{this.error.set(this.errorMessage(e)),this.refreshWorking(),this.busy.set(!1)}}))}stashChanges(t){this.busy()||this.mutationBusy()||this.statusLoading()||this.statusError()||this.openGitOperation({action:"stash-save",stashScope:t,currentBranch:this.currentBranchName()})}discardUnstaged(t){this.busy()||this.mutationBusy()||this.statusLoading()||this.statusError()||t.length&&(this.pendingDiscard.set(t),this.promptState.set({title:"Discard unstaged changes?",label:t.length===1?`${t[0]} will be discarded. This cannot be undone.`:`${t.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:t=>{this.error.set(this.errorMessage(t)),this.refreshWorking(),this.busy.set(!1)}}))}generateCommitMessage(){this.generatingMessage()||this.busy()||this.mutationBusy()||(this.generatingMessage.set(!0),this.messageError.set(""),this.git.generateCommitMessage().subscribe({next:t=>{this.commitSubject.set(t.subject),this.commitDescription.set(t.description),this.generatingMessage.set(!1)},error:t=>{this.messageError.set(this.errorMessage(t)),this.generatingMessage.set(!1)}}))}loadMoreCommits(){this.loadHistory(this.git.getCommits(Ra,this.commits().length))}loadAllCommits(){this.loadHistory(this.git.getCommits(void 0,this.commits().length))}loadHistory(t){if(this.historyLoading()||this.loading())return;let e=this.commits().length;this.filterFailed.set(!1),this.historyLoading.set(!0),this.historySub?.unsubscribe(),this.historySub=t.subscribe({next:({commits:i,total:r})=>{this.commits().length===e&&(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(t,e){this.searchSub?.unsubscribe(),this.searchLoading.set(!0),this.searchSub=this.git.searchCommits(t,e).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(t){let e=this.searchMatches();if(e.length===0)return;let i=this.searchIndex(),r=i<0?t==="next"?0:e.length-1:t==="next"?(i+1)%e.length:(i-1+e.length)%e.length,o=e[r];this.searchFocusHash.set(o),this.pendingSearchHash.set(o)}runRemoteAction(t){if(this.busy()||this.mutationBusy()||this.statusLoading())return;if(t==="rebase-from"){this.openRebaseFromDialog();return}if(t==="create-pr"){this.prDialogOpen.set(!0);return}if(t==="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(""),(t==="fetch"||t==="fetch-prune"?this.git.fetch(t==="fetch-prune"):t==="pull"?this.git.pull():t==="pull-rebase"?this.git.pull({mode:"rebase"}):t==="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 t=new Set(this.branches().map(r=>r.name)),e=["origin/main","origin/master"].filter(r=>t.has(r));e.forEach(r=>t.delete(r));let i=[...e,...t];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(t){this.settingsSaving.set(!0),this.git.saveSettings(t).subscribe({next:e=>{this.applySettings(e),this.settingsSaving.set(!1),this.settingsDialogOpen.set(!1)},error:e=>{this.settingsSaving.set(!1),this.error.set(this.errorMessage(e))}})}applySettings(t,e=!0){let i=this.azureSettings(),r=i?.refListView==="tree"?"tree":"flat",o=t.refListView==="tree"?"tree":"flat",s=i?.sidePanelSectionsExpanded!==!1,a=t.sidePanelSectionsExpanded!==!1;this.azureSettings.set(t),this.showRemote.set(t.showRemoteBranches!==!1),e&&i!==null&&(r!==o||s!==a)&&(this.panelInitialized()&&this.panelRenderVersion.update(l=>l+1),this.panelOpen()&&this.loadSidePanelData())}onPrCreated(){this.refresh()}onContextMenu(t){if(t.target.kind==="tag"&&!t.target.commit){let i=this.taggedCommit(t.target.branch?.name??"");i&&(t.target=ie(z({},t.target),{commit:i}))}let e=[];if(t.target.kind==="commit")e.push({label:"Add Tag...",action:"add-tag"}),e.push({label:"Create Branch...",action:"create-branch"}),e.push({separator:!0}),e.push({label:"Checkout...",action:"checkout-commit"}),e.push({label:"Cherry Pick...",action:"cherry-pick"}),e.push({label:"Revert...",action:"revert-commit",danger:!0}),e.push({label:"Drop...",action:"drop-commit",danger:!0}),e.push({separator:!0}),e.push({label:"Merge into current branch...",action:"merge-commit"}),e.push({label:"Rebase current branch on this Commit...",action:"rebase-commit"}),e.push({label:"Reset current branch to this Commit...",action:"reset-commit",danger:!0}),e.push({separator:!0}),e.push({label:"Copy Commit Hash to Clipboard",action:"copy-hash"}),e.push({label:"Copy Commit Subject to Clipboard",action:"copy-subject"});else if(t.target.kind==="tag")e.push({label:"View Details",action:"tag-details"}),e.push({separator:!0}),e.push({label:"Delete Tag...",action:"tag-delete",danger:!0}),e.push({label:"Push Tag...",action:"tag-push"}),e.push({separator:!0}),e.push({label:"Create Archive",action:"create-archive"}),e.push({label:"Copy Tag Name to Clipboard",action:"copy-tag-name"});else if(t.target.kind==="branch"){let i=t.target.branch.type,r=i==="head"||i==="local",o=i==="remote";e.push({label:"Checkout Branch...",action:"checkout-branch"}),r&&(e.push({label:"Rename Branch...",action:"rename-branch"}),e.push({label:"Delete Branch...",action:"delete-branch",danger:!0,disabled:i==="head"})),o&&e.push({label:"Delete Remote Branch...",action:"delete-remote-branch",danger:!0}),e.push({label:"Merge into current branch...",action:"merge-branch"}),o&&e.push({label:"Pull into current branch...",action:"pull-branch"}),e.push({separator:!0}),e.push({label:"Create Archive",action:"create-archive"}),e.push({label:"Unselect in Branches Dropdown",action:"unselect-branch"}),e.push({separator:!0}),e.push({label:"Copy Branch Name to Clipboard",action:"copy-branch-name"})}else t.target.kind==="stash"?(e.push({label:"Apply Stash...",action:"stash-apply"}),e.push({label:"Pop Stash...",action:"stash-pop"}),e.push({separator:!0}),e.push({label:"Drop Stash...",action:"stash-drop",danger:!0}),e.push({separator:!0}),e.push({label:"Copy Stash Name to Clipboard",action:"copy-stash-name"})):t.target.kind==="worktree"?(e.push({label:"Switch Current Tab",action:"switch-worktree",disabled:t.target.worktree?.current||t.target.worktree?.bare||!this.vscode.canOpenRepository()}),e.push({label:"Open as New Tab",action:"open-worktree-tab",disabled:t.target.worktree?.bare||!this.vscode.canOpenRepository()}),e.push({label:"Open in New VS Code Window",action:"open-worktree-window",disabled:t.target.worktree?.bare||!this.vscode.canOpenRepository()}),e.push({separator:!0}),e.push({label:"Delete Worktree...",action:"delete-worktree",danger:!0,disabled:t.target.worktree?.current||t.target.worktree?.bare}),e.push({separator:!0}),e.push({label:"Copy Worktree Path to Clipboard",action:"copy-worktree-path"})):(e.push({label:"Stash uncommitted changes...",action:"stash-working"}),e.push({label:"Reset uncommitted changes...",action:"reset-working",danger:!0}),e.push({label:"Clean untracked files...",action:"clean-untracked",danger:!0}),e.push({separator:!0}),e.push({label:"Open Source Control View",action:"open-source-control"}));this.contextMenuTarget.set(t.target),this.contextMenuState.set({x:t.x,y:t.y,items:this.busy()||this.mutationBusy()?e.map(i=>i.action&&m3.has(i.action)?ie(z({},i),{disabled:!0}):i):e})}taggedCommit(t){if(!t)return;let e=this.tags().find(i=>i.name===t);return e?this.commitIndex().get(e.hash):void 0}selectTag(t){this.pendingSearchHash.set(t.hash)}selectStash(t){this.selectedCommit.set({hash:t.hash,date:t.date??"",message:t.message,refs:"",author_name:t.author_name??"",author_email:t.author_email??"",parents:[]})}openWorktreeDialog(){this.worktreeDialogError.set(""),this.worktreeDialogOpen.set(!0)}currentBranchName(){return this.branches().find(t=>t.current)?.name??""}openGitOperation(t){this.gitOperationError.set(""),this.gitOperationState.set(t)}copyToClipboard(t){Ud(t).then(e=>{e||this.error.set("Could not copy to the clipboard.")})}closeGitOperation(){this.mutationBusy()||(this.gitOperationState.set(null),this.gitOperationError.set(""))}onGitOperationConfirm(t){if(this.busy()||this.mutationBusy())return;this.gitOperationError.set("");let e=r=>{this.gitOperationState.set(null),r?.warnings?.length&&this.error.set(r.warnings.join(" ")),this.refresh()},i=r=>{this.gitOperationError.set(this.errorMessage(r)),this.refreshWorking()};switch(t.action){case"add-tag":this.git.createTag(ie(z(ie(z({name:t.name},t.commit?{commit:t.commit}:{}),{annotate:t.annotate}),t.annotate?{message:t.message}:{}),{push:t.push,remote:t.remote})).subscribe({next:e,error:i});return;case"create-branch":this.git.createBranch(ie(z({name:t.name},t.commit?{startPoint:t.commit}:{}),{checkout:t.checkout,publish:t.publish,remote:t.remote})).subscribe({next:e,error:i});return;case"checkout-commit":this.git.checkoutRef(z({ref:t.hash},t.mode==="branch"?{newBranch:t.branchName,publish:t.publish,remote:t.remote}:{detach:!0})).subscribe({next:e,error:i});return;case"checkout-branch":t.isRemote?this.git.checkoutRef(t.mode==="track"?{ref:t.branch,newBranch:t.branchName,track:!0}:{ref:t.branch,detach:!0}).subscribe({next:e,error:i}):this.git.checkoutRef({ref:t.branch}).subscribe({next:e,error:i});return;case"cherry-pick":this.git.cherryPick(z({commit:t.hash,noCommit:t.noCommit,recordSource:t.recordSource,signoff:t.signoff},t.mainline!==void 0?{mainline:t.mainline}:{})).subscribe({next:e,error:i});return;case"revert":this.git.revertCommit(z({commit:t.hash,noCommit:t.noCommit,signoff:t.signoff},t.mainline!==void 0?{mainline:t.mainline}:{})).subscribe({next:e,error:i});return;case"drop-commit":this.git.dropCommit(t.hash).subscribe({next:e,error:i});return;case"merge":this.git.mergeRef({branch:t.source,mode:t.mode,noCommit:t.noCommit,autostash:t.autostash}).subscribe({next:e,error:i});return;case"rebase":this.git.rebaseRef({branch:t.onto,autostash:t.autostash,preserveMerges:t.preserveMerges}).subscribe({next:e,error:i});return;case"reset-commit":this.git.resetToCommit(t.hash,t.mode).subscribe({next:e,error:i});return;case"push-tag":this.git.pushTag({name:t.name,remote:t.remote,force:t.force}).subscribe({next:e,error:i});return;case"delete-tag":this.git.deleteTag({name:t.name,deleteRemote:t.deleteRemote,remote:t.remote}).subscribe({next:e,error:i});return;case"rename-branch":this.git.renameBranch({oldName:t.oldName,newName:t.newName,publish:t.publish,deleteRemoteOld:t.deleteRemoteOld,remote:t.remote}).subscribe({next:r=>{this.selectedBranches.update(o=>o.map(s=>s===t.oldName?t.newName:s)),e(r)},error:i});return;case"delete-branch":this.git.deleteBranch({name:t.name,force:t.force,deleteRemote:t.deleteRemote,remote:t.remote}).subscribe({next:r=>{this.selectedBranches.update(o=>o.filter(s=>s!==t.name)),e(r)},error:i});return;case"delete-remote-branch":this.git.deleteRemoteBranch(t.remote,t.branch).subscribe({next:e,error:i});return;case"pull-branch":this.git.pull({remote:t.remote,branch:t.branch,mode:t.mode}).subscribe({next:e,error:i});return;case"stash-save":this.git.stashSave(ie(z({},t.message?{message:t.message}:{}),{scope:t.scope,includeUntracked:t.includeUntracked})).subscribe({next:e,error:i});return;case"stash-apply":this.git.stashApply(t.index,t.restoreIndex).subscribe({next:e,error:i});return;case"stash-pop":this.git.stashPop(t.index,t.restoreIndex).subscribe({next:e,error:i});return}}createWorktree(t){this.busy()||this.mutationBusy()||this.statusLoading()||(this.worktreeDialogError.set(""),this.git.createWorktree(t.path,t.branch).subscribe({next:()=>{this.worktreeDialogOpen.set(!1),this.loadSidePanelData()},error:e=>this.worktreeDialogError.set(this.errorMessage(e))}))}onContextAction(t){if(this.busy()||this.mutationBusy())return;let e=this.contextMenuTarget()?.commit??this.selectedCommit();switch(t){case"add-tag":this.openGitOperation({action:"add-tag",commit:e??void 0,currentBranch:this.currentBranchName()});break;case"create-branch":this.openGitOperation({action:"create-branch",commit:e??void 0,currentBranch:this.currentBranchName()});break;case"checkout-commit":e&&this.openGitOperation({action:"checkout-commit",commit:e,currentBranch:this.currentBranchName()});break;case"cherry-pick":e&&this.openGitOperation({action:"cherry-pick",commit:e,currentBranch:this.currentBranchName()});break;case"open-commit":this.selectedCommit()===null&&this.selectedCommit.set(this.commits()[0]??null);break;case"copy-hash":e&&this.copyToClipboard(e.hash);break;case"copy-subject":e&&this.copyToClipboard(e.message);break;case"view-commit-diff":e&&this.selectedCommit.set(e);break;case"revert-commit":e&&this.openGitOperation({action:"revert",commit:e,currentBranch:this.currentBranchName()});break;case"drop-commit":e&&this.openGitOperation({action:"drop-commit",commit:e,currentBranch:this.currentBranchName()});break;case"merge-commit":e&&this.openGitOperation({action:"merge",commit:e,currentBranch:this.currentBranchName()});break;case"rebase-commit":e&&this.openGitOperation({action:"rebase",commit:e,currentBranch:this.currentBranchName()});break;case"reset-commit":e&&this.openGitOperation({action:"reset-commit",commit:e,currentBranch:this.currentBranchName()});break;case"checkout-branch":{let i=this.contextMenuTarget()?.branch;if(i){let r=i.type==="remote",o=i.name.indexOf("/");this.openGitOperation({action:"checkout-branch",ref:i.name,isRemote:r,remote:r&&o>0?i.name.slice(0,o):void 0,currentBranch:this.currentBranchName()})}break}case"delete-remote-branch":{let i=this.contextMenuTarget()?.branch?.name??"",r=i.indexOf("/");r>0&&this.openGitOperation({action:"delete-remote-branch",ref:i,isRemote:!0,remote:i.slice(0,r),currentBranch:this.currentBranchName()});break}case"merge-branch":{let i=this.contextMenuTarget()?.branch;i&&this.openGitOperation({action:"merge",ref:i.name,currentBranch:this.currentBranchName()});break}case"pull-branch":{let i=this.contextMenuTarget()?.branch;if(i&&i.type==="remote"){let r=i.name.indexOf("/");this.openGitOperation({action:"pull-branch",ref:i.name,isRemote:!0,remote:r>0?i.name.slice(0,r):void 0,currentBranch:this.currentBranchName()})}break}case"create-archive":{let i=this.contextMenuTarget(),r=i?.commit?.hash??i?.branch?.name;r&&window.open(Uy(`/api/archive?ref=${encodeURIComponent(r)}`),"_blank");break}case"tag-details":{let i=this.contextMenuTarget();if(i?.commit)this.selectedCommit.set(i.commit);else{let r=i?.branch?.name??"",o=this.tags().find(s=>s.name===r);o&&this.selectTag(o)}break}case"tag-delete":{let i=this.contextMenuTarget()?.branch?.name??"";this.openGitOperation({action:"delete-tag",ref:i,currentBranch:this.currentBranchName()});break}case"tag-push":{let i=this.contextMenuTarget()?.branch?.name??"";this.openGitOperation({action:"push-tag",ref:i,currentBranch:this.currentBranchName()});break}case"copy-tag-name":this.contextMenuTarget()?.branch?.name&&this.copyToClipboard(this.contextMenuTarget().branch.name);break;case"unselect-branch":this.selectedBranches.set([]);break;case"stash-apply":{let i=this.contextMenuTarget()?.stash;i&&this.openGitOperation({action:"stash-apply",stash:i,currentBranch:this.currentBranchName()});break}case"stash-pop":{let i=this.contextMenuTarget()?.stash;i&&this.openGitOperation({action:"stash-pop",stash:i,currentBranch:this.currentBranchName()});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&&this.copyToClipboard(`stash@{${i.index}}`);break}case"copy-worktree-path":{let i=this.contextMenuTarget()?.worktree?.path;i&&this.copyToClipboard(i);break}case"switch-worktree":{let i=this.contextMenuTarget()?.worktree;i&&this.openWorktree(i);break}case"open-worktree-tab":{let i=this.contextMenuTarget()?.worktree;i&&!i.bare&&this.vscode.openRepository(i.path);break}case"open-worktree-window":{let i=this.contextMenuTarget()?.worktree;i&&!i.bare&&this.vscode.openRepositoryWindow(i.path);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&&this.copyToClipboard(this.contextMenuTarget().branch.name);break;case"rename-branch":{let i=this.contextMenuTarget()?.branch?.name??"";this.openGitOperation({action:"rename-branch",ref:i,currentBranch:this.currentBranchName()});break}case"delete-branch":{let i=this.contextMenuTarget()?.branch?.name??"";this.openGitOperation({action:"delete-branch",ref:i,currentBranch:this.currentBranchName()});break}case"open-working":this.selectedCommit.set({hash:wn,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.openGitOperation({action:"stash-save",currentBranch:this.currentBranchName()});break;case"reset-working":{let i=this.workingChanges(),r=(i?.staged.length??0)+(i?.unstaged.length??0);this.promptState.set({title:"Reset uncommitted changes?",label:`${r===1?"1 tracked file will be":`${r} tracked files will be`} discarded. Untracked files will remain. This cannot be undone.`,confirmOnly:!0,okLabel:"Reset",danger:!0});break}case"clean-untracked":{let i=this.workingChanges()?.untracked.length??0;this.promptState.set({title:"Clean untracked files?",label:`${i===1?"1 untracked file will be":`${i} untracked files will be`} permanently deleted. This cannot be undone.`,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":this.vscode.openSourceControl()||window.open("vscode://command/workbench.view.scm","_blank");break;default:break}this.contextMenuState.set(null)}openWorktree(t){t.bare||this.vscode.switchRepository(t.path)}onPromptConfirm(t){if(this.busy()||this.mutationBusy())return;let e=this.promptState();if(!e)return;this.promptState.set(null);let i=this.contextMenuTarget()?.commit;if(e.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(e.title==="Push tag?"){let r=this.contextMenuTarget()?.branch?.name;r&&this.git.pushTag({name:r}).subscribe({next:()=>this.refresh(),error:o=>this.error.set(this.errorMessage(o))});return}if(e.title==="Force push?"){this.git.push(!0).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});return}if(e.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(e.title==="Stash uncommitted changes"){this.git.stashSave(t?{message:t}:{}).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});return}if(e.title==="Reset uncommitted changes?"){this.git.resetWorking().subscribe({next:()=>this.refreshWorking(),error:r=>this.error.set(this.errorMessage(r))});return}if(e.title==="Clean untracked files?"){this.git.cleanUntracked().subscribe({next:()=>this.refreshWorking(),error:r=>this.error.set(this.errorMessage(r))});return}if(e.title==="Rename branch"){let r=this.contextMenuTarget()?.branch?.name,o=t.trim();r&&o&&o!==r&&this.git.renameBranch({oldName:r,newName:o}).subscribe({next:()=>{this.selectedBranches.update(s=>s.map(a=>a===r?o:a)),this.refresh()},error:s=>this.error.set(this.errorMessage(s))});return}if(e.title==="Delete branch?"){let r=this.contextMenuTarget()?.branch?.name;r&&this.git.deleteBranch({name:r}).subscribe({next:()=>{this.selectedBranches.update(o=>o.filter(s=>s!==r)),this.refresh()},error:o=>this.error.set(this.errorMessage(o))});return}if(e.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(e.title==="Rebase from branch"){let r=t.trim();r&&this.git.rebaseRef({branch:r}).subscribe({next:()=>this.refresh(),error:o=>this.error.set(this.errorMessage(o))});return}}ancestorsOf(t){let e=this.commitIndex(),i=new Set,r=[t];for(;r.length;){let o=r.pop();if(i.has(o))continue;i.add(o);let s=e.get(o);s&&r.push(...s.parents)}return i}errorMessage(t){let e=t;return e?.status===400&&e.error?.error?e.error.error:"Failed to communicate with the Guito server."}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-root"]],hostBindings:function(e,i){e&1&&C("focus",function(){return i.checkRepository()},$f)("visibilitychange",function(){return i.checkRepository()},qe)},decls:16,vars:33,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"],[1,"content"],[3,"commitClick","contextMenu","loadMoreRequested","loadAllRequested","identity","commits","loadingLabel","selectedHash","search","showGraph","selectedBranches","showRemote","workingChanges","stashes","showStashes","showTags","issueLinking","unloaded","historyLoading","scrollToHash"],[3,"select","closed","menu"],[3,"confirmed","cancelled","state"],[3,"state","busy","error"],[3,"branches","worktrees","busy","error"],[3,"branches"],[3,"prId","settings","initialTab"],[3,"settings","identity","saving"],["retryLabel","Retry",3,"retry","message","busy"],["retryLabel","Retry status",3,"retry","message","busy"],[3,"panel-open","hidden","branches","selectedBranches","showRemote","stashes","worktrees","tags","refListView","sectionsExpandedByDefault","searchCaseSensitive","worktreeSort","prSort","selectedCommitHash","loading","azureEnabled","pullRequests","prError"],[3,"transitionend","transitioncancel","branchChange","tagSelect","stashSelect","contextMenu","worktreeCreate","worktreeOpen","prSelect","prRefresh","hidden","branches","selectedBranches","showRemote","stashes","worktrees","tags","refListView","sectionsExpandedByDefault","searchCaseSensitive","worktreeSort","prSort","selectedCommitHash","loading","azureEnabled","pullRequests","prError"],[3,"changes","branches","busy","statusLoading","statusError","subject","description","fileListView","generating","generateError"],[3,"commit","fileListView","issueLinking"],[3,"subjectChange","descriptionChange","generateMessage","stageChange","stashChange","discardRequest","commitRequested","conflictResolved","retry","closed","changes","branches","busy","statusLoading","statusError","subject","description","fileListView","generating","generateError"],[3,"closed","commit","fileListView","issueLinking"],[3,"confirmed","closed","state","busy","error"],[3,"created","closed","branches","worktrees","busy","error"],[3,"closed","created","branches"],[3,"changed","closed","prId","settings","initialTab"],[3,"saved","settingsUpdated","identityChanged","repositoryChanged","closed","settings","identity","saving"]],template:function(e,i){if(e&1&&(u(0,"div",0)(1,"app-toolbar",1),C("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)}),f(),E(2,i3,1,2,"app-error-banner",2),E(3,r3,1,2,"app-error-banner",3),u(4,"div",4),E(5,s3,2,2),u(6,"main",5)(7,"app-commit-table",6),C("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()}),f(),E(8,c3,2,1),f()(),u(9,"app-context-menu",7),C("select",function(o){return i.onContextAction(o)})("closed",function(){return i.contextMenuState.set(null)}),f(),u(10,"app-prompt-dialog",8),C("confirmed",function(o){return i.onPromptConfirm(o)})("cancelled",function(){return i.onPromptCancel()}),f(),E(11,d3,1,3,"app-git-operation-dialog",9),E(12,u3,1,4,"app-worktree-dialog",10),E(13,p3,1,1,"app-create-pr-dialog",11),E(14,f3,1,3,"app-pr-dialog",12),E(15,h3,1,3,"app-settings-dialog",13),f()),e&2){let r,o,s,a,l,h;c(),S("busy",i.busy()||i.mutationBusy()||i.statusLoading())("prEnabled",i.hasAzureUrl())("panelOpen",i.panelOpen())("matchIndex",i.searchIndex())("matchCount",i.searchMatches().length)("filterMode",i.filterSearch()),c(),D(i.error()?2:-1),c(),D(i.statusError()&&((r=i.selectedCommit())==null?null:r.hash)!==i.workingHash?3:-1),c(2),D(i.panelInitialized()?5:-1),c(2),S("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())("selectedBranches",i.selectedBranches())("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()),c(),D((s=i.selectedCommit())?8:-1,s),c(),S("menu",i.contextMenuState()),c(),S("state",i.promptState()),c(),D((a=i.gitOperationState())?11:-1,a),c(),D(i.worktreeDialogOpen()?12:-1),c(),D(i.prDialogOpen()?13:-1),c(),D((l=i.prDetailId())?14:-1,l),c(),D((h=i.settingsDialogOpen()&&i.azureSettings())?15:-1,h)}},dependencies:[pt,Qd,zd,Ed,gd,jo,Go,Nd,qd,Rd,Ad,Vd,Zd],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})};Xh(Kd,Gy).catch(n=>console.error(n));