guito 1.0.2 → 1.0.3
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.
- package/CHANGELOG.md +20 -1
- package/bin/guito-server.js +910 -1287
- package/bin/ui/browser/index.html +1 -1
- package/bin/ui/browser/main-H44AMFJL.js +67 -0
- package/bin/working-tree.js +72 -3
- package/package.json +1 -1
- package/bin/ui/browser/main-VXSKPJDX.js +0 -65
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var ix=Object.defineProperty,rx=Object.defineProperties;var ox=Object.getOwnPropertyDescriptors;var zm=Object.getOwnPropertySymbols;var sx=Object.prototype.hasOwnProperty,ax=Object.prototype.propertyIsEnumerable;var Gm=(n,t,e)=>t in n?ix(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,W=(n,t)=>{for(var e in t||={})sx.call(t,e)&&Gm(n,e,t[e]);if(zm)for(var e of zm(t))ax.call(t,e)&&Gm(n,e,t[e]);return n},le=(n,t)=>rx(n,ox(t));var Dn=(n,t,e)=>new Promise((i,r)=>{var o=l=>{try{a(e.next(l))}catch(d){r(d)}},s=l=>{try{a(e.throw(l))}catch(d){r(d)}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(o,s);a((e=e.apply(n,t)).next())});var Gd;function Ea(){return Gd}function Sn(n){let t=Gd;return Gd=n,t}var Wm=Symbol("NotFound");function Mr(n){return n===Wm||n?.name==="\u0275NotFound"}var ht=null,Da=!1,Wd=1,lx=null,rt=Symbol("SIGNAL");function re(n){let t=ht;return ht=n,t}function ka(){return ht}var Si={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 Ti(n){if(Da)throw new Error("");if(ht===null)return;ht.consumerOnSignalRead(n);let t=ht.producersTail;if(t!==void 0&&t.producer===n)return;let e,i=ht.recomputing;if(i&&(e=t!==void 0?t.nextProducer:ht.producers,e!==void 0&&e.producer===n)){ht.producersTail=e,e.lastReadVersion=n.version;return}let r=n.consumersTail;if(r!==void 0&&r.consumer===ht&&(!i||dx(r,ht)))return;let o=kr(ht),s={producer:n,consumer:ht,nextProducer:e,prevConsumer:r,lastReadVersion:n.version,nextConsumer:void 0};ht.producersTail=s,t!==void 0?t.nextProducer=s:ht.producers=s,o&&Qm(n,s)}function qm(){Wd++}function Ia(n){if(!(kr(n)&&!n.dirty)&&!(!n.dirty&&n.lastCleanEpoch===Wd)){if(!n.producerMustRecompute(n)&&!ki(n)){Ma(n);return}n.producerRecomputeValue(n),Ma(n)}}function qd(n){if(n.consumers===void 0)return;let t=Da;Da=!0;try{for(let e=n.consumers;e!==void 0;e=e.nextConsumer){let i=e.consumer;i.dirty||cx(i)}}finally{Da=t}}function Zd(){return ht?.consumerAllowSignalWrites!==!1}function cx(n){n.dirty=!0,qd(n),n.consumerMarkedDirty?.(n)}function Ma(n){n.dirty=!1,n.lastCleanEpoch=Wd}function Qn(n){return n&&Zm(n),re(n)}function Zm(n){n.producersTail=void 0,n.recomputing=!0}function Mi(n,t){re(t),n&&Ym(n)}function Ym(n){n.recomputing=!1;let t=n.producersTail,e=t!==void 0?t.nextProducer:n.producers;if(e!==void 0){if(kr(n))do e=Yd(e);while(e!==void 0);t!==void 0?t.nextProducer=void 0:n.producers=void 0}}function ki(n){for(let t=n.producers;t!==void 0;t=t.nextProducer){let e=t.producer,i=t.lastReadVersion;if(i!==e.version||(Ia(e),i!==e.version))return!0}return!1}function Kn(n){if(kr(n)){let t=n.producers;for(;t!==void 0;)t=Yd(t)}n.producers=void 0,n.producersTail=void 0,n.consumers=void 0,n.consumersTail=void 0}function Qm(n,t){let e=n.consumersTail,i=kr(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)Qm(r.producer,r)}function Yd(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,!kr(t)){let o=t.producers;for(;o!==void 0;)o=Yd(o)}return e}function kr(n){return n.consumerIsAlwaysLive||n.consumers!==void 0}function Pa(n){lx?.(n)}function dx(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 Oa(n,t){return Object.is(n,t)}function Ro(n,t){let e=Object.create(ux);e.computation=n,t!==void 0&&(e.equal=t);let i=()=>{if(Ia(e),Ti(e),e.value===Oo)throw e.error;return e.value};return i[rt]=e,Pa(e),i}var Sa=Symbol("UNSET"),Ta=Symbol("COMPUTING"),Oo=Symbol("ERRORED"),ux=le(W({},Si),{value:Sa,dirty:!0,error:null,equal:Oa,kind:"computed",producerMustRecompute(n){return n.value===Sa||n.value===Ta},producerRecomputeValue(n){if(n.value===Ta)throw new Error("");let t=n.value;n.value=Ta;let e=Qn(n),i,r=!1;try{i=n.computation(),re(null),r=t!==Sa&&t!==Oo&&i!==Oo&&n.equal(t,i)}catch(o){i=Oo,n.error=o}finally{Mi(n,e)}if(r){n.value=t;return}n.value=i,n.version++}});function px(){throw new Error}var Km=px;function Xm(n){Km(n)}function Qd(n){Km=n}var fx=null;function Kd(n,t){let e=Object.create(No);e.value=n,t!==void 0&&(e.equal=t);let i=()=>Jm(e);return i[rt]=e,Pa(e),[i,s=>Ir(e,s),s=>Xd(e,s)]}function Jm(n){return Ti(n),n.value}function Ir(n,t){Zd()||Xm(n),n.equal(n.value,t)||(n.value=t,hx(n))}function Xd(n,t){Zd()||Xm(n),Ir(n,t(n.value))}var No=le(W({},Si),{equal:Oa,value:void 0,kind:"signal"});function hx(n){n.version++,qm(),qd(n),fx?.(n)}function he(n){return typeof n=="function"}function Pr(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 Ra=Pr(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 Ii(n,t){if(n){let e=n.indexOf(t);0<=e&&n.splice(e,1)}}var Ve=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(he(i))try{i()}catch(o){t=o instanceof Ra?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{eg(o)}catch(s){t=t??[],s instanceof Ra?t=[...t,...s.errors]:t.push(s)}}if(t)throw new Ra(t)}}add(t){var e;if(t&&t!==this)if(this.closed)eg(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)&&Ii(e,t)}remove(t){let{_finalizers:e}=this;e&&Ii(e,t),t instanceof n&&t._removeParent(this)}};Ve.EMPTY=(()=>{let n=new Ve;return n.closed=!0,n})();var Jd=Ve.EMPTY;function Na(n){return n instanceof Ve||n&&"closed"in n&&he(n.remove)&&he(n.add)&&he(n.unsubscribe)}function eg(n){he(n)?n():n.unsubscribe()}var sn={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Or={setTimeout(n,t,...e){let{delegate:i}=Or;return i?.setTimeout?i.setTimeout(n,t,...e):setTimeout(n,t,...e)},clearTimeout(n){let{delegate:t}=Or;return(t?.clearTimeout||clearTimeout)(n)},delegate:void 0};function Aa(n){Or.setTimeout(()=>{let{onUnhandledError:t}=sn;if(t)t(n);else throw n})}function Ao(){}var tg=eu("C",void 0,void 0);function ng(n){return eu("E",void 0,n)}function ig(n){return eu("N",n,void 0)}function eu(n,t,e){return{kind:n,value:t,error:e}}var Pi=null;function Rr(n){if(sn.useDeprecatedSynchronousErrorHandling){let t=!Pi;if(t&&(Pi={errorThrown:!1,error:null}),n(),t){let{errorThrown:e,error:i}=Pi;if(Pi=null,e)throw i}}else n()}function rg(n){sn.useDeprecatedSynchronousErrorHandling&&Pi&&(Pi.errorThrown=!0,Pi.error=n)}var Oi=class extends Ve{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Na(t)&&t.add(this)):this.destination=_x}static create(t,e,i){return new an(t,e,i)}next(t){this.isStopped?nu(ig(t),this):this._next(t)}error(t){this.isStopped?nu(ng(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?nu(tg,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()}}},mx=Function.prototype.bind;function tu(n,t){return mx.call(n,t)}var iu=class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(i){La(i)}}error(t){let{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(i){La(i)}else La(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){La(e)}}},an=class extends Oi{constructor(t,e,i){super();let r;if(he(t)||!t)r={next:t??void 0,error:e??void 0,complete:i??void 0};else{let o;this&&sn.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&tu(t.next,o),error:t.error&&tu(t.error,o),complete:t.complete&&tu(t.complete,o)}):r=t}this.destination=new iu(r)}};function La(n){sn.useDeprecatedSynchronousErrorHandling?rg(n):Aa(n)}function gx(n){throw n}function nu(n,t){let{onStoppedNotification:e}=sn;e&&Or.setTimeout(()=>e(n,t))}var _x={closed:!0,next:Ao,error:gx,complete:Ao};var Nr=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Ar(n){return n}function og(n){return n.length===0?Ar:n.length===1?n[0]:function(e){return n.reduce((i,r)=>r(i),e)}}var de=(()=>{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=bx(e)?e:new an(e,i,r);return Rr(()=>{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=sg(i),new i((r,o)=>{let s=new an({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)}[Nr](){return this}pipe(...e){return og(e)(this)}toPromise(e){return e=sg(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 sg(n){var t;return(t=n??sn.Promise)!==null&&t!==void 0?t:Promise}function vx(n){return n&&he(n.next)&&he(n.error)&&he(n.complete)}function bx(n){return n&&n instanceof Oi||vx(n)&&Na(n)}function ru(n){return he(n?.lift)}function ye(n){return t=>{if(ru(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 xe(n,t,e,i,r){return new ou(n,t,e,i,r)}var ou=class extends Oi{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 ag(){return ye((n,t)=>{let e=null;n._refCount++;let i=xe(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 Lo=class extends de{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,ru(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 Ve;let e=this.getSubject();t.add(this.source.subscribe(xe(e,void 0,()=>{this._teardown(),e.complete()},i=>{this._teardown(),e.error(i)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Ve.EMPTY)}return t}refCount(){return ag()(this)}};var Lr={schedule(n){let t=requestAnimationFrame,e=cancelAnimationFrame,{delegate:i}=Lr;i&&(t=i.requestAnimationFrame,e=i.cancelAnimationFrame);let r=t(o=>{e=void 0,n(o)});return new Ve(()=>e?.(r))},requestAnimationFrame(...n){let{delegate:t}=Lr;return(t?.requestAnimationFrame||requestAnimationFrame)(...n)},cancelAnimationFrame(...n){let{delegate:t}=Lr;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...n)},delegate:void 0};var lg=Pr(n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var $e=(()=>{class n extends de{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let i=new Fa(this,this);return i.operator=e,i}_throwIfClosed(){if(this.closed)throw new lg}next(e){Rr(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let i of this.currentObservers)i.next(e)}})}error(e){Rr(()=>{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(){Rr(()=>{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?Jd:(this.currentObservers=null,o.push(e),new Ve(()=>{this.currentObservers=null,Ii(o,e)}))}_checkFinalizedStatuses(e){let{hasError:i,thrownError:r,isStopped:o}=this;i?e.error(r):o&&e.complete()}asObservable(){let e=new de;return e.source=this,e}}return n.create=(t,e)=>new Fa(t,e),n})(),Fa=class extends $e{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:Jd}};var Fo=class extends $e{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 Vo={now(){return(Vo.delegate||Date).now()},delegate:void 0};var Ri=class extends $e{constructor(t=1/0,e=1/0,i=Vo){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 Va=class extends Ve{constructor(t,e){super()}schedule(t,e=0){return this}};var Bo={setInterval(n,t,...e){let{delegate:i}=Bo;return i?.setInterval?i.setInterval(n,t,...e):setInterval(n,t,...e)},clearInterval(n){let{delegate:t}=Bo;return(t?.clearInterval||clearInterval)(n)},delegate:void 0};var Xn=class extends Va{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 Bo.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&&Bo.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,Ii(i,this),t!=null&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}};var yx=1,su,au={};function cg(n){return n in au?(delete au[n],!0):!1}var dg={setImmediate(n){let t=yx++;return au[t]=!0,su||(su=Promise.resolve()),su.then(()=>cg(t)&&n()),t},clearImmediate(n){cg(n)}};var{setImmediate:Cx,clearImmediate:xx}=dg,jo={setImmediate(...n){let{delegate:t}=jo;return(t?.setImmediate||Cx)(...n)},clearImmediate(n){let{delegate:t}=jo;return(t?.clearImmediate||xx)(n)},delegate:void 0};var Ba=class extends Xn{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=jo.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&&(jo.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}};var Fr=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)}};Fr.now=Vo.now;var Jn=class extends Fr{constructor(t,e=Fr.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 ja=class extends Jn{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 lu=new ja(Ba);var $o=new Jn(Xn),ug=$o;var $a=class extends Xn{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=Lr.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&&(Lr.cancelAnimationFrame(e),t._scheduled=void 0)}};var Ha=class extends Jn{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 cu=new Ha($a);function Ua(n){return n&&he(n.schedule)}function pg(n){return n[n.length-1]}function fg(n){return he(pg(n))?n.pop():void 0}function Vr(n){return Ua(pg(n))?n.pop():void 0}function mg(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(m){try{d(i.next(m))}catch(y){s(y)}}function l(m){try{d(i.throw(m))}catch(y){s(y)}}function d(m){m.done?o(m.value):r(m.value).then(a,l)}d((i=i.apply(n,t||[])).next())})}function hg(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 Ni(n){return this instanceof Ni?(this.v=n,this):new Ni(n)}function gg(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(E){return function(R){return Promise.resolve(R).then(E,y)}}function a(E,R){i[E]&&(r[E]=function(j){return new Promise(function(Z,$){o.push([E,j,Z,$])>1||l(E,j)})},R&&(r[E]=R(r[E])))}function l(E,R){try{d(i[E](R))}catch(j){w(o[0][3],j)}}function d(E){E.value instanceof Ni?Promise.resolve(E.value.v).then(m,y):w(o[0][2],E)}function m(E){l("next",E)}function y(E){l("throw",E)}function w(E,R){E(R),o.shift(),o.length&&l(o[0][0],o[0][1])}}function _g(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 hg=="function"?hg(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(d){o({value:d,done:a})},s)}}var za=n=>n&&typeof n.length=="number"&&typeof n!="function";function Ga(n){return he(n?.then)}function Wa(n){return he(n[Nr])}function qa(n){return Symbol.asyncIterator&&he(n?.[Symbol.asyncIterator])}function Za(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 wx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ya=wx();function Qa(n){return he(n?.[Ya])}function Ka(n){return gg(this,arguments,function*(){let e=n.getReader();try{for(;;){let{value:i,done:r}=yield Ni(e.read());if(r)return yield Ni(void 0);yield yield Ni(i)}}finally{e.releaseLock()}})}function Xa(n){return he(n?.getReader)}function Re(n){if(n instanceof de)return n;if(n!=null){if(Wa(n))return Ex(n);if(za(n))return Dx(n);if(Ga(n))return Sx(n);if(qa(n))return vg(n);if(Qa(n))return Tx(n);if(Xa(n))return Mx(n)}throw Za(n)}function Ex(n){return new de(t=>{let e=n[Nr]();if(he(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Dx(n){return new de(t=>{for(let e=0;e<n.length&&!t.closed;e++)t.next(n[e]);t.complete()})}function Sx(n){return new de(t=>{n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Aa)})}function Tx(n){return new de(t=>{for(let e of n)if(t.next(e),t.closed)return;t.complete()})}function vg(n){return new de(t=>{kx(n,t).catch(e=>t.error(e))})}function Mx(n){return vg(Ka(n))}function kx(n,t){var e,i,r,o;return mg(this,void 0,void 0,function*(){try{for(e=_g(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 Gt(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 Ja(n,t=0){return ye((e,i)=>{e.subscribe(xe(i,r=>Gt(i,n,()=>i.next(r),t),()=>Gt(i,n,()=>i.complete(),t),r=>Gt(i,n,()=>i.error(r),t)))})}function el(n,t=0){return ye((e,i)=>{i.add(n.schedule(()=>e.subscribe(i),t))})}function bg(n,t){return Re(n).pipe(el(t),Ja(t))}function yg(n,t){return Re(n).pipe(el(t),Ja(t))}function Cg(n,t){return new de(e=>{let i=0;return t.schedule(function(){i===n.length?e.complete():(e.next(n[i++]),e.closed||this.schedule())})})}function xg(n,t){return new de(e=>{let i;return Gt(e,t,()=>{i=n[Ya](),Gt(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)}),()=>he(i?.return)&&i.return()})}function tl(n,t){if(!n)throw new Error("Iterable cannot be null");return new de(e=>{Gt(e,t,()=>{let i=n[Symbol.asyncIterator]();Gt(e,t,()=>{i.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function wg(n,t){return tl(Ka(n),t)}function Eg(n,t){if(n!=null){if(Wa(n))return bg(n,t);if(za(n))return Cg(n,t);if(Ga(n))return yg(n,t);if(qa(n))return tl(n,t);if(Qa(n))return xg(n,t);if(Xa(n))return wg(n,t)}throw Za(n)}function nl(n,t){return t?Eg(n,t):Re(n)}function we(...n){let t=Vr(n);return nl(n,t)}function du(n,t){let e=he(n)?n:()=>n,i=r=>r.error(e());return new de(t?r=>t.schedule(i,0,r):i)}function Ho(n){return!!n&&(n instanceof de||he(n.lift)&&he(n.subscribe))}var Dg=Pr(n=>function(){n(this),this.name="EmptyError",this.message="no elements in sequence"});function il(n,t){let e=typeof t=="object";return new Promise((i,r)=>{let o=new an({next:s=>{i(s),o.unsubscribe()},error:r,complete:()=>{e?i(t.defaultValue):r(new Dg)}});n.subscribe(o)})}function Sg(n){return n instanceof Date&&!isNaN(n)}function Ge(n,t){return ye((e,i)=>{let r=0;e.subscribe(xe(i,o=>{i.next(n.call(t,o,r++))}))})}var{isArray:Ix}=Array;function Px(n,t){return Ix(t)?n(...t):n(t)}function Tg(n){return Ge(t=>Px(n,t))}var{isArray:Ox}=Array,{getPrototypeOf:Rx,prototype:Nx,keys:Ax}=Object;function Mg(n){if(n.length===1){let t=n[0];if(Ox(t))return{args:t,keys:null};if(Lx(t)){let e=Ax(t);return{args:e.map(i=>t[i]),keys:e}}}return{args:n,keys:null}}function Lx(n){return n&&typeof n=="object"&&Rx(n)===Nx}function kg(n,t){return n.reduce((e,i,r)=>(e[i]=t[r],e),{})}function Ig(n,t,e,i,r,o,s,a){let l=[],d=0,m=0,y=!1,w=()=>{y&&!l.length&&!d&&t.complete()},E=j=>d<i?R(j):l.push(j),R=j=>{o&&t.next(j),d++;let Z=!1;Re(e(j,m++)).subscribe(xe(t,$=>{r?.($),o?E($):t.next($)},()=>{Z=!0},void 0,()=>{if(Z)try{for(d--;l.length&&d<i;){let $=l.shift();s?Gt(t,s,()=>R($)):R($)}w()}catch($){t.error($)}}))};return n.subscribe(xe(t,E,()=>{y=!0,w()})),()=>{a?.()}}function Br(n,t,e=1/0){return he(t)?Br((i,r)=>Ge((o,s)=>t(i,o,r,s))(Re(n(i,r))),e):(typeof t=="number"&&(e=t),ye((i,r)=>Ig(i,r,n,e)))}function Pg(n=1/0){return Br(Ar,n)}function Og(){return Pg(1)}function uu(...n){return Og()(nl(n,Vr(n)))}function pu(n){return new de(t=>{Re(n()).subscribe(t)})}function rl(...n){let t=fg(n),{args:e,keys:i}=Mg(n),r=new de(o=>{let{length:s}=e;if(!s){o.complete();return}let a=new Array(s),l=s,d=s;for(let m=0;m<s;m++){let y=!1;Re(e[m]).subscribe(xe(o,w=>{y||(y=!0,d--),a[m]=w},()=>l--,void 0,()=>{(!l||!y)&&(d||o.next(i?kg(i,a):a),o.complete())}))}});return t?r.pipe(Tg(t)):r}function Rg(n=0,t,e=ug){let i=-1;return t!=null&&(Ua(t)?e=t:i=t),new de(r=>{let o=Sg(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 Uo(n,t){return ye((e,i)=>{let r=0;e.subscribe(xe(i,o=>n.call(t,o,r++)&&i.next(o)))})}function Ng(n){return ye((t,e)=>{let i=!1,r=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,i){i=!1;let d=r;r=null,e.next(d)}s&&e.complete()},l=()=>{o=null,s&&e.complete()};t.subscribe(xe(e,d=>{i=!0,r=d,o||Re(n(d)).subscribe(o=xe(e,a,l))},()=>{s=!0,(!i||!o||o.closed)&&e.complete()}))})}function zo(n,t=$o){return Ng(()=>Rg(n,t))}function ot(n){return ye((t,e)=>{let i=null,r=!1,o;i=t.subscribe(xe(e,void 0,void 0,s=>{o=Re(n(s,ot(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 he(t)?Br(n,t,1):Br(n,1)}function hu(n,t=$o){return ye((e,i)=>{let r=null,o=null,s=null,a=()=>{if(r){r.unsubscribe(),r=null;let d=o;o=null,i.next(d)}};function l(){let d=s+n,m=t.now();if(m<d){r=this.schedule(void 0,d-m),i.add(r);return}a()}e.subscribe(xe(i,d=>{o=d,s=t.now(),r||(r=t.schedule(l,n),i.add(r))},()=>{a(),i.complete()},void 0,()=>{o=r=null}))})}function Go(n,t=Ar){return n=n??Fx,ye((e,i)=>{let r,o=!0;e.subscribe(xe(i,s=>{let a=t(s);(o||!n(r,a))&&(o=!1,r=a,i.next(s))}))})}function Fx(n,t){return n===t}function ei(n){return ye((t,e)=>{try{t.subscribe(e)}finally{e.add(n)}})}function mu(){return ye((n,t)=>{let e,i=!1;n.subscribe(xe(t,r=>{let o=e;e=r,i&&t.next([o,r]),i=!0}))})}function Ag(n={}){let{connector:t=()=>new $e,resetOnError:e=!0,resetOnComplete:i=!0,resetOnRefCountZero:r=!0}=n;return o=>{let s,a,l,d=0,m=!1,y=!1,w=()=>{a?.unsubscribe(),a=void 0},E=()=>{w(),s=l=void 0,m=y=!1},R=()=>{let j=s;E(),j?.unsubscribe()};return ye((j,Z)=>{d++,!y&&!m&&w();let $=l=l??t();Z.add(()=>{d--,d===0&&!y&&!m&&(a=gu(R,r))}),$.subscribe(Z),!s&&d>0&&(s=new an({next:_e=>$.next(_e),error:_e=>{y=!0,w(),a=gu(E,e,_e),$.error(_e)},complete:()=>{m=!0,w(),a=gu(E,i),$.complete()}}),Re(j).subscribe(s))})(o)}}function gu(n,t,...e){if(t===!0){n();return}if(t===!1)return;let i=new an({next:()=>{i.unsubscribe(),n()}});return Re(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,Ag({connector:()=>new Ri(i,t,e),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:r})}function ol(...n){let t=Vr(n);return ye((e,i)=>{(t?uu(n,e,t):uu(n,e)).subscribe(i)})}function yt(n,t){return ye((e,i)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&i.complete();e.subscribe(xe(i,l=>{r?.unsubscribe();let d=0,m=o++;Re(n(l,m)).subscribe(r=xe(i,y=>i.next(t?t(l,y,m,d++):y),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function Ai(n){return ye((t,e)=>{Re(n).subscribe(xe(e,()=>e.complete(),Ao)),!e.closed&&t.subscribe(e)})}function Lg(n){let t=re(null);try{return n()}finally{re(t)}}var Fg=le(W({},Si),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:"effect"});function Vg(n){if(n.dirty=!1,n.version>0&&!ki(n))return;n.version++;let t=Qn(n);try{n.cleanup(),n.fn()}finally{Mi(n,t)}}var dl="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",Y=class extends Error{code;constructor(t,e){super($i(t,e)),this.code=t}};function Vx(n){return`NG0${Math.abs(n)}`}function $i(n,t){return`${Vx(n)}${t?": "+t:""}`}var ln=globalThis;function Me(n){for(let t in n)if(n[t]===Me)return t;throw Error("")}function $g(n,t){for(let e in t)t.hasOwnProperty(e)&&!n.hasOwnProperty(e)&&(n[e]=t[e])}function ni(n){if(typeof n=="string")return n;if(Array.isArray(n))return`[${n.map(ni).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 ul(n,t){return n?t?`${n} ${t}`:n:t||""}var Bx=Me({__forward_ref__:Me});function Hr(n){return n.__forward_ref__=Hr,n.toString=function(){return ni(this())},n}function mt(n){return Hg(n)?n():n}function Hg(n){return typeof n=="function"&&n.hasOwnProperty(Bx)&&n.__forward_ref__===Hr}function se(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function pl(n){return jx(n,fl)}function jx(n,t){return n.hasOwnProperty(t)&&n[t]||null}function $x(n){let t=n?.[fl]??null;return t||null}function vu(n){return n&&n.hasOwnProperty(ll)?n[ll]:null}var fl=Me({\u0275prov:Me}),ll=Me({\u0275inj:Me}),te=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=se({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function ku(n){return n&&!!n.\u0275providers}var Iu=Me({\u0275cmp:Me}),Pu=Me({\u0275dir:Me}),Ou=Me({\u0275pipe:Me});var bu=Me({\u0275fac:Me}),Hi=Me({__NG_ELEMENT_ID__:Me}),Bg=Me({__NG_ENV_ID__:Me});function cn(n){return typeof n=="string"?n:n==null?"":String(n)}function Ug(n){return typeof n=="function"?n.name||n.toString():typeof n=="object"&&n!=null&&typeof n.type=="function"?n.type.name||n.type.toString():cn(n)}var zg=Me({ngErrorCode:Me}),Hx=Me({ngErrorMessage:Me}),Ux=Me({ngTokenPath:Me});function Ru(n,t){return Gg("",-200,t)}function hl(n,t){throw new Y(-201,!1)}function Gg(n,t,e){let i=new Y(t,n);return i[zg]=t,i[Hx]=n,e&&(i[Ux]=e),i}function zx(n){return n[zg]}var yu;function Wg(){return yu}function xt(n){let t=yu;return yu=n,t}function Nu(n,t,e){let i=pl(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;hl(n,"Injector")}var Gx={},Li=Gx,Cu="__NG_DI_FLAG__",xu=class{injector;constructor(t){this.injector=t}retrieve(t,e){let i=Fi(e)||0;try{return this.injector.get(t,i&8?null:Li,i)}catch(r){if(Mr(r))return r;throw r}}};function Wx(n,t=0){let e=Ea();if(e===void 0)throw new Y(-203,!1);if(e===null)return Nu(n,void 0,t);{let i=qx(t),r=e.retrieve(n,i);if(Mr(r)){if(i.optional)return null;throw r}return r}}function ge(n,t=0){return(Wg()||Wx)(mt(n),t)}function I(n,t){return ge(n,Fi(t))}function Fi(n){return typeof n>"u"||typeof n=="number"?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function qx(n){return{optional:!!(n&8),host:!!(n&1),self:!!(n&2),skipSelf:!!(n&4)}}function wu(n){let t=[];for(let e=0;e<n.length;e++){let i=mt(n[e]);if(Array.isArray(i)){if(i.length===0)throw new Y(900,!1);let r,o=0;for(let s=0;s<i.length;s++){let a=i[s],l=Zx(a);typeof l=="number"?l===-1?r=a.token:o|=l:r=a}t.push(ge(r,o))}else t.push(ge(i))}return t}function Au(n,t){return n[Cu]=t,n.prototype[Cu]=t,n}function Zx(n){return n[Cu]}function Vi(n,t){let e=n.hasOwnProperty(bu);return e?n[bu]:null}function qg(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 Zg(n){return n.flat(Number.POSITIVE_INFINITY)}function ml(n,t){n.forEach(e=>Array.isArray(e)?ml(e,t):t(e))}function Lu(n,t,e){t>=n.length?n.push(e):n.splice(t,0,e)}function Qo(n,t){return t>=n.length-1?n.pop():n.splice(t,1)[0]}function Yg(n,t){let e=[];for(let i=0;i<n;i++)e.push(t);return e}function Qg(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 gl(n,t,e){let i=Ur(n,t);return i>=0?n[i|1]=e:(i=~i,Qg(n,i,t,e)),i}function _l(n,t){let e=Ur(n,t);if(e>=0)return n[e|1]}function Ur(n,t){return Yx(n,t,1)}function Yx(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 ri={},Wt=[],Ui=new te(""),Fu=new te("",-1),Vu=new te(""),qo=class{get(t,e=Li){if(e===Li){let r=Gg("",-201);throw r.name="\u0275NotFound",r}return e}};function zi(n){return n[Iu]||null}function Bu(n){return n[Pu]||null}function Kg(n){return n[Ou]||null}function Ko(n){return{\u0275providers:n}}function Xg(...n){return{\u0275providers:ju(!0,n),\u0275fromNgModule:!0}}function ju(n,...t){let e=[],i=new Set,r,o=s=>{e.push(s)};return ml(t,s=>{let a=s;cl(a,o,[],i)&&(r||=[],r.push(a))}),r!==void 0&&Jg(r,o),e}function Jg(n,t){for(let e=0;e<n.length;e++){let{ngModule:i,providers:r}=n[e];$u(r,o=>{t(o,i)})}}function cl(n,t,e,i){if(n=mt(n),!n)return!1;let r=null,o=vu(n),s=!o&&zi(n);if(!o&&!s){let l=n.ngModule;if(o=vu(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 d of l)cl(d,t,e,i)}}else if(o){if(o.imports!=null&&!a){i.add(r);let d;ml(o.imports,m=>{cl(m,t,e,i)&&(d||=[],d.push(m))}),d!==void 0&&Jg(d,t)}if(!a){let d=Vi(r)||(()=>new r);t({provide:r,useFactory:d,deps:Wt},r),t({provide:Vu,useValue:r,multi:!0},r),t({provide:Ui,useValue:()=>ge(r),multi:!0},r)}let l=o.providers;if(l!=null&&!a){let d=n;$u(l,m=>{t(m,d)})}}else return!1;return r!==n&&n.providers!==void 0}function $u(n,t){for(let e of n)ku(e)&&(e=e.\u0275providers),Array.isArray(e)?$u(e,t):t(e)}var Qx=Me({provide:String,useValue:Me});function e0(n){return n!==null&&typeof n=="object"&&Qx in n}function Kx(n){return!!(n&&n.useExisting)}function Xx(n){return!!(n&&n.useFactory)}function Bi(n){return typeof n=="function"}function t0(n){return!!n.useClass}var Xo=new te(""),sl={},jg={},_u;function Jo(){return _u===void 0&&(_u=new qo),_u}var Pt=class{},ji=class extends Pt{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,Du(t,s=>this.processProvider(s)),this.records.set(Fu,$r(void 0,this)),r.has("environment")&&this.records.set(Pt,$r(void 0,this));let o=this.records.get(Xo);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(Vu,Wt,{self:!0}))}retrieve(t,e){let i=Fi(e)||0;try{return this.get(t,Li,i)}catch(r){if(Mr(r))return r;throw r}}destroy(){Wo(this),this._destroyed=!0;let t=re(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(),re(t)}}onDestroy(t){return Wo(this),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){Wo(this);let e=Sn(this),i=xt(void 0),r;try{return t()}finally{Sn(e),xt(i)}}get(t,e=Li,i){if(Wo(this),t.hasOwnProperty(Bg))return t[Bg](this);let r=Fi(i),o,s=Sn(this),a=xt(void 0);try{if(!(r&4)){let d=this.records.get(t);if(d===void 0){let m=iw(t)&&pl(t);m&&this.injectableDefInScope(m)?d=$r(Eu(t),sl):d=null,this.records.set(t,d)}if(d!=null)return this.hydrate(t,d,r)}let l=r&2?Jo():this.parent;return e=r&8&&e===Li?null:e,l.get(t,e)}catch(l){let d=zx(l);throw d===-200||d===-201?new Y(d,null):l}finally{xt(a),Sn(s)}}resolveInjectorInitializers(){let t=re(null),e=Sn(this),i=xt(void 0),r;try{let o=this.get(Ui,Wt,{self:!0});for(let s of o)s()}finally{Sn(e),xt(i),re(t)}}toString(){let t=[],e=this.records;for(let i of e.keys())t.push(ni(i));return`R3Injector[${t.join(", ")}]`}processProvider(t){t=mt(t);let e=Bi(t)?t:mt(t&&t.provide),i=ew(t);if(!Bi(t)&&t.multi===!0){let r=this.records.get(e);r||(r=$r(void 0,sl,!0),r.factory=()=>wu(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,i)}hydrate(t,e,i){let r=re(null);try{if(e.value===jg)throw Ru(ni(t));return e.value===sl&&(e.value=jg,e.value=e.factory(void 0,i)),typeof e.value=="object"&&e.value&&nw(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}finally{re(r)}}injectableDefInScope(t){if(!t.providedIn)return!1;let e=mt(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 Eu(n){let t=pl(n),e=t!==null?t.factory:Vi(n);if(e!==null)return e;if(n instanceof te)throw new Y(204,!1);if(n instanceof Function)return Jx(n);throw new Y(204,!1)}function Jx(n){if(n.length>0)throw new Y(204,!1);let e=$x(n);return e!==null?()=>e.factory(n):()=>new n}function ew(n){if(e0(n))return $r(void 0,n.useValue);{let t=Hu(n);return $r(t,sl)}}function Hu(n,t,e){let i;if(Bi(n)){let r=mt(n);return Vi(r)||Eu(r)}else if(e0(n))i=()=>mt(n.useValue);else if(Xx(n))i=()=>n.useFactory(...wu(n.deps||[]));else if(Kx(n))i=(r,o)=>ge(mt(n.useExisting),o!==void 0&&o&8?8:void 0);else{let r=mt(n&&(n.useClass||n.provide));if(tw(n))i=()=>new r(...wu(n.deps));else return Vi(r)||Eu(r)}return i}function Wo(n){if(n.destroyed)throw new Y(205,!1)}function $r(n,t,e=!1){return{factory:n,value:t,multi:e?[]:void 0}}function tw(n){return!!n.deps}function nw(n){return n!==null&&typeof n=="object"&&typeof n.ngOnDestroy=="function"}function iw(n){return typeof n=="function"||typeof n=="object"&&n.ngMetadataName==="InjectionToken"}function Du(n,t){for(let e of n)Array.isArray(e)?Du(e,t):e&&ku(e)?Du(e.\u0275providers,t):t(e)}function zr(n,t){let e;n instanceof ji?(Wo(n),e=n):e=new xu(n);let i,r=Sn(e),o=xt(void 0);try{return t()}finally{Sn(r),xt(o)}}function n0(){return Wg()!==void 0||Ea()!=null}var dn=0,ee=1,oe=2,Xe=3,Zt=4,Et=5,Gi=6,Gr=7,We=8,Dt=9,Tn=10,ke=11,Wr=12,Uu=13,Wi=14,St=15,Vn=16,qi=17,Mn=18,es=19,zu=20,Fn=21,vl=22,Bn=23,Ft=24,Zi=25,jn=26,Ne=27,i0=1,Gu=6,oi=7,ts=8,Yi=9,He=10;function kn(n){return Array.isArray(n)&&typeof n[i0]=="object"}function un(n){return Array.isArray(n)&&n[i0]===!0}function Wu(n){return(n.flags&4)!==0}function si(n){return n.componentOffset>-1}function qr(n){return(n.flags&1)===1}function In(n){return!!n.template}function Zr(n){return(n[oe]&512)!==0}function Qi(n){return(n[oe]&256)===256}var Ct=(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})(Ct||{}),al,Zo="svg",qu="math";function r0(){return al||(al={},ti(Ct.HTML,void 0,[["iframe",["srcdoc"]],["*",["innerHTML","outerHTML"]]]),ti(Ct.STYLE,void 0,[["*",["style"]]]),ti(Ct.URL,void 0,[["*",["formAction"]],["area",["href"]],["a",["href","xlink:href"]],["form",["action"]],["img",["src"]],["video",["src"]]]),ti(Ct.URL,qu,[["*",["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"]]]),ti(Ct.RESOURCE_URL,void 0,[["base",["href"]],["embed",["src"]],["frame",["src"]],["iframe",["src"]],["link",["href"]],["object",["codebase","data"]]]),ti(Ct.URL,Zo,[["a",["href","xlink:href"]]]),ti(Ct.ATTRIBUTE_NO_BINDING,Zo,[["animate",["attributeName","values","to","from"]],["set",["to","attributeName"]],["animateMotion",["attributeName"]],["animateTransform",["attributeName"]]]),ti(Ct.ATTRIBUTE_NO_BINDING,void 0,[["unknown",["attributeName","values","to","from","sandbox","allow","allowFullscreen","referrerPolicy","csp","fetchPriority"]],["iframe",["sandbox","allow","allowFullscreen","referrerPolicy","csp","fetchPriority"]]])),al}function ti(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)al[`${o}|${s.toLowerCase()}`]=n}}function o0(n,t,e){let i=r0(),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}`]??Ct.NONE}function Yt(n){for(;Array.isArray(n);)n=n[dn];return n}function Zu(n,t){return Yt(t[n])}function Ot(n,t){return Yt(t[n.index])}function ns(n,t){return n.data[t]}function bl(n,t){return n[t]}function Yu(n,t,e,i){e>=n.data.length&&(n.data[e]=null,n.blueprint[e]=null),t[e]=i}function Qt(n,t){let e=t[n];return kn(e)?e:e[dn]}function s0(n){return(n[oe]&4)===4}function yl(n){return(n[oe]&128)===128}function a0(n){return un(n[Xe])}function Kt(n,t){return t==null?null:n[t]}function Qu(n){n[qi]=0}function Ku(n){n[oe]&1024||(n[oe]|=1024,yl(n)&&ai(n))}function l0(n,t){for(;n>0;)t=t[Wi],n--;return t}function is(n){return!!(n[oe]&9216||n[Ft]?.dirty)}function Cl(n){n[Tn].changeDetectionScheduler?.notify(8),n[oe]&64&&(n[oe]|=1024),is(n)&&ai(n)}function ai(n){n[Tn].changeDetectionScheduler?.notify(0);let t=ii(n);for(;t!==null&&!(t[oe]&8192||(t[oe]|=8192,!yl(t)));)t=ii(t)}function Xu(n,t){if(Qi(n))throw new Y(911,!1);n[Fn]===null&&(n[Fn]=[]),n[Fn].push(t)}function c0(n,t){if(n[Fn]===null)return;let e=n[Fn].indexOf(t);e!==-1&&n[Fn].splice(e,1)}function ii(n){let t=n[Xe];return un(t)?t[Xe]:t}function Ju(n){return n[Gr]??=[]}function ep(n){return n.cleanup??=[]}function d0(n,t,e,i){let r=Ju(t);r.push(e),n.firstCreatePass&&ep(n).push(i,r.length-1)}var fe={lFrame:C0(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var Su=!1;function u0(){return fe.lFrame.elementDepthCount}function p0(){fe.lFrame.elementDepthCount++}function tp(){fe.lFrame.elementDepthCount--}function xl(){return fe.bindingsEnabled}function np(){return fe.skipHydrationRootTNode!==null}function ip(n){return fe.skipHydrationRootTNode===n}function rp(){fe.skipHydrationRootTNode=null}function ne(){return fe.lFrame.lView}function Ue(){return fe.lFrame.tView}function _(n){return fe.lFrame.contextLView=n,n[We]}function v(n){return fe.lFrame.contextLView=null,n}function Je(){let n=op();for(;n!==null&&n.type===64;)n=n.parent;return n}function op(){return fe.lFrame.currentTNode}function f0(){let n=fe.lFrame,t=n.currentTNode;return n.isParent?t:t.parent}function Yr(n,t){let e=fe.lFrame;e.currentTNode=n,e.isParent=t}function sp(){return fe.lFrame.isParent}function ap(){fe.lFrame.isParent=!1}function h0(){return fe.lFrame.contextLView}function lp(){return Su}function Qr(n){let t=Su;return Su=n,t}function rs(){let n=fe.lFrame,t=n.bindingRootIndex;return t===-1&&(t=n.bindingRootIndex=n.tView.bindingStartIndex),t}function cp(){return fe.lFrame.bindingIndex}function m0(n){return fe.lFrame.bindingIndex=n}function Ki(){return fe.lFrame.bindingIndex++}function os(n){let t=fe.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+n,e}function g0(){return fe.lFrame.inI18n}function _0(n,t){let e=fe.lFrame;e.bindingIndex=e.bindingRootIndex=n,wl(t)}function v0(){return fe.lFrame.currentDirectiveIndex}function wl(n){fe.lFrame.currentDirectiveIndex=n}function b0(n){let t=fe.lFrame.currentDirectiveIndex;return t===-1?null:n[t]}function El(){return fe.lFrame.currentQueryIndex}function ss(n){fe.lFrame.currentQueryIndex=n}function rw(n){let t=n[ee];return t.type===2?t.declTNode:t.type===1?n[Et]:null}function dp(n,t,e){if(e&4){let r=t,o=n;for(;r=r.parent,r===null&&!(e&1);)if(r=rw(o),r===null||(o=o[Wi],r.type&10))break;if(r===null)return!1;t=r,n=o}let i=fe.lFrame=y0();return i.currentTNode=t,i.lView=n,!0}function Dl(n){let t=y0(),e=n[ee];fe.lFrame=t,t.currentTNode=e.firstChild,t.lView=n,t.tView=e,t.contextLView=n,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function y0(){let n=fe.lFrame,t=n===null?null:n.child;return t===null?C0(n):t}function C0(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 x0(){let n=fe.lFrame;return fe.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}var up=x0;function Sl(){let n=x0();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 w0(n){return(fe.lFrame.contextLView=l0(n,fe.lFrame.contextLView))[We]}function Xt(){return fe.lFrame.selectedIndex}function li(n){fe.lFrame.selectedIndex=n}function as(){let n=fe.lFrame;return ns(n.tView,n.selectedIndex)}function V(){fe.lFrame.currentNamespace=Zo}function ue(){ow()}function ow(){fe.lFrame.currentNamespace=null}function pp(){return fe.lFrame.currentNamespace}var E0=!0;function Tl(){return E0}function ls(n){E0=n}function Tu(n,t=null,e=null,i){let r=D0(n,t,e,i);return r.resolveInjectorInitializers(),r}function D0(n,t=null,e=null,i,r=new Set){let o=[e||Wt,Xg(n)];return i=i||(typeof n=="object"?void 0:ni(n)),new ji(o,t||Jo(),i||null,r)}var wt=class n{static THROW_IF_NOT_FOUND=Li;static NULL=new qo;static create(t,e){if(Array.isArray(t))return Tu({name:""},e,t,"");{let i=t.name??"";return Tu({name:i},t.parent,t.providers,i)}}static \u0275prov=se({token:n,providedIn:"any",factory:()=>ge(Fu)});static __NG_ELEMENT_ID__=-1},ut=new te(""),et=(()=>{class n{static __NG_ELEMENT_ID__=sw;static __NG_ENV_ID__=e=>e}return n})(),Yo=class extends et{_lView;constructor(t){super(),this._lView=t}get destroyed(){return Qi(this._lView)}onDestroy(t){let e=this._lView;return Xu(e,t),()=>c0(e,t)}};function sw(){return new Yo(ne())}var Lt=class{_console=console;handleError(t){this._console.error("ERROR",t)}},pn=new te("",{providedIn:"root",factory:()=>{let n=I(Pt),t;return e=>{n.destroyed&&!t?setTimeout(()=>{throw e}):(t??=n.get(Lt),t.handleError(e))}}}),S0={provide:Ui,useValue:()=>{I(Lt)},multi:!0};function x(n,t){let[e,i,r]=Kd(n,t?.equal),o=e,s=o[rt];return o.set=i,o.update=r,o.asReadonly=fp.bind(o),o}function fp(){let n=this[rt];if(n.readonlyFn===void 0){let t=()=>this();t[rt]=n,n.readonlyFn=t}return n.readonlyFn}var Xi=(()=>{class n{view;node;constructor(e,i){this.view=e,this.node=i}static __NG_ELEMENT_ID__=aw}return n})();function aw(){return new Xi(ne(),Je())}var qt=class{},cs=new te("",{providedIn:"root",factory:()=>!1});var hp=new te(""),mp=new te(""),ci=(()=>{class n{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Fo(!1);get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new de(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=se({token:n,providedIn:"root",factory:()=>new n})}return n})(),Kr=(()=>{class n{internalPendingTasks=I(ci);scheduler=I(qt);errorHandler=I(pn);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=se({token:n,providedIn:"root",factory:()=>new n})}return n})();function Ji(...n){}var ds=(()=>{class n{static \u0275prov=se({token:n,providedIn:"root",factory:()=>new Mu})}return n})(),Mu=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 ic(n){return{toString:n}.toString()}var Ml="__parameters__";function gw(n){return function(...e){if(n){let i=n(...e);for(let r in i)this[r]=i[r]}}}function d_(n,t,e){return ic(()=>{let i=gw(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,d,m){let y=l.hasOwnProperty(Ml)?l[Ml]:Object.defineProperty(l,Ml,{value:[]})[Ml];for(;y.length<=m;)y.push(null);return(y[m]=y[m]||[]).push(s),l}}return r.prototype.ngMetadataName=n,r.annotationCls=r,r})}var af=Au(d_("Inject",n=>({token:n})),-1),lf=Au(d_("Optional"),8);function _w(n){return typeof n=="function"}var Bl=class{previousValue;currentValue;firstChange;constructor(t,e,i){this.previousValue=t,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}};function u_(n,t,e,i){t!==null?t.applyValueToInputSignal(t,i):n[e]=i}var ws=(()=>{let n=()=>p_;return n.ngInherit=!0,n})();function p_(n){return n.type.prototype.ngOnChanges&&(n.setInput=bw),vw}function vw(){let n=h_(this),t=n?.current;if(t){let e=n.previous;if(e===ri)n.previous=t;else for(let i in t)e[i]=t[i];n.current=null,this.ngOnChanges(t)}}function bw(n,t,e,i,r){let o=this.declaredInputs[i],s=h_(n)||yw(n,{previous:ri,current:null}),a=s.current||(s.current={}),l=s.previous,d=l[o];a[o]=new Bl(d&&d.currentValue,e,l===ri),u_(n,t,r,e)}var f_="__ngSimpleChanges__";function h_(n){return n[f_]||null}function yw(n,t){return n[f_]=t}var T0=[];var Se=function(n,t=null,e){for(let i=0;i<T0.length;i++){let r=T0[i];r(n,t,e)}};function Cw(n,t,e){let{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=t.type.prototype;if(i){let s=p_(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 m_(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:d,ngOnDestroy:m}=o;s&&(n.contentHooks??=[]).push(-e,s),a&&((n.contentHooks??=[]).push(e,a),(n.contentCheckHooks??=[]).push(e,a)),l&&(n.viewHooks??=[]).push(-e,l),d&&((n.viewHooks??=[]).push(e,d),(n.viewCheckHooks??=[]).push(e,d)),m!=null&&(n.destroyHooks??=[]).push(e,m)}}function Nl(n,t,e){g_(n,t,3,e)}function Al(n,t,e,i){(n[oe]&3)===e&&g_(n,t,e,i)}function gp(n,t){let e=n[oe];(e&3)===t&&(e&=16383,e+=1,n[oe]=e)}function g_(n,t,e,i){let r=i!==void 0?n[qi]&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[qi]+=65536),(a<o||o==-1)&&(xw(n,e,t,l),n[qi]=(n[qi]&4294901760)+l+2),l++}function M0(n,t){Se(4,n,t);let e=re(null);try{t.call(n)}finally{re(e),Se(5,n,t)}}function xw(n,t,e,i){let r=e[i]<0,o=e[i+1],s=r?-e[i]:e[i],a=n[s];r?n[oe]>>14<n[qi]>>16&&(n[oe]&3)===t&&(n[oe]+=16384,M0(a,o)):M0(a,o)}var Jr=-1,rr=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 ww(n){return(n.flags&8)!==0}function Ew(n){return(n.flags&16)!==0}function Dw(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];Tw(o)?n.setProperty(t,o,s):n.setAttribute(t,o,s),i++}}return i}function Sw(n){return n===3||n===4||n===6}function Tw(n){return n.charCodeAt(0)===64}function no(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?k0(n,e,r,null,t[++i]):k0(n,e,r,null,null))}}return n}function k0(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!==Jr}function jl(n){return n&32767}function Mw(n){return n>>16}function $l(n,t){let e=Mw(n),i=t;for(;e>0;)i=i[Wi],e--;return i}var Tp=!0;function Hl(n){let t=Tp;return Tp=n,t}var kw=256,v_=kw-1,b_=5,Iw=0,Pn={};function Pw(n,t,e){let i;typeof e=="string"?i=e.charCodeAt(0)||0:e.hasOwnProperty(Hi)&&(i=e[Hi]),i==null&&(i=e[Hi]=Iw++);let r=i&v_,o=1<<r;t.data[n+(r>>b_)]|=o}function Ul(n,t){let e=y_(n,t);if(e!==-1)return e;let i=t[ee];i.firstCreatePass&&(n.injectorIndex=t.length,_p(i.data,n),_p(t,null),_p(i.blueprint,null));let r=cf(n,t),o=n.injectorIndex;if(__(r)){let s=jl(r),a=$l(r,t),l=a[ee].data;for(let d=0;d<8;d++)t[o+d]=a[s+d]|l[s+d]}return t[o+8]=r,o}function _p(n,t){n.push(0,0,0,0,0,0,0,0,t)}function y_(n,t){return n.injectorIndex===-1||n.parent&&n.parent.injectorIndex===n.injectorIndex||t[n.injectorIndex+8]===null?-1:n.injectorIndex}function cf(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=D_(r),i===null)return Jr;if(e++,r=r[Wi],i.injectorIndex!==-1)return i.injectorIndex|e<<16}return Jr}function Mp(n,t,e){Pw(n,t,e)}function C_(n,t,e){if(e&8||n!==void 0)return n;hl(t,"NodeInjector")}function x_(n,t,e,i){if(e&8&&i===void 0&&(i=null),(e&3)===0){let r=n[Dt],o=xt(void 0);try{return r?r.get(t,i,e&8):Nu(t,i,e&8)}finally{xt(o)}}return C_(i,t,e)}function w_(n,t,e,i=0,r){if(n!==null){if(t[oe]&2048&&!(i&2)){let s=Aw(n,t,e,i,Pn);if(s!==Pn)return s}let o=E_(n,t,e,i,Pn);if(o!==Pn)return o}return x_(t,e,i,r)}function E_(n,t,e,i,r){let o=Rw(e);if(typeof o=="function"){if(!dp(t,n,i))return i&1?C_(r,e,i):x_(t,e,i,r);try{let s;if(s=o(i),s==null&&!(i&8))hl(e);else return s}finally{up()}}else if(typeof o=="number"){let s=null,a=y_(n,t),l=Jr,d=i&1?t[St][Et]:null;for((a===-1||i&4)&&(l=a===-1?cf(n,t):t[a+8],l===Jr||!P0(i,!1)?a=-1:(s=t[ee],a=jl(l),t=$l(l,t)));a!==-1;){let m=t[ee];if(I0(o,a,m.data)){let y=Ow(a,t,e,s,i,d);if(y!==Pn)return y}l=t[a+8],l!==Jr&&P0(i,t[ee].data[a+8]===d)&&I0(o,a,t)?(s=m,a=jl(l),t=$l(l,t)):a=-1}}return r}function Ow(n,t,e,i,r,o){let s=t[ee],a=s.data[n+8],l=i==null?si(a)&&Tp:i!=s&&(a.type&3)!==0,d=r&1&&o===a,m=Ll(a,s,e,l,d);return m!==null?fs(t,s,m,a,r):Pn}function Ll(n,t,e,i,r){let o=n.providerIndexes,s=t.data,a=o&1048575,l=n.directiveStart,d=n.directiveEnd,m=o>>20,y=i?a:a+m,w=r?a+m:d;for(let E=y;E<w;E++){let R=s[E];if(E<l&&e===R||E>=l&&R.type===e)return E}if(r){let E=s[l];if(E&&In(E)&&E.type===e)return l}return null}function fs(n,t,e,i,r){let o=n[e],s=t.data;if(o instanceof rr){let a=o;if(a.resolving){let E=Ug(s[e]);throw Ru(E)}let l=Hl(a.canSeeViewProviders);a.resolving=!0;let d=s[e].type||s[e],m,y=a.injectImpl?xt(a.injectImpl):null,w=dp(n,i,0);try{o=n[e]=a.factory(void 0,r,s,n,i),t.firstCreatePass&&e>=i.directiveStart&&Cw(e,s[e],t)}finally{y!==null&&xt(y),Hl(l),a.resolving=!1,up()}}return o}function Rw(n){if(typeof n=="string")return n.charCodeAt(0)||0;let t=n.hasOwnProperty(Hi)?n[Hi]:void 0;return typeof t=="number"?t>=0?t&v_:Nw:t}function I0(n,t,e){let i=1<<n;return!!(e[t+(n>>b_)]&i)}function P0(n,t){return!(n&2)&&!(n&1&&t)}var er=class{_tNode;_lView;constructor(t,e){this._tNode=t,this._lView=e}get(t,e,i){return w_(this._tNode,this._lView,t,Fi(i),e)}};function Nw(){return new er(Je(),ne())}function Aw(n,t,e,i,r){let o=n,s=t;for(;o!==null&&s!==null&&s[oe]&2048&&!Zr(s);){let a=E_(o,s,e,i|2,Pn);if(a!==Pn)return a;let l=o.parent;if(!l){let d=s[zu];if(d){let m=d.get(e,Pn,i);if(m!==Pn)return m}l=D_(s),s=s[Wi]}o=l}return r}function D_(n){let t=n[ee],e=t.type;return e===2?t.declTNode:e===1?n[Et]:null}function Lw(){return ao(Je(),ne())}function ao(n,t){return new gn(Ot(n,t))}var gn=(()=>{class n{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=Lw}return n})();function S_(n){return n instanceof gn?n.nativeElement:n}function Fw(){return this._results[Symbol.iterator]()}var zl=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new $e}constructor(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=Zg(t);(this._changesDetected=!qg(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]=Fw};function T_(n){return(n.flags&128)===128}var df=(function(n){return n[n.OnPush=0]="OnPush",n[n.Default=1]="Default",n})(df||{}),M_=new Map,Vw=0;function Bw(){return Vw++}function jw(n){M_.set(n[es],n)}function kp(n){M_.delete(n[es])}var O0="__ngContext__";function io(n,t){kn(t)?(n[O0]=t[es],jw(t)):n[O0]=t}function k_(n){return P_(n[Wr])}function I_(n){return P_(n[Zt])}function P_(n){for(;n!==null&&!un(n);)n=n[Zt];return n}var Ip;function uf(n){Ip=n}function pf(){if(Ip!==void 0)return Ip;if(typeof document<"u")return document;throw new Y(210,!1)}var rc=new te("",{providedIn:"root",factory:()=>$w}),$w="ng",oc=new te(""),sr=new te("",{providedIn:"platform",factory:()=>"unknown"});var sc=new te("",{providedIn:"root",factory:()=>pf().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var Hw="h",Uw="b";var O_="r";var R_="di";var N_=!1,A_=new te("",{providedIn:"root",factory:()=>N_});var zw=(n,t,e,i)=>{};function Gw(n,t,e,i){zw(n,t,e,i)}function ac(n){return(n.flags&32)===32}var Ww=()=>null;function L_(n,t,e=!1){return Ww(n,t,e)}function F_(n,t){let e=n.contentQueries;if(e!==null){let i=re(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{re(i)}}}function Pp(n,t,e){ss(0);let i=re(null);try{t(n,e)}finally{re(i)}}function ff(n,t,e){if(Wu(t)){let i=re(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{re(i)}}}var $n=(function(n){return n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",n})($n||{});var qw="svg",Zw="math",Yw={"http://www.w3.org/2000/svg":qw,"http://www.w3.org/1998/Math/MathML":Zw},kl;function Qw(){if(kl===void 0&&(kl=null,ln.trustedTypes))try{kl=ln.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return kl}function lc(n){return Qw()?.createHTML(n)||n}var Il;function Kw(){if(Il===void 0&&(Il=null,ln.trustedTypes))try{Il=ln.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return Il}function R0(n){return Kw()?.createHTML(n)||n}var Gl=class{changingThisBreaksApplicationSecurity;constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${dl})`}};function Es(n){return n instanceof Gl?n.changingThisBreaksApplicationSecurity:n}function hf(n,t){let e=V_(n);if(e!=null&&e!==t){if(e==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${e} (see ${dl})`)}return e===t}function V_(n){return n instanceof Gl&&n.getTypeName()||null}function Xw(n){let t=new Rp(n);return Jw()?new Op(t):t}var Op=class{inertDocumentHelper;constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t="<body><remove></remove>"+t;try{let e=new window.DOMParser().parseFromString(lc(t),"text/html").body;return e===null?this.inertDocumentHelper.getInertBodyElement(t):(e.firstChild?.remove(),e)}catch{return null}}},Rp=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=lc(t),e}};function Jw(){try{return!!new window.DOMParser().parseFromString(lc(""),"text/html")}catch{return!1}}var e1=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function mf(n){return n=String(n),n.match(e1)?n:"unsafe:"+n}function Hn(n){let t={};for(let e of n.split(","))t[e]=!0;return t}function Ds(...n){let t={};for(let e of n)for(let i in e)e.hasOwnProperty(i)&&(t[i]=!0);return t}var B_=Hn("area,br,col,hr,img,wbr"),j_=Hn("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),$_=Hn("rp,rt"),t1=Ds($_,j_),n1=Ds(j_,Hn("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")),i1=Ds($_,Hn("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")),N0=Ds(B_,n1,i1,t1),H_=Hn("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),r1=Hn("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"),o1=Hn("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"),s1=Ds(H_,r1,o1),a1=Hn("script,style,template"),Np=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=d1(e);continue}for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let o=c1(e);if(o){e=o;break}e=r.pop()}}return this.buf.join("")}startElement(t){let e=A0(t).toLowerCase();if(!N0.hasOwnProperty(e))return this.sanitizedSomething=!0,!a1.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(!s1.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=o.value;H_[a]&&(l=mf(l)),this.buf.push(" ",s,'="',L0(l),'"')}return this.buf.push(">"),!0}endElement(t){let e=A0(t).toLowerCase();N0.hasOwnProperty(e)&&!B_.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))}chars(t){this.buf.push(L0(t))}};function l1(n,t){return(n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function c1(n){let t=n.nextSibling;if(t&&n!==t.previousSibling)throw U_(t);return t}function d1(n){let t=n.firstChild;if(t&&l1(n,t))throw U_(t);return t}function A0(n){let t=n.nodeName;return typeof t=="string"?t:"FORM"}function U_(n){return new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`)}var u1=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,p1=/([^\#-~ |!])/g;function L0(n){return n.replace(/&/g,"&").replace(u1,function(t){let e=t.charCodeAt(0),i=t.charCodeAt(1);return"&#"+((e-55296)*1024+(i-56320)+65536)+";"}).replace(p1,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}var Pl;function z_(n,t){let e=null;try{Pl=Pl||Xw(n);let i=t?String(t):"";e=Pl.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=Pl.getInertBodyElement(i)}while(i!==o);let a=new Np().sanitizeChildren(F0(e)||e);return lc(a)}finally{if(e){let i=F0(e)||e;for(;i.firstChild;)i.firstChild.remove()}}}function F0(n){return"content"in n&&f1(n)?n.content:null}function f1(n){return n.nodeType===Node.ELEMENT_NODE&&n.nodeName==="TEMPLATE"}var h1=/^>|^->|<!--|-->|--!>|<!-$/g,m1=/(<|>)/g,g1="\u200B$1\u200B";function _1(n){return n.replace(h1,t=>t.replace(m1,g1))}function v1(n,t){return n.createText(t)}function b1(n,t,e){n.setValue(t,e)}function y1(n,t){return n.createComment(_1(t))}function G_(n,t,e){return n.createElement(t,e)}function Wl(n,t,e,i,r){n.insertBefore(t,e,i,r)}function W_(n,t,e){n.appendChild(t,e)}function V0(n,t,e,i,r){i!==null?Wl(n,t,e,i,r):W_(n,t,e)}function q_(n,t,e,i){n.removeChild(null,t,e,i)}function C1(n,t,e){n.setAttribute(t,"style",e)}function x1(n,t,e){e===""?n.removeAttribute(t,"class"):n.setAttribute(t,"class",e)}function Z_(n,t,e){let{mergedAttrs:i,classes:r,styles:o}=e;i!==null&&Dw(n,t,i),r!==null&&x1(n,t,r),o!==null&&C1(n,t,o)}function w1(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 gf(n,t,e){if(t!==void 0&&e!==void 0&&E1(t,e)!==Ct.HTML)return n;let i=Y_();return i?R0(i.sanitize(Ct.HTML,n)||""):hf(n,"HTML")?R0(Es(n)):z_(pf(),cn(n))}function ar(n){let t=Y_();return t?t.sanitize(Ct.URL,n)||"":hf(n,"URL")?Es(n):mf(cn(n))}function Y_(){let n=ne();return n&&n[Tn].sanitizer}function E1(n,t){let[e,i]=D1(n);return o0(i,t,e)}function D1(n){n=n.toLowerCase();let t=w1(n,!1);if(t[0])return t;let i=Xt()===-1?null:as(),r=i?.namespace;if(n==="#host"&&i?.type===2){let o=Ot(i,ne());if(o.tagName&&(n=o.tagName.toLowerCase()),r==null){let s=o.namespaceURI;r=s&&Yw[s]}}return[r,n]}function _f(n){return n.ownerDocument.defaultView}function Ye(n){return n.ownerDocument}function S1(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 Q_="ng-template";function T1(n,t,e,i){let r=0;if(i){for(;r<t.length&&typeof t[r]=="string";r+=2)if(t[r]==="class"&&S1(t[r+1].toLowerCase(),e,0)!==-1)return!0}else if(vf(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 vf(n){return n.type===4&&n.value!==Q_}function M1(n,t,e){let i=n.type===4&&!e?Q_:n.value;return t===i}function k1(n,t,e){let i=4,r=n.attrs,o=r!==null?O1(r):0,s=!1;for(let a=0;a<t.length;a++){let l=t[a];if(typeof l=="number"){if(!s&&!fn(i)&&!fn(l))return!1;if(s&&fn(l))continue;s=!1,i=l|i&1;continue}if(!s)if(i&4){if(i=2|i&1,l!==""&&!M1(n,l,e)||l===""&&t.length===1){if(fn(i))return!1;s=!0}}else if(i&8){if(r===null||!T1(n,r,l,e)){if(fn(i))return!1;s=!0}}else{let d=t[++a],m=I1(l,r,vf(n),e);if(m===-1){if(fn(i))return!1;s=!0;continue}if(d!==""){let y;if(m>o?y="":y=r[m+1].toLowerCase(),i&2&&d!==y){if(fn(i))return!1;s=!0}}}}return fn(i)||s}function fn(n){return(n&1)===0}function I1(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 R1(t,n)}function K_(n,t,e=!1){for(let i=0;i<t.length;i++)if(k1(n,t[i],e))return!0;return!1}function P1(n){let t=n.attrs;if(t!=null){let e=t.indexOf(5);if((e&1)===0)return t[e+1]}return null}function O1(n){for(let t=0;t<n.length;t++){let e=n[t];if(Sw(e))return t}return n.length}function R1(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 N1(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 B0(n,t){return n?":not("+t.trim()+")":t}function A1(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!==""&&!fn(s)&&(t+=B0(o,r),r=""),i=s,o=o||!fn(i);e++}return r!==""&&(t+=B0(o,r)),t}function L1(n){return n.map(A1).join(",")}function F1(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(!fn(r))break;r=o}i++}return e.length&&t.push(1,...e),t}var pt={};function bf(n,t,e,i,r,o,s,a,l,d,m){let y=Ne+i,w=y+r,E=V1(y,w),R=typeof d=="function"?d():d;return E[ee]={type:n,blueprint:E,template:e,queries:null,viewQuery:a,declTNode:t,data:E.slice().fill(null,y),bindingStartIndex:y,expandoStartIndex:w,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof o=="function"?o():o,pipeRegistry:typeof s=="function"?s():s,firstChild:null,schemas:l,consts:R,incompleteFirstPass:!1,ssrId:m}}function V1(n,t){let e=[];for(let i=0;i<t;i++)e.push(i<n?null:pt);return e}function B1(n){let t=n.tView;return t===null||t.incompleteFirstPass?n.tView=bf(1,null,n.template,n.decls,n.vars,n.directiveDefs,n.pipeDefs,n.viewQuery,n.schemas,n.consts,n.id):t}function yf(n,t,e,i,r,o,s,a,l,d,m){let y=t.blueprint.slice();return y[dn]=r,y[oe]=i|4|128|8|64|1024,(d!==null||n&&n[oe]&2048)&&(y[oe]|=2048),Qu(y),y[Xe]=y[Wi]=n,y[We]=e,y[Tn]=s||n&&n[Tn],y[ke]=a||n&&n[ke],y[Dt]=l||n&&n[Dt]||null,y[Et]=o,y[es]=Bw(),y[Gi]=m,y[zu]=d,y[St]=t.type==2?n[St]:y,y}function j1(n,t,e){let i=Ot(t,n),r=B1(e),o=n[Tn].rendererFactory,s=Cf(n,yf(n,r,null,X_(e),i,t,null,o.createRenderer(i,e),null,null,null));return n[t.index]=s}function X_(n){let t=16;return n.signals?t=4096:n.onPush&&(t=64),t}function J_(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 Cf(n,t){return n[Wr]?n[Uu][Zt]=t:n[Wr]=t,n[Uu]=t,t}function c(n=1){ev(Ue(),ne(),Xt()+n,!1)}function ev(n,t,e,i){if(!i)if((t[oe]&3)===3){let o=n.preOrderCheckHooks;o!==null&&Nl(t,o,e)}else{let o=n.preOrderHooks;o!==null&&Al(t,o,0,e)}li(e)}var cc=(function(n){return n[n.None=0]="None",n[n.SignalBased=1]="SignalBased",n[n.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",n})(cc||{});function Ap(n,t,e,i){let r=re(null);try{let[o,s,a]=n.inputs[e],l=null;(s&cc.SignalBased)!==0&&(l=t[o][rt]),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):u_(t,l,o,i)}finally{re(r)}}var On=(function(n){return n[n.Important=1]="Important",n[n.DashCase=2]="DashCase",n})(On||{}),$1;function xf(n,t){return $1(n,t)}function ql(n){if(!n)return 0;let t=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*t}function eo(n,t){return n.getPropertyValue(t).split(",").map(i=>i.trim())}function H1(n){let t=eo(n,"transition-property"),e=eo(n,"transition-duration"),i=eo(n,"transition-delay"),r={propertyName:"",duration:0,animationName:void 0};for(let o=0;o<t.length;o++){let s=ql(i[o])+ql(e[o]);s>r.duration&&(r.propertyName=t[o],r.duration=s)}return r}function U1(n){let t=eo(n,"animation-name"),e=eo(n,"animation-delay"),i=eo(n,"animation-duration"),r={animationName:"",propertyName:void 0,duration:0};for(let o=0;o<t.length;o++){let s=ql(e[o])+ql(i[o]);s>r.duration&&(r.animationName=t[o],r.duration=s)}return r}function tv(n,t){return n!==void 0&&n.duration>t.duration}function nv(n){return(n.animationName!=null||n.propertyName!=null)&&n.duration>0}function z1(n,t){let e=getComputedStyle(n),i=U1(e),r=H1(e),o=i.duration>r.duration?i:r;tv(t.get(n),o)||nv(o)&&t.set(n,o)}function iv(n,t,e){if(!e)return;let i=n.getAnimations();return i.length===0?z1(n,t):G1(n,t,i)}function G1(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,d;r.animationName?d=r.animationName:l=r.transitionProperty,a>=i.duration&&(i={animationName:d,propertyName:l,duration:a})}tv(t.get(n),i)||nv(i)&&t.set(n,i)}var di=new Set,dc=(function(n){return n[n.CHANGE_DETECTION=0]="CHANGE_DETECTION",n[n.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",n})(dc||{}),fi=new te(""),j0=new Set;function Nn(n){j0.has(n)||(j0.add(n),performance?.mark?.("mark_feature_usage",{detail:{feature:n}}))}var rv=!1,Lp=class extends $e{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(t=!1){super(),this.__isAsync=t,n0()&&(this.destroyRef=I(et,{optional:!0})??void 0,this.pendingTasks=I(ci,{optional:!0})??void 0)}emit(t){let e=re(null);try{super.next(t)}finally{re(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 Ve&&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)}})}}},mn=Lp;function ov(n){let t,e;function i(){n=Ji;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 $0(n){return queueMicrotask(()=>n()),()=>{n=Ji}}var wf="isAngularZone",Zl=wf+"_ID",W1=0,Te=class n{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new mn(!1);onMicrotaskEmpty=new mn(!1);onStable=new mn(!1);onError=new mn(!1);constructor(t){let{enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:i=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=rv}=t;if(typeof Zone>"u")throw new Y(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,Y1(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(wf)===!0}static assertInAngularZone(){if(!n.isInAngularZone())throw new Y(909,!1)}static assertNotInAngularZone(){if(n.isInAngularZone())throw new Y(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,q1,Ji,Ji);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)}},q1={};function Ef(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 Z1(n){if(n.isCheckStableRunning||n.callbackScheduled)return;n.callbackScheduled=!0;function t(){ov(()=>{n.callbackScheduled=!1,Fp(n),n.isCheckStableRunning=!0,Ef(n),n.isCheckStableRunning=!1})}n.scheduleInRootZone?Zone.root.run(()=>{t()}):n._outer.run(()=>{t()}),Fp(n)}function Y1(n){let t=()=>{Z1(n)},e=W1++;n._inner=n._inner.fork({name:"angular",properties:{[wf]:!0,[Zl]:e,[Zl+e]:!0},onInvokeTask:(i,r,o,s,a,l)=>{if(Q1(l))return i.invokeTask(o,s,a,l);try{return H0(n),i.invokeTask(o,s,a,l)}finally{(n.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||n.shouldCoalesceRunChangeDetection)&&t(),U0(n)}},onInvoke:(i,r,o,s,a,l,d)=>{try{return H0(n),i.invoke(o,s,a,l,d)}finally{n.shouldCoalesceRunChangeDetection&&!n.callbackScheduled&&!K1(l)&&t(),U0(n)}},onHasTask:(i,r,o,s)=>{i.hasTask(o,s),r===o&&(s.change=="microTask"?(n._hasPendingMicrotasks=s.microTask,Fp(n),Ef(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 Fp(n){n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&n.callbackScheduled===!0?n.hasPendingMicrotasks=!0:n.hasPendingMicrotasks=!1}function H0(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function U0(n){n._nesting--,Ef(n)}var Yl=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new mn;onMicrotaskEmpty=new mn;onStable=new mn;onError=new mn;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 Q1(n){return sv(n,"__ignore_ng_zone__")}function K1(n){return sv(n,"__scheduler_tick__")}function sv(n,t){return!Array.isArray(n)||n.length!==1?!1:n[0]?.data?.[t]===!0}var uc=(()=>{class n{impl=null;execute(){this.impl?.execute()}static \u0275prov=se({token:n,providedIn:"root",factory:()=>new n})}return n})(),Df=[0,1,2,3],Sf=(()=>{class n{ngZone=I(Te);scheduler=I(qt);errorHandler=I(Lt,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){I(fi,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Se(16),this.executing=!0;for(let i of Df)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&&Se(17)}register(e){let{view:i}=e;i!==void 0?((i[Zi]??=[]).push(e),ai(i),i[oe]|=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(dc.AFTER_NEXT_RENDER,e):e()}static \u0275prov=se({token:n,providedIn:"root",factory:()=>new n})}return n})(),hs=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?.[Zi];t&&(this.view[Zi]=t.filter(e=>e!==this))}};function pc(n,t){let e=t?.injector??I(wt);return Nn("NgAfterNextRender"),J1(n,e,t,!0)}function X1(n){return n instanceof Function?[void 0,void 0,n,void 0]:[n.earlyRead,n.write,n.mixedReadWrite,n.read]}function J1(n,t,e,i){let r=t.get(uc);r.impl??=t.get(Sf);let o=t.get(fi,null,{optional:!0}),s=e?.manualCleanup!==!0?t.get(et):null,a=t.get(Xi,null,{optional:!0}),l=new hs(r.impl,X1(n),a?.view,i,s,o?.snapshot(null));return r.impl.register(l),l}var fc=new te("",{providedIn:"root",factory:()=>({queue:new Set,isScheduled:!1,scheduler:null})});function av(n,t,e){let i=n.get(fc);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 eE(n,t){let e=n.get(fc);if(t.detachedLeaveAnimationFns){for(let i of t.detachedLeaveAnimationFns)e.queue.delete(i);t.detachedLeaveAnimationFns=void 0}}function tE(n){let t=n.get(fc);t.isScheduled||(pc(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:n}),t.isScheduled=!0)}function lv(n){let t=n.get(fc);t.scheduler=tE,t.scheduler(n)}function cv(n,t){for(let[e,i]of t)av(n,i.animateFns)}function z0(n,t,e,i){let r=n?.[jn]?.enter;t!==null&&r&&r.has(e.index)&&cv(i,r)}function Xr(n,t,e,i,r,o,s,a){if(r!=null){let l,d=!1;un(r)?l=r:kn(r)&&(d=!0,r=r[dn]);let m=Yt(r);n===0&&i!==null?(z0(a,i,o,e),s==null?W_(t,i,m):Wl(t,i,m,s||null,!0)):n===1&&i!==null?(z0(a,i,o,e),Wl(t,i,m,s||null,!0)):n===2?G0(a,o,e,y=>{q_(t,m,d,y)}):n===3&&G0(a,o,e,()=>{t.destroyNode(m)}),l!=null&&pE(t,n,e,l,o,i,s)}}function nE(n,t){dv(n,t),t[dn]=null,t[Et]=null}function iE(n,t,e,i,r,o){i[dn]=r,i[Et]=t,mc(n,i,e,1,r,o)}function dv(n,t){t[Tn].changeDetectionScheduler?.notify(9),mc(n,t,t[ke],2,null,null)}function rE(n){let t=n[Wr];if(!t)return vp(n[ee],n);for(;t;){let e=null;if(kn(t))e=t[Wr];else{let i=t[He];i&&(e=i)}if(!e){for(;t&&!t[Zt]&&t!==n;)kn(t)&&vp(t[ee],t),t=t[Xe];t===null&&(t=n),kn(t)&&vp(t[ee],t),e=t&&t[Zt]}t=e}}function Tf(n,t){let e=n[Yi],i=e.indexOf(t);e.splice(i,1)}function hc(n,t){if(Qi(t))return;let e=t[ke];e.destroyNode&&mc(n,t,e,3,null,null),rE(t)}function vp(n,t){if(Qi(t))return;let e=re(null);try{t[oe]&=-129,t[oe]|=256,t[Ft]&&Kn(t[Ft]),aE(n,t),sE(n,t),t[ee].type===1&&t[ke].destroy();let i=t[Vn];if(i!==null&&un(t[Xe])){i!==t[Xe]&&Tf(i,t);let r=t[Mn];r!==null&&r.detachView(n)}kp(t)}finally{re(e)}}function G0(n,t,e,i){let r=n?.[jn];if(r==null||r.leave==null||!r.leave.has(t.index))return i(!1);n&&di.add(n),av(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 d=s.animateFns[l],{promise:m}=d();a.push(m)}r.detachedLeaveAnimationFns=void 0}r.running=Promise.allSettled(a),oE(n,i)}else n&&di.delete(n),i(!1)},r)}function oE(n,t){let e=n[jn]?.running;if(e){e.then(()=>{n[jn].running=void 0,di.delete(n),t(!0)});return}t(!1)}function sE(n,t){let e=n.cleanup,i=t[Gr];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[Gr]=null);let r=t[Fn];if(r!==null){t[Fn]=null;for(let s=0;s<r.length;s++){let a=r[s];a()}}let o=t[Bn];if(o!==null){t[Bn]=null;for(let s of o)s.destroy()}}function aE(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 rr)){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];Se(4,a,l);try{l.call(a)}finally{Se(5,a,l)}}else{Se(4,r,o);try{o.call(r)}finally{Se(5,r,o)}}}}}function uv(n,t,e){return lE(n,t.parent,e)}function lE(n,t,e){let i=t;for(;i!==null&&i.type&168;)t=i,i=t.parent;if(i===null)return e[dn];if(si(i)){let{encapsulation:r}=n.data[i.directiveStart+i.componentOffset];if(r===$n.None||r===$n.Emulated)return null}return Ot(i,e)}function pv(n,t,e){return dE(n,t,e)}function cE(n,t,e){return n.type&40?Ot(n,e):null}var dE=cE,W0;function Mf(n,t,e,i){let r=uv(n,i,t),o=t[ke],s=i.parent||t[Et],a=pv(s,i,t);if(r!=null)if(Array.isArray(e))for(let l=0;l<e.length;l++)V0(o,r,e[l],a,!1);else V0(o,r,e,a,!1);W0!==void 0&&W0(o,i,t,e,r)}function us(n,t){if(t!==null){let e=t.type;if(e&3)return Ot(t,n);if(e&4)return Ql(-1,n[t.index]);if(e&8){let i=t.child;if(i!==null)return us(n,i);{let r=n[t.index];return un(r)?Ql(-1,r):Yt(r)}}else{if(e&128)return us(n,t.next);if(e&32)return xf(t,n)()||Yt(n[t.index]);{let i=fv(n,t);if(i!==null){if(Array.isArray(i))return i[0];let r=ii(n[St]);return us(r,i)}else return us(n,t.next)}}}return null}function fv(n,t){if(t!==null){let i=n[St][Et],r=t.projection;return i.projection[r]}return null}function Ql(n,t){let e=He+n+1;if(e<t.length){let i=t[e],r=i[ee].firstChild;if(r!==null)return us(i,r)}return t[oi]}function kf(n,t,e,i,r,o,s){for(;e!=null;){let a=i[Dt];if(e.type===128){e=e.next;continue}let l=i[e.index],d=e.type;if(s&&t===0&&(l&&io(Yt(l),i),e.flags|=2),!ac(e))if(d&8)kf(n,t,e.child,i,r,o,!1),Xr(t,n,a,r,l,e,o,i);else if(d&32){let m=xf(e,i),y;for(;y=m();)Xr(t,n,a,r,y,e,o,i);Xr(t,n,a,r,l,e,o,i)}else d&16?hv(n,t,i,e,r,o):Xr(t,n,a,r,l,e,o,i);e=s?e.projectionNext:e.next}}function mc(n,t,e,i,r,o){kf(e,i,n.firstChild,t,r,o,!1)}function uE(n,t,e){let i=t[ke],r=uv(n,e,t),o=e.parent||t[Et],s=pv(o,e,t);hv(i,0,t,e,r,s)}function hv(n,t,e,i,r,o){let s=e[St],l=s[Et].projection[i.projection];if(Array.isArray(l))for(let d=0;d<l.length;d++){let m=l[d];Xr(t,n,e[Dt],r,m,i,o,e)}else{let d=l,m=s[Xe];T_(i)&&(d.flags|=128),kf(n,t,d,m,r,o,!0)}}function pE(n,t,e,i,r,o,s){let a=i[oi],l=Yt(i);a!==l&&Xr(t,n,e,o,a,r,s);for(let d=He;d<i.length;d++){let m=i[d];mc(m[ee],m,n,t,o,a)}}function fE(n,t,e,i,r){if(t)r?n.addClass(e,i):n.removeClass(e,i);else{let o=i.indexOf("-")===-1?void 0:On.DashCase;r==null?n.removeStyle(e,i,o):(typeof r=="string"&&r.endsWith("!important")&&(r=r.slice(0,-10),o|=On.Important),n.setStyle(e,i,r,o))}}function mv(n,t,e,i,r){let o=Xt(),s=i&2;try{li(-1),s&&t.length>Ne&&ev(n,t,Ne,!1),Se(s?2:0,r,e),e(i,r)}finally{li(o),Se(s?3:1,r,e)}}function gc(n,t,e){yE(n,t,e),(e.flags&64)===64&&CE(n,t,e)}function Ss(n,t,e=Ot){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 hE(n,t,e,i){let o=i.get(A_,N_)||e===$n.ShadowDom,s=n.selectRootElement(t,o);return mE(s),s}function mE(n){gE(n)}var gE=()=>null;function _E(n){return n==="class"?"className":n==="for"?"htmlFor":n==="formaction"?"formAction":n==="innerHtml"?"innerHTML":n==="readonly"?"readOnly":n==="tabindex"?"tabIndex":n}function vE(n,t,e,i,r,o){let s=t[ee];if(Rf(n,s,t,e,i)){si(n)&&bE(t,n.index);return}n.type&3&&(e=_E(e)),gv(n,t,e,i,r,o)}function gv(n,t,e,i,r,o){if(n.type&3){let s=Ot(n,t);i=o!=null?o(i,n.value||"",e):i,r.setProperty(s,e,i)}else n.type&12}function bE(n,t){let e=Qt(t,n);e[oe]&16||(e[oe]|=64)}function yE(n,t,e){let i=e.directiveStart,r=e.directiveEnd;si(e)&&j1(t,e,n.data[i+e.componentOffset]),n.firstCreatePass||Ul(e,t);let o=e.initialInputs;for(let s=i;s<r;s++){let a=n.data[s],l=fs(t,n,s,e);if(io(l,t),o!==null&&DE(t,s-i,l,a,e,o),In(a)){let d=Qt(e.index,t);d[We]=fs(t,n,s,e)}}}function CE(n,t,e){let i=e.directiveStart,r=e.directiveEnd,o=e.index,s=v0();try{li(o);for(let a=i;a<r;a++){let l=n.data[a],d=t[a];wl(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&xE(l,d)}}finally{li(-1),wl(s)}}function xE(n,t){n.hostBindings!==null&&n.hostBindings(1,t)}function If(n,t){let e=n.directiveRegistry,i=null;if(e)for(let r=0;r<e.length;r++){let o=e[r];K_(t,o.selectors,!1)&&(i??=[],In(o)?i.unshift(o):i.push(o))}return i}function wE(n,t,e,i,r,o){let s=Ot(n,t);EE(t[ke],s,o,n.value,e,i,r)}function EE(n,t,e,i,r,o,s){if(o==null)n.removeAttribute(t,r,e);else{let a=s==null?cn(o):s(o,i||"",r);n.setAttribute(t,r,a,e)}}function DE(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],d=s[a+1];Ap(i,e,l,d)}}function Pf(n,t,e,i,r){let o=Ne+e,s=t[ee],a=r(s,t,n,i,e);t[o]=a,Yr(n,!0);let l=n.type===2;return l?(Z_(t[ke],a,n),(u0()===0||qr(n))&&io(a,t),p0()):io(a,t),Tl()&&(!l||!ac(n))&&Mf(s,t,a,n),n}function Of(n){let t=n;return sp()?ap():(t=t.parent,Yr(t,!1)),t}function SE(n,t){let e=n[Dt];if(!e)return;let i;try{i=e.get(pn,null)}catch{i=null}i?.(t)}function Rf(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 d=s[l],m=s[l+1],y=t.data[d];Ap(y,e[d],m,r),a=!0}if(o)for(let l of o){let d=e[l],m=t.data[l];Ap(m,d,i,r),a=!0}return a}function TE(n,t){let e=Qt(t,n),i=e[ee];ME(i,e);let r=e[dn];r!==null&&e[Gi]===null&&(e[Gi]=L_(r,e[Dt])),Se(18),Nf(i,e,e[We]),Se(19,e[We])}function ME(n,t){for(let e=t.length;e<n.blueprint.length;e++)t.push(n.blueprint[e])}function Nf(n,t,e){Dl(t);try{let i=n.viewQuery;i!==null&&Pp(1,i,e);let r=n.template;r!==null&&mv(n,t,r,1,e),n.firstCreatePass&&(n.firstCreatePass=!1),t[Mn]?.finishViewCreation(n),n.staticContentQueries&&F_(n,t),n.staticViewQueries&&Pp(2,n.viewQuery,e);let o=n.components;o!==null&&kE(t,o)}catch(i){throw n.firstCreatePass&&(n.incompleteFirstPass=!0,n.firstCreatePass=!1),i}finally{t[oe]&=-5,Sl()}}function kE(n,t){for(let e=0;e<t.length;e++)TE(n,t[e])}function Ts(n,t,e,i){let r=re(null);try{let o=t.tView,a=n[oe]&4096?4096:16,l=yf(n,o,e,a,null,t,null,null,i?.injector??null,i?.embeddedViewInjector??null,i?.dehydratedView??null),d=n[t.index];l[Vn]=d;let m=n[Mn];return m!==null&&(l[Mn]=m.createEmbeddedView(o)),Nf(o,l,e),l}finally{re(r)}}function ro(n,t){return!t||t.firstChild===null||T_(n)}function ms(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(Yt(o)),un(o)&&_v(o,i);let s=e.type;if(s&8)ms(n,t,e.child,i);else if(s&32){let a=xf(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=ii(t[St]);ms(l[ee],l,a,i,!0)}}e=r?e.projectionNext:e.next}return i}function _v(n,t){for(let e=He;e<n.length;e++){let i=n[e],r=i[ee].firstChild;r!==null&&ms(i[ee],i,r,t)}n[oi]!==n[dn]&&t.push(n[oi])}function vv(n){if(n[Zi]!==null){for(let t of n[Zi])t.impl.addSequence(t);n[Zi].length=0}}var bv=[];function IE(n){return n[Ft]??PE(n)}function PE(n){let t=bv.pop()??Object.create(RE);return t.lView=n,t}function OE(n){n.lView[Ft]!==n&&(n.lView=null,bv.push(n))}var RE=le(W({},Si),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:n=>{ai(n.lView)},consumerOnSignalRead(){this.lView[Ft]=this}});function NE(n){let t=n[Ft]??Object.create(AE);return t.lView=n,t}var AE=le(W({},Si),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:n=>{let t=ii(n.lView);for(;t&&!yv(t[ee]);)t=ii(t);t&&Ku(t)},consumerOnSignalRead(){this.lView[Ft]=this}});function yv(n){return n.type!==2}function Cv(n){if(n[Bn]===null)return;let t=!0;for(;t;){let e=!1;for(let i of n[Bn])i.dirty&&(e=!0,i.zone===null||Zone.current===i.zone?i.run():i.zone.run(()=>i.run()));t=e&&!!(n[oe]&8192)}}var LE=100;function xv(n,t=0){let i=n[Tn].rendererFactory,r=!1;r||i.begin?.();try{FE(n,t)}finally{r||i.end?.()}}function FE(n,t){let e=lp();try{Qr(!0),Vp(n,t);let i=0;for(;is(n);){if(i===LE)throw new Y(103,!1);i++,Vp(n,1)}}finally{Qr(e)}}function VE(n,t,e,i){if(Qi(t))return;let r=t[oe],o=!1,s=!1;Dl(t);let a=!0,l=null,d=null;o||(yv(n)?(d=IE(t),l=Qn(d)):ka()===null?(a=!1,d=NE(t),l=Qn(d)):t[Ft]&&(Kn(t[Ft]),t[Ft]=null));try{Qu(t),m0(n.bindingStartIndex),e!==null&&mv(n,t,e,2,i);let m=(r&3)===3;if(!o)if(m){let E=n.preOrderCheckHooks;E!==null&&Nl(t,E,null)}else{let E=n.preOrderHooks;E!==null&&Al(t,E,0,null),gp(t,0)}if(s||BE(t),Cv(t),wv(t,0),n.contentQueries!==null&&F_(n,t),!o)if(m){let E=n.contentCheckHooks;E!==null&&Nl(t,E)}else{let E=n.contentHooks;E!==null&&Al(t,E,1),gp(t,1)}$E(n,t);let y=n.components;y!==null&&Dv(t,y,0);let w=n.viewQuery;if(w!==null&&Pp(2,w,i),!o)if(m){let E=n.viewCheckHooks;E!==null&&Nl(t,E)}else{let E=n.viewHooks;E!==null&&Al(t,E,2),gp(t,2)}if(n.firstUpdatePass===!0&&(n.firstUpdatePass=!1),t[vl]){for(let E of t[vl])E();t[vl]=null}o||(vv(t),t[oe]&=-73)}catch(m){throw o||ai(t),m}finally{d!==null&&(Mi(d,l),a&&OE(d)),Sl()}}function wv(n,t){for(let e=k_(n);e!==null;e=I_(e))for(let i=He;i<e.length;i++){let r=e[i];Ev(r,t)}}function BE(n){for(let t=k_(n);t!==null;t=I_(t)){if(!(t[oe]&2))continue;let e=t[Yi];for(let i=0;i<e.length;i++){let r=e[i];Ku(r)}}}function jE(n,t,e){Se(18);let i=Qt(t,n);Ev(i,e),Se(19,i[We])}function Ev(n,t){yl(n)&&Vp(n,t)}function Vp(n,t){let i=n[ee],r=n[oe],o=n[Ft],s=!!(t===0&&r&16);if(s||=!!(r&64&&t===0),s||=!!(r&1024),s||=!!(o?.dirty&&ki(o)),s||=!1,o&&(o.dirty=!1),n[oe]&=-9217,s)VE(i,n,i.template,n[We]);else if(r&8192){let a=re(null);try{Cv(n),wv(n,1);let l=i.components;l!==null&&Dv(n,l,1),vv(n)}finally{re(a)}}}function Dv(n,t,e){for(let i=0;i<t.length;i++)jE(n,t[i],e)}function $E(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)li(~r);else{let o=r,s=e[++i],a=e[++i];_0(s,o);let l=t[o];Se(24,l),a(2,l),Se(25,l)}}}finally{li(-1)}}function Af(n,t){let e=lp()?64:1088;for(n[Tn].changeDetectionScheduler?.notify(t);n;){n[oe]|=e;let i=ii(n);if(Zr(n)&&!i)return n;n=i}return null}function Sv(n,t,e,i){return[n,!0,0,t,null,i,null,e,null,null]}function Tv(n,t){let e=He+t;if(e<n.length)return n[e]}function Ms(n,t,e,i=!0){let r=t[ee];if(HE(r,t,n,e),i){let s=Ql(e,n),a=t[ke],l=a.parentNode(n[oi]);l!==null&&iE(r,n[Et],a,t,l,s)}let o=t[Gi];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function Mv(n,t){let e=gs(n,t);return e!==void 0&&hc(e[ee],e),e}function gs(n,t){if(n.length<=He)return;let e=He+t,i=n[e];if(i){let r=i[Vn];r!==null&&r!==n&&Tf(r,i),t>0&&(n[e-1][Zt]=i[Zt]);let o=Qo(n,He+t);nE(i[ee],i);let s=o[Mn];s!==null&&s.detachView(o[ee]),i[Xe]=null,i[Zt]=null,i[oe]&=-129}return i}function HE(n,t,e,i){let r=He+i,o=e.length;i>0&&(e[r-1][Zt]=t),i<o-He?(t[Zt]=e[r],Lu(e,He+i,t)):(e.push(t),t[Zt]=null),t[Xe]=e;let s=t[Vn];s!==null&&e!==s&&kv(s,t);let a=t[Mn];a!==null&&a.insertView(n),Cl(t),t[oe]|=128}function kv(n,t){let e=n[Yi],i=t[Xe];if(kn(i))n[oe]|=2;else{let r=i[Xe][St];t[St]!==r&&(n[oe]|=2)}e===null?n[Yi]=[t]:e.push(t)}var ui=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let t=this._lView,e=t[ee];return ms(e,t,e.firstChild,[])}constructor(t,e){this._lView=t,this._cdRefInjectingView=e}get context(){return this._lView[We]}set context(t){this._lView[We]=t}get destroyed(){return Qi(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let t=this._lView[Xe];if(un(t)){let e=t[ts],i=e?e.indexOf(this):-1;i>-1&&(gs(t,i),Qo(e,i))}this._attachedToViewContainer=!1}hc(this._lView[ee],this._lView)}onDestroy(t){Xu(this._lView,t)}markForCheck(){Af(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[oe]&=-129}reattach(){Cl(this._lView),this._lView[oe]|=128}detectChanges(){this._lView[oe]|=1024,xv(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Y(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let t=Zr(this._lView),e=this._lView[Vn];e!==null&&!t&&Tf(e,this._lView),dv(this._lView[ee],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new Y(902,!1);this._appRef=t;let e=Zr(this._lView),i=this._lView[Vn];i!==null&&!e&&kv(i,this._lView),Cl(this._lView)}};var pi=(()=>{class n{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=UE;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=Ts(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:i,dehydratedView:r});return new ui(o)}}return n})();function UE(){return _c(Je(),ne())}function _c(n,t){return n.type&4?new pi(t,n,ao(n,t)):null}function lo(n,t,e,i,r){let o=n.data[t];if(o===null)o=zE(n,t,e,i,r),g0()&&(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 Yr(o,!0),o}function zE(n,t,e,i,r){let o=op(),s=sp(),a=s?o:o&&o.parent,l=n.data[t]=WE(n,a,e,t,i,r);return GE(n,l,o,s),l}function GE(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 WE(n,t,e,i,r,o){let s=t?t.injectorIndex:-1,a=0;return np()&&(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:pp(),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 l8=new RegExp(`^(\\d+)*(${Uw}|${Hw})*(.*)`);function qE(n){let t=n[Gu]??[],i=n[Xe][ke],r=[];for(let o of t)o.data[R_]!==void 0?r.push(o):ZE(o,i);n[Gu]=r}function ZE(n,t){let e=0,i=n.firstChild;if(i){let r=n.data[O_];for(;e<r;){let o=i.nextSibling;q_(t,i,!1),i=o,e++}}}var YE=()=>null,QE=()=>null;function Kl(n,t){return YE(n,t)}function Iv(n,t,e){return QE(n,t,e)}var Pv=class{},vc=class{},Bp=class{resolveComponentFactory(t){throw new Y(917,!1)}},bc=class{static NULL=new Bp},Rn=class{},yc=(()=>{class n{destroyNode=null;static __NG_ELEMENT_ID__=()=>KE()}return n})();function KE(){let n=ne(),t=Je(),e=Qt(t.index,n);return(kn(e)?e:n)[ke]}var Ov=(()=>{class n{static \u0275prov=se({token:n,providedIn:"root",factory:()=>null})}return n})();var Fl={},jp=class{injector;parentInjector;constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,i){let r=this.injector.get(t,Fl,i);return r!==Fl||e===Fl?r:this.parentInjector.get(t,e,i)}};function Xl(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=ul(r,a);else if(o==2){let l=a,d=t[++s];i=ul(i,l+": "+d+";")}}e?n.styles=i:n.stylesWithoutHost=i,e?n.classes=r:n.classesWithoutHost=r}function _n(n,t=0){let e=ne();if(e===null)return ge(n,t);let i=Je();return w_(i,e,mt(n),t)}function Rv(n,t,e,i,r){let o=i===null?null:{"":-1},s=r(n,e);if(s!==null){let a=s,l=null,d=null;for(let m of s)if(m.resolveHostDirectives!==null){[a,l,d]=m.resolveHostDirectives(s);break}eD(n,t,e,a,o,l,d)}o!==null&&i!==null&&XE(e,i,o)}function XE(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 Y(-301,!1);i.push(t[r],o)}}function JE(n,t,e){t.componentOffset=e,(n.components??=[]).push(t.index)}function eD(n,t,e,i,r,o,s){let a=i.length,l=!1;for(let w=0;w<a;w++){let E=i[w];!l&&In(E)&&(l=!0,JE(n,e,w)),Mp(Ul(e,t),n,E.type)}sD(e,n.data.length,a);for(let w=0;w<a;w++){let E=i[w];E.providersResolver&&E.providersResolver(E)}let d=!1,m=!1,y=J_(n,t,a,null);a>0&&(e.directiveToIndex=new Map);for(let w=0;w<a;w++){let E=i[w];if(e.mergedAttrs=no(e.mergedAttrs,E.hostAttrs),nD(n,e,t,y,E),oD(y,E,r),s!==null&&s.has(E)){let[j,Z]=s.get(E);e.directiveToIndex.set(E.type,[y,j+e.directiveStart,Z+e.directiveStart])}else(o===null||!o.has(E))&&e.directiveToIndex.set(E.type,y);E.contentQueries!==null&&(e.flags|=4),(E.hostBindings!==null||E.hostAttrs!==null||E.hostVars!==0)&&(e.flags|=64);let R=E.type.prototype;!d&&(R.ngOnChanges||R.ngOnInit||R.ngDoCheck)&&((n.preOrderHooks??=[]).push(e.index),d=!0),!m&&(R.ngOnChanges||R.ngDoCheck)&&((n.preOrderCheckHooks??=[]).push(e.index),m=!0),y++}tD(n,e,o)}function tD(n,t,e){for(let i=t.directiveStart;i<t.directiveEnd;i++){let r=n.data[i];if(e===null||!e.has(r))q0(0,t,r,i),q0(1,t,r,i),Y0(t,i,!1);else{let o=e.get(r);Z0(0,t,o,i),Z0(1,t,o,i),Y0(t,i,!0)}}}function q0(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),Nv(t,o)}}function Z0(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),Nv(t,s)}}function Nv(n,t){t==="class"?n.flags|=8:t==="style"&&(n.flags|=16)}function Y0(n,t,e){let{attrs:i,inputs:r,hostDirectiveInputs:o}=n;if(i===null||!e&&r===null||e&&o===null||vf(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 d=r[l];for(let m of d)if(m===t){s??=[],s.push(l,i[a+1]);break}}else if(e&&o.hasOwnProperty(l)){let d=o[l];for(let m=0;m<d.length;m+=2)if(d[m]===t){s??=[],s.push(d[m+1],i[a+1]);break}}a+=2}n.initialInputs??=[],n.initialInputs.push(s)}function nD(n,t,e,i,r){n.data[i]=r;let o=r.factory||(r.factory=Vi(r.type,!0)),s=new rr(o,In(r),_n,null);n.blueprint[i]=s,e[i]=s,iD(n,t,i,J_(n,e,r.hostVars,pt),r)}function iD(n,t,e,i,r){let o=r.hostBindings;if(o){let s=n.hostBindingOpCodes;s===null&&(s=n.hostBindingOpCodes=[]);let a=~t.index;rD(s)!=a&&s.push(a),s.push(e,i,o)}}function rD(n){let t=n.length;for(;t>0;){let e=n[--t];if(typeof e=="number"&&e<0)return e}return 0}function oD(n,t,e){if(e){if(t.exportAs)for(let i=0;i<t.exportAs.length;i++)e[t.exportAs[i]]=n;In(t)&&(e[""]=n)}}function sD(n,t,e){n.flags|=1,n.directiveStart=t,n.directiveEnd=t+e,n.providerIndexes=t}function Lf(n,t,e,i,r,o,s,a){let l=t[ee],d=l.consts,m=Kt(d,s),y=lo(l,n,e,i,m);return o&&Rv(l,t,y,Kt(d,a),r),y.mergedAttrs=no(y.mergedAttrs,y.attrs),y.attrs!==null&&Xl(y,y.attrs,!1),y.mergedAttrs!==null&&Xl(y,y.mergedAttrs,!0),l.queries!==null&&l.queries.elementStart(l,y),y}function Ff(n,t){m_(n,t),Wu(t)&&n.queries.elementEnd(t)}function aD(n,t,e,i,r,o){let s=t.consts,a=Kt(s,r),l=lo(t,n,e,i,a);if(l.mergedAttrs=no(l.mergedAttrs,l.attrs),o!=null){let d=Kt(s,o);l.localNames=[];for(let m=0;m<d.length;m+=2)l.localNames.push(d[m],-1)}return l.attrs!==null&&Xl(l,l.attrs,!1),l.mergedAttrs!==null&&Xl(l,l.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,l),l}function Vf(n){return Lv(n)?Array.isArray(n)||!(n instanceof Map)&&Symbol.iterator in n:!1}function Av(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 Lv(n){return n!==null&&(typeof n=="function"||typeof n=="object")}function Bf(n,t,e){return n[t]=e}function lD(n,t){return n[t]}function Jt(n,t,e){if(e===pt)return!1;let i=n[t];return Object.is(i,e)?!1:(n[t]=e,!0)}function jf(n,t,e,i){let r=Jt(n,t,e);return Jt(n,t+1,i)||r}function cD(n,t,e,i,r){let o=jf(n,t,e,i);return Jt(n,t+2,r)||o}function Vl(n,t,e){return function i(r){let o=si(n)?Qt(n.index,t):t;Af(o,5);let s=t[We],a=Q0(t,s,e,r),l=i.__ngNextListenerFn__;for(;l;)a=Q0(t,s,l,r)&&a,l=l.__ngNextListenerFn__;return a}}function Q0(n,t,e,i){let r=re(null);try{return Se(6,t,e),e(i)!==!1}catch(o){return SE(n,o),!1}finally{Se(7,t,e),re(r)}}function Fv(n,t,e,i,r,o,s,a){let l=qr(n),d=!1,m=null;if(!i&&l&&(m=uD(t,e,o,n.index)),m!==null){let y=m.__ngLastListenerFn__||m;y.__ngNextListenerFn__=s,m.__ngLastListenerFn__=s,d=!0}else{let y=Ot(n,e),w=i?i(y):y;Gw(e,w,o,a);let E=r.listen(w,o,a);if(!dD(o)){let R=i?j=>i(Yt(j[n.index])):n.index;Vv(R,t,e,o,a,E,!1)}}return d}function dD(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[Gr],l=r[o+2];return a&&a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function Vv(n,t,e,i,r,o,s){let a=t.firstCreatePass?ep(t):null,l=Ju(e),d=l.length;l.push(r,o),a&&a.push(i,n,d,(d+1)*(s?-1:1))}function K0(n,t,e,i,r,o){let s=t[e],a=t[ee],d=a.data[e].outputs[i],y=s[d].subscribe(o);Vv(n.index,a,t,r,o,y,!0)}var $p=Symbol("BINDING");var Hp=class extends bc{ngModule;constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){let e=zi(t);return new _s(e,this.ngModule)}};function pD(n){return Object.keys(n).map(t=>{let[e,i,r]=n[t],o={propName:e,templateName:t,isSignal:(i&cc.SignalBased)!==0};return r&&(o.transform=r),o})}function fD(n){return Object.keys(n).map(t=>({propName:n[t],templateName:t}))}function hD(n,t,e){let i=t instanceof Pt?t:t?.injector;return i&&n.getStandaloneInjector!==null&&(i=n.getStandaloneInjector(i)||i),i?new jp(e,i):e}function mD(n){let t=n.get(Rn,null);if(t===null)throw new Y(407,!1);let e=n.get(Ov,null),i=n.get(qt,null);return{rendererFactory:t,sanitizer:e,changeDetectionScheduler:i,ngReflect:!1}}function gD(n,t){let e=Bv(n);return G_(t,e,e==="svg"?Zo:e==="math"?qu:null)}function _D(n){if(n?.toLowerCase()==="script")throw new Y(905,!1)}function Bv(n){return(n.selectors[0][0]||"div").toLowerCase()}var _s=class extends vc{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=pD(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=fD(this.componentDef.outputs),this.cachedOutputs}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=L1(t.selectors),this.ngContentSelectors=t.ngContentSelectors??[],this.isBoundToModule=!!e}create(t,e,i,r,o,s){Se(22);let a=re(null);try{let l=this.componentDef,d=vD(i,l,s,o),m=hD(l,r||this.ngModule,t),y=mD(m),w=y.rendererFactory.createRenderer(null,l),E=i?hE(w,i,l.encapsulation,m):gD(l,w);_D(E?.tagName);let R=s?.some(X0)||o?.some($=>typeof $!="function"&&$.bindings.some(X0)),j=yf(null,d,null,512|X_(l),null,null,y,w,m,null,L_(E,m,!0));j[Ne]=E,Dl(j);let Z=null;try{let $=Lf(Ne,j,2,"#host",()=>d.directiveRegistry,!0,0);Z_(w,E,$),io(E,j),gc(d,j,$),ff(d,$,j),Ff(d,$),e!==void 0&&yD($,this.ngContentSelectors,e),Z=Qt($.index,j),j[We]=Z[We],Nf(d,j,null)}catch($){throw Z!==null&&kp(Z),kp(j),$}finally{Se(23),Sl()}return new Jl(this.componentType,j,!!R)}finally{re(a)}}};function vD(n,t,e,i){let r=n?["ng-version","20.3.29"]:F1(t.selectors[0]),o=null,s=null,a=0;if(e)for(let m of e)a+=m[$p].requiredVars,m.create&&(m.targetIdx=0,(o??=[]).push(m)),m.update&&(m.targetIdx=0,(s??=[]).push(m));if(i)for(let m=0;m<i.length;m++){let y=i[m];if(typeof y!="function")for(let w of y.bindings){a+=w[$p].requiredVars;let E=m+1;w.create&&(w.targetIdx=E,(o??=[]).push(w)),w.update&&(w.targetIdx=E,(s??=[]).push(w))}}let l=[t];if(i)for(let m of i){let y=typeof m=="function"?m:m.type,w=Bu(y);l.push(w)}return bf(0,null,bD(o,s),1,a,l,null,null,null,[r],null)}function bD(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 X0(n){let t=n[$p].kind;return t==="input"||t==="twoWay"}var Jl=class extends Pv{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(t,e,i){super(),this._rootLView=e,this._hasInputBindings=i,this._tNode=ns(e[ee],Ne),this.location=ao(this._tNode,e),this.instance=Qt(this._tNode.index,e)[We],this.hostView=this.changeDetectorRef=new ui(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=Rf(i,r[ee],r,t,e);this.previousInputValues.set(t,e);let s=Qt(i.index,r);Af(s,1)}get injector(){return new er(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}};function yD(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 hi=(()=>{class n{static __NG_ELEMENT_ID__=CD}return n})();function CD(){let n=Je();return $v(n,ne())}var xD=hi,jv=class extends xD{_lContainer;_hostTNode;_hostLView;constructor(t,e,i){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=i}get element(){return ao(this._hostTNode,this._hostLView)}get injector(){return new er(this._hostTNode,this._hostLView)}get parentInjector(){let t=cf(this._hostTNode,this._hostLView);if(__(t)){let e=$l(t,this._hostLView),i=jl(t),r=e[ee].data[i+8];return new er(r,e)}else return new er(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){let e=J0(this._lContainer);return e!==null&&e[t]||null}get length(){return this._lContainer.length-He}createEmbeddedView(t,e,i){let r,o;typeof i=="number"?r=i:i!=null&&(r=i.index,o=i.injector);let s=Kl(this._lContainer,t.ssrId),a=t.createEmbeddedViewImpl(e||{},o,s);return this.insertImpl(a,r,ro(this._hostTNode,s)),a}createComponent(t,e,i,r,o,s,a){let l=t&&!_w(t),d;if(l)d=e;else{let Z=e||{};d=Z.index,i=Z.injector,r=Z.projectableNodes,o=Z.environmentInjector||Z.ngModuleRef,s=Z.directives,a=Z.bindings}let m=l?t:new _s(zi(t)),y=i||this.parentInjector;if(!o&&m.ngModule==null){let $=(l?y:this.parentInjector).get(Pt,null);$&&(o=$)}let w=zi(m.componentType??{}),E=Kl(this._lContainer,w?.id??null),R=E?.firstChild??null,j=m.create(y,r,R,o,s,a);return this.insertImpl(j.hostView,d,ro(this._hostTNode,E)),j}insert(t,e){return this.insertImpl(t,e,!0)}insertImpl(t,e,i){let r=t._lView;if(a0(r)){let a=this.indexOf(t);if(a!==-1)this.detach(a);else{let l=r[Xe],d=new jv(l,l[Et],l[Xe]);d.detach(d.indexOf(t))}}let o=this._adjustIndex(e),s=this._lContainer;return Ms(s,r,o,i),t.attachToViewContainerRef(),Lu(bp(s),o,t),t}move(t,e){return this.insert(t,e)}indexOf(t){let e=J0(this._lContainer);return e!==null?e.indexOf(t):-1}remove(t){let e=this._adjustIndex(t,-1),i=gs(this._lContainer,e);i&&(Qo(bp(this._lContainer),e),hc(i[ee],i))}detach(t){let e=this._adjustIndex(t,-1),i=gs(this._lContainer,e);return i&&Qo(bp(this._lContainer),e)!=null?new ui(i):null}_adjustIndex(t,e=0){return t??this.length+e}};function J0(n){return n[ts]}function bp(n){return n[ts]||(n[ts]=[])}function $v(n,t){let e,i=t[n.index];return un(i)?e=i:(e=Sv(i,t,null,n),t[n.index]=e,Cf(t,e)),ED(e,t,n,i),new jv(e,n,t)}function wD(n,t){let e=n[ke],i=e.createComment(""),r=Ot(t,n),o=e.parentNode(r);return Wl(e,o,i,e.nextSibling(r),!1),i}var ED=TD,DD=()=>!1;function SD(n,t,e){return DD(n,t,e)}function TD(n,t,e,i){if(n[oi])return;let r;e.type&8?r=Yt(i):r=wD(t,e),n[oi]=r}var Up=class n{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new n(this.queryList)}setDirty(){this.queryList.setDirty()}},zp=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++)Hf(t,e).matches!==null&&this.queries[e].setDirty()}},Gp=class{flags;read;predicate;constructor(t,e,i=null){this.flags=e,this.read=i,typeof t=="string"?this.predicate=RD(t):this.predicate=t}},Wp=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)}},qp=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,MD(e,o)),this.matchTNodeWithReadOption(t,e,Ll(e,t,o,!1,!1))}else i===pi?e.type&4&&this.matchTNodeWithReadOption(t,e,-1):this.matchTNodeWithReadOption(t,e,Ll(e,t,i,!1,!1))}matchTNodeWithReadOption(t,e,i){if(i!==null){let r=this.metadata.read;if(r!==null)if(r===gn||r===hi||r===pi&&e.type&4)this.addMatch(e.index,-2);else{let o=Ll(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 MD(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 kD(n,t){return n.type&11?ao(n,t):n.type&4?_c(n,t):null}function ID(n,t,e,i){return e===-1?kD(t,n):e===-2?PD(n,t,i):fs(n,n[ee],e,t)}function PD(n,t,e){if(e===gn)return ao(t,n);if(e===pi)return _c(t,n);if(e===hi)return $v(t,n)}function Hv(n,t,e,i){let r=t[Mn].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 d=s[l];if(d<0)a.push(null);else{let m=o[d];a.push(ID(t,m,s[l+1],e.metadata.read))}}r.matches=a}return r.matches}function Zp(n,t,e,i){let r=n.queries.getByIndex(e),o=r.matches;if(o!==null){let s=Hv(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 d=o[a+1],m=t[-l];for(let y=He;y<m.length;y++){let w=m[y];w[Vn]===w[Xe]&&Zp(w[ee],w,d,i)}if(m[Yi]!==null){let y=m[Yi];for(let w=0;w<y.length;w++){let E=y[w];Zp(E[ee],E,d,i)}}}}}return i}function $f(n,t){return n[Mn].queries[t].queryList}function OD(n,t,e){let i=new zl((e&4)===4);return d0(n,t,i,i.destroy),(t[Mn]??=new zp).queries.push(new Up(i))-1}function Uv(n,t,e){let i=Ue();return i.firstCreatePass&&(ND(i,new Gp(n,t,e),-1),(t&2)===2&&(i.staticViewQueries=!0)),OD(i,ne(),t)}function RD(n){return n.split(",").map(t=>t.trim())}function ND(n,t,e){n.queries===null&&(n.queries=new Wp),n.queries.track(new qp(t,e))}function Hf(n,t){return n.queries.getByIndex(t)}function zv(n,t){let e=n[ee],i=Hf(e,t);return i.crossesNgTemplate?Zp(e,n,t,[]):Hv(e,n,i,t)}function Gv(n,t,e){let i,r=Ro(()=>{i._dirtyCounter();let o=LD(i,n);if(t&&o===void 0)throw new Y(-951,!1);return o});return i=r[rt],i._dirtyCounter=x(0),i._flatValue=void 0,r}function Wv(n){return Gv(!0,!1,n)}function qv(n){return Gv(!0,!0,n)}function AD(n,t){let e=n[rt];e._lView=ne(),e._queryIndex=t,e._queryList=$f(e._lView,t),e._queryList.onDirty(()=>e._dirtyCounter.update(i=>i+1))}function LD(n,t){let e=n._lView,i=n._queryIndex;if(e===void 0||i===void 0||e[oe]&4)return t?void 0:Wt;let r=$f(e,i),o=zv(e,i);return r.reset(o,S_),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 Hp(this);instance=null;constructor(t){super();let e=new ji([...t.providers,{provide:vs,useValue:this},{provide:bc,useValue:this.componentFactoryResolver}],t.parent||Jo(),t.debugName,new Set(["environment"]));this.injector=e,t.runEnvironmentInitializers&&e.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}};function Zv(n,t,e=null){return new bs({providers:n,parent:t,debugName:e,runEnvironmentInitializers:!0}).injector}var FD=(()=>{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=ju(!1,e.type),r=i.length>0?Zv([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=se({token:n,providedIn:"environment",factory:()=>new n(ge(Pt))})}return n})();function pe(n){return ic(()=>{let t=Yv(n),e=le(W({},t),{decls:n.decls,vars:n.vars,template:n.template,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,onPush:n.changeDetection===df.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&n.dependencies||null,getStandaloneInjector:t.standalone?r=>r.get(FD).getOrCreateStandaloneInjector(e):null,getExternalStyles:null,signals:n.signals??!1,data:n.data||{},encapsulation:n.encapsulation||$n.Emulated,styles:n.styles||Wt,_:null,schemas:n.schemas||null,tView:null,id:""});t.standalone&&Nn("NgStandalone"),Qv(e);let i=n.dependencies;return e.directiveDefs=e_(i,VD),e.pipeDefs=e_(i,Kg),e.id=$D(e),e})}function VD(n){return zi(n)||Bu(n)}function BD(n,t){if(n==null)return ri;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=cc.None,l=null),e[o]=[i,a,l],t[o]=s}return e}function jD(n){if(n==null)return ri;let t={};for(let e in n)n.hasOwnProperty(e)&&(t[n[e]]=e);return t}function mi(n){return ic(()=>{let t=Yv(n);return Qv(t),t})}function Cc(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 Yv(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||ri,exportAs:n.exportAs||null,standalone:n.standalone??!0,signals:n.signals===!0,selectors:n.selectors||Wt,viewQuery:n.viewQuery||null,features:n.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,inputs:BD(n.inputs,t),outputs:jD(n.outputs),debugInfo:null}}function Qv(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 $D(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 HD(n){return Object.getPrototypeOf(n.prototype).constructor}function ks(n){let t=HD(n.type),e=!0,i=[n];for(;t;){let r;if(In(n))r=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new Y(903,!1);r=t.\u0275dir}if(r){if(e){i.push(r);let s=n;s.inputs=yp(n.inputs),s.declaredInputs=yp(n.declaredInputs),s.outputs=yp(n.outputs);let a=r.hostBindings;a&&qD(n,a);let l=r.viewQuery,d=r.contentQueries;if(l&&GD(n,l),d&&WD(n,d),UD(n,r),$g(n.outputs,r.outputs),In(r)&&r.data.animation){let m=n.data;m.animation=(m.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===ks&&(e=!1)}}t=Object.getPrototypeOf(t)}zD(i)}function UD(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 zD(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=no(r.hostAttrs,e=no(e,r.hostAttrs))}}function yp(n){return n===ri?{}:n===Wt?[]:n}function GD(n,t){let e=n.viewQuery;e?n.viewQuery=(i,r)=>{t(i,r),e(i,r)}:n.viewQuery=t}function WD(n,t){let e=n.contentQueries;e?n.contentQueries=(i,r,o)=>{t(i,r,o),e(i,r,o)}:n.contentQueries=t}function qD(n,t){let e=n.hostBindings;e?n.hostBindings=(i,r)=>{t(i,r),e(i,r)}:n.hostBindings=t}function Kv(n,t,e,i,r,o,s,a){if(e.firstCreatePass){n.mergedAttrs=no(n.mergedAttrs,n.attrs);let m=n.tView=bf(2,n,r,o,s,e.directiveRegistry,e.pipeRegistry,null,e.schemas,e.consts,null);e.queries!==null&&(e.queries.template(e,n),m.queries=e.queries.embeddedTView(n))}a&&(n.flags|=a),Yr(n,!1);let l=YD(e,t,n,i);Tl()&&Mf(e,t,l,n),io(l,t);let d=Sv(l,t,l,n);t[i+Ne]=d,Cf(t,d),SD(d,n,t)}function ZD(n,t,e,i,r,o,s,a,l,d,m){let y=e+Ne,w;return t.firstCreatePass?(w=lo(t,y,4,s||null,a||null),xl()&&Rv(t,n,w,Kt(t.consts,d),If),m_(t,w)):w=t.data[y],Kv(w,n,t,e,i,r,o,l),qr(w)&&gc(t,n,w),d!=null&&Ss(n,w,m),w}function ys(n,t,e,i,r,o,s,a,l,d,m){let y=e+Ne,w;if(t.firstCreatePass){if(w=lo(t,y,4,s||null,a||null),d!=null){let E=Kt(t.consts,d);w.localNames=[];for(let R=0;R<E.length;R+=2)w.localNames.push(E[R],-1)}}else w=t.data[y];return Kv(w,n,t,e,i,r,o,l),d!=null&&Ss(n,w,m),w}function co(n,t,e,i,r,o,s,a){let l=ne(),d=Ue(),m=Kt(d.consts,o);return ZD(l,d,n,t,e,i,r,m,void 0,s,a),co}var YD=QD;function QD(n,t,e,i){return ls(!0),t[ke].createComment("")}var Uf=new te("");function Is(n){return!!n&&typeof n.then=="function"}function xc(n){return!!n&&typeof n.subscribe=="function"}var Xv=new te("");var zf=(()=>{class n{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,i)=>{this.resolve=e,this.reject=i});appInits=I(Xv,{optional:!0})??[];injector=I(wt);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let r of this.appInits){let o=zr(this.injector,r);if(Is(o))e.push(o);else if(xc(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=se({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Jv=new te("");function eb(){Qd(()=>{let n="";throw new Y(600,n)})}function tb(n){return n.isBoundToModule}var KD=10;var lr=(()=>{class n{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=I(pn);afterRenderManager=I(uc);zonelessEnabled=I(cs);rootEffectScheduler=I(ds);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new $e;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=I(ci);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(Ge(e=>!e))}constructor(){I(fi,{optional:!0})}whenStable(){let e;return new Promise(i=>{e=this.isStable.subscribe({next:r=>{r&&i()}})}).finally(()=>{e.unsubscribe()})}_injector=I(Pt);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,i){return this.bootstrapImpl(e,i)}bootstrapImpl(e,i,r=wt.NULL){return this._injector.get(Te).run(()=>{Se(10);let s=e instanceof vc;if(!this._injector.get(zf).done){let R="";throw new Y(405,R)}let l;s?l=e:l=this._injector.get(bc).resolveComponentFactory(e),this.componentTypes.push(l.componentType);let d=tb(l)?void 0:this._injector.get(vs),m=i||l.selector,y=l.create(r,[],m,d),w=y.location.nativeElement,E=y.injector.get(Uf,null);return E?.registerApplication(w),y.onDestroy(()=>{this.detachView(y.hostView),ps(this.components,y),E?.unregisterApplication(w)}),this._loadComponent(y),Se(11,y),y})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Se(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(dc.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new Y(101,!1);let e=re(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,re(e),this.afterTick.next(),Se(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Rn,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++<KD;)Se(14),this.synchronizeOnce(),Se(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&&!is(r))continue;let o=i&&!this.zonelessEnabled?0:1;xv(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})=>is(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;ps(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(Jv,[]).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),()=>ps(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new Y(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=se({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function ps(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function XD(){let n,t;return{promise:new Promise((i,r)=>{n=i,t=r}),resolve:n,reject:t}}function ce(n,t,e,i){let r=ne(),o=Ki();if(Jt(r,o,t)){let s=Ue(),a=as();wE(a,r,n,t,e,i)}return ce}var nb=new te("",{providedIn:"root",factory:()=>!1});var JD=!1,Ps=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";function ib(n){return n[Dt].get(nb,JD)}function eS(n,t,e){let i=oo.get(n);if(i){for(let r of t)i.classList.push(r);for(let r of e)i.cleanupFns.push(r)}else oo.set(n,{classList:t,cleanupFns:e})}function Gf(n){let t=oo.get(n);if(t){for(let e of t.cleanupFns)e();oo.delete(n)}tr.delete(n)}var oo=new WeakMap,tr=new WeakMap,to=new WeakMap;function t_(n,t){let e=to.get(n);if(e&&e.length>0){let i=e.findIndex(r=>r===t);i>-1&&e.splice(i,1)}e?.length===0&&to.delete(n)}function rb(n,t){let e=to.get(n)?.shift(),i=t[Vn];if(i){let o=Ql(n.index,i)?.previousSibling;e&&o&&e===o&&e.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}}))}}function tS(n,t){to.has(n)?to.get(n)?.push(t):to.set(n,[t])}function n_(n){let t=n[jn]??={};return t.enter??=new Map}function wc(n){let t=n[jn]??={};return t.leave??=new Map}function ob(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 nS(n,t){if(!Ps)return;let e=oo.get(n);if(e&&e.classList.length>0&&iS(n,e.classList))for(let i of e.classList)t.removeClass(n,i);Gf(n)}function iS(n,t){for(let e of t)if(n.classList.contains(e))return!0;return!1}function sb(n,t){let e=tr.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 ab(n,t,e){let i=n.get(t.index)??{animateFns:[]};i.animateFns.push(e),n.set(t.index,i)}function i_(n,t){if(n)for(let e of n)e();for(let e of t)e()}function r_(n,t){let e=wc(n).get(t.index);e&&(e.resolvers=void 0)}function nr(n){if(Nn("NgAnimateEnter"),!Ps)return nr;let t=ne();if(ib(t))return nr;let e=Je();return rb(e,t),ab(n_(t),e,()=>rS(t,e,n)),lv(t[Dt]),cv(t[Dt],n_(t)),nr}function rS(n,t,e){let i=Ot(t,n),r=n[ke],o=n[Dt].get(Te),s=ob(e),a=[],l=m=>{if(m.target!==i)return;let y=m instanceof AnimationEvent?"animationend":"transitionend";o.runOutsideAngular(()=>{r.listen(i,y,d)})},d=m=>{m.target===i&&oS(m,i,r)};if(s&&s.length>0){o.runOutsideAngular(()=>{a.push(r.listen(i,"animationstart",l)),a.push(r.listen(i,"transitionstart",l))}),eS(i,s,a);for(let m of s)r.addClass(i,m);o.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(iv(i,tr,Ps),!tr.has(i)){for(let m of s)r.removeClass(i,m);Gf(i)}})})}}function oS(n,t,e){let i=oo.get(t);if(!(n.target!==t||!i)&&sb(n,t)){n.stopImmediatePropagation();for(let r of i.classList)e.removeClass(t,r);Gf(t)}}function ir(n){if(Nn("NgAnimateLeave"),!Ps)return ir;let t=ne();if(ib(t))return ir;let i=Je();return rb(i,t),ab(wc(t),i,()=>sS(t,i,n)),lv(t[Dt]),ir}function sS(n,t,e){let{promise:i,resolve:r}=XD(),o=Ot(t,n),s=n[ke],a=n[Dt].get(Te);di.add(n),(wc(n).get(t.index).resolvers??=[]).push(r);let l=ob(e);return l&&l.length>0?aS(o,t,n,l,s,a):r(),{promise:i,resolve:r}}function aS(n,t,e,i,r,o){nS(n,r);let s=[],a=wc(e).get(t.index)?.resolvers,l=d=>{if(d.target===n&&(d instanceof CustomEvent||sb(d,n))){if(d.stopImmediatePropagation(),tr.delete(n),t_(t,n),Array.isArray(t.projection))for(let m of i)r.removeClass(n,m);i_(a,s),r_(e,t)}};o.runOutsideAngular(()=>{s.push(r.listen(n,"animationend",l)),s.push(r.listen(n,"transitionend",l))}),tS(t,n);for(let d of i)r.addClass(n,d);o.runOutsideAngular(()=>{requestAnimationFrame(()=>{iv(n,tr,Ps),tr.has(n)||(t_(t,n),i_(a,s),r_(e,t))})})}var Yp=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 Cp(n,t,e,i,r){return n===e&&Object.is(t,i)?1:Object.is(r(n,t),r(e,i))?-1:0}function lS(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 d=n.at(o),m=t[o],y=Cp(o,d,o,m,e);if(y!==0){y<0&&n.updateValue(o,m),o++;continue}let w=n.at(s),E=t[l],R=Cp(s,w,l,E,e);if(R!==0){R<0&&n.updateValue(s,E),s--,l--;continue}let j=e(o,d),Z=e(s,w),$=e(o,m);if(Object.is($,Z)){let _e=e(l,E);Object.is(_e,j)?(n.swap(o,s),n.updateValue(s,E),l--,s--):n.move(s,o),n.updateValue(o,m),o++;continue}if(i??=new ec,r??=s_(n,o,s,e),Qp(n,i,o,$))n.updateValue(o,m),o++,s++;else if(r.has($))i.set(j,n.detach(o)),s--;else{let _e=n.create(o,t[o]);n.attach(o,_e),o++,s++}}for(;o<=l;)o_(n,i,e,o,t[o]),o++}else if(t!=null){let l=t[Symbol.iterator](),d=l.next();for(;!d.done&&o<=s;){let m=n.at(o),y=d.value,w=Cp(o,m,o,y,e);if(w!==0)w<0&&n.updateValue(o,y),o++,d=l.next();else{i??=new ec,r??=s_(n,o,s,e);let E=e(o,y);if(Qp(n,i,o,E))n.updateValue(o,y),o++,s++,d=l.next();else if(!r.has(E))n.attach(o,n.create(o,y)),o++,s++,d=l.next();else{let R=e(o,m);i.set(R,n.detach(o)),s--}}}for(;!d.done;)o_(n,i,e,n.length,d.value),d=l.next()}for(;o<=s;)n.destroy(n.detach(s--));i?.forEach(l=>{n.destroy(l)})}function Qp(n,t,e,i){return t!==void 0&&t.has(i)?(n.attach(e,t.get(i)),t.delete(i),!0):!1}function o_(n,t,e,i,r){if(Qp(n,t,i,e(i,r)))n.updateValue(i,r);else{let o=n.create(i,r);n.attach(i,o)}}function s_(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 ec=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 S(n,t,e,i,r,o,s,a){Nn("NgControlFlow");let l=ne(),d=Ue(),m=Kt(d.consts,o);return ys(l,d,n,t,e,i,r,m,256,s,a),Os}function Os(n,t,e,i,r,o,s,a){Nn("NgControlFlow");let l=ne(),d=Ue(),m=Kt(d.consts,o);return ys(l,d,n,t,e,i,r,m,512,s,a),Os}function T(n,t){Nn("NgControlFlow");let e=ne(),i=Ki(),r=e[i]!==pt?e[i]:-1,o=r!==-1?tc(e,Ne+r):void 0,s=0;if(Jt(e,i,n)){let a=re(null);try{if(o!==void 0&&Mv(o,s),n!==-1){let l=Ne+n,d=tc(e,l),m=ef(e[ee],l),y=Iv(d,m,e),w=Ts(e,m,t,{dehydratedView:y});Ms(d,w,s,ro(m,y))}}finally{re(a)}}else if(o!==void 0){let a=Tv(o,s);a!==void 0&&(a[We]=t)}}var Kp=class{lContainer;$implicit;$index;constructor(t,e,i){this.lContainer=t,this.$implicit=e,this.$index=i}get $count(){return this.lContainer.length-He}};function Vt(n){return n}function Rt(n,t){return t}var Xp=class{hasEmptyBlock;trackByFn;liveCollection;constructor(t,e,i){this.hasEmptyBlock=t,this.trackByFn=e,this.liveCollection=i}};function Q(n,t,e,i,r,o,s,a,l,d,m,y,w){Nn("NgControlFlow");let E=ne(),R=Ue(),j=l!==void 0,Z=ne(),$=a?s.bind(Z[St][We]):s,_e=new Xp(j,$);Z[Ne+n]=_e,ys(E,R,n+1,t,e,i,r,Kt(R.consts,o),256),j&&ys(E,R,n+2,l,d,m,y,Kt(R.consts,w),512)}var Jp=class extends Yp{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-He}at(t){return this.getLView(t)[We].$implicit}attach(t,e){let i=e[Gi];this.needsIndexUpdate||=t!==this.length,Ms(this.lContainer,e,t,ro(this.templateTNode,i)),cS(this.lContainer,t)}detach(t){return this.needsIndexUpdate||=t!==this.length-1,dS(this.lContainer,t),uS(this.lContainer,t)}create(t,e){let i=Kl(this.lContainer,this.templateTNode.tView.ssrId),r=Ts(this.hostLView,this.templateTNode,new Kp(this.lContainer,e,t),{dehydratedView:i});return this.operationsCounter?.recordCreate(),r}destroy(t){hc(t[ee],t),this.operationsCounter?.recordDestroy()}updateValue(t,e){this.getLView(t)[We].$implicit=e}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let t=0;t<this.length;t++)this.getLView(t)[We].$index=t}getLView(t){return pS(this.lContainer,t)}};function K(n){let t=re(null),e=Xt();try{let i=ne(),r=i[ee],o=i[e],s=e+1,a=tc(i,s);if(o.liveCollection===void 0){let d=ef(r,s);o.liveCollection=new Jp(a,i,d)}else o.liveCollection.reset();let l=o.liveCollection;if(lS(l,n,o.trackByFn),l.updateIndexes(),o.hasEmptyBlock){let d=Ki(),m=l.length===0;if(Jt(i,d,m)){let y=e+2,w=tc(i,y);if(m){let E=ef(r,y),R=Iv(w,E,i),j=Ts(i,E,void 0,{dehydratedView:R});Ms(w,j,0,ro(E,R))}else r.firstUpdatePass&&qE(w),Mv(w,0)}}}finally{re(t)}}function tc(n,t){return n[t]}function cS(n,t){if(n.length<=He)return;let e=He+t,i=n[e],r=i?i[jn]:void 0;if(i&&r&&r.detachedLeaveAnimationFns&&r.detachedLeaveAnimationFns.length>0){let o=i[Dt];eE(o,r),di.delete(i),r.detachedLeaveAnimationFns=void 0}}function dS(n,t){if(n.length<=He)return;let e=He+t,i=n[e],r=i?i[jn]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function uS(n,t){return gs(n,t)}function pS(n,t){return Tv(n,t)}function ef(n,t){return ns(n,t)}function k(n,t,e){let i=ne(),r=Ki();if(Jt(i,r,t)){let o=Ue(),s=as();vE(s,i,n,t,i[ke],e)}return k}function tf(n,t,e,i,r){Rf(t,n,e,r?"class":"style",i)}function f(n,t,e,i){let r=ne(),o=r[ee],s=n+Ne,a=o.firstCreatePass?Lf(s,r,2,t,If,xl(),e,i):o.data[s];if(Pf(a,r,n,t,lb),qr(a)){let l=r[ee];gc(l,r,a),ff(l,a,r)}return i!=null&&Ss(r,a),f}function h(){let n=Ue(),t=Je(),e=Of(t);return n.firstCreatePass&&Ff(n,e),ip(e)&&rp(),tp(),e.classesWithoutHost!=null&&ww(e)&&tf(n,e,ne(),e.classesWithoutHost,!0),e.stylesWithoutHost!=null&&Ew(e)&&tf(n,e,ne(),e.stylesWithoutHost,!1),h}function z(n,t,e,i){return f(n,t,e,i),h(),z}function b(n,t,e,i){let r=ne(),o=r[ee],s=n+Ne,a=o.firstCreatePass?aD(s,o,2,t,e,i):o.data[s];return Pf(a,r,n,t,lb),i!=null&&Ss(r,a),b}function C(){let n=Je(),t=Of(n);return ip(t)&&rp(),tp(),C}function J(n,t,e,i){return b(n,t,e,i),C(),J}var lb=(n,t,e,i,r)=>(ls(!0),G_(t[ke],i,pp()));function Wf(n,t,e){let i=ne(),r=i[ee],o=n+Ne,s=r.firstCreatePass?Lf(o,i,8,"ng-container",If,xl(),t,e):r.data[o];if(Pf(s,i,n,"ng-container",fS),qr(s)){let a=i[ee];gc(a,i,s),ff(a,s,i)}return e!=null&&Ss(i,s),Wf}function qf(){let n=Ue(),t=Je(),e=Of(t);return n.firstCreatePass&&Ff(n,e),qf}function cr(n,t,e){return Wf(n,t,e),qf(),cr}var fS=(n,t,e,i,r)=>(ls(!0),y1(t[ke],""));function P(){return ne()}function q(n,t,e){let i=ne(),r=Ki();if(Jt(i,r,t)){let o=Ue(),s=as();gv(s,i,n,t,i[ke],e)}return q}var Ol=void 0;function hS(n){let t=Math.floor(Math.abs(n)),e=n.toString().replace(/^[^.]*\.?/,"").length;return t===1&&e===0?1:5}var mS=["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"]],Ol,[["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"]],Ol,[["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}",Ol,"{1} 'at' {0}",Ol],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",hS],xp={};function Bt(n){let t=gS(n),e=a_(t);if(e)return e;let i=t.split("-")[0];if(e=a_(i),e)return e;if(i==="en")return mS;throw new Y(701,!1)}function a_(n){if(!(n in xp)){let t=ln.ng&&ln.ng.common&&ln.ng.common.locales&&ln.ng.common.locales[n];return t!==void 0&&(xp[n]=t),t}return xp[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 gS(n){return n.toLowerCase().replace(/_/g,"-")}var Rs="en-US";var _S=Rs;function cb(n){typeof n=="string"&&(_S=n.toLowerCase().replace(/_/g,"-"))}function D(n,t,e){let i=ne(),r=Ue(),o=Je();return vS(r,i,i[ke],o,n,t,e),D}function B(n,t,e){let i=ne(),r=Ue(),o=Je();return(o.type&3||e)&&Fv(o,r,i,e,i[ke],n,t,Vl(o,i,t)),B}function vS(n,t,e,i,r,o,s){let a=!0,l=null;if((i.type&3||s)&&(l??=Vl(i,t,o),Fv(i,n,t,s,e,r,o,l)&&(a=!1)),a){let d=i.outputs?.[r],m=i.hostDirectiveOutputs?.[r];if(m&&m.length)for(let y=0;y<m.length;y+=2){let w=m[y],E=m[y+1];l??=Vl(i,t,o),K0(i,t,w,E,r,l)}if(d&&d.length)for(let y of d)l??=Vl(i,t,o),K0(i,t,y,r,r,l)}}function u(n=1){return w0(n)}function bS(n,t){let e=null,i=P1(n);for(let r=0;r<t.length;r++){let o=t[r];if(o==="*"){e=r;continue}if(i===null?K_(n,o,!0):N1(i,o))return r}return e}function Zf(n){let t=ne()[St][Et];if(!t.projection){let e=n?n.length:1,i=t.projection=Yg(e,null),r=i.slice(),o=t.child;for(;o!==null;){if(o.type!==128){let s=n?bS(o,n):0;s!==null&&(r[s]?r[s].projectionNext=o:i[s]=o,r[s]=o)}o=o.next}}}function Yf(n,t=0,e,i,r,o){let s=ne(),a=Ue(),l=i?n+1:null;l!==null&&ys(s,a,l,i,r,o,null,e);let d=lo(a,Ne+n,16,null,e||null);d.projection===null&&(d.projection=t),ap();let y=!s[Gi]||np();s[St][Et].projection[d.projection]===null&&l!==null?yS(s,a,l):y&&!ac(d)&&uE(a,s,d)}function yS(n,t,e){let i=Ne+e,r=t.data[i],o=n[i],s=Kl(o,r.tView.ssrId),a=Ts(n,r,void 0,{dehydratedView:s});Ms(o,a,0,ro(r,s))}function Qf(n,t,e){Uv(n,t,e)}function Kf(n){let t=ne(),e=Ue(),i=El();ss(i+1);let r=Hf(e,i);if(n.dirty&&s0(t)===((r.metadata.flags&2)===2)){if(r.matches===null)n.reset([]);else{let o=zv(t,i);n.reset(o,S_),n.notifyOnChanges()}return!0}return!1}function Xf(){return $f(ne(),El())}function jt(n,t,e,i){AD(n,Uv(t,e,i))}function vn(n=1){ss(El()+n)}function gi(n){let t=h0();return bl(t,Ne+n)}function Rl(n,t){return n<<17|t<<2}function or(n){return n>>17&32767}function CS(n){return(n&2)==2}function xS(n,t){return n&131071|t<<17}function nf(n){return n|2}function so(n){return(n&131068)>>2}function wp(n,t){return n&-131069|t<<2}function wS(n){return(n&1)===1}function rf(n){return n|1}function ES(n,t,e,i,r,o){let s=o?t.classBindings:t.styleBindings,a=or(s),l=so(s);n[i]=e;let d=!1,m;if(Array.isArray(e)){let y=e;m=y[1],(m===null||Ur(y,m)>0)&&(d=!0)}else m=e;if(r)if(l!==0){let w=or(n[a+1]);n[i+1]=Rl(w,a),w!==0&&(n[w+1]=wp(n[w+1],i)),n[a+1]=xS(n[a+1],i)}else n[i+1]=Rl(a,0),a!==0&&(n[a+1]=wp(n[a+1],i)),a=i;else n[i+1]=Rl(l,0),a===0?a=i:n[l+1]=wp(n[l+1],i),l=i;d&&(n[i+1]=nf(n[i+1])),l_(n,m,i,!0),l_(n,m,i,!1),DS(t,m,n,i,o),s=Rl(a,l),o?t.classBindings=s:t.styleBindings=s}function DS(n,t,e,i,r){let o=r?n.residualClasses:n.residualStyles;o!=null&&typeof t=="string"&&Ur(o,t)>=0&&(e[i+1]=rf(e[i+1]))}function l_(n,t,e,i){let r=n[e+1],o=t===null,s=i?or(r):so(r),a=!1;for(;s!==0&&(a===!1||o);){let l=n[s],d=n[s+1];SS(l,t)&&(a=!0,n[s+1]=i?rf(d):nf(d)),s=i?or(d):so(d)}a&&(n[e+1]=i?nf(r):rf(r))}function SS(n,t){return n===null||t==null||(Array.isArray(n)?n[1]:n)===t?!0:Array.isArray(n)&&typeof t=="string"?Ur(n,t)>=0:!1}var hn={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function TS(n){return n.substring(hn.key,hn.keyEnd)}function MS(n){return kS(n),db(n,ub(n,0,hn.textEnd))}function db(n,t){let e=hn.textEnd;return e===t?-1:(t=hn.keyEnd=IS(n,hn.key=t,e),ub(n,t,e))}function kS(n){hn.key=0,hn.keyEnd=0,hn.value=0,hn.valueEnd=0,hn.textEnd=n.length}function ub(n,t,e){for(;t<e&&n.charCodeAt(t)<=32;)t++;return t}function IS(n,t,e){for(;t<e&&n.charCodeAt(t)>32;)t++;return t}function ie(n,t,e){return pb(n,t,e,!1),ie}function me(n,t){return pb(n,t,null,!0),me}function ft(n){OS(VS,PS,n,!0)}function PS(n,t){for(let e=MS(t);e>=0;e=db(t,e))gl(n,TS(t),!0)}function pb(n,t,e,i){let r=ne(),o=Ue(),s=os(2);if(o.firstUpdatePass&&hb(o,n,s,i),t!==pt&&Jt(r,s,t)){let a=o.data[Xt()];mb(o,a,r,r[ke],n,r[s+1]=jS(t,e),i,s)}}function OS(n,t,e,i){let r=Ue(),o=os(2);r.firstUpdatePass&&hb(r,null,o,i);let s=ne();if(e!==pt&&Jt(s,o,e)){let a=r.data[Xt()];if(gb(a,i)&&!fb(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;l!==null&&(e=ul(l,e||"")),tf(r,a,s,e,i)}else BS(r,a,s,s[ke],s[o+1],s[o+1]=FS(n,t,e),i,o)}}function fb(n,t){return t>=n.expandoStartIndex}function hb(n,t,e,i){let r=n.data;if(r[e+1]===null){let o=r[Xt()],s=fb(n,e);gb(o,i)&&t===null&&!s&&(t=!1),t=RS(r,o,t,i),ES(r,o,t,e,s,i)}}function RS(n,t,e,i){let r=b0(n),o=i?t.residualClasses:t.residualStyles;if(r===null)(i?t.classBindings:t.styleBindings)===0&&(e=Ep(null,n,t,e,i),e=Cs(e,t.attrs,i),o=null);else{let s=t.directiveStylingLast;if(s===-1||n[s]!==r)if(e=Ep(r,n,t,e,i),o===null){let l=NS(n,t,i);l!==void 0&&Array.isArray(l)&&(l=Ep(null,n,t,l[1],i),l=Cs(l,t.attrs,i),AS(n,t,i,l))}else o=LS(n,t,i)}return o!==void 0&&(i?t.residualClasses=o:t.residualStyles=o),e}function NS(n,t,e){let i=e?t.classBindings:t.styleBindings;if(so(i)!==0)return n[or(i)]}function AS(n,t,e,i){let r=e?t.classBindings:t.styleBindings;n[or(r)]=i}function LS(n,t,e){let i,r=t.directiveEnd;for(let o=1+t.directiveStylingLast;o<r;o++){let s=n[o].hostAttrs;i=Cs(i,s,e)}return Cs(i,t.attrs,e)}function Ep(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=Cs(i,o.hostAttrs,r),o!==n);)a++;return n!==null&&(e.directiveStylingLast=a),i}function Cs(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]),gl(n,s,e?!0:t[++o]))}return n===void 0?null:n}function FS(n,t,e){if(e==null||e==="")return Wt;let i=[],r=Es(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 VS(n,t,e){let i=String(t);i!==""&&!i.includes(" ")&&gl(n,i,e)}function BS(n,t,e,i,r,o,s,a){r===pt&&(r=Wt);let l=0,d=0,m=0<r.length?r[0]:null,y=0<o.length?o[0]:null;for(;m!==null||y!==null;){let w=l<r.length?r[l+1]:void 0,E=d<o.length?o[d+1]:void 0,R=null,j;m===y?(l+=2,d+=2,w!==E&&(R=y,j=E)):y===null||m!==null&&m<y?(l+=2,R=m):(d+=2,R=y,j=E),R!==null&&mb(n,t,e,i,R,j,s,a),m=l<r.length?r[l]:null,y=d<o.length?o[d]:null}}function mb(n,t,e,i,r,o,s,a){if(!(t.type&3))return;let l=n.data,d=l[a+1],m=wS(d)?c_(l,t,e,r,so(d),s):void 0;if(!nc(m)){nc(o)||CS(d)&&(o=c_(l,null,e,r,a,s));let y=Zu(Xt(),e);fE(i,s,y,r,o)}}function c_(n,t,e,i,r,o){let s=t===null,a;for(;r>0;){let l=n[r],d=Array.isArray(l),m=d?l[1]:l,y=m===null,w=e[r+1];w===pt&&(w=y?Wt:void 0);let E=y?_l(w,i):m===i?w:void 0;if(d&&!nc(E)&&(E=_l(l,i)),nc(E)&&(a=E,s))return a;let R=n[r+1];r=s?or(R):so(R)}if(t!==null){let l=o?t.residualClasses:t.residualStyles;l!=null&&(a=_l(l,i))}return a}function nc(n){return n!==void 0}function jS(n,t){return n==null||n===""||(typeof t=="string"?n=n+t:typeof n=="object"&&(n=ni(Es(n)))),n}function gb(n,t){return(n.flags&(t?8:16))!==0}function p(n,t=""){let e=ne(),i=Ue(),r=n+Ne,o=i.firstCreatePass?lo(i,r,1,t,null):i.data[r],s=$S(i,e,o,t,n);e[r]=s,Tl()&&Mf(i,e,s,o),Yr(o,!1)}var $S=(n,t,e,i,r)=>(ls(!0),v1(t[ke],i));function HS(n,t,e,i=""){return Jt(n,Ki(),e)?t+cn(e)+i:pt}function US(n,t,e,i,r,o=""){let s=cp(),a=jf(n,s,e,r);return os(2),a?t+cn(e)+i+cn(r)+o:pt}function zS(n,t,e,i,r,o,s,a=""){let l=cp(),d=cD(n,l,e,r,s);return os(3),d?t+cn(e)+i+cn(r)+o+cn(s)+a:pt}function O(n){return G("",n),O}function G(n,t,e){let i=ne(),r=HS(i,n,t,e);return r!==pt&&Jf(i,Xt(),r),G}function uo(n,t,e,i,r){let o=ne(),s=US(o,n,t,e,i,r);return s!==pt&&Jf(o,Xt(),s),uo}function Ec(n,t,e,i,r,o,s){let a=ne(),l=zS(a,n,t,e,i,r,o,s);return l!==pt&&Jf(a,Xt(),l),Ec}function Jf(n,t,e){let i=Zu(t,n);b1(n[ke],i,e)}function GS(n,t,e){let i=Ue();if(i.firstCreatePass){let r=In(n);of(e,i.data,i.blueprint,r,!0),of(t,i.data,i.blueprint,r,!1)}}function of(n,t,e,i,r){if(n=mt(n),Array.isArray(n))for(let o=0;o<n.length;o++)of(n[o],t,e,i,r);else{let o=Ue(),s=ne(),a=Je(),l=Bi(n)?n:mt(n.provide),d=Hu(n),m=a.providerIndexes&1048575,y=a.directiveStart,w=a.providerIndexes>>20;if(Bi(n)||!n.multi){let E=new rr(d,r,_n,null),R=Sp(l,t,r?m:m+w,y);R===-1?(Mp(Ul(a,s),o,l),Dp(o,n,t.length),t.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),e.push(E),s.push(E)):(e[R]=E,s[R]=E)}else{let E=Sp(l,t,m+w,y),R=Sp(l,t,m,m+w),j=E>=0&&e[E],Z=R>=0&&e[R];if(r&&!Z||!r&&!j){Mp(Ul(a,s),o,l);let $=ZS(r?qS:WS,e.length,r,i,d,n);!r&&Z&&(e[R].providerFactory=$),Dp(o,n,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),e.push($),s.push($)}else{let $=_b(e[r?R:E],d,!r&&i);Dp(o,n,E>-1?E:R,$)}!r&&i&&Z&&e[R].componentProviders++}}}function Dp(n,t,e,i){let r=Bi(t),o=t0(t);if(r||o){let l=(o?mt(t.useClass):t).prototype.ngOnDestroy;if(l){let d=n.destroyHooks||(n.destroyHooks=[]);if(!r&&t.multi){let m=d.indexOf(e);m===-1?d.push(e,[i,l]):d[m+1].push(i,l)}else d.push(e,l)}}}function _b(n,t,e){return e&&n.componentProviders++,n.multi.push(t)-1}function Sp(n,t,e,i){for(let r=e;r<i;r++)if(t[r]===n)return r;return-1}function WS(n,t,e,i,r){return sf(this.multi,[])}function qS(n,t,e,i,r){let o=this.multi,s;if(this.providerFactory){let a=this.providerFactory.componentProviders,l=fs(i,i[ee],this.providerFactory.index,r);s=l.slice(0,a),sf(o,s);for(let d=a;d<l.length;d++)s.push(l[d])}else s=[],sf(o,s);return s}function sf(n,t){for(let e=0;e<n.length;e++){let i=n[e];t.push(i())}return t}function ZS(n,t,e,i,r,o){let s=new rr(n,e,_n,null);return s.multi=[],s.index=t,s.componentProviders=0,_b(s,r,i&&!e),s}function Ns(n,t=[]){return e=>{e.providersResolver=(i,r)=>GS(i,r?r(n):n,t)}}function As(n,t,e){let i=rs()+n,r=ne();return r[i]===pt?Bf(r,i,e?t.call(e):t()):lD(r,i)}function _i(n,t,e,i){return bb(ne(),rs(),n,t,e,i)}function vb(n,t){let e=n[t];return e===pt?void 0:e}function bb(n,t,e,i,r,o){let s=t+e;return Jt(n,s,r)?Bf(n,s+1,o?i.call(o,r):i(r)):vb(n,s+1)}function YS(n,t,e,i,r,o,s){let a=t+e;return jf(n,a,r,o)?Bf(n,a+2,s?i.call(s,r,o):i(r,o)):vb(n,a+2)}function vi(n,t){let e=Ue(),i,r=n+Ne;e.firstCreatePass?(i=QS(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=Vi(i.type,!0)),s,a=xt(_n);try{let l=Hl(!1),d=o();return Hl(l),Yu(e,ne(),r,d),d}finally{xt(a)}}function QS(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+Ne,r=ne(),o=bl(r,i);return yb(r,i)?bb(r,rs(),t,o.transform,e,o):o.transform(e)}function po(n,t,e,i){let r=n+Ne,o=ne(),s=bl(o,r);return yb(o,r)?YS(o,rs(),t,s.transform,e,i,s):s.transform(e,i)}function yb(n,t){return n[ee].data[t].pure}function Dc(n,t){return _c(n,t)}var KS=(()=>{class n{zone=I(Te);changeDetectionScheduler=I(qt);applicationRef=I(lr);applicationErrorHandler=I(pn);_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=se({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Cb=new te("",{factory:()=>!1});function th({ngZoneFactory:n,ignoreChangesOutsideZone:t,scheduleInRootZone:e}){return n??=()=>new Te(le(W({},ih()),{scheduleInRootZone:e})),[{provide:Te,useFactory:n},{provide:Ui,multi:!0,useFactory:()=>{let i=I(KS,{optional:!0});return()=>i.initialize()}},{provide:Ui,multi:!0,useFactory:()=>{let i=I(XS);return()=>{i.initialize()}}},t===!0?{provide:hp,useValue:!0}:[],{provide:mp,useValue:e??rv},{provide:pn,useFactory:()=>{let i=I(Te),r=I(Pt),o;return s=>{i.runOutsideAngular(()=>{r.destroyed&&!o?setTimeout(()=>{throw s}):(o??=r.get(Lt),o.handleError(s))})}}}]}function nh(n){let t=n?.ignoreChangesOutsideZone,e=n?.scheduleInRootZone,i=th({ngZoneFactory:()=>{let r=ih(n);return r.scheduleInRootZone=e,r.shouldCoalesceEventChangeDetection&&Nn("NgZone_CoalesceEvent"),new Te(r)},ignoreChangesOutsideZone:t,scheduleInRootZone:e});return Ko([{provide:Cb,useValue:!0},{provide:cs,useValue:!1},i])}function ih(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:n?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:n?.runCoalescing??!1}}var XS=(()=>{class n{subscription=new Ve;initialized=!1;zone=I(Te);pendingTasks=I(ci);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(()=>{Te.assertNotInAngularZone(),queueMicrotask(()=>{e!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(e),e=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Te.assertInAngularZone(),e??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=se({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var xb=(()=>{class n{applicationErrorHandler=I(pn);appRef=I(lr);taskService=I(ci);ngZone=I(Te);zonelessEnabled=I(cs);tracing=I(fi,{optional:!0});disableScheduling=I(hp,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Ve;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Zl):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(I(mp,{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 Yl||!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?$0:ov;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(Zl+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,$0(()=>{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=se({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function JS(){return typeof $localize<"u"&&$localize.locale||Rs}var Ls=new te("",{providedIn:"root",factory:()=>I(Ls,{optional:!0,skipSelf:!0})||JS()});var Sc=class{destroyed=!1;listeners=null;errorHandler=I(Lt,{optional:!0});destroyRef=I(et);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(t){if(this.destroyed)throw new Y(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($i(953,!1));return}if(this.listeners===null)return;let e=re(null);try{for(let i of this.listeners)try{i(t)}catch(r){this.errorHandler?.handleError(r)}}finally{re(e)}}};function tt(n){return Lg(n)}function L(n,t){return Ro(n,t?.equal)}var rh=class{[rt];constructor(t){this[rt]=t}destroy(){this[rt].destroy()}};function Ce(n,t){let e=t?.injector??I(wt),i=t?.manualCleanup!==!0?e.get(et):null,r,o=e.get(Xi,null,{optional:!0}),s=e.get(qt);return o!==null?(r=nT(o.view,s,n),i instanceof Yo&&i._lView===o.view&&(i=null)):r=iT(n,e.get(ds),s),r.injector=e,i!==null&&(r.onDestroyFn=i.onDestroy(()=>r.destroy())),new rh(r)}var wb=le(W({},Fg),{cleanupFns:void 0,zone:null,onDestroyFn:Ji,run(){let n=Qr(!1);try{Vg(this)}finally{Qr(n)}},cleanup(){if(!this.cleanupFns?.length)return;let n=re(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],re(n)}}}),eT=le(W({},wb),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){Kn(this),this.onDestroyFn(),this.cleanup(),this.scheduler.remove(this)}}),tT=le(W({},wb),{consumerMarkedDirty(){this.view[oe]|=8192,ai(this.view),this.notifier.notify(13)},destroy(){Kn(this),this.onDestroyFn(),this.cleanup(),this.view[Bn]?.delete(this)}});function nT(n,t,e){let i=Object.create(tT);return i.view=n,i.zone=typeof Zone<"u"?Zone.current:null,i.notifier=t,i.fn=Eb(i,e),n[Bn]??=new Set,n[Bn].add(i),i.consumerMarkedDirty(i),i}function iT(n,t,e){let i=Object.create(eT);return i.fn=Eb(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 Eb(n,t){return()=>{t(e=>(n.cleanupFns??=[]).push(e))}}var kb=Symbol("InputSignalNode#UNSET"),_T=le(W({},No),{transformFn:void 0,applyValueToInputSignal(n,t){Ir(n,t)}});function Ib(n,t){let e=Object.create(_T);e.value=n,e.transformFn=t?.transform;function i(){if(Ti(e),e.value===kb){let r=null;throw new Y(-950,r)}return e.value}return i[rt]=e,i}var vT=new te("");vT.__NG_ELEMENT_ID__=n=>{let t=Je();if(t===null)throw new Y(204,!1);if(t.type&2)return t.value;if(n&8)return null;throw new Y(204,!1)};function H(n){return new Sc}function Db(n,t){return Ib(n,t)}function bT(n){return Ib(kb,n)}var N=(Db.required=bT,Db);function Sb(n,t){return Wv(t)}function yT(n,t){return qv(t)}var en=(Sb.required=yT,Sb);var sh=new te(""),CT=new te("");function Fs(n){return!n.moduleRef}function xT(n){let t=Fs(n)?n.r3Injector:n.moduleRef.injector,e=t.get(Te);return e.run(()=>{Fs(n)?n.r3Injector.resolveInjectorInitializers():n.moduleRef.resolveInjectorInitializers();let i=t.get(pn),r;if(e.runOutsideAngular(()=>{r=e.onError.subscribe({next:i})}),Fs(n)){let o=()=>t.destroy(),s=n.platformInjector.get(sh);s.add(o),t.onDestroy(()=>{r.unsubscribe(),s.delete(o)})}else{let o=()=>n.moduleRef.destroy(),s=n.platformInjector.get(sh);s.add(o),n.moduleRef.onDestroy(()=>{ps(n.allPlatformModules,n.moduleRef),r.unsubscribe(),s.delete(o)})}return ET(i,e,()=>{let o=t.get(ci),s=o.add(),a=t.get(zf);return a.runInitializers(),a.donePromise.then(()=>{let l=t.get(Ls,Rs);if(cb(l||Rs),!t.get(CT,!0))return Fs(n)?t.get(lr):(n.allPlatformModules.push(n.moduleRef),n.moduleRef);if(Fs(n)){let m=t.get(lr);return n.rootComponent!==void 0&&m.bootstrap(n.rootComponent),m}else return wT?.(n.moduleRef,n.allPlatformModules),n.moduleRef}).finally(()=>{o.remove(s)})})})}var wT;function ET(n,t,e){try{let i=e();return Is(i)?i.catch(r=>{throw t.runOutsideAngular(()=>n(r)),r}):i}catch(i){throw t.runOutsideAngular(()=>n(i)),i}}var Tc=null;function DT(n=[],t){return wt.create({name:t,providers:[{provide:Xo,useValue:"platform"},{provide:sh,useValue:new Set([()=>Tc=null])},...n]})}function ST(n=[]){if(Tc)return Tc;let t=DT(n);return Tc=t,eb(),TT(t),t}function TT(n){let t=n.get(oc,null);zr(n,()=>{t?.forEach(e=>e())})}var Ic=(()=>{class n{static __NG_ELEMENT_ID__=MT}return n})();function MT(n){return kT(Je(),ne(),(n&16)===16)}function kT(n,t,e){if(si(n)&&!e){let i=Qt(n.index,t);return new ui(i,i)}else if(n.type&175){let i=t[St];return new ui(i,t)}return null}var ah=class{constructor(){}supports(t){return Vf(t)}create(t){return new lh(t)}},IT=(n,t)=>t,lh=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||IT}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<Tb(i,r,o)?e:i,a=Tb(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 d=a-r,m=l-r;if(d!=m){for(let w=0;w<d;w++){let E=w<o.length?o[w]:o[w]=0,R=E+w;m<=R&&R<d&&(o[w]=E+1)}let y=s.previousIndex;o[y]=m-d}}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=[]),!Vf(t))throw new Y(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,Av(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 ch(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 Mc),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 Mc),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}},ch=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}},dh=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}},Mc=class{map=new Map;put(t){let e=t.trackById,i=this.map.get(e);i||(i=new dh,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 Tb(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 Mb(){return new Pc([new ah])}var Pc=(()=>{class n{factories;static \u0275prov=se({token:n,providedIn:"root",factory:Mb});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=I(n,{optional:!0,skipSelf:!0});return n.create(e,i||Mb())}}}find(e){let i=this.factories.find(r=>r.supports(e));if(i!=null)return i;throw new Y(901,!1)}}return n})();function Pb(n){let{rootComponent:t,appProviders:e,platformProviders:i,platformRef:r}=n;Se(8);try{let o=r?.injector??ST(i),s=[th({}),{provide:qt,useExisting:xb},S0,...e||[]],a=new bs({providers:s,parent:o,debugName:"",runEnvironmentInitializers:!1});return xT({r3Injector:a.injector,platformInjector:o,rootComponent:t})}catch(o){return Promise.reject(o)}finally{Se(9)}}function Ob(n){return typeof n=="boolean"?n:n!=null&&n!=="false"}var oh=Symbol("NOT_SET"),Rb=new Set,PT=le(W({},No),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:oh,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!==oh&&!ki(this))return this.signal;try{for(let r of this.cleanup??Rb)r()}finally{this.cleanup?.clear()}let t=[];n!==void 0&&t.push(n),t.push(this.registerCleanupFn);let e=Qn(this),i;try{i=this.userFn.apply(null,t)}finally{Mi(this,e)}return(this.value===oh||!this.equal(this.value,i))&&(this.value=i,this.version++),this.signal}}),uh=class extends hs{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(et),s),this.scheduler=r;for(let a of Df){let l=e[a];if(l===void 0)continue;let d=Object.create(PT);d.sequence=this,d.phase=a,d.userFn=l,d.dirty=!0,d.signal=()=>(Ti(d),d.value),d.signal[rt]=d,d.registerCleanupFn=m=>(d.cleanup??=new Set).add(m),this.nodes[a]=d,this.hooks[a]=m=>d.phaseFn(m)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){super.destroy();for(let t of this.nodes)if(t)try{for(let e of t.cleanup??Rb)e()}finally{Kn(t)}}};function ph(n,t){let e=t?.injector??I(wt),i=e.get(qt),r=e.get(uc),o=e.get(fi,null,{optional:!0});r.impl??=e.get(Sf);let s=n;typeof s=="function"&&(s={mixedReadWrite:n});let a=e.get(Xi,null,{optional:!0}),l=new uh(r.impl,[s.earlyRead,s.write,s.mixedReadWrite,s.read],a?.view,i,e,o?.snapshot(null));return r.impl.register(l),l}var Nb=null;function Bs(){return Nb}function fh(n){Nb??=n}var Vs=class{};var gt=(function(n){return n[n.Format=0]="Format",n[n.Standalone=1]="Standalone",n})(gt||{}),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||{}),Nt=(function(n){return n[n.Short=0]="Short",n[n.Medium=1]="Medium",n[n.Long=2]="Long",n[n.Full=3]="Full",n})(Nt||{}),zn={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 Lb(n){return Bt(n)[qe.LocaleId]}function Fb(n,t,e){let i=Bt(n),r=[i[qe.DayPeriodsFormat],i[qe.DayPeriodsStandalone]],o=tn(r,t);return tn(o,e)}function Vb(n,t,e){let i=Bt(n),r=[i[qe.DaysFormat],i[qe.DaysStandalone]],o=tn(r,t);return tn(o,e)}function Bb(n,t,e){let i=Bt(n),r=[i[qe.MonthsFormat],i[qe.MonthsStandalone]],o=tn(r,t);return tn(o,e)}function jb(n,t){let i=Bt(n)[qe.Eras];return tn(i,t)}function js(n,t){let e=Bt(n);return tn(e[qe.DateFormat],t)}function $s(n,t){let e=Bt(n);return tn(e[qe.TimeFormat],t)}function Hs(n,t){let i=Bt(n)[qe.DateTimeFormat];return tn(i,t)}function Us(n,t){let e=Bt(n),i=e[qe.NumberSymbols][t];if(typeof i>"u"){if(t===zn.CurrencyDecimal)return e[qe.NumberSymbols][zn.Decimal];if(t===zn.CurrencyGroup)return e[qe.NumberSymbols][zn.Group]}return i}function $b(n){if(!n[qe.ExtraData])throw new Y(2303,!1)}function Hb(n){let t=Bt(n);return $b(t),(t[qe.ExtraData][2]||[]).map(i=>typeof i=="string"?hh(i):[hh(i[0]),hh(i[1])])}function Ub(n,t,e){let i=Bt(n);$b(i);let r=[i[qe.ExtraData][0],i[qe.ExtraData][1]],o=tn(r,t)||[];return tn(o,e)||[]}function tn(n,t){for(let e=t;e>-1;e--)if(typeof n[e]<"u")return n[e];throw new Y(2304,!1)}function hh(n){let[t,e]=n.split(":");return{hours:+t,minutes:+e}}var OT=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Oc={},RT=/((?:[^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]*)/,NT=256;function zb(n,t,e,i){let r=zT(n);AT(t),t=Un(e,t)||t;let s=[],a;for(;t;)if(a=RT.exec(t),a){s=s.concat(a.slice(1));let m=s.pop();if(!m)break;t=m}else{s.push(t);break}let l=r.getTimezoneOffset();i&&(l=Wb(i,l),r=UT(r,i));let d="";return s.forEach(m=>{let y=$T(m);d+=y?y(r,e,l):m==="''"?"'":m.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),d}function AT(n){if(n.length>NT)throw new Y(2300,!1)}function Fc(n,t,e){let i=new Date(0);return i.setFullYear(n,t,e),i.setHours(0,0,0),i}function Un(n,t){let e=Lb(n);if(Oc[e]??={},Oc[e][t])return Oc[e][t];let i="";switch(t){case"shortDate":i=js(n,Nt.Short);break;case"mediumDate":i=js(n,Nt.Medium);break;case"longDate":i=js(n,Nt.Long);break;case"fullDate":i=js(n,Nt.Full);break;case"shortTime":i=$s(n,Nt.Short);break;case"mediumTime":i=$s(n,Nt.Medium);break;case"longTime":i=$s(n,Nt.Long);break;case"fullTime":i=$s(n,Nt.Full);break;case"short":let r=Un(n,"shortTime"),o=Un(n,"shortDate");i=Rc(Hs(n,Nt.Short),[r,o]);break;case"medium":let s=Un(n,"mediumTime"),a=Un(n,"mediumDate");i=Rc(Hs(n,Nt.Medium),[s,a]);break;case"long":let l=Un(n,"longTime"),d=Un(n,"longDate");i=Rc(Hs(n,Nt.Long),[l,d]);break;case"full":let m=Un(n,"fullTime"),y=Un(n,"fullDate");i=Rc(Hs(n,Nt.Full),[m,y]);break}return i&&(Oc[e][t]=i),i}function Rc(n,t){return t&&(n=n.replace(/\{([^}]+)}/g,function(e,i){return t!=null&&i in t?t[i]:e})),n}function bn(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 LT(n,t){return bn(n,3).substring(0,t)}function Qe(n,t,e=0,i=!1,r=!1){return function(o,s){let a=FT(n,o);if((e>0||a>-e)&&(a+=e),n===3)a===0&&e===-12&&(a=12);else if(n===6)return LT(a,t);let l=Us(s,zn.MinusSign);return bn(a,t,l,i,r)}}function FT(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 Y(2301,!1)}}function Oe(n,t,e=gt.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 Bb(t,r,i)[n.getMonth()];case 1:return Vb(t,r,i)[n.getDay()];case 0:let s=n.getHours(),a=n.getMinutes();if(o){let d=Hb(t),m=Ub(t,r,i),y=d.findIndex(w=>{if(Array.isArray(w)){let[E,R]=w,j=s>=E.hours&&a>=E.minutes,Z=s<R.hours||s===R.hours&&a<R.minutes;if(E.hours<R.hours){if(j&&Z)return!0}else if(j||Z)return!0}else if(w.hours===s&&w.minutes===a)return!0;return!1});if(y!==-1)return m[y]}return Fb(t,r,i)[s<12?0:1];case 3:return jb(t,i)[n.getFullYear()<=0?0:1];default:let l=e;throw new Y(2302,!1)}}function Nc(n){return function(t,e,i){let r=-1*i,o=Us(e,zn.MinusSign),s=r>0?Math.floor(r/60):Math.ceil(r/60);switch(n){case 0:return(r>=0?"+":"")+bn(s,2,o)+bn(Math.abs(r%60),2,o);case 1:return"GMT"+(r>=0?"+":"")+bn(s,1,o);case 2:return"GMT"+(r>=0?"+":"")+bn(s,2,o)+":"+bn(Math.abs(r%60),2,o);case 3:return i===0?"Z":(r>=0?"+":"")+bn(s,2,o)+":"+bn(Math.abs(r%60),2,o);default:throw new Y(2310,!1)}}}var BT=0,Lc=4;function jT(n){let t=Fc(n,BT,1).getDay();return Fc(n,0,1+(t<=Lc?Lc:Lc+7)-t)}function Gb(n){let t=n.getDay(),e=t===0?-3:Lc-t;return Fc(n.getFullYear(),n.getMonth(),n.getDate()+e)}function mh(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=Gb(e),s=jT(o.getFullYear()),a=o.getTime()-s.getTime();r=1+Math.round(a/6048e5)}return bn(r,n,Us(i,zn.MinusSign))}}function Ac(n,t=!1){return function(e,i){let o=Gb(e).getFullYear();return bn(o,n,Us(i,zn.MinusSign),t)}}var gh={};function $T(n){if(gh[n])return gh[n];let t;switch(n){case"G":case"GG":case"GGG":t=Oe(3,Ie.Abbreviated);break;case"GGGG":t=Oe(3,Ie.Wide);break;case"GGGGG":t=Oe(3,Ie.Narrow);break;case"y":t=Qe(0,1,0,!1,!0);break;case"yy":t=Qe(0,2,0,!0,!0);break;case"yyy":t=Qe(0,3,0,!1,!0);break;case"yyyy":t=Qe(0,4,0,!1,!0);break;case"Y":t=Ac(1);break;case"YY":t=Ac(2,!0);break;case"YYY":t=Ac(3);break;case"YYYY":t=Ac(4);break;case"M":case"L":t=Qe(1,1,1);break;case"MM":case"LL":t=Qe(1,2,1);break;case"MMM":t=Oe(2,Ie.Abbreviated);break;case"MMMM":t=Oe(2,Ie.Wide);break;case"MMMMM":t=Oe(2,Ie.Narrow);break;case"LLL":t=Oe(2,Ie.Abbreviated,gt.Standalone);break;case"LLLL":t=Oe(2,Ie.Wide,gt.Standalone);break;case"LLLLL":t=Oe(2,Ie.Narrow,gt.Standalone);break;case"w":t=mh(1);break;case"ww":t=mh(2);break;case"W":t=mh(1,!0);break;case"d":t=Qe(2,1);break;case"dd":t=Qe(2,2);break;case"c":case"cc":t=Qe(7,1);break;case"ccc":t=Oe(1,Ie.Abbreviated,gt.Standalone);break;case"cccc":t=Oe(1,Ie.Wide,gt.Standalone);break;case"ccccc":t=Oe(1,Ie.Narrow,gt.Standalone);break;case"cccccc":t=Oe(1,Ie.Short,gt.Standalone);break;case"E":case"EE":case"EEE":t=Oe(1,Ie.Abbreviated);break;case"EEEE":t=Oe(1,Ie.Wide);break;case"EEEEE":t=Oe(1,Ie.Narrow);break;case"EEEEEE":t=Oe(1,Ie.Short);break;case"a":case"aa":case"aaa":t=Oe(0,Ie.Abbreviated);break;case"aaaa":t=Oe(0,Ie.Wide);break;case"aaaaa":t=Oe(0,Ie.Narrow);break;case"b":case"bb":case"bbb":t=Oe(0,Ie.Abbreviated,gt.Standalone,!0);break;case"bbbb":t=Oe(0,Ie.Wide,gt.Standalone,!0);break;case"bbbbb":t=Oe(0,Ie.Narrow,gt.Standalone,!0);break;case"B":case"BB":case"BBB":t=Oe(0,Ie.Abbreviated,gt.Format,!0);break;case"BBBB":t=Oe(0,Ie.Wide,gt.Format,!0);break;case"BBBBB":t=Oe(0,Ie.Narrow,gt.Format,!0);break;case"h":t=Qe(3,1,-12);break;case"hh":t=Qe(3,2,-12);break;case"H":t=Qe(3,1);break;case"HH":t=Qe(3,2);break;case"m":t=Qe(4,1);break;case"mm":t=Qe(4,2);break;case"s":t=Qe(5,1);break;case"ss":t=Qe(5,2);break;case"S":t=Qe(6,1);break;case"SS":t=Qe(6,2);break;case"SSS":t=Qe(6,3);break;case"Z":case"ZZ":case"ZZZ":t=Nc(0);break;case"ZZZZZ":t=Nc(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":t=Nc(1);break;case"OOOO":case"ZZZZ":case"zzzz":t=Nc(2);break;default:return null}return gh[n]=t,t}function Wb(n,t){n=n.replace(/:/g,"");let e=Date.parse("Jan 01, 1970 00:00:00 "+n)/6e4;return isNaN(e)?t:e}function HT(n,t){return n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+t),n}function UT(n,t,e){let r=n.getTimezoneOffset(),o=Wb(t,r);return HT(n,-1*(o-r))}function zT(n){if(Ab(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 Fc(r,o-1,s)}let e=parseFloat(n);if(!isNaN(n-e))return new Date(e);let i;if(i=n.match(OT))return GT(i)}let t=new Date(n);if(!Ab(t))throw new Y(2311,!1);return t}function GT(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),d=Math.floor(parseFloat("0."+(n[7]||0))*1e3);return o.call(t,s,a,l,d),t}function Ab(n){return n instanceof Date&&!isNaN(n.valueOf())}var bh=(()=>{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)(_n(hi))};static \u0275dir=mi({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[ws]})}return n})();function qb(n,t){return new Y(2100,!1)}var _h=class{createSubscription(t,e,i){return tt(()=>t.subscribe({next:e,error:i}))}dispose(t){tt(()=>t.unsubscribe())}},vh=class{createSubscription(t,e,i){return t.then(r=>e?.(r),r=>i?.(r)),{unsubscribe:()=>{e=null,i=null}}}dispose(t){t.unsubscribe()}},WT=new vh,qT=new _h,yh=(()=>{class n{_ref;_latestValue=null;markForCheckOnValueUpdate=!0;_subscription=null;_obj=null;_strategy=null;applicationErrorHandler=I(pn);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(Is(e))return WT;if(xc(e))return qT;throw qb(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)(_n(Ic,16))};static \u0275pipe=Cc({name:"async",type:n,pure:!1})}return n})();var ZT="mediumDate",Zb=new te(""),Yb=new te(""),zs=(()=>{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??ZT,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return zb(e,s,o||this.locale,a)}catch(s){throw qb(n,s.message)}}static \u0275fac=function(i){return new(i||n)(_n(Ls,16),_n(Zb,24),_n(Yb,24))};static \u0275pipe=Cc({name:"date",type:n,pure:!0})}return n})();function Gs(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 dr=class{};var Ch="browser";function Qb(n){return n===Ch}var Ws=class{_doc;constructor(t){this._doc=t}manager},Vc=(()=>{class n extends Ws{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)(ge(ut))};static \u0275prov=se({token:n,factory:n.\u0275fac})}return n})(),jc=new te(""),Sh=(()=>{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 Vc));this._plugins=r.slice().reverse();let o=e.find(s=>s instanceof Vc);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 Y(5101,!1);return this._eventNameToPlugin.set(e,i),i}static \u0275fac=function(i){return new(i||n)(ge(jc),ge(Te))};static \u0275prov=se({token:n,factory:n.\u0275fac})}return n})(),xh="ng-app-id";function Kb(n){for(let t of n)t.remove()}function Xb(n,t){let e=t.createElement("style");return e.textContent=n,e}function KT(n,t,e,i){let r=n.head?.querySelectorAll(`style[${xh}="${t}"],link[${xh}="${t}"]`);if(r)for(let o of r)o.removeAttribute(xh),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 Eh(n,t){let e=t.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",n),e}var Th=(()=>{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,KT(e,i,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,i){for(let r of e)this.addUsage(r,this.inline,Xb);i?.forEach(r=>this.addUsage(r,this.external,Eh))}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&&(Kb(r.elements),i.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Kb(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[i,{elements:r}]of this.inline)r.push(this.addElement(e,Xb(i,this.doc)));for(let[i,{elements:r}]of this.external)r.push(this.addElement(e,Eh(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)(ge(ut),ge(rc),ge(sc,8),ge(sr))};static \u0275prov=se({token:n,factory:n.\u0275fac})}return n})(),wh={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"},Mh=/%COMP%/g;var ey="%COMP%",XT=`_nghost-${ey}`,JT=`_ngcontent-${ey}`,eM=!0,tM=new te("",{providedIn:"root",factory:()=>eM});function nM(n){return JT.replace(Mh,n)}function iM(n){return XT.replace(Mh,n)}function ty(n,t){return t.map(e=>e.replace(Mh,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,d=null){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestroy=o,this.doc=s,this.ngZone=a,this.nonce=l,this.tracingService=d,this.platformIsServer=!1,this.defaultRenderer=new qs(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 Bc?r.applyToHost(e):r instanceof Zs&&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,d=this.sharedStylesHost,m=this.removeStylesOnCompDestroy,y=this.platformIsServer,w=this.tracingService;switch(i.encapsulation){case $n.Emulated:o=new Bc(l,d,i,this.appId,m,s,a,y,w);break;case $n.ShadowDom:return new Dh(l,d,e,i,s,a,this.nonce,y,w);default:o=new Zs(l,d,i,m,s,a,y,w);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)(ge(Sh),ge(Th),ge(rc),ge(tM),ge(ut),ge(Te),ge(sc),ge(fi,8))};static \u0275prov=se({token:n,factory:n.\u0275fac})}return n})(),qs=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(wh[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(Jb(t)?t.content:t).appendChild(e)}insertBefore(t,e,i){t&&(Jb(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 Y(-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=wh[r];o?t.setAttributeNS(o,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){let r=wh[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&(On.DashCase|On.Important)?t.style.setProperty(e,i,r&On.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&On.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=Bs().getGlobalEventTarget(this.doc,t),!t))throw new Y(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 Jb(n){return n.tagName==="TEMPLATE"&&n.content!==void 0}var Dh=class extends qs{sharedStylesHost;hostEl;shadowRoot;constructor(t,e,i,r,o,s,a,l,d){super(t,o,s,l,d),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let m=r.styles;m=ty(r.id,m);for(let w of m){let E=document.createElement("style");a&&E.setAttribute("nonce",a),E.textContent=w,this.shadowRoot.appendChild(E)}let y=r.getExternalStyles?.();if(y)for(let w of y){let E=Eh(w,o);a&&E.setAttribute("nonce",a),this.shadowRoot.appendChild(E)}}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)}},Zs=class extends qs{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,e,i,r,o,s,a,l,d){super(t,o,s,a,l),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=r;let m=i.styles;this.styles=d?ty(d,m):m,this.styleUrls=i.getExternalStyles?.(d)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&di.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Bc=class extends Zs{contentAttr;hostAttr;constructor(t,e,i,r,o,s,a,l,d){let m=r+"-"+i.id;super(t,e,i,o,s,a,l,d,m),this.contentAttr=nM(m),this.hostAttr=iM(m)}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 $c=class n extends Vs{supportsDOMEvents=!0;static makeCurrent(){fh(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=rM();return e==null?null:oM(e)}resetBaseElement(){Ys=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return Gs(document.cookie,t)}},Ys=null;function rM(){return Ys=Ys||document.head.querySelector("base"),Ys?Ys.getAttribute("href"):null}function oM(n){return new URL(n,document.baseURI).pathname}var sM=(()=>{class n{build(){return new XMLHttpRequest}static \u0275fac=function(i){return new(i||n)};static \u0275prov=se({token:n,factory:n.\u0275fac})}return n})(),ny=["alt","control","meta","shift"],aM={"\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"},lM={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey},iy=(()=>{class n extends Ws{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(()=>Bs().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."),ny.forEach(d=>{let m=i.indexOf(d);m>-1&&(i.splice(m,1),s+=d+".")}),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=aM[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"),ny.forEach(s=>{if(s!==r){let a=lM[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)(ge(ut))};static \u0275prov=se({token:n,factory:n.\u0275fac})}return n})();function Ih(n,t,e){let i=W({rootComponent:n,platformRef:e?.platformRef},cM(t));return Pb(i)}function cM(n){return{appProviders:[...hM,...n?.providers??[]],platformProviders:fM}}function dM(){$c.makeCurrent()}function uM(){return new Lt}function pM(){return uf(document),document}var fM=[{provide:sr,useValue:Ch},{provide:oc,useValue:dM,multi:!0},{provide:ut,useFactory:pM}];var hM=[{provide:Xo,useValue:"root"},{provide:Lt,useFactory:uM},{provide:jc,useClass:Vc,multi:!0,deps:[ut]},{provide:jc,useClass:iy,multi:!0,deps:[ut]},kh,Th,Sh,{provide:Rn,useExisting:kh},{provide:dr,useClass:sM},[]];var pr=class{},Qs=class{},bi=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 Uc=class{encodeKey(t){return ry(t)}encodeValue(t){return ry(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function mM(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 gM=/%(\d[a-f0-9])/gi,_M={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function ry(n){return encodeURIComponent(n).replace(gM,(t,e)=>_M[e]??t)}function Hc(n){return`${n}`}var st=class n{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new Uc,t.fromString){if(t.fromObject)throw new Y(2805,!1);this.map=mM(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(Hc):[Hc(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(Hc(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(Hc(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 zc=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 vM(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function oy(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function sy(n){return typeof Blob<"u"&&n instanceof Blob}function ay(n){return typeof FormData<"u"&&n instanceof FormData}function bM(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}var ly="Content-Type",cy="Accept",dy="X-Request-URL",uy="text/plain",py="application/json",yM=`${py}, ${uy}, */*`,fo=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(vM(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 Y(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 bi,this.context??=new zc,!this.params)this.params=new st,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"||oy(this.body)||sy(this.body)||ay(this.body)||bM(this.body)?this.body:this.body instanceof st?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||ay(this.body)?null:sy(this.body)?this.body.type||null:oy(this.body)?null:typeof this.body=="string"?uy:this.body instanceof st?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?py: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,d=t.redirect||this.redirect,m=t.credentials||this.credentials,y=t.referrer??this.referrer,w=t.integrity||this.integrity,E=t.transferCache??this.transferCache,R=t.timeout??this.timeout,j=t.body!==void 0?t.body:this.body,Z=t.withCredentials??this.withCredentials,$=t.reportProgress??this.reportProgress,_e=t.headers||this.headers,Ut=t.params||this.params,Be=t.context??this.context;return t.setHeaders!==void 0&&(_e=Object.keys(t.setHeaders).reduce((dt,it)=>dt.set(it,t.setHeaders[it]),_e)),t.setParams&&(Ut=Object.keys(t.setParams).reduce((dt,it)=>dt.set(it,t.setParams[it]),Ut)),new n(e,i,j,{params:Ut,headers:_e,context:Be,reportProgress:$,responseType:r,withCredentials:Z,transferCache:E,keepalive:o,cache:a,priority:s,timeout:R,mode:l,redirect:d,credentials:m,referrer:y,integrity:w})}},ur=(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})(ur||{}),mo=class{headers;status;statusText;url;ok;type;redirected;constructor(t,e=200,i="OK"){this.headers=t.headers||new bi,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}},Gc=class n extends mo{constructor(t={}){super(t)}type=ur.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})}},Ks=class n extends mo{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=ur.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})}},ho=class extends mo{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}},CM=200,xM=204;function Ph(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 go=(()=>{class n{handler;constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof fo)o=e;else{let l;r.headers instanceof bi?l=r.headers:l=new bi(r.headers);let d;r.params&&(r.params instanceof st?d=r.params:d=new st({fromObject:r.params})),o=new fo(e,i,r.body!==void 0?r.body:null,{headers:l,context:r.context,params:d,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=we(o).pipe(fu(l=>this.handler.handle(l)));if(e instanceof fo||r.observe==="events")return s;let a=s.pipe(Uo(l=>l instanceof Ks));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(Ge(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new Y(2806,!1);return l.body}));case"blob":return a.pipe(Ge(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Y(2807,!1);return l.body}));case"text":return a.pipe(Ge(l=>{if(l.body!==null&&typeof l.body!="string")throw new Y(2808,!1);return l.body}));default:return a.pipe(Ge(l=>l.body))}case"response":return a;default:throw new Y(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 st().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,Ph(r,i))}post(e,i,r={}){return this.request("POST",e,Ph(r,i))}put(e,i,r={}){return this.request("PUT",e,Ph(r,i))}static \u0275fac=function(i){return new(i||n)(ge(pr))};static \u0275prov=se({token:n,factory:n.\u0275fac})}return n})();var wM=new te("");function EM(n,t){return t(n)}function DM(n,t,e){return(i,r)=>zr(e,()=>t(i,o=>n(o,r)))}var Rh=new te(""),fy=new te(""),hy=new te("",{providedIn:"root",factory:()=>!0});var Wc=(()=>{class n extends pr{backend;injector;chain=null;pendingTasks=I(Kr);contributeToStability=I(hy);constructor(e,i){super(),this.backend=e,this.injector=i}handle(e){if(this.chain===null){let i=this.injector.get(pr,null,{skipSelf:!0}),r=i!==null&&this.backend===i,o=this.injector.get(fy,[],r?{self:!0}:void 0),s=Array.from(new Set([...this.injector.get(Rh),...o]));this.chain=s.reduceRight((a,l)=>DM(a,l,this.injector),EM)}if(this.contributeToStability){let i=this.pendingTasks.add();return this.chain(e,r=>this.backend.handle(r)).pipe(ei(i))}else return this.chain(e,i=>this.backend.handle(i))}static \u0275fac=function(i){return new(i||n)(ge(Qs),ge(Pt))};static \u0275prov=se({token:n,factory:n.\u0275fac})}return n})();var SM=/^\)\]\}',?\n/,TM=RegExp(`^${dy}:`,"m");function MM(n){return"responseURL"in n&&n.responseURL?n.responseURL:TM.test(n.getAllResponseHeaders())?n.getResponseHeader(dy):null}var Oh=(()=>{class n{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new Y(-2800,!1);let i=this.xhrFactory;return we(null).pipe(yt(()=>new de(o=>{let s=i.build();if(s.open(e.method,e.urlWithParams),e.withCredentials&&(s.withCredentials=!0),e.headers.forEach((Z,$)=>s.setRequestHeader(Z,$.join(","))),e.headers.has(cy)||s.setRequestHeader(cy,yM),!e.headers.has(ly)){let Z=e.detectContentTypeHeader();Z!==null&&s.setRequestHeader(ly,Z)}if(e.timeout&&(s.timeout=e.timeout),e.responseType){let Z=e.responseType.toLowerCase();s.responseType=Z!=="json"?Z:"text"}let a=e.serializeBody(),l=null,d=()=>{if(l!==null)return l;let Z=s.statusText||"OK",$=new bi(s.getAllResponseHeaders()),_e=MM(s)||e.url;return l=new Gc({headers:$,status:s.status,statusText:Z,url:_e}),l},m=()=>{let{headers:Z,status:$,statusText:_e,url:Ut}=d(),Be=null;$!==xM&&(Be=typeof s.response>"u"?s.responseText:s.response),$===0&&($=Be?CM:0);let dt=$>=200&&$<300;if(e.responseType==="json"&&typeof Be=="string"){let it=Be;Be=Be.replace(SM,"");try{Be=Be!==""?JSON.parse(Be):null}catch(zt){Be=it,dt&&(dt=!1,Be={error:zt,text:Be})}}dt?(o.next(new Ks({body:Be,headers:Z,status:$,statusText:_e,url:Ut||void 0})),o.complete()):o.error(new ho({error:Be,headers:Z,status:$,statusText:_e,url:Ut||void 0}))},y=Z=>{let{url:$}=d(),_e=new ho({error:Z,status:s.status||0,statusText:s.statusText||"Unknown Error",url:$||void 0});o.error(_e)},w=y;e.timeout&&(w=Z=>{let{url:$}=d(),_e=new ho({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:$||void 0});o.error(_e)});let E=!1,R=Z=>{E||(o.next(d()),E=!0);let $={type:ur.DownloadProgress,loaded:Z.loaded};Z.lengthComputable&&($.total=Z.total),e.responseType==="text"&&s.responseText&&($.partialText=s.responseText),o.next($)},j=Z=>{let $={type:ur.UploadProgress,loaded:Z.loaded};Z.lengthComputable&&($.total=Z.total),o.next($)};return s.addEventListener("load",m),s.addEventListener("error",y),s.addEventListener("timeout",w),s.addEventListener("abort",y),e.reportProgress&&(s.addEventListener("progress",R),a!==null&&s.upload&&s.upload.addEventListener("progress",j)),s.send(a),o.next({type:ur.Sent}),()=>{s.removeEventListener("error",y),s.removeEventListener("abort",y),s.removeEventListener("load",m),s.removeEventListener("timeout",w),e.reportProgress&&(s.removeEventListener("progress",R),a!==null&&s.upload&&s.upload.removeEventListener("progress",j)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(i){return new(i||n)(ge(dr))};static \u0275prov=se({token:n,factory:n.\u0275fac})}return n})(),my=new te(""),kM="XSRF-TOKEN",IM=new te("",{providedIn:"root",factory:()=>kM}),PM="X-XSRF-TOKEN",OM=new te("",{providedIn:"root",factory:()=>PM}),Xs=class{},RM=(()=>{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=Gs(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(i){return new(i||n)(ge(ut),ge(IM))};static \u0275prov=se({token:n,factory:n.\u0275fac})}return n})(),NM=/^(?:https?:)?\/\//i;function AM(n,t){if(!I(my)||n.method==="GET"||n.method==="HEAD"||NM.test(n.url))return t(n);let e=I(Xs).getToken(),i=I(OM);return e!=null&&!n.headers.has(i)&&(n=n.clone({headers:n.headers.set(i,e)})),t(n)}var Nh=(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})(Nh||{});function LM(n,t){return{\u0275kind:n,\u0275providers:t}}function Ah(...n){let t=[go,Oh,Wc,{provide:pr,useExisting:Wc},{provide:Qs,useFactory:()=>I(wM,{optional:!0})??I(Oh)},{provide:Rh,useValue:AM,multi:!0},{provide:my,useValue:!0},{provide:Xs,useClass:RM}];for(let e of n)t.push(...e.\u0275providers);return Ko(t)}function Lh(n){return LM(Nh.Interceptors,n.map(t=>({provide:Rh,useValue:t,multi:!0})))}var gy="guitoToken";function _y(){return new URLSearchParams(window.location.search).get(gy)??""}var vy=(n,t)=>{let e=_y();return!e||!n.url.startsWith("/api")?t(n):t(n.clone({setHeaders:{"X-Guito-Token":e}}))};function by(n){let t=new URL(n,window.location.origin),e=_y();return e&&t.searchParams.set(gy,e),t.toString()}var yy={providers:[nh({eventCoalescing:!0}),Ah(Lh([vy]))]};function FM(n,t){if(n&1){let e=P();b(0,"button",11),B("click",function(){_(e);let r=u(2);return v(r.retry.emit())}),p(1),C()}if(n&2){let e=u(2);q("disabled",e.busy()),c(),O(e.retryLabel())}}function VM(n,t){if(n&1){let e=P();b(0,"div",1),B("animationend",function(r){_(e);let o=u();return v(o.finishDismiss(r))}),V(),b(1,"svg",2),J(2,"circle",3)(3,"path",4)(4,"circle",5),C(),ue(),b(5,"div",6)(6,"p"),p(7),C(),S(8,FM,2,2,"button",7),C(),b(9,"button",8),B("click",function(){_(e);let r=u();return v(r.dismiss())}),V(),b(10,"svg",9),J(11,"path",10),C()()()}if(n&2){let e=u();me("closing",e.closing()),c(7),O(e.message()),c(),T(e.retryLabel()?8:-1)}}var at=class n{message=N.required();retryLabel=N("");busy=N(!1);retry=H();dismissed=x(!1);closing=x(!1);constructor(){Ce(()=>{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=pe({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&&S(0,VM,12,4,"div",0),e&2&&T(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 qc=class n{http=I(go);cache=new Map;empty=we(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(yt(o=>o.size?new de(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),ot(()=>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=se({token:n,factory:n.\u0275fac,providedIn:"root"})};function BM(n,t){n&1&&J(0,"img",0),n&2&&q("src",t,ar)}function jM(n,t){if(n&1&&(b(0,"span",1),p(1),C()),n&2){let e=u();c(),O(e.initials())}}var An=class n{name=N("");email=N("");avatars=I(qc);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=pe({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&&(S(0,BM,1,1,"img",0),vi(1,"async"),Os(2,jM,2,1,"span",1)),e&2){let r;T((r=eh(1,1,i.avatars.get(i.email())))?0:2,r)}},dependencies:[yh],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 $M(n,t){if(n&1&&(b(0,"mark",1),p(1),C()),n&2){let e=u(2).$implicit;c(),O(e.text)}}function HM(n,t){if(n&1&&p(0),n&2){let e=u(2).$implicit;G(" ",e.text," ")}}function UM(n,t){if(n&1){let e=P();b(0,"a",2),B("click",function(r){return _(e),v(r.stopPropagation())}),S(1,$M,2,1,"mark",1)(2,HM,1,1),C()}if(n&2){let e=u().$implicit;q("href",e.href,ar),c(),T(e.match?1:2)}}function zM(n,t){if(n&1&&(b(0,"mark",1),p(1),C()),n&2){let e=u().$implicit;c(),O(e.text)}}function GM(n,t){if(n&1&&p(0),n&2){let e=u().$implicit;G(" ",e.text," ")}}function WM(n,t){if(n&1&&S(0,UM,3,2,"a",0)(1,zM,2,1,"mark",1)(2,GM,1,1),n&2){let e=t.$implicit;T(e.href?0:e.match?1:2)}}var _o=class n{text=N("");search=N("");linking=N(null);segments=L(()=>{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 d=e.url.replace(/\$(\d+)/g,(m,y)=>a[Number(y)]??"");if(i.push(W({text:a[0]},/^https?:\/\//i.test(d)?{href:d}:{})),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 d=a.indexOf(r,l);if(d===-1){s.push(le(W({},o),{text:o.text.slice(l),match:!1}));break}d>l&&s.push(le(W({},o),{text:o.text.slice(l,d),match:!1})),s.push(le(W({},o),{text:o.text.slice(d,d+r.length),match:!0})),l=d+r.length}return s}):i.map(o=>le(W({},o),{match:!1}))});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({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&&Q(0,WM,3,1,null,null,Vt),e&2&&K(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 yn="__working__";var lt=class n{http=I(go);base="/api";mutating=x(!1);mutate(t){return pu(()=>this.mutating()?du(()=>({status:400,error:{error:"Another Git operation is in progress."}})):(this.mutating.set(!0),t().pipe(ei(()=>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 st;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 st().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 st().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 st().set("prune","1"):void 0;return this.mutate(()=>this.http.get(`${this.base}/fetch`,{params:e}))}pull(t=!1){return this.mutate(()=>this.http.post(`${this.base}/pull`,{rebase:t}))}push(t=!1){return this.mutate(()=>this.http.post(`${this.base}/push`,{force:t}))}sync(){return this.mutate(()=>this.http.post(`${this.base}/sync`,{}))}checkout(t){return this.mutate(()=>this.http.post(`${this.base}/checkout`,{ref:t}))}revert(t){return this.mutate(()=>this.http.post(`${this.base}/revert`,{commit:t}))}cherryPick(t){return this.mutate(()=>this.http.post(`${this.base}/cherry-pick`,{commit:t}))}dropCommit(t){return this.mutate(()=>this.http.post(`${this.base}/commit/drop`,{commit:t}))}resetToCommit(t,e="hard"){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}))}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,e="all"){return this.mutate(()=>this.http.post(`${this.base}/stash/save`,{message:t,scope:e}))}getStashes(){return this.http.get(`${this.base}/stash/list`).pipe(Ge(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){return this.mutate(()=>this.http.post(`${this.base}/stash/apply`,{index:t}))}stashPop(t){return this.mutate(()=>this.http.post(`${this.base}/stash/pop`,{index:t}))}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,e){return this.mutate(()=>this.http.post(`${this.base}/branch/create`,{name:t,startPoint:e}))}deleteBranch(t,e=!1){return this.mutate(()=>this.http.post(`${this.base}/branch/delete`,{name:t,force:e}))}deleteRemoteBranch(t,e){return this.mutate(()=>this.http.post(`${this.base}/branch/delete-remote`,{remote:t,branch:e}))}renameBranch(t,e){return this.mutate(()=>this.http.post(`${this.base}/branch/rename`,{oldName:t,newName:e}))}merge(t){return this.mutate(()=>this.http.post(`${this.base}/merge`,{branch:t}))}rebase(t){return this.mutate(()=>this.http.post(`${this.base}/rebase`,{branch:t}))}createTag(t,e){return this.mutate(()=>this.http.post(`${this.base}/tag/create`,{name:t,commit:e}))}deleteTag(t){return this.mutate(()=>this.http.post(`${this.base}/tag/delete`,{name:t}))}pushTag(t,e="origin"){return this.mutate(()=>this.http.post(`${this.base}/tag/push`,{name:t,remote:e}))}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 st().set("query",t)}).pipe(Ge(e=>e.reviewers))}searchWorkItems(t){return this.http.get(`${this.base}/azure-devops/workitems`,{params:new st().set("query",t)}).pipe(Ge(e=>e.workItems))}getPrTags(){return this.http.get(`${this.base}/azure-devops/tags`).pipe(Ge(t=>t.tags.map(e=>({name:e}))))}getAzureMe(){return this.http.get(`${this.base}/azure-devops/me`)}getMyPullRequests(t="active"){let e=new st().set("status",t);return this.http.get(`${this.base}/azure-devops/pullrequests`,{params:e}).pipe(Ge(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`,W({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(Ge(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(Ge(e=>e.files))}getPrFileDiff(t,e){let i=new st().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(Ge(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`,{}))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=se({token:n,factory:n.\u0275fac,providedIn:"root"})};var nn=class n{git=I(lt);inVsCode=typeof window<"u"&&window.parent!==window;diffViewer=x("vscode");settingsVersion=x(0);folderRequest=0;folderResolvers=new Map;canPickFolder=this.inVsCode;constructor(){this.inVsCode&&(window.addEventListener("message",t=>{let e=t.data;if(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:()=>{}}))}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}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){if(!this.inVsCode||this.diffViewer()!=="vscode"||t.status==="binary")return!1;let 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:r,modifiedRef:i},"*"),!0}static \u0275fac=function(e){return new(e||n)};static \u0275prov=se({token:n,factory:n.\u0275fac,providedIn:"root"})};var qM=(n,t)=>n.name.toLowerCase().localeCompare(t.name.toLowerCase()),Cy=n=>n.split("/").pop()??n,ZM=(n,t)=>Cy(n.path).toLowerCase().localeCompare(Cy(t.path).toLowerCase());function vo(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 d=a.dirs.get(l);d||(d={name:l,dirs:new Map,files:[],additions:0,deletions:0},a.dirs.set(l,d)),d.additions+=o.additions??0,d.deletions+=o.deletions??0,a=d}a.files.push(o)}let i=[],r=(o,s,a)=>{for(let l of[...o.dirs.values()].sort(qM)){let d=s?`${s}/${l.name}`:l.name,m=t.has(d);i.push({kind:"dir",path:d,name:l.name,depth:a,collapsed:m,additions:l.additions,deletions:l.deletions}),m||r(l,d,a+1)}for(let l of[...o.files].sort(ZM))i.push({kind:"file",path:l.path,name:l.path.split("/").pop()??l.path,depth:a,file:l})};return r(e,"",0),i}var bo=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=se({token:n,factory:n.\u0275fac,providedIn:"root"})};var YM=["host"];function QM(n,t){if(n&1&&(f(0,"span",6),p(1),h()),n&2){let e=u();c(),G("+",e.file().additions)}}function KM(n,t){if(n&1&&(f(0,"span",7),p(1),h()),n&2){let e=u();c(),G("\u2212",e.file().deletions)}}function XM(n,t){n&1&&(V(),z(0,"line",11))}function JM(n,t){n&1&&(V(),z(0,"line",12))}function ek(n,t){n&1&&(f(0,"div",18),p(1,"Loading diff\u2026"),h())}function tk(n,t){if(n&1&&z(0,"app-error-banner",19),n&2){let e=u();k("message",e.error())}}function nk(n,t){n&1&&(f(0,"div",18),p(1,"Binary file not shown."),h())}var ik=0,yo=class n{git=I(lt);monacoService=I(bo);file=N.required();originalRef=N.required();modifiedRef=N.required();closed=H();host=en.required("host");loading=x(!0);error=x("");binary=x(!1);sideBySide=x(!0);destroyed=!1;editor=null;models=[];onEscape(){this.closed.emit()}ngAfterViewInit(){return Dn(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=e.status==="added"&&!e.oldPath?"EMPTY":this.originalRef(),[r,o]=yield Promise.all([il(this.git.getFileContent(e.oldPath||e.path,i)),il(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=++ik,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.loading.set(!1)}catch{this.error.set("Failed to load the diff."),this.loading.set(!1)}})}ngOnDestroy(){this.destroyed=!0,this.editor?.dispose(),this.editor=null;for(let t of this.models)t.dispose();this.models=[]}toggleLayout(){this.sideBySide.update(t=>!t),this.editor?.updateOptions({renderSideBySide:this.sideBySide()})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-diff-dialog"]],viewQuery:function(e,i){e&1&&jt(i.host,YM,5),e&2&&vn()},hostBindings:function(e,i){e&1&&D("keydown.escape",function(){return i.onEscape()},Ye)},inputs:{file:[1,"file"],originalRef:[1,"originalRef"],modifiedRef:[1,"modifiedRef"]},outputs:{closed:"closed"},decls:25,vars:10,consts:[["host",""],[1,"backdrop",3,"click"],["role","dialog","aria-modal","true",1,"dialog"],[1,"dialog-head"],[1,"path",3,"title"],[1,"counts"],[1,"additions"],[1,"deletions"],["type","button","title","Toggle diff layout",1,"icon-btn",3,"click"],["viewBox","0 0 24 24","aria-hidden","true"],["x","3","y","4","width","18","height","16","rx","2"],["x1","12","y1","4","x2","12","y2","20"],["x1","3","y1","12","x2","21","y2","12"],["type","button","title","Close","aria-label","Close diff",1,"icon-btn",3,"click"],["x1","18","y1","6","x2","6","y2","18"],["x1","6","y1","6","x2","18","y2","18"],[1,"dialog-body"],[1,"editor-host"],[1,"state"],[3,"message"]],template:function(e,i){if(e&1){let r=P();f(0,"div",1),D("click",function(){return _(r),v(i.closed.emit())}),h(),f(1,"div",2)(2,"header",3)(3,"span"),p(4),h(),f(5,"span",4),p(6),h(),f(7,"span",5),S(8,QM,2,1,"span",6),S(9,KM,2,1,"span",7),h(),f(10,"button",8),D("click",function(){return _(r),v(i.toggleLayout())}),V(),f(11,"svg",9),z(12,"rect",10),S(13,XM,1,0,":svg:line",11)(14,JM,1,0,":svg:line",12),h()(),ue(),f(15,"button",13),D("click",function(){return _(r),v(i.closed.emit())}),V(),f(16,"svg",9),z(17,"line",14)(18,"line",15),h()()(),ue(),f(19,"div",16),z(20,"div",17,0),S(22,ek,2,0,"div",18)(23,tk,1,1,"app-error-banner",19)(24,nk,2,0,"div",18),h()()}e&2&&(c(3),ft("status status-"+i.file().status),c(),O(i.file().status),c(),k("title",i.file().path),c(),O(i.file().path),c(2),T(i.file().additions>0?8:-1),c(),T(i.file().deletions>0?9:-1),c(),ce("aria-label",i.sideBySide()?"Switch to inline view":"Switch to side-by-side view"),c(3),T(i.sideBySide()?13:14),c(9),T(i.loading()?22:i.error()?23:i.binary()?24:-1))},dependencies:[at],styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#0000008c;z-index:200}.dialog[_ngcontent-%COMP%]{position:fixed;top:4vh;left:4vw;right:4vw;bottom:4vh;display:flex;flex-direction:column;background:var(--bg);border:1px solid var(--border);border-radius:8px;box-shadow:0 12px 48px #0009;overflow:hidden;z-index:201}.dialog-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex:none;height:42px;padding:0 10px;background:var(--bg-alt);border-bottom:1px solid var(--border)}.status[_ngcontent-%COMP%]{flex:none;padding:1px 7px;border-radius:3px;font-size:10px;text-transform:uppercase;letter-spacing:.4px}.status-added[_ngcontent-%COMP%]{background:#89d18526;color:#89d185}.status-deleted[_ngcontent-%COMP%]{background:#f4877126;color:#f48771}.status-modified[_ngcontent-%COMP%]{background:#3794ff26;color:#4fc1ff}.status-renamed[_ngcontent-%COMP%]{background:#c586c026;color:#c586c0}.status-binary[_ngcontent-%COMP%]{background:#ffffff14;color:#9d9d9d}.path[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--mono);font-size:12px;color:var(--text)}.counts[_ngcontent-%COMP%]{flex:none;display:flex;gap:6px;font-family:var(--mono);font-size:11px}.additions[_ngcontent-%COMP%]{color:#89d185}.deletions[_ngcontent-%COMP%]{color:#f48771}.icon-btn[_ngcontent-%COMP%]{flex:none;width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:none;border-radius:4px;background:transparent;color:var(--text);cursor:pointer}.icon-btn[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-bright)}.icon-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.dialog-body[_ngcontent-%COMP%]{position:relative;flex:1;min-height:0}.editor-host[_ngcontent-%COMP%]{position:absolute;inset:0}.state[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:var(--bg);color:var(--text-dim);font-size:13px}"],changeDetection:0})};var rk=(n,t)=>t.path;function ok(n,t){if(n&1&&(f(0,"span",16),p(1,"\u2022"),h(),f(2,"span"),p(3),vi(4,"date"),h(),f(5,"span",16),p(6,"\u2022"),h(),f(7,"code",17),p(8),h()),n&2){let e=u();c(3),O(po(4,2,e.commit().date,"d MMM y HH:mm")),c(5),O(e.commit().hash.slice(0,8))}}function sk(n,t){if(n&1&&(f(0,"pre",11),z(1,"app-issue-text",7),h()),n&2){let e=u();c(),k("text",e.body())("linking",e.issueLinking())}}function ak(n,t){n&1&&(f(0,"div",13),p(1,"Loading changes\u2026"),h())}function lk(n,t){if(n&1&&z(0,"app-error-banner",14),n&2){let e=u();k("message",e.error())}}function ck(n,t){n&1&&(f(0,"div",13),p(1,"No changes."),h())}function dk(n,t){n&1&&(V(),z(0,"polyline",23))}function uk(n,t){n&1&&(V(),z(0,"polyline",24))}function pk(n,t){if(n&1&&(f(0,"span",27),p(1),h()),n&2){let e=u(2).$implicit;c(),G("+",e.additions)}}function fk(n,t){if(n&1&&(f(0,"span",28),p(1),h()),n&2){let e=u(2).$implicit;c(),G("\u2212",e.deletions)}}function hk(n,t){if(n&1){let e=P();f(0,"button",21),D("click",function(){_(e);let r=u().$implicit,o=u(3);return v(o.toggleDir(r.path))}),V(),f(1,"svg",22),S(2,dk,1,0,":svg:polyline",23)(3,uk,1,0,":svg:polyline",24),h(),ue(),f(4,"span",25),p(5),h(),f(6,"span",26),S(7,pk,2,1,"span",27),S(8,fk,2,1,"span",28),h()()}if(n&2){let e=u().$implicit;ie("padding-left",e.depth*14+8,"px"),k("title",e.path),ce("aria-expanded",!e.collapsed),c(2),T(e.collapsed?2:3),c(2),k("title",e.path),c(),O(e.name),c(2),T(e.additions>0?7:-1),c(),T(e.deletions>0?8:-1)}}function mk(n,t){if(n&1&&(f(0,"span",27),p(1),h()),n&2){let e=u(2).$implicit;c(),G("+",e.file.additions)}}function gk(n,t){if(n&1&&(f(0,"span",28),p(1),h()),n&2){let e=u(2).$implicit;c(),G("\u2212",e.file.deletions)}}function _k(n,t){if(n&1){let e=P();f(0,"button",29),D("click",function(){_(e);let r=u().$implicit,o=u(3);return v(o.openFile(r.file))}),f(1,"span"),p(2),h(),f(3,"span",30),p(4),h(),f(5,"span",26),S(6,mk,2,1,"span",27),S(7,gk,2,1,"span",28),h(),V(),f(8,"svg",31),z(9,"polyline",32),h()()}if(n&2){let e=u().$implicit;ie("padding-left",e.depth*14+8,"px"),c(),ft("file-status status-"+e.file.status),c(),O(e.file.status),c(),k("title",e.file.path),c(),O(e.name),c(2),T(e.file.additions>0?6:-1),c(),T(e.file.deletions>0?7:-1)}}function vk(n,t){if(n&1&&S(0,hk,9,9,"button",19)(1,_k,10,9,"button",20),n&2){let e=t.$implicit;T(e.kind==="dir"?0:1)}}function bk(n,t){if(n&1&&(f(0,"div",18),Q(1,vk,2,1,null,null,rk),h()),n&2){let e=u(2);c(),K(e.rows())}}function yk(n,t){n&1&&S(0,ck,2,0,"div",13)(1,bk,3,0,"div",18),n&2&&T(t.files.length===0?0:1)}function Ck(n,t){if(n&1){let e=P();f(0,"app-diff-dialog",33),D("closed",function(){_(e);let r=u();return v(r.dialogFile.set(null))}),h()}if(n&2){let e=u();k("file",t)("originalRef",e.originalRef())("modifiedRef",e.modifiedRef())}}var Zc=class n{git=I(lt);vscode=I(nn);commit=N.required();issueLinking=N(null);fileListView=N("flat");closed=H();diff=x(null);loading=x(!1);error=x("");dialogFile=x(null);collapsed=x(new Set);rows=L(()=>{let t=this.diff()?.files??[];return this.fileListView()!=="tree"?t.map(e=>({kind:"file",path:e.path,name:e.path,depth:0,file:e})):vo(t,this.collapsed())});body=x("");bodySub=null;workingHash=yn;isWorking=L(()=>this.commit().hash===this.workingHash);originalRef=L(()=>this.isWorking()?"HEAD":`${this.commit().hash}^`);modifiedRef=L(()=>this.isWorking()?"WORKING":this.commit().hash);constructor(){Ce(()=>{this.loadDiff(this.commit().hash),this.loadBody(this.commit())})}ngOnDestroy(){this.bodySub?.unsubscribe()}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===yn){this.git.getWorkingChanges().subscribe({next:e=>{this.loading.set(!1),this.diff.set({hash:yn,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.")}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-commit-detail"]],inputs:{commit:[1,"commit"],issueLinking:[1,"issueLinking"],fileListView:[1,"fileListView"]},outputs:{closed:"closed"},decls:19,vars:9,consts:[[1,"detail"],[1,"detail-head"],["title","Close",1,"close-btn",3,"click"],["viewBox","0 0 24 24","aria-hidden","true"],["x1","18","y1","6","x2","6","y2","18"],["x1","6","y1","6","x2","18","y2","18"],[1,"subject"],[3,"text","linking"],[1,"meta"],[3,"name","email"],[1,"author"],[1,"body"],[1,"detail-body"],[1,"state"],[3,"message"],[3,"file","originalRef","modifiedRef"],[1,"separator"],[1,"hash"],[1,"file-list"],["type","button",1,"file-row","dir-row",3,"title","paddingLeft"],["type","button",1,"file-row",3,"paddingLeft"],["type","button",1,"file-row","dir-row",3,"click","title"],["viewBox","0 0 24 24","aria-hidden","true",1,"chevron","dir-chevron"],["points","9 6 15 12 9 18"],["points","6 9 12 15 18 9"],[1,"file-path","dir-name",3,"title"],[1,"file-counts"],[1,"additions"],[1,"deletions"],["type","button",1,"file-row",3,"click"],[1,"file-path",3,"title"],["viewBox","0 0 24 24","aria-hidden","true",1,"chevron"],["points","9 18 15 12 9 6"],[3,"closed","file","originalRef","modifiedRef"]],template:function(e,i){if(e&1&&(f(0,"aside",0)(1,"header",1)(2,"button",2),D("click",function(){return i.closed.emit()}),V(),f(3,"svg",3),z(4,"line",4)(5,"line",5),h()(),ue(),f(6,"h2",6),z(7,"app-issue-text",7),h(),f(8,"div",8),z(9,"app-author-avatar",9),f(10,"span",10),p(11),h(),S(12,ok,9,5),h(),S(13,sk,2,2,"pre",11),h(),f(14,"div",12),S(15,ak,2,0,"div",13)(16,lk,1,1,"app-error-banner",14)(17,yk,2,1),h()(),S(18,Ck,1,3,"app-diff-dialog",15)),e&2){let r,o;c(7),k("text",i.commit().message)("linking",i.issueLinking()),c(2),k("name",i.commit().author_name)("email",i.commit().author_email),c(2),O(i.commit().author_name),c(),T(i.isWorking()?-1:12),c(),T(i.body().trim()?13:-1),c(2),T(i.loading()?15:i.error()?16:(r=i.diff())?17:-1,r),c(3),T((o=i.dialogFile())?18:-1,o)}},dependencies:[at,An,yo,_o,zs],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}@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 Js(n,t=0){return xk(n)?Number(n):arguments.length===2?t:0}function xk(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}function xy(n){return n instanceof gn?n.nativeElement:n}var Fh;try{Fh=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Fh=!1}var Yc=(()=>{class n{_platformId=I(sr);isBrowser=this._platformId?Qb(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||Fh)&&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=se({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var wk=new te("cdk-dir-doc",{providedIn:"root",factory:Ek});function Ek(){return I(ut)}var Dk=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function Sk(n){let t=n?.toLowerCase()||"";return t==="auto"&&typeof navigator<"u"&&navigator?.language?Dk.test(navigator.language)?"rtl":"ltr":t==="rtl"?"rtl":"ltr"}var wy=(()=>{class n{get value(){return this.valueSignal()}valueSignal=x("ltr");change=new mn;constructor(){let e=I(wk,{optional:!0});if(e){let i=e.body?e.body.dir:null,r=e.documentElement?e.documentElement.dir:null;this.valueSignal.set(Sk(i||r||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=se({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Cn=(function(n){return n[n.NORMAL=0]="NORMAL",n[n.NEGATED=1]="NEGATED",n[n.INVERTED=2]="INVERTED",n})(Cn||{}),Qc,fr;function Ey(){if(fr==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return fr=!1,fr;if(document.documentElement?.style&&"scrollBehavior"in document.documentElement.style)fr=!0;else{let n=Element.prototype.scrollTo;n?fr=!/\{\s*\[native code\]\s*\}/.test(n.toString()):fr=!1}}return fr}function Co(){if(typeof document!="object"||!document)return Cn.NORMAL;if(Qc==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),Qc=Cn.NORMAL,n.scrollLeft===0&&(n.scrollLeft=1,Qc=n.scrollLeft===0?Cn.NEGATED:Cn.INVERTED),n.remove()}return Qc}var Kc=class{};function Dy(n){return n&&typeof n.connect=="function"&&!(n instanceof Lo)}var Xc=class extends Kc{_data;constructor(t){super(),this._data=t}connect(){return Ho(this._data)?this._data:we(this._data)}disconnect(){}},ea=(function(n){return n[n.REPLACED=0]="REPLACED",n[n.INSERTED=1]="INSERTED",n[n.MOVED=2]="MOVED",n[n.REMOVED=3]="REMOVED",n})(ea||{}),Vh=new te("_ViewRepeater"),Jc=class{viewCacheSize=20;_viewCache=[];applyChanges(t,e,i,r,o){t.forEachOperation((s,a,l)=>{let d,m;if(s.previousIndex==null){let y=()=>i(s,a,l);d=this._insertView(y,l,e,r(s)),m=d?ea.INSERTED:ea.REPLACED}else l==null?(this._detachAndCacheView(a,e),m=ea.REMOVED):(d=this._moveView(a,l,e,r(s)),m=ea.MOVED);o&&o({context:d?.context,operation:m,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 Tk=["contentWrapper"],Mk=["*"],My=new te("VIRTUAL_SCROLL_STRATEGY"),Bh=class{_scrolledIndexChange=new $e;scrolledIndexChange=this._scrolledIndexChange.pipe(Go());_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),d=Math.max(0,Math.min(s,r-l));s!=d&&(s=d,o=d*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 d=Math.ceil((this._maxBufferPx-l)/this._itemSize);d>0&&(e.end=Math.min(r,e.end+d),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 kk(n){return n._scrollStrategy}var ky=(()=>{class n{get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=Js(e)}_itemSize=20;get minBufferPx(){return this._minBufferPx}set minBufferPx(e){this._minBufferPx=Js(e)}_minBufferPx=100;get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(e){this._maxBufferPx=Js(e)}_maxBufferPx=200;_scrollStrategy=new Bh(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=mi({type:n,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[Ns([{provide:My,useFactory:kk,deps:[Hr(()=>n)]}]),ws]})}return n})(),Ik=20,Pk=(()=>{class n{_ngZone=I(Te);_platform=I(Yc);_renderer=I(Rn).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new $e;_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=Ik){return this._platform.isBrowser?new de(i=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let r=e>0?this._scrolled.pipe(zo(e)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):we()}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(Uo(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=xy(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=se({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Iy=(()=>{class n{elementRef=I(gn);scrollDispatcher=I(Pk);ngZone=I(Te);dir=I(wy,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new $e;_renderer=I(yc);_cleanupScroll;_elementScrolled=new $e;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&&Co()!=Cn.NORMAL?(e.left!=null&&(e.right=i.scrollWidth-i.clientWidth-e.left),Co()==Cn.INVERTED?e.left=e.right:Co()==Cn.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;Ey()?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&&Co()==Cn.INVERTED?e==i?o.scrollWidth-o.clientWidth-o.scrollLeft:o.scrollLeft:s&&Co()==Cn.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=mi({type:n,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return n})(),Ok=20,Rk=(()=>{class n{_platform=I(Yc);_listeners;_viewportSize;_change=new $e;_document=I(ut);constructor(){let e=I(Te),i=I(Rn).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=Ok){return e>0?this._change.pipe(zo(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=se({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Sy=new te("VIRTUAL_SCROLLABLE"),Nk=(()=>{class n extends Iy{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=mi({type:n,features:[ks]})}return n})();function Ak(n,t){return n.start==t.start&&n.end==t.end}var Lk=typeof requestAnimationFrame<"u"?cu:lu,ta=(()=>{class n extends Nk{elementRef=I(gn);_changeDetectorRef=I(Ic);_scrollStrategy=I(My,{optional:!0});scrollable=I(Sy,{optional:!0});_platform=I(Yc);_detachedSubject=new $e;_renderedRangeSubject=new $e;get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this._calculateSpacerSize())}_orientation="vertical";appendOnly=!1;scrolledIndexChange=new de(e=>this._scrollStrategy.scrolledIndexChange.subscribe(i=>Promise.resolve().then(()=>this.ngZone.run(()=>e.next(i)))));_contentWrapper;renderedRangeStream=this._renderedRangeSubject;_totalContentSize=0;_totalContentWidth=x("");_totalContentHeight=x("");_renderedContentTransform;_renderedRange={start:0,end:0};_dataLength=0;_viewportSize=0;_forOf;_renderedContentOffset=0;_renderedContentOffsetNeedsRewrite=!1;_changeDetectionNeeded=x(!1);_runAfterChangeDetection=[];_viewportChanges=Ve.EMPTY;_injector=I(wt);_isDestroyed=!1;constructor(){super();let e=I(Rk);this._scrollStrategy,this._viewportChanges=e.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this);let i=Ce(()=>{this._changeDetectionNeeded()&&this._doChangeDetection()},{injector:I(lr).injector});I(et).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(ol(null),zo(0,Lk),Ai(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(Ai(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){Ak(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),!tt(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=pe({type:n,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(i,r){if(i&1&&Qf(Tk,7),i&2){let o;Kf(o=Xf())&&(r._contentWrapper=o.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(i,r){i&2&&me("cdk-virtual-scroll-orientation-horizontal",r.orientation==="horizontal")("cdk-virtual-scroll-orientation-vertical",r.orientation!=="horizontal")},inputs:{orientation:"orientation",appendOnly:[2,"appendOnly","appendOnly",Ob]},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[Ns([{provide:Iy,useFactory:(e,i)=>e||i,deps:[[new lf,new af(Sy)],n]}]),ks],ngContentSelectors:Mk,decls:4,vars:4,consts:[["contentWrapper",""],[1,"cdk-virtual-scroll-content-wrapper"],[1,"cdk-virtual-scroll-spacer"]],template:function(i,r){i&1&&(Zf(),b(0,"div",1,0),Yf(2),C(),J(3,"div",2)),i&2&&(c(3),ie("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 Ty(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 Py=(()=>{class n{_viewContainerRef=I(hi);_template=I(pi);_differs=I(Pc);_viewRepeater=I(Vh);_viewport=I(ta,{skipSelf:!0});viewChange=new $e;_dataSourceChanges=new $e;get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(e){this._cdkVirtualForOf=e,Dy(e)?this._dataSourceChanges.next(e):this._dataSourceChanges.next(new Xc(Ho(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=Js(e)}dataStream=this._dataSourceChanges.pipe(ol(null),mu(),yt(([e,i])=>this._changeDataSource(e,i)),jr(1));_differ=null;_data;_renderedItems;_renderedRange;_needsUpdate=!1;_destroyed=new $e;constructor(){let e=I(Te);this.dataStream.subscribe(i=>{this._data=i,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe(Ai(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 d=this._viewContainerRef.get(l+r);if(d&&d.rootNodes.length){s=a=d.rootNodes[0];break}}for(let l=o-1;l>-1;l--){let d=this._viewContainerRef.get(l+r);if(d&&d.rootNodes.length){a=d.rootNodes[d.rootNodes.length-1];break}}return s&&a?Ty(i,"end",a)-Ty(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):we()}_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=mi({type:n,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},features:[Ns([{provide:Vh,useClass:Jc}])]})}return n})();function ed(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((d,m)=>d===o?m:-1).filter(d=>d!==-1),l;if(a.length>0){l=a[0];for(let d=1;d<a.length;d++)t[a[d]]=null}else l=i(o);t[l]=s[0]??null;for(let d=1;d<s.length;d++)i(s[d]);e[r]=l}return e}var Oy=["#3794ff","#4ec9b0","#d7ba7d","#c586c0","#89d185","#ce9178","#d16969","#569cd6","#b5cea8","#dcdcaa"];function jh(n){return Oy[Math.abs(n)%Oy.length]}var Fk=2e3,td=class n{worker=null;workerBroken=!1;nextId=0;pending=new Map;compute(t){return t.length<=Fk?we(ed(t)):new de(e=>{let i=this.ensureWorker();if(!i){e.next(ed(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(ed(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=se({token:n,factory:n.\u0275fac,providedIn:"root"})};function Ry(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 $h(n){let t=n.refs;return t?t==="HEAD"||t.startsWith("HEAD,")||t.startsWith("HEAD ->"):!1}function nd(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 id(n,t){if(!(typeof localStorage>"u"))try{localStorage.setItem(n,JSON.stringify(t))}catch{}}var Vk=(n,t)=>t.index,Bk=(n,t)=>t.hash,jk=(n,t)=>t.name;function $k(n,t){if(n&1){let e=P();f(0,"div",20)(1,"span",5),p(2,"Graph"),h(),f(3,"div",6),D("mousedown",function(r){_(e);let o=u();return v(o.startResize("graph",r))}),h()()}if(n&2){let e=u();ie("width",e.graphColumnWidth(),"px")}}function Hk(n,t){if(n&1&&(f(0,"div",35),V(),f(1,"svg",36),z(2,"path",37)(3,"path",38),h()()),n&2){let e=u(2);ie("width",e.graphColumnWidth(),"px")}}function Uk(n,t){if(n&1&&(f(0,"span",39),p(1),h()),n&2){let e=u();c(),G("",e.staged.length," staged")}}function zk(n,t){if(n&1&&(f(0,"span",40),p(1),h()),n&2){let e=u();c(),G("",e.unstaged.length," unstaged")}}function Gk(n,t){if(n&1&&(f(0,"span",41),p(1),h()),n&2){let e=u();c(),G("",e.untracked.length," untracked")}}function Wk(n,t){if(n&1&&(S(0,Uk,2,1,"span",39),S(1,zk,2,1,"span",40),S(2,Gk,2,1,"span",41)),n&2){let e=t;T(e.staged.length>0?0:-1),c(),T(e.unstaged.length>0?1:-1),c(),T(e.untracked.length>0?2:-1)}}function qk(n,t){if(n&1){let e=P();f(0,"div",21),D("click",function(){_(e);let r=u();return v(r.commitClick.emit(r.workingCommit()))})("contextmenu",function(r){_(e);let o=u();return v(o.onWorkingContextMenu(r))}),S(1,Hk,4,2,"div",22),f(2,"div",23)(3,"span",24),V(),f(4,"svg",25),z(5,"circle",26)(6,"path",27)(7,"path",28)(8,"path",29)(9,"path",30),h(),ue(),f(10,"span",31),p(11,"Uncommitted changes"),h()(),S(12,Wk,3,3),h(),f(13,"div",32),p(14,"\u2014"),h(),f(15,"div",33),p(16),h(),f(17,"div",34),p(18,"\u2014"),h()()}if(n&2){let e,i=u();ie("width",i.tableWidth(),"px")("transform",i.horizontalTransform()),me("selected",i.selectedHash()===i.workingHash),c(),T(i.showGraph()?1:-1),c(),ie("width",i.descriptionWidth(),"px"),c(10),T((e=i.workingChanges())?12:-1,e),c(),ie("width",i.columnWidths().date,"px"),c(2),ie("width",i.columnWidths().author,"px"),c(),O(i.identity().name||"You"),c(),ie("width",i.columnWidths().commit,"px")}}function Zk(n,t){if(n&1&&(f(0,"div",35),V(),f(1,"svg",49),z(2,"path",44)(3,"line",45),h()()),n&2){let e=u(2);ie("width",e.graphColumnWidth(),"px")}}function Yk(n,t){if(n&1&&(f(0,"mark",50),p(1),h()),n&2){let e=u().$implicit;c(),O(e.text)}}function Qk(n,t){if(n&1&&p(0),n&2){let e=u().$implicit;G(" ",e.text," ")}}function Kk(n,t){if(n&1&&S(0,Yk,2,1,"mark",50)(1,Qk,1,1),n&2){let e=t.$implicit;T(e.match?0:1)}}function Xk(n,t){if(n&1&&(z(0,"app-author-avatar",51),p(1)),n&2){let e=u().$implicit;k("name",e.author_name)("email",e.author_email??""),c(),G(" ",e.author_name," ")}}function Jk(n,t){if(n&1){let e=P();f(0,"div",42),D("click",function(){let r=_(e).$implicit,o=u();return v(o.commitClick.emit(o.stashCommit(r)))})("contextmenu",function(r){let o=_(e).$implicit,s=u();return v(s.onStashContextMenu(r,o))}),S(1,Zk,4,2,"div",22),f(2,"div",23)(3,"span",43),V(),f(4,"svg",25),z(5,"path",44)(6,"line",45),h(),ue(),f(7,"span",31),p(8),h()(),f(9,"span",46),Q(10,Kk,2,1,null,null,Vt),h()(),f(12,"div",32),p(13),vi(14,"date"),h(),f(15,"div",47),S(16,Xk,2,3),h(),f(17,"div",48),p(18),h()()}if(n&2){let e=t.$implicit,i=u();ie("width",i.tableWidth(),"px")("transform",i.horizontalTransform()),me("selected",i.selectedHash()===e.hash),c(),T(i.showGraph()?1:-1),c(),ie("width",i.descriptionWidth(),"px"),c(),k("title",i.stashLabel(e)),c(5),O(i.stashLabel(e)),c(),k("title",e.message),c(),K(i.highlight(e.message)),c(2),ie("width",i.columnWidths().date,"px"),c(),G(" ",e.date?po(14,23,e.date,"d MMM y HH:mm"):"\u2014"," "),c(2),ie("width",i.columnWidths().author,"px"),k("title",e.author_name),c(),T(e.author_name?16:-1),c(),ie("width",i.columnWidths().commit,"px"),k("title",e.hash),c(),G(" ",e.hash.slice(0,8)," ")}}function eI(n,t){if(n&1&&(f(0,"div",13),z(1,"span",52),p(2),h()),n&2){let e=u();c(2),O(e.pendingLabel())}}function tI(n,t){if(n&1&&(V(),z(0,"path",55)),n&2){let e=t.$implicit;ce("d",e.d)("stroke",e.color)}}function nI(n,t){if(n&1&&(V(),z(0,"circle",56)),n&2){let e=u().$implicit;ce("cx",e.x)("cy",e.y)("stroke",e.color)}}function iI(n,t){if(n&1&&(V(),z(0,"circle",57)),n&2){let e=u().$implicit;ce("cx",e.x)("cy",e.y)("fill",e.color)}}function rI(n,t){if(n&1&&S(0,nI,1,3,":svg:circle",56)(1,iI,1,3,":svg:circle",57),n&2){let e=t.$implicit;T(e.isHead?0:1)}}function oI(n,t){if(n&1&&(f(0,"div",53),V(),f(1,"svg",54)(2,"g"),Q(3,tI,1,2,":svg:path",55,Vt),Q(5,rI,2,1,null,null,Bk),h()()()),n&2){let e=u();ie("width",e.viewportWidth(),"px"),c(),ie("transform",e.horizontalTransform()),ce("width",e.graphWidth()),c(),ce("transform","translate(0 "+-e.scrollTop()+")"),c(),K(e.edges()),c(2),K(e.nodes())}}function sI(n,t){if(n&1&&z(0,"div",35),n&2){let e=u(2);ie("width",e.graphColumnWidth(),"px")}}function aI(n,t){n&1&&(V(),f(0,"svg",25),z(1,"line",63)(2,"circle",64)(3,"circle",65)(4,"path",66),h())}function lI(n,t){n&1&&(V(),f(0,"svg",25),z(1,"path",67)(2,"line",68),h())}function cI(n,t){if(n&1){let e=P();f(0,"span",62),D("contextmenu",function(r){let o=_(e).$implicit,s=u().$implicit,a=u();return v(a.onBadgeContextMenu(r,s.commit,o))}),S(1,aI,5,0,":svg:svg",25)(2,lI,3,0,":svg:svg",25),f(3,"span",31),p(4),h()()}if(n&2){let e=t.$implicit;ft("badge badge-"+e.type),c(),T(e.type==="head"||e.type==="local"?1:e.type==="tag"?2:-1),c(3),O(e.name)}}function dI(n,t){if(n&1&&(f(0,"mark",50),p(1),h()),n&2){let e=u().$implicit;c(),O(e.text)}}function uI(n,t){if(n&1&&p(0),n&2){let e=u().$implicit;G(" ",e.text," ")}}function pI(n,t){if(n&1&&S(0,dI,2,1,"mark",50)(1,uI,1,1),n&2){let e=t.$implicit;T(e.match?0:1)}}function fI(n,t){if(n&1){let e=P();f(0,"div",58),D("click",function(){let r=_(e).$implicit,o=u();return v(o.commitClick.emit(r.commit))})("contextmenu",function(r){let o=_(e).$implicit,s=u();return v(s.onRowContextMenu(r,o.commit))}),S(1,sI,1,2,"div",22),f(2,"div",23),Q(3,cI,5,4,"span",59,jk),f(5,"span",60),z(6,"app-issue-text",61),h()(),f(7,"div",32),p(8),vi(9,"date"),h(),f(10,"div",47),z(11,"app-author-avatar",51),Q(12,pI,2,1,null,null,Vt),h(),f(14,"div",48),p(15),h()()}if(n&2){let e=t.$implicit,i=u();ie("width",i.tableWidth(),"px"),me("selected",e.commit.hash===i.selectedHash()),c(),T(i.showGraph()?1:-1),c(),ie("width",i.descriptionWidth(),"px"),c(),K(i.badges(e.commit)),c(2),me("head",i.isHead(e.commit)),c(),k("text",e.commit.message)("search",i.search())("linking",i.issueLinking()),c(),ie("width",i.columnWidths().date,"px"),c(),G(" ",po(9,24,e.commit.date,"d MMM y HH:mm")," "),c(2),ie("width",i.columnWidths().author,"px"),k("title",e.commit.author_name),c(),k("name",e.commit.author_name)("email",e.commit.author_email),c(),K(i.highlight(e.commit.author_name)),c(2),ie("width",i.columnWidths().commit,"px"),k("title",e.commit.hash),c(),G(" ",e.commit.hash.slice(0,8)," ")}}function hI(n,t){if(n&1&&(f(0,"div",18),p(1),h()),n&2){let e=u();c(),O(e.search().trim()?"No matching commits":"No commits to show")}}function mI(n,t){if(n&1){let e=P();f(0,"div",19)(1,"button",69),D("click",function(){_(e);let r=u();return v(r.onLoadMoreCommits())}),p(2,"Load more commits"),h(),f(3,"button",69),D("click",function(){_(e);let r=u();return v(r.onLoadAllCommits())}),p(4),h()()}if(n&2){let e=u();c(4),G("Load all (",e.unloaded(),")")}}var rn=34,Hh=14,Ny=10,gI=72,Ay=10,Fy="guito.columnWidths",Ly={graph:0,description:480,date:132,author:150,commit:84},_I={graph:0,description:48,date:48,author:48,commit:48};function vI(){let n=nd(Fy,{}),t=W({},Ly);for(let e of Object.keys(Ly)){let i=n[e];typeof i=="number"&&Number.isFinite(i)&&i>=_I[e]&&(t[e]=i)}return t}var rd=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=x(!1);pendingLabel=L(()=>this.loadingLabel()||(this.graphLoading()?"Drawing commit graph...":""));commitClick=H();contextMenu=H();loadMoreRequested=H();loadAllRequested=H();rowHeight=rn;graph=I(td);viewport=en(ta);zone=I(Te);scrollTop=x(0);scrollLeft=x(0);viewportWidth=x(0);viewportHeight=x(0);constructor(){Ce(()=>{let t=this.commits();this.updateGraph(t)}),ph(()=>{this.graphCommits(),this.columnWidths();let t=this.viewport();t&&tt(()=>{t.checkViewportSize(),this.measureViewport()})}),ph(()=>{this.selectedBranches(),this.showRemote(),this.showGraph(),this.showGraph()||this.search();let t=this.viewport();t&&tt(()=>{t.scrollToOffset(0),this.measureViewport()})}),Ce(()=>{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&&tt(()=>this.scrollToIndex(i,e))}),Ce(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())});t(()=>{i.disconnect(),r.unsubscribe()})}),Ce(()=>{this.viewportWidth(),this.graphCommits(),tt(()=>{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))}scrollToIndex(t,e){let i=t.elementRef.nativeElement,r=i.clientHeight||this.viewportHeight(),o=Math.max(0,e*rn-(r-rn)/2),s=0,a=()=>{t.scrollToOffset(o),this.measureViewport(),Math.abs(i.scrollTop-o)>1&&++s<10&&requestAnimationFrame(a)};a()}columnWidths=x(vI());graphCommits=x([]);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=L(()=>{let t=this.graphCommits().reduce((e,i)=>Math.max(e,i.lane),0)+1;return Math.max(gI,Ny*2+t*Hh)});graphColumnWidth=L(()=>this.showGraph()?Math.max(this.graphWidth(),this.columnWidths().graph):0);fillerWidth=x(0);descriptionWidth=L(()=>this.columnWidths().description+this.fillerWidth());tableWidth=L(()=>this.graphColumnWidth()+this.columnWidths().date+this.columnWidths().author+this.columnWidths().commit+this.descriptionWidth());horizontalTransform=L(()=>"translateX("+-this.scrollLeft()+"px)");graphHeight=L(()=>this.graphCommits().length*rn);allEdges=L(()=>{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=L(()=>{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()/rn)-Ay),i=Math.min(t,Math.ceil((this.scrollTop()+this.viewportHeight())/rn)+Ay);return{start:e,end:i}});nodes=L(()=>{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*rn+rn/2,color:jh(o.lane),isHead:$h(o.commit)})}return i});edges=L(()=>{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 m=jh(s.childLane),y=this.laneX(s.childLane),w=s.childRow*rn+rn/2;if(a<0){o.push({d:`M ${y} ${w} L ${y} ${r}`,color:m});continue}let E=this.laneX(s.parentLane),R=a*rn+rn/2;if(y===E)o.push({d:`M ${y} ${w} L ${E} ${R}`,color:m});else{let j=(w+R)/2;o.push({d:`M ${y} ${w} C ${y} ${j} ${E} ${j} ${E} ${R}`,color:m})}}return o});hasWorkingChanges=L(()=>{let t=this.workingChanges();return!!t&&t.staged.length+t.unstaged.length+t.untracked.length+t.conflicted.length>0});workingHash=yn;workingCommit=L(()=>({hash:yn,date:new Date().toISOString(),message:"Uncommitted changes",refs:"",body:"",author_name:this.identity().name||"You",author_email:this.identity().email,parents:[]}));visibleStashes=L(()=>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=>le(W({},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=>le(W({},s),{[e.column]:o}))};onResizeEnd=()=>{this.resizeState&&id(Fy,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 Ry(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 $h(t)}laneX(t){return Ny+Hh/2+t*Hh}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-commit-table"]],viewQuery:function(e,i){e&1&&jt(i.viewport,ta,5),e&2&&vn()},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&&(f(0,"div",0)(1,"div",1)(2,"div",2),S(3,$k,4,2,"div",3),f(4,"div",4)(5,"span",5),p(6,"Description"),h(),f(7,"div",6),D("mousedown",function(o){return i.startResize("description",o)}),h()(),f(8,"div",7)(9,"span",5),p(10,"Date"),h(),f(11,"div",6),D("mousedown",function(o){return i.startResize("date",o)}),h()(),f(12,"div",8)(13,"span",5),p(14,"Author"),h(),f(15,"div",6),D("mousedown",function(o){return i.startResize("author",o)}),h()(),f(16,"div",9)(17,"span",5),p(18,"Commit"),h(),f(19,"div",6),D("mousedown",function(o){return i.startResize("commit",o)}),h()()(),S(20,qk,19,17,"div",10),Q(21,Jk,19,26,"div",11,Vk),h(),f(23,"div",12),S(24,eI,3,1,"div",13),f(25,"div",14),S(26,oI,7,6,"div",15),f(27,"cdk-virtual-scroll-viewport",16),co(28,fI,16,27,"div",17),h(),S(29,hI,2,1,"div",18),h(),S(30,mI,5,1,"div",19),h()()),e&2&&(ce("aria-busy",!!i.pendingLabel()),c(),ie("width",i.viewportWidth(),"px"),c(),ie("width",i.tableWidth(),"px")("transform",i.horizontalTransform()),c(),T(i.showGraph()?3:-1),c(),ie("width",i.descriptionWidth(),"px"),c(4),ie("width",i.columnWidths().date,"px"),c(4),ie("width",i.columnWidths().author,"px"),c(4),ie("width",i.columnWidths().commit,"px"),c(4),T(i.hasWorkingChanges()?20:-1),c(),K(i.visibleStashes()),c(3),T(i.pendingLabel()?24:-1),c(2),T(i.showGraph()?26:-1),c(),k("itemSize",i.rowHeight),c(),k("cdkVirtualForOf",i.graphCommits())("cdkVirtualForTrackBy",i.trackByHash),c(),T(!i.pendingLabel()&&i.graphCommits().length===0?29:-1),c(),T(i.unloaded()>0&&!i.historyLoading()?30:-1))},dependencies:[An,ky,Py,ta,_o,zs],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 bI(n,t){n&1&&J(0,"div",2)}function yI(n,t){if(n&1){let e=P();b(0,"button",4),B("click",function(){_(e);let r=u().$implicit,o=u(2);return v(o.onSelect(r))}),p(1),C()}if(n&2){let e=u().$implicit;me("danger",e.danger),q("disabled",e.disabled),c(),G(" ",e.label," ")}}function CI(n,t){if(n&1&&S(0,bI,1,0,"div",2)(1,yI,2,4,"button",3),n&2){let e=t.$implicit;T(e.separator?0:1)}}function xI(n,t){if(n&1){let e=P();b(0,"div",0),B("click",function(){_(e);let r=u();return v(r.closed.emit())})("contextmenu",function(r){_(e);let o=u();return r.preventDefault(),v(o.closed.emit())}),C(),b(1,"div",1),Q(2,CI,2,1,null,null,Vt),C()}if(n&2){let e=u();c(),ie("left",e.left(),"px")("top",e.top(),"px"),c(),K(t.items)}}var xo=class n{menu=N.required();select=H();closed=H();left=L(()=>{let t=this.menu();return t?Math.max(4,Math.min(t.x,window.innerWidth-250)):0});top=L(()=>{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=pe({type:n,selectors:[["app-context-menu"]],hostBindings:function(e,i){e&1&&D("keydown.escape",function(){return i.onEscape()},Ye)},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&&S(0,xI,4,4),e&2){let r;T((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 _t(n){n||(n=I(et));let t=new de(e=>{if(n.destroyed){e.next();return}return n.onDestroy(e.next.bind(e))});return e=>e.pipe(Ai(t))}function hr(n,t){let e=t?.injector??I(wt),i=new Ri(1),r=Ce(()=>{let o;try{o=n()}catch(s){tt(()=>i.error(s));return}tt(()=>i.next(o))},{injector:e,manualCleanup:!0});return e.get(et).onDestroy(()=>{r.destroy(),i.complete()}),i.asObservable()}var Vy=(n,t)=>t.id;function wI(n,t){if(n&1){let e=P();f(0,"span",2)(1,"span",7),p(2),h(),f(3,"button",8),D("click",function(){let r=_(e).$implicit,o=u();return v(o.remove.emit(r))}),p(4," \xD7 "),h()()}if(n&2){let e=t.$implicit,i=u();c(),k("title",e.description??e.label),c(),O(e.label),c(),k("disabled",i.disabled()),ce("aria-label","Remove "+e.label)}}function EI(n,t){if(n&1){let e=P();f(0,"button",9),D("mousedown",function(r){return _(e),v(r.preventDefault())})("click",function(){_(e);let r=u();return v(r.trailingAction.emit())}),p(1),h()}if(n&2){let e=u();me("on",e.trailingPressed()),k("title",e.trailingLabel())("disabled",e.disabled()),ce("aria-pressed",e.trailingPressed())("aria-label",e.trailingLabel()),c(),G(" ",e.trailingIcon()," ")}}function DI(n,t){if(n&1&&z(0,"app-error-banner",5),n&2){let e=u();k("message",e.error())}}function SI(n,t){n&1&&(f(0,"li",10),p(1,"Searching..."),h())}function TI(n,t){n&1&&(f(0,"li",10),p(1,"No matches"),h())}function MI(n,t){if(n&1&&(f(0,"span",14),p(1),h()),n&2){let e=u().$implicit;c(),O(e.description)}}function kI(n,t){if(n&1){let e=P();f(0,"li",12),D("mousedown",function(r){let o=_(e).$implicit,s=u(2);return v(s.onSuggestionMouseDown(r,o))}),f(1,"span",13),p(2),h(),S(3,MI,2,1,"span",14),h()}if(n&2){let e=t.$implicit,i=t.$index,r=u(2);me("active",i===r.highlight()),ce("aria-selected",i===r.highlight()),c(2),O(e.label),c(),T(e.description?3:-1)}}function II(n,t){if(n&1&&(f(0,"ul",6),S(1,SI,2,0,"li",10),S(2,TI,2,0,"li",10),Q(3,kI,4,5,"li",11,Vy),h()),n&2){let e=u();c(),T(e.loading()?1:-1),c(),T(!e.loading()&&!e.error()&&!e.suggestions().length?2:-1),c(),K(e.suggestions())}}var wo=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=H();select=H();remove=H();trailingAction=H();open=x(!1);highlight=x(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=pe({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&&(f(0,"div",0)(1,"div",1),Q(2,wI,5,4,"span",2,Vy),f(4,"input",3),D("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()}),h(),S(5,EI,2,7,"button",4),h(),S(6,DI,1,1,"app-error-banner",5),S(7,II,5,2,"ul",6),h()),e&2&&(c(2),K(i.chips()),c(2),k("value",i.query())("disabled",i.disabled()),ce("placeholder",i.chips().length?"":i.placeholder()),c(),T(i.trailingIcon()?5:-1),c(),T(i.error()?6:-1),c(),T(i.open()&&(i.loading()||i.suggestions().length>0||i.query().trim())?7:-1))},dependencies:[at],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})};var Uh=(n,t)=>t.name;function PI(n,t){if(n&1&&(f(0,"a",10),p(1," Open in Azure DevOps "),h()),n&2){let e=u();k("href",e.url,ar)}}function OI(n,t){if(n&1&&(f(0,"p",14),p(1),h()),n&2){let e=t.$implicit;c(),O(e)}}function RI(n,t){if(n&1&&Q(0,OI,2,1,"p",14,Rt),n&2){let e=u();K(e.warnings)}}function NI(n,t){if(n&1){let e=P();f(0,"div",8)(1,"p",9),p(2),h(),S(3,PI,2,1,"a",10),f(4,"p",11),p(5),h(),S(6,RI,2,0),h(),f(7,"div",12)(8,"button",13),D("click",function(){_(e);let r=u();return v(r.closed.emit())}),p(9,"Close"),h()()}if(n&2){let e=t;c(2),G("\u2714 Pull Request #",e.id," created"),c(),T(e.url?3:-1),c(2),G("Source branch: ",e.branch),c(),T(e.warnings!=null&&e.warnings.length?6:-1)}}function AI(n,t){if(n&1&&(f(0,"option",22),p(1),h()),n&2){let e=t.$implicit,i=u(2);k("value",e.name)("selected",i.source()===e.name),c(),G(" ",e.name," ")}}function LI(n,t){if(n&1&&(f(0,"option",22),p(1),h()),n&2){let e=t.$implicit,i=u(2);k("value",e.name)("selected",i.source()===e.name),c(),G(" ",e.name," ")}}function FI(n,t){n&1&&(f(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. "),h())}function VI(n,t){if(n&1&&(f(0,"option",22),p(1),h()),n&2){let e=t.$implicit,i=u(2);k("value",e.name)("selected",i.target()===e.name),c(),G(" ",e.name," ")}}function BI(n,t){if(n&1&&(f(0,"p",11),p(1),h()),n&2){let e=u(2);c(),G('Press Enter to add "',e.tagQuery().trim(),'" as a new tag.')}}function jI(n,t){if(n&1&&z(0,"app-error-banner",30),n&2){let e=u(2);k("message",e.error())}}function $I(n,t){if(n&1){let e=P();f(0,"div",15)(1,"label",16)(2,"span",17),p(3,"Title"),h(),f(4,"input",18),D("input",function(r){_(e);let o=u();return v(o.onTitleInput(r))}),h()(),f(5,"label",16)(6,"span",17),p(7,"Description"),h(),f(8,"textarea",19),D("input",function(r){_(e);let o=u();return v(o.onDescriptionInput(r))}),h()(),f(9,"label",16)(10,"span",17),p(11,"Source branch"),h(),f(12,"select",20),D("change",function(r){_(e);let o=u();return v(o.onSourceChange(r))}),f(13,"optgroup",21)(14,"option",22),p(15," \u2795 Create new branch (random name) "),h()(),f(16,"optgroup",23),Q(17,AI,2,3,"option",22,Uh),h(),f(19,"optgroup",24),Q(20,LI,2,3,"option",22,Uh),h()()(),S(22,FI,2,0,"p",11),f(23,"label",16)(24,"span",17),p(25,"Target branch"),h(),f(26,"select",20),D("change",function(r){_(e);let o=u();return v(o.onTargetChange(r))}),Q(27,VI,2,3,"option",22,Uh),h()(),f(29,"label",25)(30,"input",26),D("change",function(r){_(e);let o=u();return v(o.isDraft.set(r.target.checked))}),h(),p(31," Create as draft "),h(),f(32,"label",16)(33,"span",17),p(34,"Required reviewers"),h(),f(35,"app-chip-input",27),D("queryChange",function(r){_(e);let o=u();return v(o.requiredReviewerQuery.set(r))})("select",function(r){_(e);let o=u();return v(o.addRequiredReviewer(r))})("remove",function(r){_(e);let o=u();return v(o.removeRequiredReviewer(r))}),h()(),f(36,"label",16)(37,"span",17),p(38,"Optional reviewers"),h(),f(39,"app-chip-input",27),D("queryChange",function(r){_(e);let o=u();return v(o.optionalReviewerQuery.set(r))})("select",function(r){_(e);let o=u();return v(o.addOptionalReviewer(r))})("remove",function(r){_(e);let o=u();return v(o.removeOptionalReviewer(r))}),h()(),f(40,"label",16)(41,"span",17),p(42,"Work items"),h(),f(43,"app-chip-input",28),D("queryChange",function(r){_(e);let o=u();return v(o.workItemQuery.set(r))})("select",function(r){_(e);let o=u();return v(o.addWorkItem(r))})("remove",function(r){_(e);let o=u();return v(o.removeWorkItem(r))}),h()(),f(44,"label",16)(45,"span",17),p(46,"Tags"),h(),f(47,"app-chip-input",29),D("queryChange",function(r){_(e);let o=u();return v(o.tagQuery.set(r))})("select",function(r){_(e);let o=u();return v(o.addTag(r))})("remove",function(r){_(e);let o=u();return v(o.removeTag(r))}),h()(),S(48,BI,2,1,"p",11),S(49,jI,1,1,"app-error-banner",30),h(),f(50,"div",12)(51,"button",31),D("click",function(){_(e);let r=u();return v(r.closed.emit())}),p(52," Cancel "),h(),f(53,"button",32),D("click",function(){_(e);let r=u();return v(r.create())}),p(54),h()()}if(n&2){let e=u();c(4),k("value",e.title()),c(4),k("value",e.description()),c(6),k("value",e.newBranchValue)("selected",e.source()===e.newBranchValue),c(3),K(e.localBranches()),c(3),K(e.remoteBranches()),c(2),T(e.source()===e.newBranchValue?22:-1),c(5),K(e.remoteBranches()),c(3),k("checked",e.isDraft())("disabled",e.creating()),c(5),k("chips",e.requiredReviewers())("suggestions",e.requiredReviewerSuggestions())("loading",e.requiredReviewersLoading())("error",e.requiredReviewersError())("query",e.requiredReviewerQuery()),c(4),k("chips",e.optionalReviewers())("suggestions",e.optionalReviewerSuggestions())("loading",e.optionalReviewersLoading())("error",e.optionalReviewersError())("query",e.optionalReviewerQuery()),c(4),k("chips",e.workItemChips())("suggestions",e.workItemSuggestions())("loading",e.workItemsLoading())("error",e.workItemsError())("query",e.workItemQuery()),c(4),k("chips",e.tagChips())("suggestions",e.filteredTagSuggestions())("loading",e.tagsLoading())("error",e.tagsError())("query",e.tagQuery())("allowFreeText",!0),c(),T(e.tagQuery().trim()&&!e.tagSuggestions().length&&!e.tagsLoading()?48:-1),c(),T(e.error()?49:-1),c(2),k("disabled",e.creating()),c(2),k("disabled",!e.canCreate()),c(),G(" ",e.creating()?"Creating...":"Create Pull Request"," ")}}var By="__new__",od=class n{git=I(lt);destroyRef=I(et);branches=N.required();closed=H();created=H();newBranchValue=By;isDraft=x(!1);title=x("");description=x("");source=x("");target=x("");creating=x(!1);error=x("");result=x(null);requiredReviewers=x([]);optionalReviewers=x([]);workItemChips=x([]);tagChips=x([]);requiredReviewerQuery=x("");optionalReviewerQuery=x("");workItemQuery=x("");tagQuery=x("");requiredReviewerSuggestions=x([]);optionalReviewerSuggestions=x([]);workItemSuggestions=x([]);tagSuggestions=x([]);requiredReviewersLoading=x(!1);optionalReviewersLoading=x(!1);requiredReviewersError=x("");optionalReviewersError=x("");workItemsError=x("");tagsError=x("");workItemsLoading=x(!1);tagsLoading=x(!1);localBranches=L(()=>this.branches().filter(t=>!t.remote));remoteBranches=L(()=>this.branches().filter(t=>t.remote));canCreate=L(()=>!this.creating()&&!!this.target()&&!!this.source());filteredTagSuggestions=L(()=>{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){hr(t).pipe(yt(l=>(e.set([]),r.set(""),i.set(l.trim().length>=a),l.trim().length<a?we([]):new de(d=>{let m=setTimeout(()=>{d.next(l.trim()),d.complete()},300);return()=>clearTimeout(m)}).pipe(yt(o),ot(d=>(r.set(d?.error?.error||"Unable to load suggestions. Try searching again."),we([])))))),_t(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(_t(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()===By;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=pe({type:n,selectors:[["app-create-pr-dialog"]],hostBindings:function(e,i){e&1&&D("keydown.escape",function(){return i.onEscape()},Ye)},inputs:{branches:[1,"branches"]},outputs:{closed:"closed",created:"created"},decls:11,vars:2,consts:[[1,"backdrop",3,"click"],["role","dialog","aria-modal","true","aria-labelledby","create-pr-title",1,"dialog"],[1,"dialog-head"],["id","create-pr-title",1,"title"],["type","button","title","Close","aria-label","Close dialog",1,"icon-btn",3,"click","disabled"],["viewBox","0 0 24 24","aria-hidden","true"],["x1","18","y1","6","x2","6","y2","18"],["x1","6","y1","6","x2","18","y2","18"],[1,"success"],[1,"success-line"],["target","_blank","rel","noopener",1,"pr-link",3,"href"],[1,"hint"],[1,"actions"],["type","button",1,"btn","btn-primary",3,"click"],[1,"warning"],[1,"form"],[1,"field"],[1,"field-label"],["type","text","placeholder","Pull request title",1,"input",3,"input","value"],["rows","3","placeholder","Optional description",1,"input","description",3,"input","value"],[1,"input",3,"change"],["label","New branch"],[3,"value","selected"],["label","Local branches"],["label","Remote branches"],[1,"draft-option"],["type","checkbox",3,"change","checked","disabled"],["placeholder","Search users by name or email",3,"queryChange","select","remove","chips","suggestions","loading","error","query"],["placeholder","Search by id or title",3,"queryChange","select","remove","chips","suggestions","loading","error","query"],["placeholder","Add tags (Enter to add)",3,"queryChange","select","remove","chips","suggestions","loading","error","query","allowFreeText"],[3,"message"],["type","button",1,"btn",3,"click","disabled"],["type","button",1,"btn","btn-primary",3,"click","disabled"]],template:function(e,i){if(e&1&&(f(0,"div",0),D("click",function(){return i.onBackdropClick()}),h(),f(1,"div",1)(2,"header",2)(3,"h3",3),p(4,"Create Pull Request"),h(),f(5,"button",4),D("click",function(){return i.closed.emit()}),V(),f(6,"svg",5),z(7,"line",6)(8,"line",7),h()()(),S(9,NI,10,4)(10,$I,55,33),h()),e&2){let r;c(5),k("disabled",i.creating()),c(4),T((r=i.result())?9:10,r)}},dependencies:[at,wo],styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#00000080;z-index:400}.dialog[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(480px,calc(100vw - 48px));max-height:calc(100vh - 64px);overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:12px;background:var(--bg-alt);border:1px solid var(--border);border-radius:8px;box-shadow:0 10px 36px #0009;z-index:401}.dialog-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px}.title[_ngcontent-%COMP%]{margin:0;font-size:14px;font-weight:600;color:var(--text-bright)}.icon-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--text-dim);cursor:pointer}.icon-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.icon-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.field-label[_ngcontent-%COMP%]{font-size:12px;color:var(--text-dim)}.input[_ngcontent-%COMP%]{padding:7px 10px;border:1px solid var(--border);border-radius:4px;background:var(--bg);color:var(--text);font-size:13px;font-family:inherit;outline:none}.input[_ngcontent-%COMP%]:focus{border-color:var(--accent)}textarea.description[_ngcontent-%COMP%]{resize:vertical;min-height:60px}.hint[_ngcontent-%COMP%]{margin:-6px 0 0;font-size:11px;color:var(--text-dim)}.warning[_ngcontent-%COMP%]{margin:0;padding:8px 10px;border:1px solid #8a6c10;border-radius:4px;background:#8a6c1026;color:#dcb67a;font-size:12px;word-break:break-word}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px}.btn[_ngcontent-%COMP%]{padding:6px 14px;border:1px solid var(--border);border-radius:4px;background:transparent;color:var(--text);font-size:12px;font-family:inherit;cursor:pointer}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}.btn-primary[_ngcontent-%COMP%]{background:var(--accent);border-color:var(--accent);color:#fff}.btn-primary[_ngcontent-%COMP%]:hover:not(:disabled){background:#2b7cd3}.success[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.success-line[_ngcontent-%COMP%]{margin:0;font-size:13px;color:#4ec9b0}.pr-link[_ngcontent-%COMP%]{font-size:13px;color:var(--accent);text-decoration:none}.pr-link[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};var HI=(n,t)=>t.name;function UI(n,t){n&1&&(b(0,"p"),p(1,"Repository preferences and Git configuration."),C())}function zI(n,t){if(n&1&&(b(0,"div",5),p(1),C()),n&2){let e=u();c(),O(e.error())}}function GI(n,t){if(n&1){let e=P();b(0,"div",30)(1,"strong",31),p(2),C(),b(3,"span",32),p(4),C(),b(5,"span"),p(6,"Fetch"),C(),b(7,"span",33)(8,"button",34),B("click",function(){let r=_(e).$implicit,o=u(2);return v(o.editRemote(r))}),p(9,"Edit"),C(),b(10,"button",35),B("click",function(){let r=_(e).$implicit,o=u(2);return v(o.removeRemote(r.name))}),p(11,"Remove"),C()()(),b(12,"div",36),J(13,"span"),b(14,"span",32),p(15),C(),b(16,"span"),p(17,"Push"),C(),J(18,"span"),C()}if(n&2){let e=t.$implicit;c(2),O(e.name),c(2),O(e.fetchUrl),c(11),O(e.pushUrl)}}function WI(n,t){n&1&&(b(0,"p",19),p(1,"No remotes configured."),C())}function qI(n,t){if(n&1){let e=P();b(0,"div",13)(1,"span"),p(2,"Issue regex"),C(),b(3,"code"),p(4),C(),b(5,"span"),p(6,"Issue URL"),C(),b(7,"code"),p(8),C(),b(9,"span"),p(10,"Scope"),C(),b(11,"strong"),p(12),C()(),b(13,"div",14)(14,"button",15),B("click",function(){_(e);let r=u(2);return v(r.editIssueLinking())}),p(15,"Edit"),C(),b(16,"button",37),B("click",function(){_(e);let r=u(2);return v(r.removeIssueLinking())}),p(17,"Remove"),C()()}if(n&2){let e=t;c(4),O(e.regex),c(4),O(e.url),c(4),O(e.useGlobally?"Global":"This repository")}}function ZI(n,t){if(n&1){let e=P();b(0,"div",14)(1,"button",15),B("click",function(){_(e);let r=u(2);return v(r.editIssueLinking())}),p(2,"+ Add Issue Linking"),C()()}}function YI(n,t){if(n&1){let e=P();b(0,"div",6)(1,"fieldset")(2,"legend"),p(3,"Repository"),C(),b(4,"label",7)(5,"span")(6,"strong"),p(7,"Automatically refresh"),C(),b(8,"small"),p(9,"Reload changes made outside Guito."),C()(),b(10,"input",8),B("change",function(r){_(e);let o=u();return v(o.setChecked(r.target,"autoReload"))}),C()(),b(11,"label",7)(12,"span")(13,"strong"),p(14,"Show Git graph"),C(),b(15,"small"),p(16,"Display branch lines beside commit history."),C()(),b(17,"input",8),B("change",function(r){_(e);let o=u();return v(o.setChecked(r.target,"showGraph"))}),C()(),b(18,"label",7)(19,"span")(20,"strong"),p(21,"Show stashes"),C(),b(22,"small"),p(23,"Pin stash entries above commit history."),C()(),b(24,"input",8),B("change",function(r){_(e);let o=u();return v(o.setChecked(r.target,"showStashes"))}),C()(),b(25,"label",7)(26,"span")(27,"strong"),p(28,"Show tags"),C(),b(29,"small"),p(30,"Show tag badges attached to commits."),C()(),b(31,"input",8),B("change",function(r){_(e);let o=u();return v(o.setChecked(r.target,"showTags"))}),C()(),b(32,"label",7)(33,"span")(34,"strong"),p(35,"Show remote branches"),C(),b(36,"small"),p(37,"Include remote branches in the repository panel and branch pills."),C()(),b(38,"input",8),B("change",function(r){_(e);let o=u();return v(o.setChecked(r.target,"showRemoteBranches"))}),C()(),b(39,"label",9)(40,"span")(41,"strong"),p(42,"Search mode"),C(),b(43,"small"),p(44,"Navigate jumps between matches with arrows; filter shows only matching commits."),C()(),b(45,"select",10),B("change",function(r){_(e);let o=u();return v(o.changeSearchMode(r.target))}),b(46,"option",11),p(47,"Navigate matches"),C(),b(48,"option",12),p(49,"Filter matches"),C()()(),b(50,"label",7)(51,"span")(52,"strong"),p(53,"Case-sensitive search"),C(),b(54,"small"),p(55,"Only match commits and repository panel items with the same uppercase and lowercase letters and accents."),C()(),b(56,"input",8),B("change",function(r){_(e);let o=u();return v(o.setChecked(r.target,"searchCaseSensitive"))}),C()()(),b(57,"fieldset")(58,"legend"),p(59,"User details"),C(),b(60,"div",13)(61,"span"),p(62,"User name"),C(),b(63,"strong"),p(64),C(),b(65,"span"),p(66,"User email"),C(),b(67,"strong"),p(68),C()(),b(69,"div",14)(70,"button",15),B("click",function(){_(e);let r=u();return v(r.editIdentity())}),p(71,"Edit"),C(),b(72,"button",16),B("click",function(){_(e);let r=u();return v(r.removeIdentity())}),p(73,"Remove"),C()()(),b(74,"fieldset")(75,"legend"),p(76,"Remote configuration"),C(),b(77,"div",17)(78,"div",18)(79,"strong"),p(80,"Remote"),C(),b(81,"strong"),p(82,"URL"),C(),b(83,"strong"),p(84,"Type"),C(),b(85,"strong"),p(86,"Action"),C()(),Q(87,GI,19,3,null,null,HI,!1,WI,2,0,"p",19),C(),b(90,"div",14)(91,"button",15),B("click",function(){_(e);let r=u();return v(r.editRemote())}),p(92,"+ Add Remote"),C()()(),b(93,"fieldset")(94,"legend"),p(95,"Issue linking"),C(),b(96,"p",20),p(97,"Convert issue numbers in commit messages into links to your issue tracking system."),C(),S(98,qI,18,3)(99,ZI,3,0,"div",14),C(),b(100,"fieldset")(101,"legend"),p(102,"Branches and tags"),C(),b(103,"label",21)(104,"input",22),B("change",function(){_(e);let r=u();return v(r.refListView.set("flat"))}),C(),b(105,"span")(106,"strong"),p(107,"Flat list"),C(),b(108,"small"),p(109,"Show each branch and tag with its full name."),C()()(),b(110,"label",21)(111,"input",22),B("change",function(){_(e);let r=u();return v(r.refListView.set("tree"))}),C(),b(112,"span")(113,"strong"),p(114,"Directory tree"),C(),b(115,"small"),p(116,"Group branches and tags into collapsible namespace folders."),C()()()(),b(117,"fieldset")(118,"legend"),p(119,"Changed files"),C(),b(120,"label",21)(121,"input",23),B("change",function(){_(e);let r=u();return v(r.fileListView.set("flat"))}),C(),b(122,"span")(123,"strong"),p(124,"Flat list"),C(),b(125,"small"),p(126,"Show each file with its full path."),C()()(),b(127,"label",21)(128,"input",23),B("change",function(){_(e);let r=u();return v(r.fileListView.set("tree"))}),C(),b(129,"span")(130,"strong"),p(131,"Directory tree"),C(),b(132,"small"),p(133,"Group files into collapsible folders."),C()()()(),b(134,"fieldset")(135,"legend"),p(136,"Azure DevOps"),C(),b(137,"label",24)(138,"span")(139,"strong"),p(140,"Server URL"),C(),b(141,"small"),p(142,"Enables pull request creation for an on-prem Azure DevOps Server."),C()(),b(143,"input",25),B("input",function(r){_(e);let o=u();return v(o.azureDevOpsUrl.set(r.target.value))}),C()(),b(144,"label",26)(145,"span")(146,"strong"),p(147,"Automatic PR branch name"),C(),b(148,"small"),p(149,"Used when creating a new branch for a pull request. Variables: username, randomstring, branch, targetbranch, title, repository, date, time, and timestamp (wrapped as dollar-brace placeholders)."),C()(),b(150,"input",27),B("input",function(r){_(e);let o=u();return v(o.prBranchNameTemplate.set(r.target.value))}),C()(),b(151,"label",7)(152,"span")(153,"strong"),p(154,"Allow merge completion"),C(),b(155,"small"),p(156,'Offer the "No fast-forward (merge commit)" and "Semi-linear merge" pull request completion strategies.'),C()(),b(157,"input",8),B("change",function(r){_(e);let o=u();return v(o.setChecked(r.target,"allowMerge"))}),C()()()(),b(158,"footer")(159,"button",28),B("click",function(){_(e);let r=u();return v(r.closed.emit())}),p(160,"Cancel"),C(),b(161,"button",29),B("click",function(){_(e);let r=u();return v(r.save())}),p(162),C()()}if(n&2){let e,i=u();c(10),q("checked",i.autoReload()),c(7),q("checked",i.showGraph()),c(7),q("checked",i.showStashes()),c(7),q("checked",i.showTags()),c(7),q("checked",i.showRemoteBranches()),c(7),q("value",i.searchMode()),c(11),q("checked",i.searchCaseSensitive()),c(8),O(i.identity().name||"Not configured"),c(4),O(i.identity().email||"Not configured"),c(4),q("disabled",i.busy()),c(15),K(i.remotes()),c(11),T((e=i.settings().issueLinking)?98:99,e),c(6),q("checked",i.refListView()==="flat"),c(7),q("checked",i.refListView()==="tree"),c(10),q("checked",i.fileListView()==="flat"),c(7),q("checked",i.fileListView()==="tree"),c(15),q("value",i.azureDevOpsUrl()),c(7),q("value",i.prBranchNameTemplate()),c(7),q("checked",i.allowMerge()),c(2),q("disabled",i.saving()),c(2),q("disabled",i.saving()||i.busy()),c(),O(i.saving()?"Saving...":"Save settings")}}function QI(n,t){if(n&1){let e=P();b(0,"label",39)(1,"span")(2,"strong"),p(3,"User name"),C()(),b(4,"input",40),B("input",function(r){_(e);let o=u(2);return v(o.userName.set(r.target.value))}),C()(),b(5,"label",39)(6,"span")(7,"strong"),p(8,"User email"),C()(),b(9,"input",41),B("input",function(r){_(e);let o=u(2);return v(o.userEmail.set(r.target.value))}),C()()}if(n&2){let e=u(2);c(4),q("value",e.userName()),c(5),q("value",e.userEmail())}}function KI(n,t){if(n&1){let e=P();b(0,"label",39)(1,"span")(2,"strong"),p(3,"Remote name"),C()(),b(4,"input",42),B("input",function(r){_(e);let o=u(2);return v(o.remoteName.set(r.target.value))}),C()(),b(5,"label",39)(6,"span")(7,"strong"),p(8,"Fetch URL"),C()(),b(9,"input",43),B("input",function(r){_(e);let o=u(2);return v(o.fetchUrl.set(r.target.value))}),C()(),b(10,"label",39)(11,"span")(12,"strong"),p(13,"Push URL"),C(),b(14,"small"),p(15,"Leave blank to use the fetch URL."),C()(),b(16,"input",44),B("input",function(r){_(e);let o=u(2);return v(o.pushUrl.set(r.target.value))}),C()()}if(n&2){let e=u(2);c(4),q("value",e.remoteName()),c(5),q("value",e.fetchUrl()),c(7),q("value",e.pushUrl())}}function XI(n,t){if(n&1){let e=P();b(0,"p",20),p(1,"For example, regex "),b(2,"code"),p(3,"#(\\d+)"),C(),p(4," and URL "),b(5,"code"),p(6,"https://github.com/owner/repo/issues/$1"),C(),p(7," turn #123 into a link."),C(),b(8,"label",39)(9,"span")(10,"strong"),p(11,"Issue regex"),C()(),b(12,"input",45),B("input",function(r){_(e);let o=u(2);return v(o.issueRegex.set(r.target.value))}),C()(),b(13,"label",39)(14,"span")(15,"strong"),p(16,"Issue URL"),C()(),b(17,"input",46),B("input",function(r){_(e);let o=u(2);return v(o.issueUrl.set(r.target.value))}),C()(),b(18,"label",21)(19,"input",8),B("change",function(r){_(e);let o=u(2);return v(o.issueGlobal.set(r.target.checked))}),C(),b(20,"span")(21,"strong"),p(22,"Use globally"),C(),b(23,"small"),p(24,"Apply this rule to repositories without their own rule."),C()()()}if(n&2){let e=u(2);c(12),q("value",e.issueRegex()),c(5),q("value",e.issueUrl()),c(2),q("checked",e.issueGlobal())}}function JI(n,t){if(n&1){let e=P();b(0,"div",38),S(1,QI,10,2)(2,KI,17,3)(3,XI,25,3),C(),b(4,"footer")(5,"button",28),B("click",function(){_(e);let r=u();return v(r.mode.set("main"))}),p(6,"Cancel"),C(),b(7,"button",29),B("click",function(){_(e);let r=u();return v(r.mode()==="identity"?r.saveIdentity():r.mode()==="remote"?r.saveRemote():r.saveIssueLinking())}),p(8),C()()}if(n&2){let e=u();c(),T(e.mode()==="identity"?1:e.mode()==="remote"?2:3),c(4),q("disabled",e.busy()),c(2),q("disabled",e.busy()),c(),O(e.busy()?"Saving...":"Save")}}var sd=class n{git=I(lt);settings=N.required();identity=N.required();saving=N(!1);saved=H();settingsUpdated=H();identityChanged=H();repositoryChanged=H();closed=H();azureDevOpsUrl=x("");prBranchNameTemplate=x("pr/${randomstring}");autoReload=x(!0);showGraph=x(!0);showStashes=x(!1);showTags=x(!0);showRemoteBranches=x(!0);fileListView=x("flat");refListView=x("flat");searchMode=x("navigate");searchCaseSensitive=x(!1);allowMerge=x(!0);remotes=x([]);busy=x(!1);error=x("");mode=x("main");userName=x("");userEmail=x("");originalRemoteName=x("");remoteName=x("");fetchUrl=x("");pushUrl=x("");issueRegex=x("");issueUrl=x("");issueGlobal=x(!1);remotesLoaded=!1;constructor(){Ce(()=>{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.searchMode.set(t.searchMode==="filter"?"filter":"navigate"),this.searchCaseSensitive.set(t.searchCaseSensitive===!0),this.allowMerge.set(t.allowMerge!==!1),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(),searchMode:this.searchMode(),searchCaseSensitive:this.searchCaseSensitive(),allowMerge:this.allowMerge()})}changeSearchMode(t){let e=t.value;this.searchMode.set(e==="filter"?"filter":"navigate")}editIdentity(){this.userName.set(this.identity().name),this.userEmail.set(this.identity().email),this.error.set(""),this.mode.set("identity")}saveIdentity(){this.run(this.git.saveIdentity({name:this.userName().trim(),email:this.userEmail().trim()}),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=pe({type:n,selectors:[["app-settings-dialog"]],hostBindings:function(e,i){e&1&&D("keydown.escape",function(){return i.onEscape()},Ye)},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","azure-devops-url",1,"text-setting"],["id","azure-devops-url","type","url","placeholder","https://server/DefaultCollection",3,"input","value"],["for","pr-branch-name-template",1,"text-setting"],["id","pr-branch-name-template","type","text","maxlength","200",3,"input","value"],["type","button",1,"btn",3,"click","disabled"],["type","button",1,"btn","primary",3,"click","disabled"],["role","row",1,"remote-row"],[1,"remote-name"],[1,"remote-url"],[1,"row-actions"],["type","button","title","Edit remote",3,"click"],["type","button","title","Remove remote",1,"danger-link",3,"click"],["role","row",1,"remote-row","push-row"],["type","button",1,"danger-link",3,"click"],[1,"editor-body"],[1,"text-setting"],["aria-label","User name",3,"input","value"],["aria-label","User email","type","email",3,"input","value"],["aria-label","Remote name","placeholder","origin",3,"input","value"],["aria-label","Fetch URL",3,"input","value"],["aria-label","Push URL",3,"input","value"],["aria-label","Issue regex",3,"input","value"],["aria-label","Issue URL","type","url",3,"input","value"]],template:function(e,i){e&1&&(b(0,"div",0),B("click",function(){return!i.saving()&&!i.busy()&&i.closed.emit()}),C(),b(1,"section",1)(2,"header",2)(3,"div")(4,"h2",3),p(5),C(),S(6,UI,2,0,"p"),C(),b(7,"button",4),B("click",function(){return i.closed.emit()}),p(8,"\xD7"),C()(),S(9,zI,2,1,"div",5),S(10,YI,163,22)(11,JI,9,4),C()),e&2&&(c(5),O(i.mode()==="main"?"Settings":i.mode()==="identity"?"Edit User Details":i.mode()==="remote"?i.originalRemoteName()?"Edit Remote":"Add Remote":"Issue Linking"),c(),T(i.mode()==="main"?6:-1),c(),q("disabled",i.saving()||i.busy()),c(2),T(i.error()?9:-1),c(),T(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 eP=["inputEl"],tP=["searchEl"],nP=(n,t)=>t.value;function iP(n,t){if(n&1&&(b(0,"p",5),p(1),C()),n&2){let e=u();c(),O(e.label)}}function rP(n,t){if(n&1){let e=P();b(0,"input",13,0),B("input",function(r){_(e);let o=u(3);return v(o.onSearch(r))})("keydown.enter",function(r){_(e);let o=u(3);return v(o.onSearchEnter(r))}),C()}if(n&2){let e=u(3);q("value",e.search())}}function oP(n,t){if(n&1&&(b(0,"span",18),p(1),C()),n&2){let e=u().$implicit;c(),O(e.description)}}function sP(n,t){if(n&1){let e=P();b(0,"button",14),B("click",function(){let r=_(e).$implicit,o=u(3);return v(o.choose(r))})("dblclick",function(){_(e);let r=u(3);return v(r.confirm())}),J(1,"span",15),b(2,"span",16)(3,"span",17),p(4),C(),S(5,oP,2,1,"span",18),C()()}if(n&2){let e=t.$implicit,i=u(3);me("selected",i.choice()===e.value)("danger",e.danger),ce("aria-checked",i.choice()===e.value),c(4),O(e.label),c(),T(e.description?5:-1)}}function aP(n,t){n&1&&(b(0,"p",12),p(1,"No matching branches"),C())}function lP(n,t){if(n&1&&(S(0,rP,2,1,"input",9),b(1,"div",10),Q(2,sP,6,7,"button",11,nP,!1,aP,2,0,"p",12),C()),n&2){let e=u(),i=u();T(e.searchable?0:-1),c(2),K(i.filteredOptions())}}function cP(n,t){if(n&1){let e=P();b(0,"label",19),p(1),C(),b(2,"input",20,1),B("input",function(r){_(e);let o=u(2);return v(o.onInput(r))})("keydown.enter",function(){_(e);let r=u(2);return v(r.confirm())}),C()}if(n&2){let e=u(),i=u();c(),O(e.label||e.title),c(),q("value",i.value()),ce("placeholder",e.placeholder||" ")("aria-label",e.label||e.title)}}function dP(n,t){if(n&1){let e=P();b(0,"div",2),B("click",function(){_(e);let r=u();return v(r.cancelled.emit())}),C(),b(1,"div",3)(2,"h3",4),p(3),C(),S(4,iP,2,1,"p",5),S(5,lP,5,2)(6,cP,4,4),b(7,"div",6)(8,"button",7),B("click",function(){_(e);let r=u();return v(r.cancelled.emit())}),p(9,"Cancel"),C(),b(10,"button",8),B("click",function(){_(e);let r=u();return v(r.confirm())}),p(11),C()()()}if(n&2){let e=t,i=u();c(3),O(e.title),c(),T(e.label?4:-1),c(),T(i.options().length>0?5:e.confirmOnly?-1:6),c(5),me("btn-danger",e.danger),q("disabled",i.options().length===0&&!e.confirmOnly&&!e.allowEmpty&&!i.value().trim()||e.searchable&&i.filteredOptions().length===0),c(),G(" ",e.okLabel||"OK"," ")}}var ad=class n{state=N.required();confirmed=H();cancelled=H();value=x("");choice=x("");options=L(()=>this.state()?.options??[]);search=x("");filteredOptions=L(()=>{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=en("inputEl");searchEl=en("searchEl");constructor(){Ce(()=>{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=pe({type:n,selectors:[["app-prompt-dialog"]],viewQuery:function(e,i){e&1&&(jt(i.inputEl,eP,5),jt(i.searchEl,tP,5)),e&2&&vn(2)},hostBindings:function(e,i){e&1&&D("keydown.escape",function(){return i.onEscape()},Ye)},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&&S(0,dP,12,7),e&2){let r;T((r=i.state())?0:-1,r)}},styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#00000080;z-index:400}.dialog[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(420px,calc(100vw - 48px));padding:18px;display:flex;flex-direction:column;gap:12px;background:var(--bg-alt);border:1px solid var(--border);border-radius:8px;box-shadow:0 10px 36px #0009;z-index:401}.title[_ngcontent-%COMP%]{margin:0;font-size:14px;font-weight:600;color:var(--text-bright)}.label[_ngcontent-%COMP%]{margin:0;font-size:12px;color:var(--text-dim)}.input[_ngcontent-%COMP%]{padding:7px 10px;border:1px solid var(--border);border-radius:4px;background:var(--bg);color:var(--text);font-size:13px;font-family:inherit;outline:none}.input[_ngcontent-%COMP%]:focus{border-color:var(--accent)}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px}.btn[_ngcontent-%COMP%]{padding:6px 14px;border:1px solid var(--border);border-radius:4px;background:transparent;color:var(--text);font-size:12px;font-family:inherit;cursor:pointer}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.btn-primary[_ngcontent-%COMP%]{background:var(--accent);border-color:var(--accent);color:#fff}.btn-primary[_ngcontent-%COMP%]:hover:not(:disabled){background:#2b7cd3}.btn-danger[_ngcontent-%COMP%]{background:#a1260d;border-color:#a1260d;color:#fff}.options[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;max-height:40vh;overflow-y:auto}.no-results[_ngcontent-%COMP%]{margin:0;padding:8px 10px;font-size:12px;color:var(--text-dim)}.option[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;padding:8px 10px;border:1px solid var(--border);border-radius:4px;background:transparent;color:var(--text);font-family:inherit;text-align:left;cursor:pointer}.option[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.option.selected[_ngcontent-%COMP%]{border-color:var(--accent);background:#3794ff1f}.option-radio[_ngcontent-%COMP%]{width:13px;height:13px;margin-top:2px;border:1px solid var(--border);border-radius:50%;flex:none}.option.selected[_ngcontent-%COMP%] .option-radio[_ngcontent-%COMP%]{border-color:var(--accent);background:radial-gradient(circle,var(--accent) 0 40%,transparent 45%)}.option-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;min-width:0}.option-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:var(--text-bright)}.option.danger[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{color:#f48771}.option-description[_ngcontent-%COMP%]{font-size:11px;color:var(--text-dim)}.btn-danger[_ngcontent-%COMP%]:hover:not(:disabled){background:#c42b1c}.btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}"],changeDetection:0})};function qh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var gr=qh();function Gy(n){gr=n}var ra={exec:()=>null};function De(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(Tt.caret,"$1"),e=e.replace(r,s),i},getRegex:()=>new RegExp(e,t)};return i}var Tt={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")},uP=/^(?:[ \t]*(?:\n|$))+/,pP=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,fP=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,oa=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,hP=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Zh=/(?:[*+-]|\d{1,9}[.)])/,Wy=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,qy=De(Wy).replace(/bull/g,Zh).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(),mP=De(Wy).replace(/bull/g,Zh).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(),Yh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,gP=/^[^\n]+/,Qh=/(?!\s*\])(?:\\.|[^\[\]\\])+/,_P=De(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Qh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),vP=De(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Zh).getRegex(),fd="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",Kh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,bP=De("^ {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",Kh).replace("tag",fd).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Zy=De(Yh).replace("hr",oa).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",fd).getRegex(),yP=De(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Zy).getRegex(),Xh={blockquote:yP,code:pP,def:_P,fences:fP,heading:hP,hr:oa,html:bP,lheading:qy,list:vP,newline:uP,paragraph:Zy,table:ra,text:gP},jy=De("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",oa).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",fd).getRegex(),CP=le(W({},Xh),{lheading:mP,table:jy,paragraph:De(Yh).replace("hr",oa).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",jy).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",fd).getRegex()}),xP=le(W({},Xh),{html:De(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Kh).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:ra,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:De(Yh).replace("hr",oa).replace("heading",` *#{1,6} *[^
|
|
7
|
+
]`).replace("lheading",qy).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),wP=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,EP=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Yy=/^( {2,}|\\)\n(?!\s*$)/,DP=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,hd=/[\p{P}\p{S}]/u,Jh=/[\s\p{P}\p{S}]/u,Qy=/[^\s\p{P}\p{S}]/u,SP=De(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Jh).getRegex(),Ky=/(?!~)[\p{P}\p{S}]/u,TP=/(?!~)[\s\p{P}\p{S}]/u,MP=/(?:[^\s\p{P}\p{S}]|~)/u,kP=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Xy=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,IP=De(Xy,"u").replace(/punct/g,hd).getRegex(),PP=De(Xy,"u").replace(/punct/g,Ky).getRegex(),Jy="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",OP=De(Jy,"gu").replace(/notPunctSpace/g,Qy).replace(/punctSpace/g,Jh).replace(/punct/g,hd).getRegex(),RP=De(Jy,"gu").replace(/notPunctSpace/g,MP).replace(/punctSpace/g,TP).replace(/punct/g,Ky).getRegex(),NP=De("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Qy).replace(/punctSpace/g,Jh).replace(/punct/g,hd).getRegex(),AP=De(/\\(punct)/,"gu").replace(/punct/g,hd).getRegex(),LP=De(/^<(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(),FP=De(Kh).replace("(?:-->|$)","-->").getRegex(),VP=De("^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",FP).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),dd=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,BP=De(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",dd).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),eC=De(/^!?\[(label)\]\[(ref)\]/).replace("label",dd).replace("ref",Qh).getRegex(),tC=De(/^!?\[(ref)\](?:\[\])?/).replace("ref",Qh).getRegex(),jP=De("reflink|nolink(?!\\()","g").replace("reflink",eC).replace("nolink",tC).getRegex(),em={_backpedal:ra,anyPunctuation:AP,autolink:LP,blockSkip:kP,br:Yy,code:EP,del:ra,emStrongLDelim:IP,emStrongRDelimAst:OP,emStrongRDelimUnd:NP,escape:wP,link:BP,nolink:tC,punctuation:SP,reflink:eC,reflinkSearch:jP,tag:VP,text:DP,url:ra},$P=le(W({},em),{link:De(/^!?\[(label)\]\((.*?)\)/).replace("label",dd).getRegex(),reflink:De(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",dd).getRegex()}),zh=le(W({},em),{emStrongRDelimAst:RP,emStrongLDelim:PP,url:De(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),HP=le(W({},zh),{br:De(Yy).replace("{2,}","*").getRegex(),text:De(zh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),ld={normal:Xh,gfm:CP,pedantic:xP},na={normal:em,gfm:zh,breaks:HP,pedantic:$P},UP={"&":"&","<":"<",">":">",'"':""","'":"'"},$y=n=>UP[n];function Ln(n,t){if(t){if(Tt.escapeTest.test(n))return n.replace(Tt.escapeReplace,$y)}else if(Tt.escapeTestNoEncode.test(n))return n.replace(Tt.escapeReplaceNoEncode,$y);return n}function Hy(n){try{n=encodeURI(n).replace(Tt.percentDecode,"%")}catch{return null}return n}function Uy(n,t){let e=n.replace(Tt.findPipe,(o,s,a)=>{let l=!1,d=s;for(;--d>=0&&a[d]==="\\";)l=!l;return l?"|":" |"}),i=e.split(Tt.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(Tt.slashPipe,"|");return i}function ia(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 zP(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 zy(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 GP(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 ud=class{options;rules;lexer;constructor(n){this.options=n||gr}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:ia(e,`
|
|
10
|
+
`)}}}fences(n){let t=this.rules.block.fences.exec(n);if(t){let e=t[0],i=GP(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=ia(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:ia(t[0],`
|
|
11
|
+
`)}}blockquote(n){let t=this.rules.block.blockquote.exec(n);if(t){let e=ia(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 d=a.join(`
|
|
14
|
+
`),m=d.replace(this.rules.other.blockquoteSetextReplace,`
|
|
15
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
|
16
|
+
${d}`:d,r=r?`${r}
|
|
17
|
+
${m}`:m;let y=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(m,o,!0),this.lexer.state.top=y,e.length===0)break;let w=o.at(-1);if(w?.type==="code")break;if(w?.type==="blockquote"){let E=w,R=E.raw+`
|
|
18
|
+
`+e.join(`
|
|
19
|
+
`),j=this.blockquote(R);o[o.length-1]=j,i=i.substring(0,i.length-E.raw.length)+j.raw,r=r.substring(0,r.length-E.text.length)+j.text;break}else if(w?.type==="list"){let E=w,R=E.raw+`
|
|
20
|
+
`+e.join(`
|
|
21
|
+
`),j=this.list(R);o[o.length-1]=j,i=i.substring(0,i.length-w.raw.length)+j.raw,r=r.substring(0,r.length-E.raw.length)+j.raw,e=R.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,d="",m="";if(!(t=o.exec(n))||this.rules.block.hr.test(n))break;d=t[0],n=n.substring(d.length);let y=t[2].split(`
|
|
23
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,$=>" ".repeat(3*$.length)),w=n.split(`
|
|
24
|
+
`,1)[0],E=!y.trim(),R=0;if(this.options.pedantic?(R=2,m=y.trimStart()):E?R=t[1].length+1:(R=t[2].search(this.rules.other.nonSpaceChar),R=R>4?1:R,m=y.slice(R),R+=t[1].length),E&&this.rules.other.blankLine.test(w)&&(d+=w+`
|
|
25
|
+
`,n=n.substring(w.length+1),l=!0),!l){let $=this.rules.other.nextBulletRegex(R),_e=this.rules.other.hrRegex(R),Ut=this.rules.other.fencesBeginRegex(R),Be=this.rules.other.headingBeginRegex(R),dt=this.rules.other.htmlBeginRegex(R);for(;n;){let it=n.split(`
|
|
26
|
+
`,1)[0],zt;if(w=it,this.options.pedantic?(w=w.replace(this.rules.other.listReplaceNesting," "),zt=w):zt=w.replace(this.rules.other.tabCharGlobal," "),Ut.test(w)||Be.test(w)||dt.test(w)||$.test(w)||_e.test(w))break;if(zt.search(this.rules.other.nonSpaceChar)>=R||!w.trim())m+=`
|
|
27
|
+
`+zt.slice(R);else{if(E||y.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Ut.test(y)||Be.test(y)||_e.test(y))break;m+=`
|
|
28
|
+
`+w}!E&&!w.trim()&&(E=!0),d+=it+`
|
|
29
|
+
`,n=n.substring(it.length+1),y=zt.slice(R)}}r.loose||(s?r.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(s=!0));let j=null,Z;this.options.gfm&&(j=this.rules.other.listIsTask.exec(m),j&&(Z=j[0]!=="[ ] ",m=m.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:d,task:!!j,checked:Z,loose:!1,text:m,tokens:[]}),r.raw+=d}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 d=r.items[l].tokens.filter(y=>y.type==="space"),m=d.length>0&&d.some(y=>this.rules.other.anyLine.test(y.raw));r.loose=m}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=Uy(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(Uy(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=ia(e.slice(0,-1),"\\");if((e.length-o.length)%2===0)return}else{let o=zP(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)),zy(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 zy(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,d=0,m=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(m.lastIndex=0,t=t.slice(-1*n.length+o);(i=m.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)){d+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+d);let y=[...i[0]][0].length,w=n.slice(0,o+i.index+y+a);if(Math.min(o,a)%2){let R=w.slice(1,-1);return{type:"em",raw:w,text:R,tokens:this.lexer.inlineTokens(R)}}let E=w.slice(2,-2);return{type:"strong",raw:w,text:E,tokens:this.lexer.inlineTokens(E)}}}}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}}}},Gn=class Gh{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||gr,this.options.tokenizer=this.options.tokenizer||new ud,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:Tt,block:ld.normal,inline:na.normal};this.options.pedantic?(e.block=ld.pedantic,e.inline=na.pedantic):this.options.gfm&&(e.block=ld.gfm,this.options.breaks?e.inline=na.breaks:e.inline=na.gfm),this.tokenizer.rules=e}static get rules(){return{block:ld,inline:na}}static lex(t,e){return new Gh(e).lex(t)}static lexInline(t,e){return new Gh(e).inlineTokens(t)}lex(t){t=t.replace(Tt.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(Tt.tabCharGlobal," ").replace(Tt.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(d=>{l=d.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(d=>(a=d.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 d=e.at(-1);a.type==="text"&&d?.type==="text"?(d.raw+=a.raw,d.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 d=1/0,m=t.slice(1),y;this.options.extensions.startInline.forEach(w=>{y=w.call({lexer:this},m),typeof y=="number"&&y>=0&&(d=Math.min(d,y))}),d<1/0&&d>=0&&(l=t.substring(0,d+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 d=e.at(-1);d?.type==="text"?(d.raw+=a.raw,d.text+=a.text):e.push(a);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return e}},pd=class{options;parser;constructor(n){this.options=n||gr}space(n){return""}code({text:n,lang:t,escaped:e}){let i=(t||"").match(Tt.notSpaceStart)?.[0],r=n.replace(Tt.endingNewline,"")+`
|
|
42
|
+
`;return i?'<pre><code class="language-'+Ln(i)+'">'+(e?r:Ln(r,!0))+`</code></pre>
|
|
43
|
+
`:"<pre><code>"+(e?r:Ln(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+" "+Ln(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>${Ln(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=Hy(n);if(r===null)return i;n=r;let o='<a href="'+n+'"';return t&&(o+=' title="'+Ln(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=Hy(n);if(r===null)return Ln(e);n=r;let o=`<img src="${n}" alt="${e}"`;return t&&(o+=` title="${Ln(t)}"`),o+=">",o}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:Ln(n.text)}},tm=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""}},Wn=class Wh{options;renderer;textRenderer;constructor(t){this.options=t||gr,this.options.renderer=this.options.renderer||new pd,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new tm}static parse(t,e){return new Wh(e).parse(t)}static parseInline(t,e){return new Wh(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}},cd=class{options;block;constructor(t){this.options=t||gr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?Gn.lex:Gn.lexInline}provideParser(){return this.block?Wn.parse:Wn.parseInline}},WP=class{defaults=qh();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Wn;Renderer=pd;TextRenderer=tm;Lexer=Gn;Tokenizer=ud;Hooks=cd;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=W({},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 pd(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]=(...d)=>{let m=a.apply(r,d);return m===!1&&(m=l.apply(r,d)),m||""}}i.renderer=r}if(e.tokenizer){let r=this.defaults.tokenizer||new ud(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]=(...d)=>{let m=a.apply(r,d);return m===!1&&(m=l.apply(r,d)),m}}i.tokenizer=r}if(e.hooks){let r=this.defaults.hooks||new cd;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];cd.passThroughHooks.has(o)?r[s]=d=>{if(this.defaults.async)return Promise.resolve(a.call(r,d)).then(y=>l.call(r,y));let m=a.call(r,d);return l.call(r,m)}:r[s]=(...d)=>{let m=a.apply(r,d);return m===!1&&(m=l.apply(r,d)),m}}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=W(W({},this.defaults),i)}),this}setOptions(n){return this.defaults=W(W({},this.defaults),n),this}lexer(n,t){return Gn.lex(n,t??this.defaults)}parser(n,t){return Wn.parse(n,t??this.defaults)}parseMarkdown(n){return(e,i)=>{let r=W({},i),o=W(W({},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?Gn.lex:Gn.lexInline,l=o.hooks?o.hooks.provideParser():n?Wn.parse:Wn.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(e):e).then(d=>a(d,o)).then(d=>o.hooks?o.hooks.processAllTokens(d):d).then(d=>o.walkTokens?Promise.all(this.walkTokens(d,o.walkTokens)).then(()=>d):d).then(d=>l(d,o)).then(d=>o.hooks?o.hooks.postprocess(d):d).catch(s);try{o.hooks&&(e=o.hooks.preprocess(e));let d=a(e,o);o.hooks&&(d=o.hooks.processAllTokens(d)),o.walkTokens&&this.walkTokens(d,o.walkTokens);let m=l(d,o);return o.hooks&&(m=o.hooks.postprocess(m)),m}catch(d){return s(d)}}}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>"+Ln(e.message+"",!0)+"</pre>";return t?Promise.resolve(i):i}if(t)return Promise.reject(e);throw e}}},mr=new WP;function Ee(n,t){return mr.parse(n,t)}Ee.options=Ee.setOptions=function(n){return mr.setOptions(n),Ee.defaults=mr.defaults,Gy(Ee.defaults),Ee};Ee.getDefaults=qh;Ee.defaults=gr;Ee.use=function(...n){return mr.use(...n),Ee.defaults=mr.defaults,Gy(Ee.defaults),Ee};Ee.walkTokens=function(n,t){return mr.walkTokens(n,t)};Ee.parseInline=mr.parseInline;Ee.Parser=Wn;Ee.parser=Wn.parse;Ee.Renderer=pd;Ee.TextRenderer=tm;Ee.Lexer=Gn;Ee.lexer=Gn.lex;Ee.Tokenizer=ud;Ee.Hooks=cd;Ee.parse=Ee;var fZ=Ee.options,hZ=Ee.setOptions,mZ=Ee.use,gZ=Ee.walkTokens,_Z=Ee.parseInline;var vZ=Wn.parse,bZ=Gn.lex;function nC(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 ZP(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,d=!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(m){d=!0,r=m}finally{try{if(!l&&e.return!=null&&(s=e.return(),Object(s)!==s))return}finally{if(d)throw r}}return a}}function YP(){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 QP(n,t){return qP(n)||ZP(n,t)||KP(n,t)||YP()}function KP(n,t){if(n){if(typeof n=="string")return nC(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)?nC(n,t):void 0}}var _C=Object.entries,iC=Object.setPrototypeOf,XP=Object.isFrozen,JP=Object.getPrototypeOf,eO=Object.getOwnPropertyDescriptor,nt=Object.freeze,ct=Object.seal,Eo=Object.create,vC=typeof Reflect<"u"&&Reflect,lm=vC.apply,cm=vC.construct;nt||(nt=function(t){return t});ct||(ct=function(t){return t});lm||(lm=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)});cm||(cm=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 vr=Ke(Array.prototype.forEach),tO=Ke(Array.prototype.lastIndexOf),rC=Ke(Array.prototype.pop),sa=Ke(Array.prototype.push),nO=Ke(Array.prototype.splice),Do=Array.isArray,ca=Ke(String.prototype.toLowerCase),nm=Ke(String.prototype.toString),oC=Ke(String.prototype.match),aa=Ke(String.prototype.replace),sC=Ke(String.prototype.indexOf),iO=Ke(String.prototype.trim),rO=Ke(Number.prototype.toString),oO=Ke(Boolean.prototype.toString),aC=typeof BigInt>"u"?null:Ke(BigInt.prototype.toString),lC=typeof Symbol>"u"?null:Ke(Symbol.prototype.toString),At=Ke(Object.prototype.hasOwnProperty),la=Ke(Object.prototype.toString),vt=Ke(RegExp.prototype.test),_r=sO(TypeError);function Ke(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 lm(n,t,i)}}function sO(n){return function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return cm(n,e)}}function be(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ca;if(iC&&iC(n,null),!Do(t))return n;let i=t.length;for(;i--;){let r=t[i];if(typeof r=="string"){let o=e(r);o!==r&&(XP(t)||(t[i]=o),r=o)}n[r]=!0}return n}function aO(n){for(let t=0;t<n.length;t++)At(n,t)||(n[t]=null);return n}function Ht(n){let t=Eo(null);for(let i of _C(n)){var e=QP(i,2);let r=e[0],o=e[1];At(n,r)&&(Do(o)?t[r]=aO(o):o&&typeof o=="object"&&o.constructor===Object?t[r]=Ht(o):t[r]=o)}return t}function lO(n){switch(typeof n){case"string":return n;case"number":return rO(n);case"boolean":return oO(n);case"bigint":return aC?aC(n):"0";case"symbol":return lC?lC(n):"Symbol()";case"undefined":return la(n);case"function":case"object":{if(n===null)return la(n);let t=n,e=on(t,"toString");if(typeof e=="function"){let i=e(t);return typeof i=="string"?i:la(i)}return la(n)}default:return la(n)}}function on(n,t){for(;n!==null;){let i=eO(n,t);if(i){if(i.get)return Ke(i.get);if(typeof i.value=="function")return Ke(i.value)}n=JP(n)}function e(){return null}return e}function cO(n){try{return vt(n,""),!0}catch{return!1}}var cC=nt(["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"]),im=nt(["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"]),rm=nt(["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"]),dO=nt(["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"]),om=nt(["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"]),uO=nt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dC=nt(["#text"]),uC=nt(["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"]),sm=nt(["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"]),pC=nt(["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"]),md=nt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),pO=ct(/{{[\w\W]*|^[\w\W]*}}/g),fO=ct(/<%[\w\W]*|^[\w\W]*%>/g),hO=ct(/\${[\w\W]*/g),mO=ct(/^data-[\-\w.\u00B7-\uFFFF]+$/),gO=ct(/^aria-[\-\w]+$/),fC=ct(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),_O=ct(/^(?:\w+script|data):/i),vO=ct(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),bO=ct(/^html$/i),yO=ct(/^[a-z][.\w]*(-[.\w]+)+$/i),hC=ct(/<[/\w!]/g),mC=ct(/<[/\w]/g),CO=ct(/<\/no(script|embed|frames)/i),xO=ct(/\/>/i),$t={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},bC=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],wO=nt(be({},bC)),EO=(function(){let n={};return vr(bC,t=>{n[t]=ct(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),nt(n)})(),DO=function(){return typeof window>"u"?null:window},SO=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}},gC=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},yi=function(t,e,i,r){return At(t,e)&&Do(t[e])?be(r.base?Ht(r.base):{},t[e],r.transform):i},am=function(t,e,i){let r=At(t,e)?t[e]:void 0;return r&&typeof r=="object"?Ht(r):i()};function yC(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:DO(),t=F=>yC(F);if(t.version="3.4.15",t.removed=[],!n||!n.document||n.document.nodeType!==$t.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,d=n.NamedNodeMap;d===void 0&&(n.NamedNodeMap||n.MozNamedAttrMap),n.HTMLFormElement;let m=n.DOMParser,y=n.trustedTypes,w=a.prototype,E=on(w,"cloneNode"),R=on(w,"remove"),j=on(w,"removeAttributeNode"),Z=on(w,"nextSibling"),$=on(w,"childNodes"),_e=on(w,"parentNode"),Ut=on(w,"shadowRoot"),Be=on(w,"attributes"),dt=s&&s.prototype?on(s.prototype,"nodeType"):null,it=s&&s.prototype?on(s.prototype,"nodeName"):null,zt=s&&s.prototype?on(s.prototype,"ownerDocument"):null,To=function(g){return dt?dt(g):g.nodeType},Td=function(g){return it?it(g):g.nodeName};if(typeof o=="function"){let F=e.createElement("template");F.content&&F.content.ownerDocument&&(e=F.content.ownerDocument)}let Mt,xi="",Md,um=!1,Mo=0,pm=function(){if(Mo>0)throw _r('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.')},Cr=function(g){pm(),Mo++;try{return Mt.createHTML(g)}finally{Mo--}},kC=function(g){pm(),Mo++;try{return Mt.createScriptURL(g)}finally{Mo--}},IC=function(){return um||(Md=SO(y,r),um=!0),Md},ua=e,kd=ua.implementation,fm=ua.createNodeIterator,PC=ua.createDocumentFragment,OC=ua.getElementsByTagName,RC=i.importNode,Ae=gC();t.isSupported=typeof _C=="function"&&typeof _e=="function"&&kd&&kd.createHTMLDocument!==void 0;let NC=pO,AC=fO,LC=hO,FC=mO,VC=gO,BC=_O,hm=vO,jC=yO,mm=fC,Le=null,Id=be({},[...cC,...im,...rm,...om,...dC]),Fe=null,Pd=be({},[...uC,...sm,...pC,...md]),xn=Object.seal(Eo(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}})),ko=null,gm=null,qn=Object.seal(Eo(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),_m=!0,Od=!0,vm=!1,bm=!0,Zn=!1,wi=!0,Ei=!1,Rd=!1,pa=null,fa=null,Nd=!1,xr=!1,ha=!1,ma=!1,ym=!0,Cm=!1,xm="user-content-",Ad=!0,Ld=!1,wr={},Er=null,wm=be({},["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"]),Em=null,Dm=be({},["audio","video","img","source","image","track"]),Sm=null,Tm=be({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ga="http://www.w3.org/1998/Math/MathML",_a="http://www.w3.org/2000/svg",wn="http://www.w3.org/1999/xhtml",Dr=wn,Fd=!1,Vd=null,$C=be({},[ga,_a,wn],nm),Mm=nt(["mi","mo","mn","ms","mtext"]),Bd=be({},Mm),km=nt(["annotation-xml"]),jd=be({},km),HC=be({},["title","style","font","a","script"]),Io=null,UC=["application/xhtml+xml","text/html"],zC="text/html",ze=null,Sr=null,GC=e.createElement("form"),Im=function(g){return g instanceof RegExp||g instanceof Function},$d=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Sr&&Sr===g)return;(!g||typeof g!="object")&&(g={}),g=Ht(g),Io=UC.indexOf(g.PARSER_MEDIA_TYPE)===-1?zC:g.PARSER_MEDIA_TYPE,ze=Io==="application/xhtml+xml"?nm:ca,Le=yi(g,"ALLOWED_TAGS",Id,{transform:ze}),Fe=yi(g,"ALLOWED_ATTR",Pd,{transform:ze}),Vd=yi(g,"ALLOWED_NAMESPACES",$C,{transform:nm}),Sm=yi(g,"ADD_URI_SAFE_ATTR",Tm,{transform:ze,base:Tm}),Em=yi(g,"ADD_DATA_URI_TAGS",Dm,{transform:ze,base:Dm}),Er=yi(g,"FORBID_CONTENTS",wm,{transform:ze}),ko=yi(g,"FORBID_TAGS",Ht({}),{transform:ze}),gm=yi(g,"FORBID_ATTR",Ht({}),{transform:ze}),wr=At(g,"USE_PROFILES")?g.USE_PROFILES&&typeof g.USE_PROFILES=="object"?Ht(g.USE_PROFILES):g.USE_PROFILES:!1,_m=g.ALLOW_ARIA_ATTR!==!1,Od=g.ALLOW_DATA_ATTR!==!1,vm=g.ALLOW_UNKNOWN_PROTOCOLS||!1,bm=g.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Zn=g.SAFE_FOR_TEMPLATES||!1,wi=g.SAFE_FOR_XML!==!1,Ei=g.WHOLE_DOCUMENT||!1,xr=g.RETURN_DOM||!1,ha=g.RETURN_DOM_FRAGMENT||!1,ma=g.RETURN_TRUSTED_TYPE||!1,Nd=g.FORCE_BODY||!1,ym=g.SANITIZE_DOM!==!1,Cm=g.SANITIZE_NAMED_PROPS||!1,Ad=g.KEEP_CONTENT!==!1,Ld=g.IN_PLACE||!1,mm=cO(g.ALLOWED_URI_REGEXP)?g.ALLOWED_URI_REGEXP:fC,Dr=typeof g.NAMESPACE=="string"?g.NAMESPACE:wn,Bd=am(g,"MATHML_TEXT_INTEGRATION_POINTS",()=>be({},Mm)),jd=am(g,"HTML_INTEGRATION_POINTS",()=>be({},km));let M=am(g,"CUSTOM_ELEMENT_HANDLING",()=>Eo(null));if(xn=Eo(null),At(M,"tagNameCheck")&&Im(M.tagNameCheck)&&(xn.tagNameCheck=M.tagNameCheck),At(M,"attributeNameCheck")&&Im(M.attributeNameCheck)&&(xn.attributeNameCheck=M.attributeNameCheck),At(M,"allowCustomizedBuiltInElements")&&typeof M.allowCustomizedBuiltInElements=="boolean"&&(xn.allowCustomizedBuiltInElements=M.allowCustomizedBuiltInElements),ct(xn),Zn&&(Od=!1),ha&&(xr=!0),wr&&(Le=be({},dC),Fe=Eo(null),wr.html===!0&&(be(Le,cC),be(Fe,uC)),wr.svg===!0&&(be(Le,im),be(Fe,sm),be(Fe,md)),wr.svgFilters===!0&&(be(Le,rm),be(Fe,sm),be(Fe,md)),wr.mathMl===!0&&(be(Le,om),be(Fe,pC),be(Fe,md))),qn.tagCheck=null,qn.attributeCheck=null,At(g,"ADD_TAGS")&&(typeof g.ADD_TAGS=="function"?qn.tagCheck=g.ADD_TAGS:Do(g.ADD_TAGS)&&(Le===Id&&(Le=Ht(Le)),be(Le,g.ADD_TAGS,ze))),At(g,"ADD_ATTR")&&(typeof g.ADD_ATTR=="function"?qn.attributeCheck=g.ADD_ATTR:Do(g.ADD_ATTR)&&(Fe===Pd&&(Fe=Ht(Fe)),be(Fe,g.ADD_ATTR,ze))),At(g,"ADD_FORBID_CONTENTS")&&Do(g.ADD_FORBID_CONTENTS)&&(Er===wm&&(Er=Ht(Er)),be(Er,g.ADD_FORBID_CONTENTS,ze)),Ad&&(Le["#text"]=!0),Ei&&be(Le,["html","head","body"]),Le.table&&(be(Le,["tbody"]),delete ko.tbody),g.TRUSTED_TYPES_POLICY){if(typeof g.TRUSTED_TYPES_POLICY.createHTML!="function")throw _r('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof g.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw _r('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let A=Mt;Mt=g.TRUSTED_TYPES_POLICY;try{xi=Cr("")}catch(U){throw Mt=A,U}}else g.TRUSTED_TYPES_POLICY===null?(Mt=void 0,xi=""):(Mt===void 0&&(Mt=IC()),Mt&&typeof xi=="string"&&(xi=Cr("")));nt&&nt(g),Sr=g},Pm=be({},[...im,...rm,...dO]),Om=be({},[...om,...uO]),WC=function(g,M,A){return M.namespaceURI===wn?g==="svg":M.namespaceURI===ga?g==="svg"&&(A==="annotation-xml"||Bd[A]):!!Pm[g]},qC=function(g,M,A){return M.namespaceURI===wn?g==="math":M.namespaceURI===_a?g==="math"&&jd[A]:!!Om[g]},ZC=function(g,M,A){return M.namespaceURI===_a&&!jd[A]||M.namespaceURI===ga&&!Bd[A]?!1:!Om[g]&&(HC[g]||!Pm[g])},YC=function(g){let M=_e(g);(!M||!M.tagName)&&(M={namespaceURI:Dr,tagName:"template"});let A=ca(g.tagName),U=ca(M.tagName);return Vd[g.namespaceURI]?g.namespaceURI===_a?WC(A,M,U):g.namespaceURI===ga?qC(A,M,U):g.namespaceURI===wn?ZC(A,M,U):!!(Io==="application/xhtml+xml"&&Vd[g.namespaceURI]):!1},Yn=function(g){sa(t.removed,{element:g});try{_e(g).removeChild(g)}catch{if(R(g),!_e(g))throw _r("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Rm=function(g,M,A){try{j(g,M)}catch{try{g.removeAttribute(A)}catch{}}},va=function(g){ba(g);let M=$(g);if(M){let U=[];vr(M,X=>{sa(U,X)}),vr(U,X=>{try{R(X)}catch{}})}let A=Be(g);if(A)for(let U=A.length-1;U>=0;--U){let X=A[U],ae=X&&X.name;typeof ae=="string"&&Rm(g,X,ae)}},Di=function(g,M,A){if(!A)try{A=M.getAttributeNode(g)}catch{A=null}sa(t.removed,{attribute:A||null,from:M});try{A?j(M,A):M.removeAttribute(g)}catch{try{M.removeAttribute(g)}catch{}}if(g==="is")if(xr||ha)try{Yn(M)}catch{}else try{M.setAttribute(g,"")}catch{}},QC=function(g){let M=Be(g);if(M)for(let A=M.length-1;A>=0;--A){let U=M[A],X=U&&U.name;typeof X!="string"||Fe[ze(X)]||Rm(g,U,X)}},ba=function(g){let M=[g];for(;M.length>0;){let A=M.pop();To(A)===$t.element&&QC(A);let X=$(A);if(X)for(let ae=X.length-1;ae>=0;--ae)M.push(X[ae])}},Nm=function(g,M){return wi?g==="patchsrc"?!0:g==="for"&&M!=="label"&&M!=="output":!1},KC=function(g){if(!wi)return;let M=[g];for(;M.length>0;){let A=M.pop(),U=To(A);if(U===$t.processingInstruction||U===$t.comment&&vt(mC,A.data)){try{R(A)}catch{}continue}if(U===$t.element){let ae=A,Pe=ze(Td(A));try{ae.hasAttribute&&ae.hasAttribute("patchsrc")&&ae.removeAttribute("patchsrc"),ae.hasAttribute&&ae.hasAttribute("for")&&Nm("for",Pe)&&ae.removeAttribute("for")}catch{}}let X=$(A);if(X)for(let ae=X.length-1;ae>=0;--ae)M.push(X[ae])}},Am=function(g){let M=null,A=null;if(Nd)g="<remove></remove>"+g;else{let ae=oC(g,/^[\r\n\t ]+/);A=ae&&ae[0]}Io==="application/xhtml+xml"&&Dr===wn&&(g='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+g+"</body></html>");let U=Mt?Cr(g):g;if(Dr===wn)try{M=new m().parseFromString(U,Io)}catch{}if(!M||!M.documentElement){M=kd.createDocument(Dr,"template",null);try{M.documentElement.innerHTML=Fd?xi:U}catch{}}let X=M.body||M.documentElement;return g&&A&&X.insertBefore(e.createTextNode(A),X.childNodes[0]||null),Dr===wn?OC.call(M,Ei?"html":"body")[0]:Ei?M.documentElement:X},Lm=function(g){let M=zt?zt(g):g.ownerDocument;return fm.call(M||g,g,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},ya=function(g){return g=aa(g,NC," "),g=aa(g,AC," "),g=aa(g,LC," "),g},Hd=function(g){var M;g.normalize();let A=zt?zt(g):g.ownerDocument,U=fm.call(A||g,g,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),X=U.nextNode();for(;X;)X.data=ya(X.data),X=U.nextNode();let ae=(M=g.querySelectorAll)===null||M===void 0?void 0:M.call(g,"template");ae&&vr(ae,Pe=>{Tr(Pe.content)&&Hd(Pe.content)})},Ca=function(g){let M=it?it(g):null;return typeof M!="string"||ze(M)!=="form"?!1:typeof g.nodeName!="string"||typeof g.textContent!="string"||typeof g.removeChild!="function"||g.attributes!==Be(g)||typeof g.removeAttribute!="function"||typeof g.removeAttributeNode!="function"||typeof g.getAttributeNode!="function"||typeof g.setAttribute!="function"||typeof g.namespaceURI!="string"||typeof g.insertBefore!="function"||typeof g.hasChildNodes!="function"||g.nodeType!==dt(g)||g.childNodes!==$(g)},Tr=function(g){if(!dt||typeof g!="object"||g===null)return!1;try{return dt(g)===$t.documentFragment}catch{return!1}},Po=function(g){if(!dt||typeof g!="object"||g===null)return!1;try{return typeof dt(g)=="number"}catch{return!1}};function En(F,g,M){F.length!==0&&vr(F,A=>{A.call(t,g,M,Sr)})}let XC=function(g,M){return!!(wi&&g.hasChildNodes()&&!Po(g.firstElementChild)&&vt(hC,g.textContent)&&vt(hC,g.innerHTML)||wi&&g.namespaceURI===wn&&wO[M]&&(Po(g.firstElementChild)||typeof g.textContent=="string"&&vt(EO[M],g.textContent))||g.nodeType===$t.processingInstruction||wi&&g.nodeType===$t.comment&&vt(mC,g.data))},xa=function(g,M){if(g instanceof RegExp)return vt(g,M);if(g instanceof Function){for(var A=arguments.length,U=new Array(A>2?A-2:0),X=2;X<A;X++)U[X-2]=arguments[X];return!!g(M,...U)}return!1},JC=function(g,M,A){if(!ko[M]&&$m(M)&&xa(xn.tagNameCheck,M))return!1;if(Ad&&!Er[M]){let U=_e(g),X=$(g);if(X&&U){let ae=X.length;for(let Pe=ae-1;Pe>=0;--Pe){let je=g===A?E(X[Pe],!0):X[Pe];U.insertBefore(je,Z(g))}}}return Yn(g),!0},Fm=function(g,M,A,U){return g.length===0?M:M===A||M===U?Ht(M):M},Vm=function(g,M){return g===M||_e(g)!==null?!1:(Ld&&ba(g),!0)},Bm=function(g,M){if(En(Ae.beforeSanitizeElements,g,null),Vm(g,M))return!0;if(Ca(g))return Yn(g),!0;let A=ze(Td(g));if(Le=Fm(Ae.uponSanitizeElement,Le,Id,pa),En(Ae.uponSanitizeElement,g,{tagName:A,allowedTags:Le}),Vm(g,M))return!0;if(XC(g,A))return Yn(g),!0;if(ko[A]||!(qn.tagCheck instanceof Function&&qn.tagCheck(A))&&!Le[A]){let X=JC(g,A,M);return X===!1&&En(Ae.afterSanitizeElements,g,null),X}if(To(g)===$t.element&&!YC(g)||(A==="noscript"||A==="noembed"||A==="noframes")&&vt(CO,g.innerHTML))return Yn(g),!0;if(Zn&&g.nodeType===$t.text){let X=ya(g.textContent);g.textContent!==X&&(sa(t.removed,{element:g.cloneNode()}),g.textContent=X)}return En(Ae.afterSanitizeElements,g,null),!1},jm=function(g,M,A){if(gm[M]||Nm(M,g)||ym&&(M==="id"||M==="name")&&(A in e||A in GC))return!1;let U=Fe[M]||qn.attributeCheck instanceof Function&&qn.attributeCheck(M,g);return Od&&vt(FC,M)||_m&&vt(VC,M)?!0:U?Sm[M]||vt(mm,aa(A,hm,""))||(M==="src"||M==="xlink:href"||M==="href")&&g!=="script"&&sC(A,"data:")===0&&Em[g]||vm&&!vt(BC,aa(A,hm,""))?!0:!A:$m(g)&&xa(xn.tagNameCheck,g)&&xa(xn.attributeNameCheck,M,g)||M==="is"&&xn.allowCustomizedBuiltInElements&&xa(xn.tagNameCheck,A)},ex=be({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),$m=function(g){return!ex[ca(g)]&&vt(jC,g)},tx=function(g,M,A,U){if(Mt&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!A)switch(y.getAttributeType(g,M)){case"TrustedHTML":return Cr(U);case"TrustedScriptURL":return kC(U)}return U},nx=function(g,M,A,U){try{return A?g.setAttributeNS(A,M,U):g.setAttribute(M,U),Ca(g)?(Yn(g),!1):!0}catch{return Di(M,g),!1}},Hm=function(g){En(Ae.beforeSanitizeAttributes,g,null);let M=g.attributes;if(!M||Ca(g))return;Fe=Fm(Ae.uponSanitizeAttribute,Fe,Pd,fa);let A={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Fe,forceKeepAttr:void 0},U=M.length,X=ze(g.nodeName);for(;U--;){let ae=M[U],Pe=ae.name,je=ae.namespaceURI,kt=ae.value,It=ze(Pe),zd=kt,bt=Pe==="value"?zd:iO(zd),Um=!1;if(A.attrName=It,A.attrValue=bt,A.keepAttr=!0,A.forceKeepAttr=void 0,En(Ae.uponSanitizeAttribute,g,A),bt=A.attrValue,Cm&&(It==="id"||It==="name")&&sC(bt,xm)!==0&&(Di(Pe,g,ae),bt=xm+bt,Um=!0),wi&&vt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,bt)){Di(Pe,g,ae);continue}if(It==="attributename"&&oC(bt,"href")){Di(Pe,g,ae);continue}if(!A.forceKeepAttr){if(!A.keepAttr){Di(Pe,g,ae);continue}if(!bm&&vt(xO,bt)){Di(Pe,g,ae);continue}if(Zn&&(bt=ya(bt)),!jm(X,It,bt)){Di(Pe,g,ae);continue}bt=tx(X,It,je,bt),bt!==zd&&nx(g,Pe,je,bt)&&Um&&rC(t.removed)}}En(Ae.afterSanitizeAttributes,g,null)},wa=function(g){let M=null,A=Lm(g);for(En(Ae.beforeSanitizeShadowDOM,g,null);M=A.nextNode();)if(En(Ae.uponSanitizeShadowNode,M,null),Bm(M,g),Hm(M),Tr(M.content)&&wa(M.content),To(M)===$t.element){let U=Ut(M);Tr(U)&&(Ud(U),wa(U))}En(Ae.afterSanitizeShadowDOM,g,null)},Ud=function(g){let M=[{node:g,shadow:null}];for(;M.length>0;){let A=M.pop();if(A.shadow){wa(A.shadow);continue}let U=A.node,ae=To(U)===$t.element,Pe=$(U);if(Pe)for(let je=Pe.length-1;je>=0;--je)M.push({node:Pe[je],shadow:null});if(ae){let je=it?it(U):null;if(typeof je=="string"&&ze(je)==="template"){let kt=U.content;Tr(kt)&&M.push({node:kt,shadow:null})}}if(ae){let je=Ut(U);Tr(je)&&M.push({node:null,shadow:je},{node:je,shadow:null})}}};return t.sanitize=function(F){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},M=null,A=null,U=null,X=null;if(Fd=!F,Fd&&(F="<!-->"),typeof F!="string"&&!Po(F)&&(F=lO(F),typeof F!="string"))throw _r("dirty is not a string, aborting");if(!t.isSupported)return F;Rd?(Le=pa,Fe=fa):$d(g),(Ae.uponSanitizeElement.length>0||Ae.uponSanitizeAttribute.length>0)&&(Le=Ht(Le)),Ae.uponSanitizeAttribute.length>0&&(Fe=Ht(Fe)),t.removed=[];let ae=Ld&&typeof F!="string"&&Po(F);if(ae){KC(F);let kt=Td(F);if(typeof kt=="string"){let It=ze(kt);if(!Le[It]||ko[It])throw va(F),_r("root node is forbidden and cannot be sanitized in-place")}if(Ca(F))throw va(F),_r("root node is clobbered and cannot be sanitized in-place");try{Ud(F)}catch(It){throw va(F),It}}else if(Po(F))M=Am("<!---->"),A=M.ownerDocument.importNode(F,!0),A.nodeType===$t.element&&A.nodeName==="BODY"||A.nodeName==="HTML"?M=A:M.appendChild(A),Ud(M);else{if(!xr&&!Zn&&!Ei&&F.indexOf("<")===-1)return Mt&&ma?Cr(F):F;if(M=Am(F),!M)return xr?null:ma?xi:""}M&&Nd&&Yn(M.firstChild);let Pe=ae?F:M;try{let kt=Lm(Pe);for(;U=kt.nextNode();)Bm(U,Pe),Hm(U),Tr(U.content)&&wa(U.content)}catch(kt){throw ae&&(va(F),vr(t.removed,It=>{It.element&&ba(It.element)})),kt}if(ae)return vr(t.removed,kt=>{kt.element&&ba(kt.element)}),Zn&&Hd(F),F;if(xr){if(Zn&&Hd(M),ha)for(X=PC.call(M.ownerDocument);M.firstChild;)X.appendChild(M.firstChild);else X=M;return(Fe.shadowroot||Fe.shadowrootmode)&&(X=RC.call(i,X,!0)),X}let je=Ei?M.outerHTML:M.innerHTML;return Ei&&Le["!doctype"]&&M.ownerDocument&&M.ownerDocument.doctype&&M.ownerDocument.doctype.name&&vt(bO,M.ownerDocument.doctype.name)&&(je="<!DOCTYPE "+M.ownerDocument.doctype.name+`>
|
|
63
|
+
`+je),Zn&&(je=ya(je)),Mt&&ma?Cr(je):je},t.setConfig=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$d(F),Rd=!0,pa=Le,fa=Fe},t.clearConfig=function(){Sr=null,Rd=!1,pa=null,fa=null,Mt=Md,xi=""},t.isValidAttribute=function(F,g,M){Sr||$d({});let A=ze(F),U=ze(g);return jm(A,U,M)},t.addHook=function(F,g){typeof g=="function"&&At(Ae,F)&&sa(Ae[F],g)},t.removeHook=function(F,g){if(At(Ae,F)){if(g!==void 0){let M=tO(Ae[F],g);return M===-1?void 0:nO(Ae[F],M,1)[0]}return rC(Ae[F])}},t.removeHooks=function(F){At(Ae,F)&&(Ae[F]=[])},t.removeAllHooks=function(){Ae=gC()},t}var CC=yC();var So=class n{markdown=N.required();html=L(()=>{let t=(this.markdown()??"").trim();return t?CC.sanitize(Ee.parse(t,{async:!1})):""});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({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&&J(0,"div",0),e&2&&q("innerHTML",i.html(),gf)},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 TO=["host"],MO=["composerInput"],wC=(n,t)=>t.id;function kO(n,t){n&1&&(f(0,"div",3),p(1,"Loading diff..."),h())}function IO(n,t){if(n&1&&(f(0,"div",4),p(1),h()),n&2){let e=u();c(),O(e.error())}}function PO(n,t){if(n&1&&(f(0,"div",4),p(1),h()),n&2){let e=u();c(),O(e.editorError())}}function OO(n,t){n&1&&(f(0,"div",5),p(1,"Binary file not shown."),h())}function RO(n,t){n&1&&(f(0,"div",7),p(1,"Loading diff..."),h())}function NO(n,t){if(n&1){let e=P();f(0,"button",13),D("click",function(){_(e);let r=u(4);return v(r.openComposer())}),p(1," Add comment "),h()}}function AO(n,t){if(n&1&&(f(0,"div",20),z(1,"app-author-avatar",28),f(2,"div",29)(3,"div",30)(4,"span",31),p(5),h(),p(6),h(),z(7,"app-markdown-text",32),h()()),n&2){let e=t.$implicit,i=u(6);c(),k("name",e.author.name)("email",e.author.email||""),c(4),O(e.author.name),c(),G(" ",i.formatDate(e.createdAt)," "),c(),k("markdown",e.content)}}function LO(n,t){if(n&1&&(f(0,"option",27),p(1),h()),n&2){let e=t.$implicit,i=u(2).$implicit,r=u(4);k("value",e)("selected",e===i.status),c(),G(" ",r.statusLabel(e)," ")}}function FO(n,t){if(n&1){let e=P();f(0,"div",19),Q(1,AO,8,5,"div",20,wC),f(3,"div",21)(4,"input",22),D("input",function(r){_(e);let o=u().$implicit,s=u(4);return v(s.setReplyDraft(o.id,r))})("keydown.enter",function(){_(e);let r=u().$implicit,o=u(4);return v(o.sendReply(r.id))}),h(),f(5,"button",23),D("click",function(){_(e);let r=u().$implicit,o=u(4);return v(o.sendReply(r.id))}),p(6," Reply "),h()(),f(7,"div",24)(8,"label",25),p(9," Status "),f(10,"select",26),D("change",function(r){_(e);let o=u().$implicit,s=u(4);return v(s.onStatusChange(o,r))}),Q(11,LO,2,3,"option",27,Rt),h()()()()}if(n&2){let e=u().$implicit,i=u(4);c(),K(e.comments),c(3),k("value",i.replyDraft(e.id))("disabled",i.posting()),c(),k("disabled",i.posting()||!i.replyDraft(e.id).trim()),c(5),k("value",e.status)("disabled",i.posting()),c(),K(i.threadStatuses)}}function VO(n,t){if(n&1){let e=P();f(0,"div",14)(1,"button",15),D("click",function(){let r=_(e).$implicit,o=u(4);return v(o.toggleThread(r.id))}),f(2,"span",16),p(3),h(),f(4,"span",17),p(5),h(),f(6,"span",18),p(7),h()(),S(8,FO,13,5,"div",19),h()}if(n&2){let e=t.$implicit,i=u(4);me("expanded",i.isExpanded(e.id)),k("id","pr-thread-"+e.id),c(2),ft("status-"+e.status),c(),G(" ",i.statusLabel(e.status)," "),c(2),G(" ",i.threadPreview(e)," "),c(2),O(e.comments.length),c(),T(i.isExpanded(e.id)?8:-1)}}function BO(n,t){if(n&1){let e=P();f(0,"div",12)(1,"header",33)(2,"span",34),p(3,"New comment"),h(),f(4,"span",35),p(5,"Markdown supported"),h()(),f(6,"div",36)(7,"textarea",37,1),D("input",function(r){_(e);let o=u(4);return v(o.composerText.set(r.target.value))})("keydown",function(r){_(e);let o=u(4);return v(o.onComposerKeydown(r))}),h(),f(9,"div",38)(10,"span",39)(11,"kbd"),p(12,"Ctrl"),h(),p(13,"+"),f(14,"kbd"),p(15,"Enter"),h(),p(16," to comment "),h(),f(17,"span",40)(18,"button",41),D("click",function(){_(e);let r=u(4);return v(r.closeComposer())}),p(19,"Cancel"),h(),f(20,"button",42),D("click",function(){_(e);let r=u(4);return v(r.submitComposer())}),p(21," Comment "),h()()()()()}if(n&2){let e=u(4);c(7),k("value",e.composerText()),c(13),k("disabled",e.posting()||!e.composerText().trim())}}function jO(n,t){if(n&1&&(f(0,"section",8)(1,"header",9)(2,"strong"),p(3),h(),S(4,NO,2,0,"button",10),h(),Q(5,VO,9,9,"div",11,wC),S(7,BO,22,2,"div",12),h()),n&2){let e=u(3);c(3),O(e.selectionLabel()),c(),T(e.composerOpen()?-1:4),c(),K(e.selectedThreads()),c(2),T(e.composerOpen()?7:-1)}}function $O(n,t){if(n&1&&(z(0,"div",6,0),S(2,RO,2,0,"div",7),S(3,jO,8,3,"section",8)),n&2){let e=u(2);c(2),T(e.editorLoading()?2:-1),c(),T(e.selection()?3:-1)}}function HO(n,t){if(n&1&&S(0,OO,2,0,"div",5)(1,$O,4,2),n&2){let e=t;T(e.status==="binary"||e.binary?0:1)}}function UO(n,t){n&1&&(f(0,"div",5),p(1,"Select a file to view its changes."),h())}var zO=0,xC={active:"Active",fixed:"Resolved",wontFix:"Won't fix",closed:"Closed",byDesign:"By design",pending:"Pending"},gd=class n{monacoService=I(bo);host=en("host");composerInput=en("composerInput");diff=N(null);threads=N([]);loading=N(!1);error=N("");posting=N(!1);focus=N(null);commentSubmit=H();replySubmit=H();statusSubmit=H();threadStatuses=Object.keys(xC);editorLoading=x(!1);editorError=x("");selection=x(null);composerOpen=x(!1);composerText=x("");expanded=x({});replyDrafts=x({});viewReady=!1;destroyed=!1;renderVersion=0;editor=null;models=[];disposables=[];decorations=[];threadsByAnchor=L(()=>{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=L(()=>{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(){Ce(()=>{let t=this.diff();this.viewReady&&queueMicrotask(()=>{this.renderDiff(t)})}),Ce(()=>{this.threads(),this.viewReady&&this.updateThreadDecorations()}),Ce(()=>{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=>W(W({},r),i)),this.selection.set(le(W({},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(le(W({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=>le(W({},e),{[t]:!e[t]}))}replyDraft(t){return this.replyDrafts()[t]??""}setReplyDraft(t,e){let i=e.target.value;this.replyDrafts.update(r=>le(W({},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 xC[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 Dn(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=++zO,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}`)),d=i.editor.createModel(t.modifiedContent??this.contentFromLines(t,"right"),void 0,i.Uri.parse(`inmemory://pr-diff/${o}/modified/${a}`));this.models=[l,d],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:d}),this.watchSelection(this.editor.getOriginalEditor(),"left"),this.watchSelection(this.editor.getModifiedEditor(),"right"),this.updateThreadDecorations();let m=this.focus();m&&(this.selection.set(le(W({},m),{endLine:m.line})),this.revealSelection(m))}catch{e===this.renderVersion&&this.editorError.set("Failed to load the diff viewer.")}finally{e===this.renderVersion&&this.editorLoading.set(!1)}}})}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.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=pe({type:n,selectors:[["app-pr-file-diff"]],viewQuery:function(e,i){e&1&&(jt(i.host,TO,5),jt(i.composerInput,MO,5)),e&2&&vn(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&&(f(0,"div",2),S(1,kO,2,0,"div",3)(2,IO,2,1,"div",4)(3,PO,2,1,"div",4)(4,HO,2,1)(5,UO,2,0,"div",5),h()),e&2){let r;c(),T(i.loading()&&!i.diff()?1:i.error()?2:i.editorError()?3:(r=i.diff())?4:5,r)}},dependencies:[An,So],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 dm=()=>[],vd=n=>({$implicit:n}),SC=(n,t)=>t.value,br=(n,t)=>t.id,GO=(n,t)=>t.path;function WO(n,t){n&1&&(f(0,"div",5),p(1,"Loading pull request..."),h())}function qO(n,t){n&1&&(f(0,"span",12),p(1,"Draft"),h())}function ZO(n,t){if(n&1){let e=P();f(0,"button",26),D("click",function(){_(e);let r=u(2);return v(r.publishPr())}),p(1," Publish "),h(),f(2,"button",27),D("click",function(){_(e);let r=u(2);return v(r.openAbandonConfirm())}),p(3," Abandon "),h()}if(n&2){let e=u(2);k("disabled",e.busy()),c(2),k("disabled",e.busy())}}function YO(n,t){if(n&1){let e=P();f(0,"button",32),D("click",function(){let r=_(e).$implicit,o=u(4);return v(o.vote(r.value))}),z(1,"span"),p(2),h()}if(n&2){let e=t.$implicit,i=u(3),r=u();me("current",r.voteMeta(i.myVote).cls==="vote-"+e.icon),c(),ft("vote-dot vote-"+e.icon),c(),G("",e.label," ")}}function QO(n,t){if(n&1&&(f(0,"div",29),Q(1,YO,3,5,"button",31,SC),h()),n&2){let e=u(3);c(),K(e.voteOptions)}}function KO(n,t){if(n&1){let e=P();f(0,"button",27),D("click",function(){_(e);let r=u(3);return v(r.cancelAutoComplete())}),p(1," Cancel auto-complete "),h()}if(n&2){let e=u(3);k("disabled",e.busy())}}function XO(n,t){if(n&1){let e=P();f(0,"button",27),D("click",function(){_(e);let r=u(3);return v(r.openAutoComplete())}),p(1," Set auto-complete "),h()}if(n&2){let e=u(3);k("disabled",e.busy())}}function JO(n,t){if(n&1){let e=P();f(0,"div",28)(1,"button",27),D("click",function(){_(e);let r=u(2);return v(r.reviewMenuOpen.set(!r.reviewMenuOpen()))}),p(2," Review \u25BE "),h(),S(3,QO,3,0,"div",29),h(),S(4,KO,2,1,"button",30)(5,XO,2,1,"button",30),f(6,"button",26),D("click",function(){_(e);let r=u(2);return v(r.openComplete())}),p(7," Complete "),h()}if(n&2){let e=u(),i=u();c(),k("disabled",i.busy()),c(2),T(i.reviewMenuOpen()?3:-1),c(),T(e.autoCompleteSetBy?4:5),c(2),k("disabled",i.busy())}}function eR(n,t){if(n&1&&z(0,"app-error-banner",21),n&2){let e=u(2);k("message",e.error())}}function tR(n,t){if(n&1){let e=P();f(0,"div",34)(1,"div")(2,"strong"),p(3,"Merge conflicts"),h(),f(4,"p"),p(5," This pull request has conflicts with "),f(6,"code"),p(7),h(),p(8,". Resolve them before it can be completed. "),h()(),f(9,"button",55),D("click",function(){_(e);let r=u(3);return v(r.openInBrowser())}),p(10," Resolve in Azure DevOps "),h()()}if(n&2){let e=u(2);c(7),O(e.targetBranch)}}function nR(n,t){n&1&&(f(0,"div",35)(1,"div")(2,"strong"),p(3,"Blocked by policy"),h(),f(4,"p"),p(5," One or more merge policies reject this pull request. Check the checks below. "),h()()())}function iR(n,t){n&1&&(f(0,"div",35)(1,"div")(2,"strong"),p(3,"Merge failed"),h(),f(4,"p"),p(5," The last merge attempt failed. Check Azure DevOps for details. "),h()()())}function rR(n,t){n&1&&(f(0,"div",36)(1,"div")(2,"strong"),p(3,"Queued for merge"),h(),f(4,"p"),p(5,"The merge is in progress."),h()()())}function oR(n,t){n&1&&(f(0,"div",40),p(1,"Loading checks..."),h())}function sR(n,t){if(n&1){let e=P();f(0,"div",41)(1,"span"),p(2),h(),f(3,"button",39),D("click",function(){_(e);let r=u(3);return v(r.loadChecks())}),p(4," Retry "),h()()}if(n&2){let e=u(3);c(2),O(e.checksError()),c(),k("disabled",e.checksLoading())}}function aR(n,t){if(n&1&&(f(0,"div",56),p(1),h()),n&2){let e=t.$implicit;c(),O(e)}}function lR(n,t){if(n&1&&(f(0,"div",57),p(1),h()),n&2){let e=u(4);c(),O(e.requeueError())}}function cR(n,t){if(n&1&&cr(0,60),n&2){let e=t.$implicit;u(5);let i=gi(44);k("ngTemplateOutlet",i)("ngTemplateOutletContext",_i(2,vd,e))}}function dR(n,t){if(n&1&&(f(0,"ul",58),Q(1,cR,1,4,"ng-container",60,br),h()),n&2){let e=u(5);c(),K(e.requiredChecks())}}function uR(n,t){n&1&&z(0,"hr",59)}function pR(n,t){if(n&1&&cr(0,60),n&2){let e=t.$implicit;u(5);let i=gi(44);k("ngTemplateOutlet",i)("ngTemplateOutletContext",_i(2,vd,e))}}function fR(n,t){if(n&1&&(f(0,"ul",58),Q(1,pR,1,4,"ng-container",60,br),h()),n&2){let e=u(5);c(),K(e.optionalChecks())}}function hR(n,t){if(n&1&&(S(0,dR,3,0,"ul",58),S(1,uR,1,0,"hr",59),S(2,fR,3,0,"ul",58)),n&2){let e=u(4);T(e.requiredChecks().length?0:-1),c(),T(e.requiredChecks().length&&e.optionalChecks().length?1:-1),c(),T(e.optionalChecks().length?2:-1)}}function mR(n,t){n&1&&(f(0,"p",46),p(1,"No checks reported."),h())}function gR(n,t){if(n&1&&(Q(0,aR,2,1,"div",56,Rt),S(2,lR,2,1,"div",57),S(3,hR,3,3)(4,mR,2,0,"p",46)),n&2){let e=u(3);K(e.checksWarnings()),c(2),T(e.requeueError()?2:-1),c(),T(e.checks().length?3:4)}}function _R(n,t){if(n&1){let e=P();f(0,"button",55),D("click",function(){_(e);let r=u(3);return v(r.startEditing())}),p(1," Edit "),h()}}function vR(n,t){if(n&1){let e=P();f(0,"label"),p(1,"Title"),f(2,"input",61),D("input",function(r){_(e);let o=u(3);return v(o.editTitle.set(r.target.value))}),h()(),f(3,"label"),p(4,"Description"),f(5,"textarea",62),D("input",function(r){_(e);let o=u(3);return v(o.editDescription.set(r.target.value))}),h()(),f(6,"div",63)(7,"button",27),D("click",function(){_(e);let r=u(3);return v(r.editing.set(!1))}),p(8," Cancel "),h(),f(9,"button",26),D("click",function(){_(e);let r=u(3);return v(r.saveEdit())}),p(10," Save "),h()()}if(n&2){let e=u(3);c(2),k("value",e.editTitle()),c(3),k("value",e.editDescription()),c(2),k("disabled",e.busy()),c(2),k("disabled",e.busy()||!e.editTitle().trim())}}function bR(n,t){if(n&1&&z(0,"app-markdown-text",65),n&2){let e=u(3);k("markdown",e.description)}}function yR(n,t){n&1&&(f(0,"p",46),p(1,"No description provided."),h())}function CR(n,t){if(n&1&&(f(0,"h2",64),p(1),h(),S(2,bR,1,1,"app-markdown-text",65)(3,yR,2,0,"p",46)),n&2){let e=u(2);c(),O(e.title),c(),T(e.description?2:3)}}function xR(n,t){if(n&1&&cr(0,60),n&2){let e=t.$implicit;u(3);let i=gi(46);k("ngTemplateOutlet",i)("ngTemplateOutletContext",_i(2,vd,e))}}function wR(n,t){if(n&1&&(f(0,"h3"),p(1,"Required"),h(),Q(2,xR,1,4,"ng-container",60,br)),n&2){let e=u(3);c(2),K(e.requiredReviewers())}}function ER(n,t){if(n&1&&cr(0,60),n&2){let e=t.$implicit;u(3);let i=gi(46);k("ngTemplateOutlet",i)("ngTemplateOutletContext",_i(2,vd,e))}}function DR(n,t){if(n&1&&(f(0,"h3"),p(1,"Optional"),h(),Q(2,ER,1,4,"ng-container",60,br)),n&2){let e=u(3);c(2),K(e.otherReviewers())}}function SR(n,t){n&1&&(f(0,"p",46),p(1,"No reviewers."),h())}function TR(n,t){if(n&1){let e=P();f(0,"button",66),D("click",function(){_(e);let r=u(3);return v(r.toggleDraft())}),p(1," Convert to draft "),h()}if(n&2){let e=u(3);k("disabled",e.busy())}}function MR(n,t){if(n&1){let e=P();f(0,"span",67)(1,"span"),p(2),h(),f(3,"button",68),D("click",function(){let r=_(e).$implicit,o=u(4);return v(o.removeTag(r))}),p(4," \xD7 "),h()()}if(n&2){let e=t.$implicit,i=u(4);c(2),O(e),c(),k("disabled",i.busy()),ce("aria-label","Remove tag "+e)}}function kR(n,t){if(n&1&&(f(0,"div",50),Q(1,MR,5,3,"span",67,Rt),h()),n&2){let e=u(2);c(),K(e.labels)}}function IR(n,t){n&1&&(f(0,"p",46),p(1,"No tags."),h())}function PR(n,t){if(n&1){let e=P();f(0,"app-chip-input",69),D("queryChange",function(r){_(e);let o=u(3);return v(o.tagQuery.set(r))})("select",function(r){_(e);let o=u(3);return v(o.addTag(r))}),h()}if(n&2){let e=u(3);k("chips",As(6,dm))("suggestions",e.tagSuggestions())("loading",e.tagsLoading())("query",e.tagQuery())("disabled",e.busy())("allowFreeText",!0)}}function OR(n,t){n&1&&(f(0,"div",40),p(1,"Loading work items..."),h())}function RR(n,t){if(n&1){let e=P();f(0,"div",41)(1,"span"),p(2),h(),f(3,"button",39),D("click",function(){_(e);let r=u(3);return v(r.loadWorkItems())}),p(4," Retry "),h()()}if(n&2){let e=u(3);c(2),O(e.workItemsError()),c(),k("disabled",e.workItemsLoading())}}function NR(n,t){if(n&1&&(f(0,"small"),p(1),h()),n&2){let e=u().$implicit;c(),O(e.state)}}function AR(n,t){if(n&1){let e=P();f(0,"li")(1,"button",70),D("click",function(){let r=_(e).$implicit,o=u(4);return v(o.openExternalLink(r.url))}),f(2,"span",71),p(3),h(),f(4,"span",72),p(5),h()(),S(6,NR,2,1,"small"),f(7,"button",73),D("click",function(){let r=_(e).$implicit,o=u(4);return v(o.unlinkWorkItem(r.id))}),p(8," \xD7 "),h()()}if(n&2){let e=t.$implicit,i=u(4);c(3),G("#",e.id),c(2),O(e.title),c(),T(e.state?6:-1),c(),k("disabled",i.busy()),ce("aria-label","Unlink work item #"+e.id)}}function LR(n,t){if(n&1&&(f(0,"ul",53),Q(1,AR,9,5,"li",null,br),h()),n&2){let e=u(3);c(),K(e.workItems())}}function FR(n,t){n&1&&(f(0,"p",46),p(1,"No related work items."),h())}function VR(n,t){if(n&1){let e=P();f(0,"app-chip-input",74),D("queryChange",function(r){_(e);let o=u(3);return v(o.workItemQuery.set(r))})("select",function(r){_(e);let o=u(3);return v(o.linkWorkItem(r))}),h()}if(n&2){let e=u(3);k("chips",As(6,dm))("suggestions",e.workItemSuggestions())("loading",e.workItemsSearchLoading())("query",e.workItemQuery())("error",e.workItemsSearchError())("disabled",e.busy())}}function BR(n,t){if(n&1){let e=P();f(0,"div",23)(1,"main",33),S(2,tR,11,1,"div",34)(3,nR,6,0,"div",35)(4,iR,6,0,"div",35)(5,rR,6,0,"div",36),f(6,"section",37)(7,"div",38)(8,"h2"),p(9,"Checks"),h(),f(10,"button",39),D("click",function(){_(e);let r=u(2);return v(r.loadChecks())}),p(11," Refresh "),h()(),S(12,oR,2,0,"div",40)(13,sR,5,2,"div",41)(14,gR,5,2),h(),f(15,"section",42)(16,"div",38)(17,"h2"),p(18,"Details"),h(),S(19,_R,2,0,"button",43),h(),S(20,vR,11,4)(21,CR,4,2),h()(),f(22,"aside",44)(23,"div",38)(24,"h2"),p(25,"Reviewers"),h()(),f(26,"app-chip-input",45),D("trailingAction",function(){_(e);let r=u(2);return v(r.reviewerRequired.set(!r.reviewerRequired()))})("queryChange",function(r){_(e);let o=u(2);return v(o.reviewerQuery.set(r))})("select",function(r){_(e);let o=u(2);return v(o.addReviewer(r))}),h(),S(27,wR,4,0),S(28,DR,4,0),S(29,SR,2,0,"p",46),S(30,TR,2,1,"button",47),f(31,"div",48)(32,"h3"),p(33,"Tags"),h(),f(34,"button",49),D("click",function(){_(e);let r=u(2);return v(r.toggleTagsPicker())}),p(35," + "),h()(),S(36,kR,3,0,"div",50)(37,IR,2,0,"p",46),S(38,PR,1,7,"app-chip-input",51),f(39,"div",48)(40,"h3"),p(41,"Related work items"),h(),f(42,"button",52),D("click",function(){_(e);let r=u(2);return v(r.toggleWorkItemPicker())}),p(43," + "),h()(),S(44,OR,2,0,"div",40)(45,RR,5,2,"div",41)(46,LR,3,0,"ul",53)(47,FR,2,0,"p",46),S(48,VR,1,7,"app-chip-input",54),h()()}if(n&2){let e=u(),i=u();c(2),T(e.mergeStatus==="conflicts"?2:e.mergeStatus==="rejectedByPolicy"?3:e.mergeStatus==="failure"?4:e.mergeStatus==="queued"?5:-1),c(8),k("disabled",i.checksLoading()),c(2),T(i.checksLoading()?12:i.checksError()?13:14),c(7),T(i.editing()?-1:19),c(),T(i.editing()?20:21),c(6),k("chips",As(22,dm))("suggestions",i.reviewerSuggestions())("loading",i.reviewersLoading())("query",i.reviewerQuery())("error",i.reviewersError())("disabled",i.busy())("trailingPressed",i.reviewerRequired()),c(),T(i.requiredReviewers().length?27:-1),c(),T(i.otherReviewers().length?28:-1),c(),T(e.reviewers.length?-1:29),c(),T(e.isDraft?-1:30),c(4),k("disabled",i.busy()),c(2),T(e.labels.length?36:37),c(2),T(i.tagsPickerOpen()?38:-1),c(4),k("disabled",i.busy()),c(2),T(i.workItemsLoading()?44:i.workItemsError()?45:i.workItems().length?46:47),c(4),T(i.workItemPickerOpen()?48:-1)}}function jR(n,t){if(n&1){let e=P();f(0,"button",85),D("click",function(){_(e);let r=u().$implicit,o=u(3);return v(o.jumpToThread(r))}),p(1),h()}if(n&2){let e=u().$implicit;c(),uo(" ",e.filePath,":",e.line," ")}}function $R(n,t){if(n&1&&(f(0,"option",81),p(1),h()),n&2){let e=t.$implicit,i=u(4);k("value",e),c(),O(i.statusLabel(e))}}function HR(n,t){if(n&1&&(f(0,"div",82),z(1,"app-author-avatar",14),f(2,"div")(3,"div",86)(4,"strong"),p(5),h(),p(6),h(),z(7,"app-markdown-text",65),h()()),n&2){let e=t.$implicit,i=u(4);c(),k("name",e.author.name)("email",e.author.email||""),c(4),O(e.author.name),c(),G(" \xB7 ",i.formatDate(e.createdAt)," "),c(),k("markdown",e.content)}}function UR(n,t){if(n&1){let e=P();f(0,"article",77)(1,"header")(2,"span"),p(3),h(),S(4,jR,2,2,"button",79),f(5,"select",80),D("change",function(r){let o=_(e).$implicit,s=u(3);return v(s.setThreadStatus(o.id,r.target.value))}),Q(6,$R,2,2,"option",81,Rt),h()(),Q(8,HR,8,5,"div",82,br),f(10,"div",83)(11,"input",84,2),D("keydown.enter",function(){let r=_(e).$implicit,o=gi(12);return u(3).replyToThread(r.id,o.value),v(o.value="")}),h(),f(13,"button",39),D("click",function(){let r=_(e).$implicit,o=gi(12);return u(3).replyToThread(r.id,o.value),v(o.value="")}),p(14," Reply "),h()()()}if(n&2){let e=t.$implicit,i=u(3);c(2),ft("thread-status status-"+e.status),c(),O(i.statusLabel(e.status)),c(),T(e.filePath?4:-1),c(),k("value",e.status)("disabled",i.busy()),c(),K(i.threadStatuses),c(2),K(e.comments),c(5),k("disabled",i.busy())}}function zR(n,t){n&1&&(f(0,"div",78),p(1,"No comments yet."),h())}function GR(n,t){if(n&1){let e=P();f(0,"div",24)(1,"section",75)(2,"h2"),p(3,"Add comment"),h(),f(4,"textarea",76),D("input",function(r){_(e);let o=u(2);return v(o.newComment.set(r.target.value))}),h(),f(5,"div",63)(6,"button",26),D("click",function(){_(e);let r=u(2);return v(r.addGeneralComment())}),p(7," Comment "),h()()(),Q(8,UR,15,7,"article",77,br,!1,zR,2,0,"div",78),h()}if(n&2){let e=u(2);c(4),k("value",e.newComment()),c(2),k("disabled",e.busy()||!e.newComment().trim()),c(2),K(e.threads())}}function WR(n,t){if(n&1){let e=P();f(0,"div",88)(1,"span"),p(2),h(),f(3,"button",39),D("click",function(){_(e);let r=u(3);return v(r.loadFiles())}),p(4," Retry "),h()()}if(n&2){let e=u(3);c(2),O(e.filesError()),c(),k("disabled",e.filesLoading())}}function qR(n,t){n&1&&(f(0,"div",40),p(1,"Loading changed files..."),h())}function ZR(n,t){n&1&&(V(),z(0,"polyline",94))}function YR(n,t){n&1&&(V(),z(0,"polyline",95))}function QR(n,t){if(n&1){let e=P();f(0,"button",92),D("click",function(){_(e);let r=u().$implicit,o=u(4);return v(o.toggleFileDirectory(r.path))}),V(),f(1,"svg",93),S(2,ZR,1,0,":svg:polyline",94)(3,YR,1,0,":svg:polyline",95),h(),ue(),f(4,"span"),p(5),h()()}if(n&2){let e=u().$implicit;ie("padding-left",e.depth*14+9,"px"),k("title",e.path),ce("aria-expanded",!e.collapsed),c(2),T(e.collapsed?2:3),c(3),O(e.name)}}function KR(n,t){if(n&1){let e=P();f(0,"button",96),D("click",function(){_(e);let r=u().$implicit,o=u(4);return v(o.selectFile(r.file))}),f(1,"span"),p(2),h(),f(3,"span"),p(4),h()()}if(n&2){let e,i=u().$implicit,r=u(4);ie("padding-left",i.depth*14+9,"px"),me("active",((e=r.selectedFile())==null?null:e.path)===i.file.path),k("title",i.file.path),c(),ft("file-status status-"+i.file.changeType),c(),O(i.file.changeType[0].toUpperCase()),c(2),O(i.name)}}function XR(n,t){if(n&1&&S(0,QR,6,6,"button",90)(1,KR,5,9,"button",91),n&2){let e=t.$implicit;T(e.kind==="dir"?0:1)}}function JR(n,t){n&1&&(f(0,"div",78),p(1,"No changed files."),h())}function eN(n,t){if(n&1&&Q(0,XR,2,1,null,null,GO,!1,JR,2,0,"div",78),n&2){let e=u(3);K(e.fileRows())}}function tN(n,t){if(n&1){let e=P();f(0,"div",25)(1,"aside",87),S(2,WR,5,2,"div",88)(3,qR,2,0,"div",40)(4,eN,3,1),h(),f(5,"app-pr-file-diff",89),D("commentSubmit",function(r){_(e);let o=u(2);return v(o.addInlineComment(r))})("replySubmit",function(r){_(e);let o=u(2);return v(o.replyFromDiff(r))})("statusSubmit",function(r){_(e);let o=u(2);return v(o.setStatusFromDiff(r))}),h()()}if(n&2){let e=u(2);c(2),T(e.filesError()?2:e.filesLoading()?3:4),c(3),k("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 nN(n,t){n&1&&(f(0,"span",100),p(1,"Required"),h())}function iN(n,t){if(n&1&&(f(0,"small"),p(1),h()),n&2){let e=u().$implicit;c(),O(e.detail)}}function rN(n,t){if(n&1){let e=P();f(0,"button",39),D("click",function(){_(e);let r=u().$implicit,o=u(2);return v(o.requeueCheck(r))}),p(1),h()}if(n&2){let e=u().$implicit,i=u(2);k("disabled",!!i.requeuing()||i.checksLoading()),c(),G(" ",i.requeuing()===e.evaluationId?"Requeuing...":"Requeue"," ")}}function oN(n,t){if(n&1){let e=P();f(0,"button",55),D("click",function(){_(e);let r=u().$implicit,o=u(2);return v(o.openExternalLink(r.url))}),p(1," Open "),h()}}function sN(n,t){if(n&1&&(f(0,"li",97)(1,"span"),p(2),h(),f(3,"div",98)(4,"div",99),p(5),S(6,nN,2,0,"span",100),h(),S(7,iN,2,1,"small"),h(),S(8,rN,2,2,"button",101),S(9,oN,2,0,"button",43),h()),n&2){let e=t.$implicit,i=u(2);c(),ft("check-state state-"+e.state),c(),O(i.checkStateLabel(e.state)),c(3),G(" ",e.name," "),c(),T(e.required?6:-1),c(),T(e.detail?7:-1),c(),T(e.evaluationId?8:-1),c(),T(e.url?9:-1)}}function aN(n,t){if(n&1){let e=P();f(0,"div",102),z(1,"app-author-avatar",14),f(2,"div",103)(3,"span"),p(4),h(),f(5,"small"),p(6),h()(),f(7,"button",104),D("click",function(){let r=_(e).$implicit,o=u(2);return v(o.toggleReviewerRequired(r))}),p(8),h(),f(9,"button",105),D("click",function(){let r=_(e).$implicit,o=u(2);return v(o.removeReviewer(r))}),p(10," \xD7 "),h()()}if(n&2){let e=t.$implicit,i=u(2);c(),k("name",e.name)("email",e.email||""),c(3),O(e.name),c(),ft(i.voteMeta(e.vote).cls),c(),O(i.voteMeta(e.vote).label),c(),me("on",e.isRequired),k("title",e.isRequired?"Make optional":"Make required"),c(),G(" ",e.isRequired?"Required":"Optional"," "),c(),ce("aria-label","Remove "+e.name)}}function lN(n,t){if(n&1){let e=P();f(0,"h2"),p(1,"Abandon pull request"),h(),f(2,"p",108),p(3),h(),f(4,"div",63)(5,"button",27),D("click",function(){_(e);let r=u(3);return v(r.abandonOpen.set(!1))}),p(6," Cancel "),h(),f(7,"button",109),D("click",function(){_(e);let r=u(3);return v(r.abandonPr())}),p(8," Abandon "),h()()}if(n&2){let e,i=u(3);c(3),G(" This closes pull request !",(e=i.pr())==null?null:e.id," without merging it. The source branch is kept. "),c(2),k("disabled",i.busy()),c(2),k("disabled",i.busy())}}function cN(n,t){if(n&1&&(f(0,"option",81),p(1),h()),n&2){let e=t.$implicit;k("value",e.value),c(),O(e.label)}}function dN(n,t){if(n&1){let e=P();f(0,"h2"),p(1),h(),f(2,"label"),p(3,"Merge strategy"),f(4,"select",110),D("change",function(r){_(e);let o=u(3);return v(o.mergeStrategy.set(r.target.value))}),Q(5,cN,2,2,"option",81,SC),h()(),f(7,"label",111)(8,"input",112),D("change",function(r){_(e);let o=u(3);return v(o.deleteSourceBranch.set(r.target.checked))}),h(),p(9,"Delete source branch"),h(),f(10,"label",111)(11,"input",112),D("change",function(r){_(e);let o=u(3);return v(o.completeWorkItems.set(r.target.checked))}),h(),p(12,"Complete associated work items"),h(),f(13,"label",113)(14,"input",114),D("change",function(r){_(e);let o=u(3);return v(o.transitionWorkItems.set(r.target.checked))}),h(),p(15,"Transition linked work items"),h(),f(16,"div",63)(17,"button",17),D("click",function(){_(e);let r=u(3);return r.completeOpen.set(!1),v(r.autoCompleteOpen.set(!1))}),p(18," Cancel"),h(),f(19,"button",26),D("click",function(){_(e);let r=u(3);return v(r.completeOpen()?r.applyComplete():r.applyAutoComplete())}),p(20),h()()}if(n&2){let e=u(3);c(),G(" ",e.completeOpen()?"Complete pull request":"Set auto-complete"," "),c(3),k("value",e.mergeStrategy()),c(),K(e.mergeStrategies()),c(3),k("checked",e.deleteSourceBranch()),c(3),k("checked",e.completeWorkItems()),c(3),k("checked",e.transitionWorkItems())("disabled",!e.completeWorkItems()),c(5),k("disabled",e.busy()),c(),G(" ",e.completeOpen()?"Complete":"Enable"," ")}}function uN(n,t){if(n&1){let e=P();f(0,"div",106),D("click",function(){_(e);let r=u(2);return r.completeOpen.set(!1),r.autoCompleteOpen.set(!1),v(r.abandonOpen.set(!1))}),h(),f(1,"section",107),S(2,lN,9,3)(3,dN,21,8),h()}if(n&2){let e=u(2);c(),ce("aria-label",e.abandonOpen()?"Abandon pull request":e.completeOpen()?"Complete pull request":"Set auto-complete"),c(),T(e.abandonOpen()?2:3)}}function pN(n,t){if(n&1){let e=P();f(0,"header",7)(1,"div",8)(2,"div",9)(3,"span",10),p(4),h(),f(5,"h1"),p(6),h(),f(7,"span",11),p(8),h(),S(9,qO,2,0,"span",12),h(),f(10,"div",13),z(11,"app-author-avatar",14),f(12,"span"),p(13),h(),f(14,"code"),p(15),h(),f(16,"span",15),p(17,"\u2192"),h(),f(18,"code"),p(19),h()()(),f(20,"div",16)(21,"button",17),D("click",function(){_(e);let r=u();return v(r.openInBrowser())}),p(22," Open in Azure DevOps "),h(),S(23,ZO,4,2)(24,JO,8,4),f(25,"button",18),D("click",function(){_(e);let r=u();return v(r.closed.emit())}),p(26," \xD7 "),h()()(),f(27,"nav",19)(28,"button",20),D("click",function(){_(e);let r=u();return v(r.tab.set("overview"))}),p(29," Overview "),h(),f(30,"button",20),D("click",function(){_(e);let r=u();return v(r.tab.set("files"))}),p(31," Files "),f(32,"span"),p(33),h()(),f(34,"button",20),D("click",function(){_(e);let r=u();return v(r.tab.set("comments"))}),p(35," Comments "),f(36,"span"),p(37),h()()(),S(38,eR,1,1,"app-error-banner",21),f(39,"div",22),S(40,BR,49,23,"div",23)(41,GR,11,3,"div",24)(42,tN,6,7,"div",25),h(),co(43,sN,10,8,"ng-template",null,0,Dc)(45,aN,11,11,"ng-template",null,1,Dc),S(47,uN,4,2)}if(n&2){let e=t,i=u();c(4),G("!",e.id),c(2),O(e.title),c(2),O(e.status),c(),T(e.isDraft?9:-1),c(2),k("name",e.author.name)("email",e.author.email||""),c(2),O(e.author.name),c(2),O(e.sourceBranch),c(4),O(e.targetBranch),c(4),T(e.isDraft?23:24),c(2),k("disabled",i.busy()),c(3),me("active",i.tab()==="overview"),c(2),me("active",i.tab()==="files"),c(3),O(i.files().length),c(),me("active",i.tab()==="comments"),c(3),O(i.threads().length),c(),T(i.error()?38:-1),c(2),T(i.tab()==="overview"?40:i.tab()==="comments"?41:42),c(7),T(i.completeOpen()||i.autoCompleteOpen()||i.abandonOpen()?47:-1)}}function fN(n,t){if(n&1){let e=P();f(0,"div",6)(1,"div"),p(2),h(),f(3,"button",17),D("click",function(){_(e);let r=u();return v(r.load())}),p(4,"Retry"),h()()}if(n&2){let e=u();c(2),O(e.error()||"Pull request could not be loaded.")}}var EC={active:"Active",fixed:"Resolved",wontFix:"Won't fix",closed:"Closed",byDesign:"By design",pending:"Pending"},hN={notSet:"Not merged",queued:"Queued for merge",conflicts:"Merge conflicts",succeeded:"Ready to merge",rejectedByPolicy:"Blocked by policy",failure:"Merge failed"},mN={pending:"Pending",succeeded:"Passed",failed:"Failed",notApplicable:"N/A"},_d=class n{git=I(lt);vscode=I(nn);destroyRef=I(et);prId=N.required();settings=N(null);closed=H();changed=H();pr=x(null);threads=x([]);files=x([]);loading=x(!0);error=x("");busy=x(!1);workItems=x([]);workItemsLoading=x(!1);workItemsError=x("");checks=x([]);checksLoading=x(!1);checksError=x("");checksWarnings=x([]);requeuing=x("");requeueError=x("");requiredChecks=L(()=>this.checks().filter(t=>t.required));optionalChecks=L(()=>this.checks().filter(t=>!t.required));filesLoading=x(!1);filesError=x("");tab=x("overview");editing=x(!1);editTitle=x("");editDescription=x("");reviewerQuery=x("");reviewerSuggestions=x([]);reviewersLoading=x(!1);reviewersError=x("");reviewerRequired=x(!1);tagsPickerOpen=x(!1);tagQuery=x("");allTags=x([]);tagsLoading=x(!1);tagSuggestions=L(()=>{let t=this.tagQuery().trim().toLowerCase(),e=this.allTags();return t?e.filter(i=>i.label.toLowerCase().includes(t)):e});workItemPickerOpen=x(!1);workItemQuery=x("");workItemSuggestions=x([]);workItemsSearchLoading=x(!1);workItemsSearchError=x("");reviewMenuOpen=x(!1);completeOpen=x(!1);autoCompleteOpen=x(!1);abandonOpen=x(!1);mergeStrategy=x("noFastForward");deleteSourceBranch=x(!1);completeWorkItems=x(!1);transitionWorkItems=x(!1);newComment=x("");selectedFile=x(null);fileDiffs=x({});fileDiffLoading=x(!1);fileDiffError=x("");fileFocus=x(null);collapsedFiles=x(new Set);fileRows=L(()=>{let t=this.files();return this.settings()?.fileListView!=="tree"?t.map(e=>({kind:"file",path:e.path,name:e.path,depth:0,file:e})):vo(t,this.collapsedFiles())});mergeStrategies=L(()=>n.allMergeStrategies.filter(t=>{let e=this.settings();return t.value==="noFastForward"||t.value==="rebaseMerge"?e?.allowMerge!==!1:!0}));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(EC);requiredReviewers=L(()=>(this.pr()?.reviewers??[]).filter(t=>t.isRequired));otherReviewers=L(()=>(this.pr()?.reviewers??[]).filter(t=>!t.isRequired));generalThreads=L(()=>this.threads().filter(t=>!t.filePath));inlineThreads=L(()=>this.threads().filter(t=>t.filePath));selectedFileThreads=L(()=>{let t=this.selectedFile();return t?this.inlineThreads().filter(e=>e.filePath===t.path||e.filePath===t.oldPath):[]});constructor(){hr(this.reviewerQuery).pipe(yt(t=>(this.reviewerSuggestions.set([]),this.reviewersError.set(""),this.reviewersLoading.set(t.trim().length>=2),t.trim().length<2?we([]):this.git.searchReviewers(t.trim()).pipe(ot(()=>(this.reviewersError.set("Unable to load suggestions."),we([])))))),_t(this.destroyRef)).subscribe(t=>{this.reviewerSuggestions.set(t),this.reviewersLoading.set(!1)}),hr(this.workItemQuery).pipe(yt(t=>{let e=t.trim();return this.workItemSuggestions.set([]),this.workItemsSearchError.set(""),this.workItemsSearchLoading.set(e.length>0),e?this.git.searchWorkItems(e).pipe(ot(()=>(this.workItemsSearchError.set("Unable to load suggestions."),we([])))):we([])}),_t(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.load()}load(){this.loading.set(!0),this.error.set(""),this.git.getPrDetail(this.prId()).pipe(yt(t=>DC({detail:we(t),threads:this.git.getPrThreads(this.prId()).pipe(ot(()=>we([])))})),_t(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()},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(_t(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(_t(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(_t(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(_t(this.destroyRef)).subscribe({next:()=>{this.requeuing.set(""),this.loadChecks()},error:i=>{this.requeuing.set(""),this.requeueError.set(this.errorMessage(i))}}))}reload(){DC({detail:this.git.getPrDetail(this.prId()),threads:this.git.getPrThreads(this.prId()).pipe(ot(()=>we([])))}).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(_t(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(_t(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()[0]?.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(_t(this.destroyRef)).subscribe({next:e=>{this.fileDiffs.update(i=>le(W({},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 EC[t]??t}mergeStatusLabel(t){return hN[t]??t}checkStateLabel(t){return mN[t]??t}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=pe({type:n,selectors:[["app-pr-dialog"]],hostBindings:function(e,i){e&1&&D("keydown.escape",function(){return i.onEscape()},Ye)},inputs:{prId:[1,"prId"],settings:[1,"settings"]},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"],[3,"message"],[1,"dialog-body"],[1,"overview","content-pane"],[1,"comments","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,"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","value"],[1,"check"],["type","checkbox",3,"change","checked"],[1,"check","nested"],["type","checkbox",3,"change","checked","disabled"]],template:function(e,i){if(e&1&&(f(0,"div",3),D("click",function(){return i.onBackdropClick()}),h(),f(1,"section",4),S(2,WO,2,0,"div",5)(3,pN,48,22)(4,fN,5,1,"div",6),h()),e&2){let r;c(2),T(i.loading()?2:(r=i.pr())?3:4,r)}},dependencies:[An,wo,at,So,bh,gd],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}.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)}}"],changeDetection:0})};function DC(n){return new de(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 bd(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 d=a.dirs.get(l);d||(d={name:l,dirs:new Map,refs:[]},a.dirs.set(l,d)),a=d}a.refs.push(o)}let i=[],r=(o,s,a)=>{for(let l of[...o.dirs.values()].sort(TC)){let d=s?`${s}/${l.name}`:l.name,m=t.has(d);i.push({kind:"dir",path:d,name:l.name,depth:a,collapsed:m}),m||r(l,d,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 yr(n){return n.map(t=>({kind:"ref",path:t.name,name:t.name,depth:0,ref:t}))}function Ci(n,t){return t?n:n.normalize("NFD").replace(new RegExp("\\p{M}","gu"),"").toLocaleLowerCase()}var gN=(n,t)=>t.index,_N=(n,t)=>t.path,vN=(n,t)=>t.id;function bN(n,t){if(n&1){let e=P();b(0,"button",22),B("click",function(){_(e);let r=u();return v(r.clearFilter())}),V(),b(1,"svg",18),J(2,"line",23)(3,"line",24),C()()}}function yN(n,t){n&1&&(V(),J(0,"polyline",11))}function CN(n,t){n&1&&(V(),J(0,"polyline",12))}function xN(n,t){n&1&&(V(),J(0,"polyline",12))}function wN(n,t){n&1&&(V(),J(0,"polyline",11))}function EN(n,t){if(n&1){let e=P();b(0,"button",38),B("click",function(){_(e);let r=u().$implicit,o=u(2);return v(o.toggleDir("local",r.path))}),V(),b(1,"svg",39),S(2,xN,1,0,":svg:polyline",12)(3,wN,1,0,":svg:polyline",11),C(),ue(),b(4,"span",33),p(5),C()()}if(n&2){let e=u().$implicit;ie("padding-left",e.depth*14+8,"px"),q("title",e.path),ce("aria-expanded",!e.collapsed),c(2),T(e.collapsed?2:3),c(3),O(e.name)}}function DN(n,t){n&1&&(b(0,"span",45),p(1,"current"),C())}function SN(n,t){if(n&1){let e=P();b(0,"button",40),B("click",function(r){_(e);let o=u().$implicit,s=u(2);return v(s.selectBranch(o.ref.name,r))})("contextmenu",function(r){_(e);let o=u().$implicit,s=u(2);return v(s.onContextMenu(r,{kind:"branch",branch:s.badgeOf(o.ref)}))}),V(),b(1,"svg",26),J(2,"line",41)(3,"circle",42)(4,"circle",43)(5,"path",44),C(),ue(),b(6,"span",33),p(7),C(),S(8,DN,2,0,"span",45),C()}if(n&2){let e=u().$implicit,i=u(2);ie("padding-left",e.depth*14+8,"px"),me("selected",i.selectedBranches().includes(e.ref.name)),q("title",e.ref.name),c(7),O(e.name),c(),T(e.ref.current?8:-1)}}function TN(n,t){if(n&1&&S(0,EN,6,6,"button",36)(1,SN,9,7,"button",37),n&2){let e=t.$implicit;T(e.kind==="dir"?0:1)}}function MN(n,t){n&1&&(V(),J(0,"polyline",12))}function kN(n,t){n&1&&(V(),J(0,"polyline",11))}function IN(n,t){if(n&1){let e=P();b(0,"button",38),B("click",function(){_(e);let r=u().$implicit,o=u(3);return v(o.toggleDir("remote",r.path))}),V(),b(1,"svg",39),S(2,MN,1,0,":svg:polyline",12)(3,kN,1,0,":svg:polyline",11),C(),ue(),b(4,"span",33),p(5),C()()}if(n&2){let e=u().$implicit;ie("padding-left",e.depth*14+8,"px"),q("title",e.path),ce("aria-expanded",!e.collapsed),c(2),T(e.collapsed?2:3),c(3),O(e.name)}}function PN(n,t){if(n&1){let e=P();b(0,"button",40),B("click",function(r){_(e);let o=u().$implicit,s=u(3);return v(s.selectBranch(o.ref.name,r))})("contextmenu",function(r){_(e);let o=u().$implicit,s=u(3);return v(s.onContextMenu(r,{kind:"branch",branch:s.badgeOf(o.ref)}))}),V(),b(1,"svg",26),J(2,"line",41)(3,"circle",42)(4,"circle",43)(5,"path",44),C(),ue(),b(6,"span",33),p(7),C()()}if(n&2){let e=u().$implicit,i=u(3);ie("padding-left",e.depth*14+8,"px"),me("selected",i.selectedBranches().includes(e.ref.name)),q("title",e.ref.name),c(7),O(e.name)}}function ON(n,t){if(n&1&&S(0,IN,6,6,"button",36)(1,PN,8,6,"button",37),n&2){let e=t.$implicit;T(e.kind==="dir"?0:1)}}function RN(n,t){if(n&1&&(b(0,"div",34),p(1," Remote "),C(),Q(2,ON,2,1,null,null,Vt)),n&2){let e=u(2);me("hidden",e.filtering()&&e.remoteBranchRows().length===0),c(2),K(e.remoteBranchRows())}}function NN(n,t){n&1&&(b(0,"div",35),p(1,"No matching branches"),C())}function AN(n,t){if(n&1){let e=P();b(0,"div",15)(1,"button",25),B("click",function(){_(e);let r=u();return v(r.selectAllBranches())}),V(),b(2,"svg",26),J(3,"line",27)(4,"line",28)(5,"line",29)(6,"circle",30)(7,"circle",31)(8,"circle",32),C(),ue(),b(9,"span",33),p(10,"All Branches"),C()(),b(11,"div",34),p(12," Local "),C(),Q(13,TN,2,1,null,null,Vt),S(15,RN,4,2),S(16,NN,2,0,"div",35),C()}if(n&2){let e=u();c(),me("selected",e.selectedBranches().length===0),c(10),me("hidden",e.filtering()&&e.localBranchRows().length===0),c(2),K(e.localBranchRows()),c(2),T(e.showRemote()?15:-1),c(),T(e.filtering()&&e.branchCount()===0?16:-1)}}function LN(n,t){n&1&&(V(),J(0,"polyline",11))}function FN(n,t){n&1&&(V(),J(0,"polyline",12))}function VN(n,t){n&1&&(V(),J(0,"polyline",12))}function BN(n,t){n&1&&(V(),J(0,"polyline",11))}function jN(n,t){if(n&1){let e=P();b(0,"button",38),B("click",function(){_(e);let r=u().$implicit,o=u(2);return v(o.toggleDir("tag",r.path))}),V(),b(1,"svg",39),S(2,VN,1,0,":svg:polyline",12)(3,BN,1,0,":svg:polyline",11),C(),ue(),b(4,"span",33),p(5),C()()}if(n&2){let e=u().$implicit;ie("padding-left",e.depth*14+8,"px"),q("title",e.path),ce("aria-expanded",!e.collapsed),c(2),T(e.collapsed?2:3),c(3),O(e.name)}}function $N(n,t){if(n&1){let e=P();b(0,"button",40),B("click",function(){_(e);let r=u().$implicit,o=u(2);return v(o.selectTag(r.ref))})("contextmenu",function(r){_(e);let o=u().$implicit,s=u(2);return v(s.onContextMenu(r,{kind:"tag",branch:{type:"tag",name:o.ref.name}}))}),V(),b(1,"svg",26),J(2,"path",46)(3,"line",47),C(),ue(),b(4,"span",33),p(5),C()()}if(n&2){let e=u().$implicit,i=u(2);ie("padding-left",e.depth*14+8,"px"),me("selected",i.selectedCommitHash()===e.ref.hash),q("title",e.ref.name),c(5),O(e.name)}}function HN(n,t){if(n&1&&S(0,jN,6,6,"button",36)(1,$N,6,6,"button",37),n&2){let e=t.$implicit;T(e.kind==="dir"?0:1)}}function UN(n,t){if(n&1&&(b(0,"div",35),p(1),C()),n&2){let e=u(2);c(),O(e.filtering()?"No matching tags":"No tags")}}function zN(n,t){if(n&1&&(b(0,"div",15),Q(1,HN,2,1,null,null,Vt,!1,UN,2,1,"div",35),C()),n&2){let e=u();c(),K(e.tagRows())}}function GN(n,t){n&1&&(V(),J(0,"polyline",11))}function WN(n,t){n&1&&(V(),J(0,"polyline",12))}function qN(n,t){if(n&1){let e=P();b(0,"button",49),B("contextmenu",function(r){let o=_(e).$implicit,s=u(2);return v(s.onContextMenu(r,{kind:"stash",stash:o}))}),V(),b(1,"svg",26),J(2,"path",50)(3,"line",51),C(),ue(),b(4,"span",33),p(5),C(),b(6,"span",52),p(7),C()()}if(n&2){let e=t.$implicit,i=u(2);q("title",e.message),c(5),O(i.stashLabel(e)),c(2),O(e.message)}}function ZN(n,t){if(n&1&&(b(0,"div",35),p(1),C()),n&2){let e=u(2);c(),O(e.filtering()?"No matching stashes":"No stashes")}}function YN(n,t){if(n&1&&(b(0,"div",15),Q(1,qN,8,3,"button",48,gN,!1,ZN,2,1,"div",35),C()),n&2){let e=u();c(),K(e.filteredStashes())}}function QN(n,t){n&1&&(V(),J(0,"polyline",11))}function KN(n,t){n&1&&(V(),J(0,"polyline",12))}function XN(n,t){if(n&1&&(b(0,"span",56),p(1),C()),n&2){let e=u().$implicit;c(),O(e.branch)}}function JN(n,t){if(n&1){let e=P();b(0,"button",54),B("dblclick",function(){let r=_(e).$implicit,o=u(2);return v(o.openWorktree(r))})("contextmenu",function(r){let o=_(e).$implicit,s=u(2);return v(s.onContextMenu(r,{kind:"worktree",worktree:o}))}),V(),b(1,"svg",26),J(2,"path",55),C(),ue(),b(3,"span",33),p(4),C(),S(5,XN,2,1,"span",56),C()}if(n&2){let e=t.$implicit,i=u(2);me("selected",e.current),q("title",e.path),c(4),O(i.worktreeLabel(e)),c(),T(e.branch?5:-1)}}function e2(n,t){if(n&1&&(b(0,"div",35),p(1),C()),n&2){let e=u(2);c(),O(e.filtering()?"No matching worktrees":"No worktrees")}}function t2(n,t){if(n&1&&(b(0,"div",15),Q(1,JN,6,5,"button",53,_N,!1,e2,2,1,"div",35),C()),n&2){let e=u();c(),K(e.filteredWorktrees())}}function n2(n,t){n&1&&(V(),J(0,"polyline",11))}function i2(n,t){n&1&&(V(),J(0,"polyline",12))}function r2(n,t){if(n&1&&(b(0,"div",60),p(1),C()),n&2){let e=u(3);c(),O(e.prError())}}function o2(n,t){n&1&&(b(0,"div",35),p(1,"Loading pull requests..."),C())}function s2(n,t){n&1&&(V(),J(0,"polyline",64))}function a2(n,t){n&1&&(V(),J(0,"polyline",64)(1,"line",72))}function l2(n,t){n&1&&(V(),J(0,"circle",73)(1,"polyline",74))}function c2(n,t){n&1&&(V(),J(0,"line",75)(1,"line",76))}function d2(n,t){n&1&&(V(),J(0,"circle",65))}function u2(n,t){n&1&&(b(0,"span",69),p(1,"Draft"),C())}function p2(n,t){n&1&&(b(0,"span",70),p(1,"Required"),C())}function f2(n,t){if(n&1){let e=P();b(0,"button",62),B("click",function(){let r=_(e).$implicit,o=u(4);return v(o.prSelect.emit(r.id))}),V(),b(1,"svg",63),S(2,s2,1,0,":svg:polyline",64)(3,a2,2,0)(4,l2,2,0)(5,c2,2,0)(6,d2,1,0,":svg:circle",65),C(),ue(),b(7,"span",66)(8,"span",67)(9,"span",68),p(10),C(),S(11,u2,2,0,"span",69),S(12,p2,2,0,"span",70),C(),b(13,"span",71),p(14),C()()()}if(n&2){let e,i=t.$implicit,r=u(4);q("title",r.prTooltip(i)),c(),ft(r.voteClass(i)),c(),T((e=i.myVote)===10?2:e===5?3:e===-5?4:e===-10?5:6),c(8),O(i.title),c(),T(i.isDraft?11:-1),c(),T(i.requiresMe?12:-1),c(2),Ec(" ",i.author.name," \xB7 ",i.sourceBranch," \u2192 ",i.targetBranch," ")}}function h2(n,t){if(n&1&&(b(0,"div",35),p(1),C()),n&2){let e=u(4);c(),O(e.filtering()?"No matching pull requests":"No active pull requests")}}function m2(n,t){if(n&1&&Q(0,f2,15,10,"button",61,vN,!1,h2,2,1,"div",35),n&2){let e=u(3);K(e.filteredPullRequests())}}function g2(n,t){if(n&1&&(b(0,"div",15),S(1,r2,2,1,"div",60)(2,o2,2,0,"div",35)(3,m2,3,1),C()),n&2){let e=u(2);c(),T(e.prError()?1:e.pullRequests()===null?2:3)}}function _2(n,t){if(n&1){let e=P();b(0,"section",8)(1,"div",16)(2,"button",9),B("click",function(){_(e);let r=u();return v(r.prsOpen.set(!r.prsOpen()))}),V(),b(3,"svg",10),S(4,n2,1,0,":svg:polyline",11)(5,i2,1,0,":svg:polyline",12),C(),ue(),b(6,"span",13),p(7,"Pull Requests"),C(),b(8,"span",14),p(9),C()(),b(10,"button",57),B("click",function(){_(e);let r=u();return v(r.prRefresh.emit())}),V(),b(11,"svg",18),J(12,"polyline",58)(13,"path",59),C()()(),S(14,g2,4,1,"div",15),C()}if(n&2){let e=u();c(2),ce("aria-expanded",e.prsExpanded()),c(2),T(e.prsExpanded()?4:5),c(5),O(e.prCount()),c(5),T(e.prsExpanded()?14:-1)}}function v2(n,t){n&1&&(b(0,"div",21),p(1,"Loading..."),C())}var yd=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);selectedCommitHash=N("");loading=N(!1);azureEnabled=N(!1);pullRequests=N(null);prError=N("");branchChange=H();tagSelect=H();contextMenu=H();worktreeCreate=H();worktreeOpen=H();prSelect=H();prRefresh=H();prsOpen=x(!0);branchesOpen=x(!0);tagsOpen=x(!0);stashesOpen=x(!0);worktreesOpen=x(!0);filter=x("");filterText=L(()=>Ci(this.filter().trim(),this.searchCaseSensitive()));filtering=L(()=>this.filterText()!=="");onFilterInput(t){this.filter.set(t.target.value)}clearFilter(){this.filter.set("")}branchesExpanded=L(()=>this.filtering()||this.branchesOpen());tagsExpanded=L(()=>this.filtering()||this.tagsOpen());stashesExpanded=L(()=>this.filtering()||this.stashesOpen());worktreesExpanded=L(()=>this.filtering()||this.worktreesOpen());prsExpanded=L(()=>this.filtering()||this.prsOpen());localBranches=L(()=>this.branches().filter(t=>!t.remote));remoteBranches=L(()=>this.branches().filter(t=>t.remote));localDirsCollapsed=x(new Set);remoteDirsCollapsed=x(new Set);tagDirsCollapsed=x(new Set);filterRefs(t){return this.filtering()?t.filter(e=>this.matchesFilter(e.name)):t}matchesFilter(t){return Ci(t,this.searchCaseSensitive()).includes(this.filterText())}localBranchRows=L(()=>this.filtering()?yr(this.filterRefs(this.localBranches())):this.refListView()==="tree"?bd(this.localBranches(),this.localDirsCollapsed()):yr(this.localBranches()));remoteBranchRows=L(()=>this.filtering()?yr(this.filterRefs(this.remoteBranches())):this.refListView()==="tree"?bd(this.remoteBranches(),this.remoteDirsCollapsed()):yr(this.remoteBranches()));tagRows=L(()=>this.filtering()?yr(this.filterRefs(this.tags())):this.refListView()==="tree"?bd(this.tags(),this.tagDirsCollapsed()):yr(this.tags()));branchCount=L(()=>{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=L(()=>this.filtering()?this.tagRows().length:this.tags().length);filteredStashes=L(()=>{let t=this.stashes();return this.filtering()?t.filter(e=>this.matchesFilter(this.stashLabel(e))||this.matchesFilter(e.message)):t});stashCount=L(()=>this.filtering()?this.filteredStashes().length:this.stashes().length);filteredWorktrees=L(()=>{let t=this.worktrees();return this.filtering()?t.filter(e=>this.matchesFilter(this.worktreeLabel(e))||this.matchesFilter(e.branch??"")||this.matchesFilter(e.path)):t});worktreeCount=L(()=>this.filtering()?this.filteredWorktrees().length:this.worktrees().length);filteredPullRequests=L(()=>{let t=this.pullRequests();return t===null||!this.filtering()?t:t.filter(e=>this.matchesFilter(e.title)||this.matchesFilter(e.sourceBranch)||this.matchesFilter(e.targetBranch)||this.matchesFilter(e.author.name))});prCount=L(()=>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=L(()=>{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}}`}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-side-panel"]],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"],selectedCommitHash:[1,"selectedCommitHash"],loading:[1,"loading"],azureEnabled:[1,"azureEnabled"],pullRequests:[1,"pullRequests"],prError:[1,"prError"]},outputs:{branchChange:"branchChange",tagSelect:"tagSelect",contextMenu:"contextMenu",worktreeCreate:"worktreeCreate",worktreeOpen:"worktreeOpen",prSelect:"prSelect",prRefresh:"prRefresh"},decls:55,vars:20,consts:[["aria-label","Repository panel",1,"side-panel"],["role","search",1,"panel-filter"],[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"],[1,"tree"],["type","button",1,"tree-head",3,"click"],["viewBox","0 0 24 24","aria-hidden","true",1,"chevron"],["points","6 9 12 15 18 9"],["points","9 6 15 12 9 18"],[1,"tree-title"],[1,"tree-count"],[1,"tree-body"],[1,"tree-head-row"],["type","button","title","Create worktree","aria-label","Create worktree",1,"head-action",3,"click"],["viewBox","0 0 24 24","aria-hidden","true"],["x1","12","y1","5","x2","12","y2","19"],["x1","5","y1","12","x2","19","y2","12"],["role","status",1,"panel-loading"],["type","button","title","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"],["type","button","title","Show commits from all branches",1,"row",3,"click"],["viewBox","0 0 24 24","aria-hidden","true",1,"row-icon"],["x1","8","y1","6","x2","21","y2","6"],["x1","8","y1","12","x2","21","y2","12"],["x1","8","y1","18","x2","21","y2","18"],["cx","3.5","cy","6","r","1.5"],["cx","3.5","cy","12","r","1.5"],["cx","3.5","cy","18","r","1.5"],[1,"row-label"],[1,"group-label"],[1,"empty"],["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,"title"],["type","button",1,"row",3,"contextmenu","title"],["d","M21 8v13H3V8M1 3h22v5H1z"],["x1","10","y1","12","x2","14","y2","12"],[1,"row-tag","stash-message"],["type","button",1,"row",3,"selected","title"],["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){e&1&&(b(0,"aside",0)(1,"div",1)(2,"div",2),V(),b(3,"svg",3),J(4,"circle",4)(5,"line",5),C(),ue(),b(6,"input",6),B("input",function(o){return i.onFilterInput(o)})("keydown.escape",function(){return i.clearFilter()}),C(),S(7,bN,4,0,"button",7),C()(),b(8,"section",8)(9,"button",9),B("click",function(){return i.branchesOpen.set(!i.branchesOpen())}),V(),b(10,"svg",10),S(11,yN,1,0,":svg:polyline",11)(12,CN,1,0,":svg:polyline",12),C(),ue(),b(13,"span",13),p(14,"Branches"),C(),b(15,"span",14),p(16),C()(),S(17,AN,17,6,"div",15),C(),b(18,"section",8)(19,"button",9),B("click",function(){return i.tagsOpen.set(!i.tagsOpen())}),V(),b(20,"svg",10),S(21,LN,1,0,":svg:polyline",11)(22,FN,1,0,":svg:polyline",12),C(),ue(),b(23,"span",13),p(24,"Tags"),C(),b(25,"span",14),p(26),C()(),S(27,zN,4,1,"div",15),C(),b(28,"section",8)(29,"button",9),B("click",function(){return i.stashesOpen.set(!i.stashesOpen())}),V(),b(30,"svg",10),S(31,GN,1,0,":svg:polyline",11)(32,WN,1,0,":svg:polyline",12),C(),ue(),b(33,"span",13),p(34,"Stashes"),C(),b(35,"span",14),p(36),C()(),S(37,YN,4,1,"div",15),C(),b(38,"section",8)(39,"div",16)(40,"button",9),B("click",function(){return i.worktreesOpen.set(!i.worktreesOpen())}),V(),b(41,"svg",10),S(42,QN,1,0,":svg:polyline",11)(43,KN,1,0,":svg:polyline",12),C(),ue(),b(44,"span",13),p(45,"Worktrees"),C(),b(46,"span",14),p(47),C()(),b(48,"button",17),B("click",function(){return i.worktreeCreate.emit()}),V(),b(49,"svg",18),J(50,"line",19)(51,"line",20),C()()(),S(52,t2,4,1,"div",15),C(),S(53,_2,15,4,"section",8),S(54,v2,2,0,"div",21),C()),e&2&&(c(6),q("value",i.filter()),c(),T(i.filter()?7:-1),c(2),ce("aria-expanded",i.branchesExpanded()),c(2),T(i.branchesExpanded()?11:12),c(5),O(i.branchCount()),c(),T(i.branchesExpanded()?17:-1),c(2),ce("aria-expanded",i.tagsExpanded()),c(2),T(i.tagsExpanded()?21:22),c(5),O(i.tagCount()),c(),T(i.tagsExpanded()?27:-1),c(2),ce("aria-expanded",i.stashesExpanded()),c(2),T(i.stashesExpanded()?31:32),c(5),O(i.stashCount()),c(),T(i.stashesExpanded()?37:-1),c(3),ce("aria-expanded",i.worktreesExpanded()),c(2),T(i.worktreesExpanded()?42:43),c(5),O(i.worktreeCount()),c(5),T(i.worktreesExpanded()?52:-1),c(),T(i.azureEnabled()?53:-1),c(),T(i.loading()?54:-1))},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}}.tree[_ngcontent-%COMP%]{border-bottom:1px solid var(--border)}.panel-filter[_ngcontent-%COMP%]{position:sticky;top:0;z-index:2;padding:7px 8px 8px;background:var(--bg-alt);border-bottom:1px solid var(--border)}.filter-field[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;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}.group-label.hidden[_ngcontent-%COMP%]{display: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}.group-label[_ngcontent-%COMP%]{padding:6px 6px 2px 22px;color:var(--text-dim);font-size:10px;font-weight:600;letter-spacing:.5px;text-transform:uppercase;-webkit-user-select:none;user-select:none}.row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;width:100%;height:24px;padding:0 6px 0 8px;border:none;border-left:2px solid transparent;border-radius:3px;background:transparent;color:var(--text);font-size:12px;text-align:left;cursor:pointer;min-width:0}.row[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.row[_ngcontent-%COMP%]:focus-visible{outline:1px solid var(--accent)}.row.selected[_ngcontent-%COMP%]{border-left-color:var(--accent);background:#3794ff1f;color:var(--text-bright)}.row-icon[_ngcontent-%COMP%]{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none;opacity:.85}.row.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}.panel-loading[_ngcontent-%COMP%]{padding:8px;color:var(--text-dim);font-size:12px;-webkit-user-select:none;user-select:none}.tree-head-row[_ngcontent-%COMP%]{display:flex;align-items:center}.tree-head-row[_ngcontent-%COMP%] .tree-head[_ngcontent-%COMP%]{flex:1;min-width:0}.head-action[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:22px;height:22px;margin-right:4px;border:none;border-radius:3px;background:transparent;color:var(--text-dim);cursor:pointer;flex:none}.head-action[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-bright)}.head-action[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.pr-row[_ngcontent-%COMP%]{height:auto;min-height:40px;align-items:flex-start;padding:5px 6px 5px 8px}.vote-icon[_ngcontent-%COMP%]{margin-top:2px;opacity:1}.vote-icon.vote-approve[_ngcontent-%COMP%], .vote-icon.vote-suggestions[_ngcontent-%COMP%]{stroke:#89d185}.vote-icon.vote-suggestions[_ngcontent-%COMP%] line[_ngcontent-%COMP%]{stroke-width:2.5}.vote-icon.vote-waiting[_ngcontent-%COMP%]{stroke:#dcb67a}.vote-icon.vote-reject[_ngcontent-%COMP%]{stroke:#f48771}.vote-icon.vote-none[_ngcontent-%COMP%]{stroke:var(--text-dim)}.pr-main[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.pr-line[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;min-width:0}.pr-title[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}.pr-row[_ngcontent-%COMP%]:hover .pr-title[_ngcontent-%COMP%]{color:var(--text-bright)}.pr-badge[_ngcontent-%COMP%]{flex:none;border-radius:3px;font-size:10px;font-weight:600;letter-spacing:.3px;padding:1px 4px;text-transform:uppercase}.pr-badge.draft[_ngcontent-%COMP%]{border:1px solid var(--border);color:var(--text-dim)}.pr-badge.required[_ngcontent-%COMP%]{background:#dcb67a2e;border:1px solid rgba(220,182,122,.5);color:#dcb67a}.pr-meta[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-dim);font-size:11px}.pr-error[_ngcontent-%COMP%]{margin:2px 6px 4px 10px;color:var(--red);font-size:11px;line-height:1.4;word-break:break-word}"],changeDetection:0})};function b2(n,t){n&1&&(f(0,"div",5),p(1,"Loading conflict\u2026"),h())}function y2(n,t){n&1&&(f(0,"p"),p(1,"Binary file"),h())}function C2(n,t){n&1&&(f(0,"p"),p(1,"File deleted"),h())}function x2(n,t){if(n&1&&(f(0,"pre"),p(1),h()),n&2){let e=u();c(),O(e.ours.content)}}function w2(n,t){n&1&&(f(0,"p"),p(1,"Binary file"),h())}function E2(n,t){n&1&&(f(0,"p"),p(1,"File deleted"),h())}function D2(n,t){if(n&1&&(f(0,"pre"),p(1),h()),n&2){let e=u();c(),O(e.theirs.content)}}function S2(n,t){if(n&1){let e=P();f(0,"div",15),p(1,"The resolved change will delete this file. "),f(2,"button",11),D("click",function(){_(e);let r=u(3);return v(r.deleted.set(!1))}),p(3,"Keep file"),h()()}}function T2(n,t){if(n&1){let e=P();f(0,"textarea",17),D("input",function(r){_(e);let o=u(3);return v(o.updateResult(r))}),h()}if(n&2){let e=u(3);k("value",e.result())}}function M2(n,t){if(n&1){let e=P();f(0,"div",9)(1,"div",13)(2,"h3"),p(3,"Result"),h(),f(4,"div",14)(5,"button",8),D("click",function(){_(e);let r=u(2);return v(r.useBoth())}),p(6,"Use both"),h(),f(7,"button",8),D("click",function(){_(e);let r=u(2);return v(r.deleted.set(!0))}),p(8,"Delete file"),h()()(),S(9,S2,4,0,"div",15)(10,T2,1,1,"textarea",16),h()}if(n&2){let e=u(2);c(5),k("disabled",e.saving()),c(2),k("disabled",e.saving()),c(2),T(e.deleted()?9:10)}}function k2(n,t){if(n&1&&z(0,"app-error-banner",10),n&2){let e=u(2);k("message",e.error())}}function I2(n,t){if(n&1){let e=P();f(0,"button",18),D("click",function(){_(e);let r=u(2);return v(r.resolve())}),p(1),h()}if(n&2){let e=u(2);k("disabled",e.saving()),c(),G(" ",e.saving()?"Saving\u2026":"Mark as resolved"," ")}}function P2(n,t){if(n&1){let e=P();f(0,"div",7)(1,"section")(2,"h3"),p(3,"Current (ours)"),h(),S(4,y2,2,0,"p")(5,C2,2,0,"p")(6,x2,2,1,"pre"),f(7,"button",8),D("click",function(){let r=_(e),o=u();return v(r.ours.binary?o.resolve("ours"):o.use("ours"))}),p(8),h()(),f(9,"section")(10,"h3"),p(11,"Incoming (theirs)"),h(),S(12,w2,2,0,"p")(13,E2,2,0,"p")(14,D2,2,1,"pre"),f(15,"button",8),D("click",function(){let r=_(e),o=u();return v(r.theirs.binary?o.resolve("theirs"):o.use("theirs"))}),p(16),h()()(),S(17,M2,11,3,"div",9),S(18,k2,1,1,"app-error-banner",10),f(19,"footer")(20,"button",11),D("click",function(){_(e);let r=u();return v(r.closed.emit())}),p(21,"Cancel"),h(),S(22,I2,2,2,"button",12),h()}if(n&2){let e=t,i=u();c(4),T(e.ours.binary?4:e.ours.content===null?5:6),c(3),k("disabled",i.saving()),c(),G(" ",e.ours.binary?"Resolve with current":"Use current"," "),c(4),T(e.theirs.binary?12:e.theirs.content===null?13:14),c(3),k("disabled",i.saving()),c(),G(" ",e.theirs.binary?"Resolve with incoming":"Use incoming"," "),c(),T(!e.ours.binary&&!e.theirs.binary?17:-1),c(),T(i.error()?18:-1),c(4),T(!e.ours.binary&&!e.theirs.binary?22:-1)}}function O2(n,t){if(n&1){let e=P();f(0,"app-error-banner",19),D("retry",function(){_(e);let r=u();return v(r.load())}),h()}if(n&2){let e=u();k("message",e.error())}}var Cd=class n{git=I(lt);path=N.required();resolved=H();closed=H();conflict=x(null);result=x("");deleted=x(!1);loading=x(!0);saving=x(!1);error=x("");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(ei(()=>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=pe({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&&(f(0,"div",0),D("click",function(){return i.closed.emit()}),h(),f(1,"div",1)(2,"header")(3,"div")(4,"h2",2),p(5,"Resolve merge conflict"),h(),f(6,"div",3),p(7),h()(),f(8,"button",4),D("click",function(){return i.closed.emit()}),p(9,"\xD7"),h()(),S(10,b2,2,0,"div",5)(11,P2,23,9)(12,O2,1,1,"app-error-banner",6),h()),e&2){let r;c(6),k("title",i.path()),c(),O(i.path()),c(3),T(i.loading()?10:(r=i.conflict())?11:i.error()?12:-1,r)}},dependencies:[at],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 R2=(n,t)=>t.path;function N2(n,t){if(n&1&&(f(0,"div",4),z(1,"span",19),p(2),h()),n&2){let e=u();c(2),O(e.statusLoading()?"Refreshing changes\u2026":"Updating repository\u2026")}}function A2(n,t){if(n&1){let e=P();f(0,"app-error-banner",20),D("retry",function(){_(e);let r=u();return v(r.retry.emit())}),h()}if(n&2){let e=u();k("message",e.statusError())("busy",e.statusLoading())}}function L2(n,t){if(n&1){let e=P();f(0,"button",24),D("click",function(){let r=_(e).$implicit,o=u(2);return v(o.openConflict(r))}),f(1,"span",25),p(2,"!"),h(),f(3,"span",26),p(4),h(),f(5,"span"),p(6,"Resolve"),h()()}if(n&2){let e=t.$implicit,i=u(2);k("disabled",i.disabled()),c(3),k("title",e),c(),O(e)}}function F2(n,t){if(n&1&&(f(0,"section",7)(1,"h3"),p(2),h(),f(3,"p",21),p(4,"Choose a file to resolve it before committing."),h(),f(5,"div",22),Q(6,L2,7,3,"button",23,Rt),h()()),n&2){let e=u();c(2),G("Merge conflicts (",e.changes().conflicted.length,")"),c(4),K(e.changes().conflicted)}}function V2(n,t){if(n&1){let e=P();f(0,"button",31),D("click",function(){_(e);let r=u(2);return v(r.discardSelected())}),p(1,"Discard selected"),h(),f(2,"button",31),D("click",function(){_(e);let r=u(2);return v(r.discardAll())}),p(3,"Discard all"),h()}if(n&2){let e=u().$implicit,i=u();k("disabled",i.disabled()||!i.selected()[e].size),c(2),k("disabled",i.disabled()||!i.files(e).length)}}function B2(n,t){n&1&&(V(),z(0,"polyline",36))}function j2(n,t){n&1&&(V(),z(0,"polyline",37))}function $2(n,t){if(n&1){let e=P();f(0,"button",34),D("click",function(){_(e);let r=u().$implicit,o=u(2);return v(o.toggleDir(r.path))}),V(),f(1,"svg",35),S(2,B2,1,0,":svg:polyline",36)(3,j2,1,0,":svg:polyline",37),h(),ue(),f(4,"span",38),p(5),h(),f(6,"span",39)(7,"span",40),p(8),h(),f(9,"span",41),p(10),h()()()}if(n&2){let e=u().$implicit;ie("padding-left",e.depth*14+8,"px"),k("title",e.path),ce("aria-expanded",!e.collapsed)("aria-label","Directory "+e.path),c(2),T(e.collapsed?2:3),c(3),O(e.name),c(3),G("+",e.additions),c(2),G("\u2212",e.deletions)}}function H2(n,t){if(n&1){let e=P();f(0,"div",42),D("click",function(r){_(e);let o=u().$implicit,s=u().$implicit,a=u();return v(a.select(s,o.file.path,r))})("dblclick",function(){_(e);let r=u().$implicit,o=u().$implicit,s=u();return v(s.openDiff(o,r.file))})("contextmenu",function(r){_(e);let o=u().$implicit,s=u().$implicit,a=u();return v(a.openContextMenu(r,s,o.file))})("keydown",function(r){_(e);let o=u().$implicit,s=u().$implicit,a=u();return v(a.keySelect(s,o.file.path,r))}),f(1,"span",43),p(2),h(),f(3,"span",26),p(4),h(),f(5,"span",39)(6,"span",40),p(7),h(),f(8,"span",41),p(9),h()()()}if(n&2){let e=u().$implicit,i=u().$implicit,r=u();ie("padding-left",e.depth*14+4,"px"),me("selected",r.selected()[i].has(e.file.path)),ce("role",r.fileListView()==="tree"?"treeitem":"option")("aria-selected",r.selected()[i].has(e.file.path))("aria-label",e.file.path),c(),k("title",e.file.status),c(),O(e.file.status.slice(0,1).toUpperCase()),c(),k("title",e.file.oldPath&&e.file.oldPath!==e.file.path?e.file.oldPath+" \u2192 "+e.file.path:e.file.path),c(),O(e.name),c(3),G("+",e.file.additions),c(2),G("\u2212",e.file.deletions)}}function U2(n,t){if(n&1&&S(0,$2,11,9,"button",32)(1,H2,10,13,"div",33),n&2){let e=t.$implicit;T(e.kind==="dir"?0:1)}}function z2(n,t){if(n&1&&(f(0,"p",30),p(1),h()),n&2){let e=u().$implicit;c(),O(e==="staged"?"No staged changes.":"No unstaged changes.")}}function G2(n,t){if(n&1){let e=P();f(0,"section")(1,"h3"),p(2),h(),f(3,"div",27)(4,"span",28),p(5),h(),f(6,"button",3),D("click",function(){let r=_(e).$implicit,o=u();return v(o.moveSelected(r))}),p(7),h(),f(8,"button",3),D("click",function(){let r=_(e).$implicit,o=u();return v(o.moveAll(r))}),p(9),h(),S(10,V2,4,2),h(),f(11,"div",29),Q(12,U2,2,1,null,null,R2,!1,z2,2,1,"p",30),h()()}if(n&2){let e=t.$implicit,i=u();ce("aria-label",e==="staged"?"Staged changes":"Unstaged changes"),c(2),uo("",e==="staged"?"Staged changes":"Unstaged changes"," (",i.files(e).length,")"),c(3),G("",i.selected()[e].size," selected"),c(),k("disabled",i.disabled()||!i.selected()[e].size),c(),O(e==="staged"?"Unstage selected":"Stage selected"),c(),k("disabled",i.disabled()||!i.files(e).length),c(),O(e==="staged"?"Unstage all":"Stage all"),c(),T(e==="unstaged"?10:-1),c(),ce("role",i.fileListView()==="tree"?"tree":"listbox")("aria-label",e+" files"),c(),K(i.rows(e))}}function W2(n,t){n&1&&(f(0,"p",9),p(1,"Resolve conflicts before committing."),h())}function q2(n,t){if(n&1){let e=P();f(0,"app-diff-dialog",44),D("closed",function(){_(e);let r=u();return v(r.dialog.set(null))}),h()}if(n&2){let e=t;k("file",e.file)("originalRef",e.group==="staged"?"HEAD":"INDEX")("modifiedRef",e.group==="staged"?"INDEX":"WORKING")}}function Z2(n,t){if(n&1){let e=P();f(0,"app-conflict-dialog",45),D("resolved",function(){_(e);let r=u();return v(r.onConflictResolved())})("closed",function(){_(e);let r=u();return v(r.selectedConflict.set(null))}),h()}n&2&&k("path",t)}var xd=class n{vscode=I(nn);changes=N(null);busy=N(!1);statusLoading=N(!1);statusError=N("");subject=N("");description=N("");fileListView=N("flat");subjectChange=H();descriptionChange=H();stageChange=H();stashChange=H();discardRequest=H();commitRequested=H();conflictResolved=H();retry=H();closed=H();groups=["staged","unstaged"];selected=x({staged:new Set,unstaged:new Set});anchors={staged:null,unstaged:null};dialog=x(null);selectedConflict=x(null);contextMenu=x(null);contextMenuTarget=null;collapsed=x(new Set);disabled=L(()=>this.busy()||!!this.statusError()||!this.changes());canCommit=L(()=>!this.disabled()&&!!this.subject().trim()&&!!this.changes()?.staged.length&&!this.changes()?.conflicted.length);constructor(){Ce(()=>{let t=this.changes();this.selected.update(e=>{let i=W({},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})):vo(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,group:t})}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:"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==="open-file"?this.vscode.openFile(e.file.path):t==="copy-file-path"&&navigator.clipboard?.writeText(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 d=o.indexOf(s),m=o.indexOf(e);for(let y of o.slice(Math.min(d,m),Math.max(d,m)+1))l.add(y)}else r&&l.has(e)?l.delete(e):l.add(e),this.anchors[t]=e;this.selected.update(d=>le(W({},d),{[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)}commit(t){t.preventDefault(),this.canCommit()&&this.commitRequested.emit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=pe({type:n,selectors:[["app-working-panel"]],inputs:{changes:[1,"changes"],busy:[1,"busy"],statusLoading:[1,"statusLoading"],statusError:[1,"statusError"],subject:[1,"subject"],description:[1,"description"],fileListView:[1,"fileListView"]},outputs:{subjectChange:"subjectChange",descriptionChange:"descriptionChange",stageChange:"stageChange",stashChange:"stashChange",discardRequest:"discardRequest",commitRequested:"commitRequested",conflictResolved:"conflictResolved",retry:"retry",closed:"closed"},decls:34,vars:15,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"],["id","commit-subject","placeholder","Summary of your changes","required","",3,"input","value","disabled"],["for","commit-description"],[1,"optional"],["id","commit-description","rows","3",3,"input","value","disabled"],["type","submit",1,"commit-button",3,"disabled"],[3,"file","originalRef","modifiedRef"],[3,"select","closed","menu"],[3,"path"],[1,"spinner"],["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"],[3,"closed","file","originalRef","modifiedRef"],[3,"resolved","closed","path"]],template:function(e,i){if(e&1&&(f(0,"aside",0)(1,"header")(2,"h2"),p(3,"Uncommitted changes"),h(),f(4,"button",1),D("click",function(){return i.closed.emit()}),p(5,"\xD7"),h()(),f(6,"div",2)(7,"button",3),D("click",function(){return i.stash("all")}),p(8,"Stash all"),h(),f(9,"button",3),D("click",function(){return i.stash("staged")}),p(10,"Stash staged"),h(),f(11,"button",3),D("click",function(){return i.stash("unstaged")}),p(12,"Stash unstaged"),h()(),S(13,N2,3,1,"div",4),S(14,A2,1,2,"app-error-banner",5),f(15,"div",6),S(16,F2,8,1,"section",7),Q(17,G2,15,12,"section",null,Rt),h(),f(19,"form",8),D("submit",function(o){return i.commit(o)}),S(20,W2,2,0,"p",9),f(21,"label",10),p(22,"Commit message"),h(),f(23,"input",11),D("input",function(o){return i.updateSubject(o)}),h(),f(24,"label",12),p(25,"Description "),f(26,"span",13),p(27,"(optional)"),h()(),f(28,"textarea",14),D("input",function(o){return i.updateDescription(o)}),h(),f(29,"button",15),p(30,"Commit staged changes"),h()()(),S(31,q2,1,3,"app-diff-dialog",16),f(32,"app-context-menu",17),D("select",function(o){return i.runContextAction(o)})("closed",function(){return i.closeContextMenu()}),h(),S(33,Z2,1,1,"app-conflict-dialog",18)),e&2){let r,o,s,a;c(7),k("disabled",i.disabled()||!i.files("staged").length&&!i.files("unstaged").length),c(2),k("disabled",i.disabled()||!i.files("staged").length),c(2),k("disabled",i.disabled()||!i.files("unstaged").length),c(2),T(i.busy()?13:-1),c(),T(i.statusError()?14:-1),c(2),T(!((r=i.changes())==null||r.conflicted==null)&&r.conflicted.length?16:-1),c(),K(i.groups),c(3),T(!((o=i.changes())==null||o.conflicted==null)&&o.conflicted.length?20:-1),c(3),k("value",i.subject())("disabled",i.busy()),c(5),k("value",i.description())("disabled",i.busy()),c(),k("disabled",!i.canCommit()),c(2),T((s=i.dialog())?31:-1,s),c(),k("menu",i.contextMenu()),c(),T((a=i.selectedConflict())?33:-1,a)}},dependencies:[at,xo,Cd,yo],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}.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}.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 Y2=(n,t)=>t.name;function Q2(n,t){if(n&1&&(b(0,"option",10),p(1),C()),n&2){let e=t.$implicit;q("value",e.name),c(),O(e.name)}}function K2(n,t){n&1&&(b(0,"p",11),p(1,"Every local branch is already checked out in a worktree."),C())}function X2(n,t){if(n&1&&(b(0,"p",12),p(1),C()),n&2){let e=u();c(),O(e.error())}}var wd=class n{vscode=I(nn);branches=N.required();worktrees=N.required();busy=N(!1);error=N("");created=H();closed=H();path=x("");branch=x("");canBrowse=this.vscode.canPickFolder;availableBranches=L(()=>{let t=new Set(this.worktrees().map(e=>e.branch).filter(Boolean));return this.branches().filter(e=>!e.remote&&!t.has(e.name))});constructor(){Ce(()=>{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 Dn(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=pe({type:n,selectors:[["app-worktree-dialog"]],hostBindings:function(e,i){e&1&&D("keydown.escape",function(){return i.onEscape()},Ye)},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),B("click",function(){return i.closed.emit()}),C(),b(1,"form",1),B("submit",function(o){return o.preventDefault(),i.submit()}),b(2,"h3",2),p(3,"Create Worktree"),C(),b(4,"p",3),p(5,"Create a linked working folder from an available local branch."),C(),b(6,"label",4),p(7,"Folder"),C(),b(8,"div",5)(9,"input",6),B("input",function(o){return i.onPath(o)}),C(),b(10,"button",7),B("click",function(){return i.browse()}),p(11,"Browse..."),C()(),b(12,"label",8),p(13,"Branch"),C(),b(14,"select",9),B("change",function(o){return i.onBranch(o)}),Q(15,Q2,2,2,"option",10,Y2),C(),S(17,K2,2,0,"p",11),S(18,X2,2,1,"p",12),b(19,"div",13)(20,"button",14),B("click",function(){return i.closed.emit()}),p(21,"Cancel"),C(),b(22,"button",15),p(23),C()()()),e&2&&(c(9),q("value",i.path())("disabled",i.busy()),c(),q("disabled",i.busy()||!i.canBrowse)("title",i.canBrowse?"Browse for a folder":"Folder browsing is available in the VS Code extension"),c(4),q("value",i.branch())("disabled",i.busy()),c(),K(i.availableBranches()),c(2),T(i.availableBranches().length===0?17:-1),c(),T(i.error()?18:-1),c(2),q("disabled",i.busy()),c(2),q("disabled",i.busy()||!i.path().trim()||!i.branch()),c(),G(" ",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 J2=["searchInput"];function eA(n,t){if(n&1){let e=P();b(0,"button",10),B("click",function(){_(e);let r=u(2);return v(r.searchNavigate.emit("prev"))}),V(),b(1,"svg",2),J(2,"polyline",11),C()(),ue(),b(3,"button",12),B("click",function(){_(e);let r=u(2);return v(r.searchNavigate.emit("next"))}),V(),b(4,"svg",2),J(5,"polyline",13),C()()}if(n&2){let e=u(2);q("disabled",e.matchCount()===0),c(3),q("disabled",e.matchCount()===0)}}function tA(n,t){if(n&1){let e=P();S(0,eA,6,2),b(1,"button",6),B("click",function(){_(e);let r=u();return v(r.clearSearch())}),V(),b(2,"svg",2),J(3,"line",7)(4,"line",8),C()(),ue(),b(5,"span",9),p(6),C()}if(n&2){let e=u();T(e.filterMode()?-1:0),c(6),O(e.badgeText())}}var nA=300,Ed=class n{matchIndex=N(-1);matchCount=N(0);filterMode=N(!1);searchChange=H();searchNavigate=H();searchValue=x("");badgeText=L(()=>{let t=this.matchCount(),e=t>99?"99+":String(t);return!this.filterMode()&&this.matchIndex()>=0?`${this.matchIndex()+1}/${e}`:e});searchInput=en("searchInput");constructor(){hr(this.searchValue).pipe(hu(nA),Go(),_t()).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=pe({type:n,selectors:[["app-search-box"]],viewQuery:function(e,i){e&1&&jt(i.searchInput,J2,5),e&2&&vn()},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=P();b(0,"div",1),V(),b(1,"svg",2),J(2,"circle",3)(3,"line",4),C(),ue(),b(4,"input",5,0),B("input",function(s){return _(r),v(i.onSearch(s))})("keydown",function(s){return _(r),v(i.onSearchKeydown(s))}),C(),S(6,tA,7,2),C()}e&2&&(c(4),q("value",i.searchValue()),c(2),T(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 iA(n,t){if(n&1){let e=P();f(0,"div",13)(1,"button",34),D("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("fetch"))}),p(2,"Fetch"),h(),f(3,"button",34),D("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("fetch-prune"))}),p(4," Fetch (prune) "),h()()}}function rA(n,t){if(n&1){let e=P();f(0,"div",13)(1,"button",34),D("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("pull"))}),p(2,"Pull"),h(),f(3,"button",34),D("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("pull-rebase"))}),p(4,"Pull (rebase)"),h(),f(5,"button",34),D("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("rebase-from"))}),p(6,"Rebase (from)..."),h()()}}function oA(n,t){if(n&1){let e=P();f(0,"button",34),D("click",function(){_(e);let r=u(2);return v(r.chooseRemoteAction("create-pr"))}),p(1," Create Pull Request... "),h()}}function sA(n,t){if(n&1){let e=P();f(0,"div",13)(1,"button",34),D("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("push"))}),p(2,"Push"),h(),f(3,"button",35),D("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("push-force"))}),p(4," Push (force) "),h(),f(5,"button",34),D("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("sync"))}),p(6,"Sync"),h(),S(7,oA,2,0,"button",36),h()}if(n&2){let e=u();c(7),T(e.prEnabled()?7:-1)}}function aA(n,t){if(n&1){let e=P();f(0,"button",34),D("click",function(){_(e);let r=u(2);return v(r.chooseRemoteAction("create-pr"))}),p(1," Create Pull Request... "),h()}}function lA(n,t){if(n&1){let e=P();f(0,"div",33)(1,"button",34),D("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("fetch"))}),p(2,"Fetch"),h(),f(3,"button",34),D("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("fetch-prune"))}),p(4," Fetch (prune) "),h(),z(5,"div",37),f(6,"button",34),D("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("pull"))}),p(7,"Pull"),h(),f(8,"button",34),D("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("pull-rebase"))}),p(9," Pull (rebase) "),h(),f(10,"button",34),D("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("rebase-from"))}),p(11," Rebase (from)... "),h(),z(12,"div",37),f(13,"button",34),D("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("push"))}),p(14,"Push"),h(),f(15,"button",35),D("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("push-force"))}),p(16," Push (force) "),h(),f(17,"button",34),D("click",function(){_(e);let r=u();return v(r.chooseRemoteAction("sync"))}),p(18,"Sync"),h(),S(19,aA,2,0,"button",36),z(20,"div",37),f(21,"button",34),D("click",function(){_(e);let r=u();return v(r.chooseRefresh())}),p(22,"Refresh"),h(),z(23,"div",37),f(24,"button",34),D("click",function(){_(e);let r=u();return v(r.chooseSettings())}),p(25,"Settings..."),h()()}if(n&2){let e=u();c(19),T(e.prEnabled()?19:-1)}}var Dd=class n{busy=N.required();prEnabled=N(!1);panelOpen=N(!1);matchIndex=N(-1);matchCount=N(0);filterMode=N(!1);menuToggle=H();refresh=H();remoteAction=H();settingsClick=H();searchChange=H();searchNavigate=H();openMenu=x(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=pe({type:n,selectors:[["app-toolbar"]],hostBindings:function(e,i){e&1&&D("click",function(){return i.closeMenu()},Ye)("keydown.escape",function(){return i.closeMenuOnEscape()},Ye)},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&&(f(0,"div",0)(1,"div",1)(2,"button",2),D("click",function(){return i.menuToggle.emit()}),V(),f(3,"svg",3),z(4,"line",4)(5,"line",5)(6,"line",6),h()(),ue(),f(7,"span",7),p(8,"Guito"),h()(),f(9,"div",8)(10,"app-search-box",9),D("searchChange",function(o){return i.searchChange.emit(o)})("searchNavigate",function(o){return i.searchNavigate.emit(o)}),h(),f(11,"div",10)(12,"button",11),D("click",function(o){return i.toggleMenu("fetch",o)}),V(),f(13,"svg",3),z(14,"path",12),h()(),S(15,iA,5,0,"div",13),h(),ue(),f(16,"div",10)(17,"button",14),D("click",function(o){return i.toggleMenu("pull",o)}),V(),f(18,"svg",3),z(19,"circle",15)(20,"polyline",16)(21,"line",17),h()(),S(22,rA,7,0,"div",13),h(),ue(),f(23,"div",10)(24,"button",18),D("click",function(o){return i.toggleMenu("push",o)}),V(),f(25,"svg",3),z(26,"circle",15)(27,"polyline",19)(28,"line",20),h()(),S(29,sA,8,1,"div",13),h(),ue(),f(30,"button",21),D("click",function(){return i.refresh.emit()}),V(),f(31,"svg",3),z(32,"polyline",22)(33,"polyline",23)(34,"path",24),h()(),ue(),f(35,"button",25),D("click",function(){return i.settingsClick.emit()}),V(),f(36,"svg",3),z(37,"circle",26)(38,"path",27),h()(),ue(),f(39,"div",28)(40,"button",29),D("click",function(o){return i.toggleMenu("overflow",o)}),V(),f(41,"svg",3),z(42,"circle",30)(43,"circle",31)(44,"circle",32),h()(),S(45,lA,26,1,"div",33),h()()()),e&2&&(c(2),ce("aria-expanded",i.panelOpen()),c(8),k("matchIndex",i.matchIndex())("matchCount",i.matchCount())("filterMode",i.filterMode()),c(2),k("disabled",i.busy()),ce("aria-expanded",i.openMenu()==="fetch"),c(3),T(i.openMenu()==="fetch"?15:-1),c(2),k("disabled",i.busy()),ce("aria-expanded",i.openMenu()==="pull"),c(5),T(i.openMenu()==="pull"?22:-1),c(2),k("disabled",i.busy()),ce("aria-expanded",i.openMenu()==="push"),c(5),T(i.openMenu()==="push"?29:-1),c(11),ce("aria-expanded",i.openMenu()==="overflow"),c(5),T(i.openMenu()==="overflow"?45:-1))},dependencies:[Ed],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 cA=n=>[n];function dA(n,t){if(n&1){let e=P();f(0,"app-error-banner",13),D("retry",function(){_(e);let r=u();return v(r.refresh())}),h()}if(n&2){let e=u();k("message",e.error())("busy",e.loading())}}function uA(n,t){if(n&1){let e=P();f(0,"app-error-banner",14),D("retry",function(){_(e);let r=u();return v(r.refreshWorking())}),h()}if(n&2){let e=u();k("message",e.statusError())("busy",e.statusLoading())}}function pA(n,t){if(n&1){let e=P();f(0,"app-side-panel",16),D("transitionend",function(r){_(e);let o=u(2);return v(o.onPanelTransitionEnd(r))})("transitioncancel",function(r){_(e);let o=u(2);return v(o.onPanelTransitionEnd(r))})("branchChange",function(r){_(e);let o=u(2);return v(o.selectedBranches.set(r))})("tagSelect",function(r){_(e);let o=u(2);return v(o.selectTag(r))})("contextMenu",function(r){_(e);let o=u(2);return v(o.onContextMenu(r))})("worktreeCreate",function(){_(e);let r=u(2);return v(r.openWorktreeDialog())})("worktreeOpen",function(r){_(e);let o=u(2);return v(o.openWorktree(r))})("prSelect",function(r){_(e);let o=u(2);return v(o.openPrDetail(r))})("prRefresh",function(){_(e);let r=u(2);return v(r.loadPullRequests())}),h()}if(n&2){let e,i=u(2);me("panel-open",i.panelExpanded()),k("hidden",!i.panelRendered())("branches",i.branches())("selectedBranches",i.selectedBranches())("showRemote",i.showRemote())("stashes",i.stashes())("worktrees",i.worktrees())("tags",i.tags())("refListView",i.refListView())("searchCaseSensitive",i.searchCaseSensitive())("selectedCommitHash",((e=i.selectedCommit())==null?null:e.hash)??"")("loading",i.panelLoading())("azureEnabled",i.hasAzureUrl())("pullRequests",i.pullRequests())("prError",i.pullRequestsError())}}function fA(n,t){if(n&1&&Q(0,pA,1,16,"app-side-panel",15,Rt),n&2){let e=u();K(_i(0,cA,e.panelRenderVersion()))}}function hA(n,t){if(n&1){let e=P();f(0,"app-working-panel",19),ir("panel-leave"),nr("panel-enter"),D("subjectChange",function(r){_(e);let o=u(2);return v(o.commitSubject.set(r))})("descriptionChange",function(r){_(e);let o=u(2);return v(o.commitDescription.set(r))})("stageChange",function(r){_(e);let o=u(2);return v(o.changeStage(r))})("stashChange",function(r){_(e);let o=u(2);return v(o.stashChanges(r))})("discardRequest",function(r){_(e);let o=u(2);return v(o.discardUnstaged(r))})("commitRequested",function(){_(e);let r=u(2);return v(r.commitChanges())})("conflictResolved",function(){_(e);let r=u(2);return v(r.refreshWorking())})("retry",function(){_(e);let r=u(2);return v(r.refreshWorking())})("closed",function(){_(e);let r=u(2);return v(r.selectedCommit.set(null))}),h()}if(n&2){let e=u(2);k("changes",e.workingChanges())("busy",e.busy()||e.mutationBusy()||e.statusLoading())("statusLoading",e.statusLoading())("statusError",e.statusError())("subject",e.commitSubject())("description",e.commitDescription())("fileListView",e.fileListView())}}function mA(n,t){if(n&1){let e=P();f(0,"app-commit-detail",20),ir("panel-leave"),nr("panel-enter"),D("closed",function(){_(e);let r=u(2);return v(r.selectedCommit.set(null))}),h()}if(n&2){let e=u(),i=u();k("commit",e)("fileListView",i.fileListView())("issueLinking",i.issueLinking())}}function gA(n,t){if(n&1&&S(0,hA,1,7,"app-working-panel",17)(1,mA,1,3,"app-commit-detail",18),n&2){let e=u();T(t.hash===e.workingHash?0:1)}}function _A(n,t){if(n&1){let e=P();f(0,"app-worktree-dialog",21),D("created",function(r){_(e);let o=u();return v(o.createWorktree(r))})("closed",function(){_(e);let r=u();return v(r.worktreeDialogOpen.set(!1))}),h()}if(n&2){let e=u();k("branches",e.branches())("worktrees",e.worktrees())("busy",e.mutationBusy())("error",e.worktreeDialogError())}}function vA(n,t){if(n&1){let e=P();f(0,"app-create-pr-dialog",22),D("closed",function(){_(e);let r=u();return v(r.prDialogOpen.set(!1))})("created",function(){_(e);let r=u();return v(r.onPrCreated())}),h()}if(n&2){let e=u();k("branches",e.branches())}}function bA(n,t){if(n&1){let e=P();f(0,"app-pr-dialog",23),D("changed",function(){_(e);let r=u();return v(r.loadPullRequests())})("closed",function(){_(e);let r=u();return v(r.closePrDetail())}),h()}if(n&2){let e=u();k("prId",t)("settings",e.azureSettings())}}function yA(n,t){if(n&1){let e=P();f(0,"app-settings-dialog",24),D("saved",function(r){_(e);let o=u();return v(o.saveSettings(r))})("settingsUpdated",function(r){_(e);let o=u();return v(o.applySettings(r))})("identityChanged",function(r){_(e);let o=u();return v(o.identity.set(r))})("repositoryChanged",function(){_(e);let r=u();return v(r.refresh())})("closed",function(){_(e);let r=u();return v(r.settingsDialogOpen.set(!1))}),h()}if(n&2){let e=u();k("settings",t)("identity",e.identity())("saving",e.settingsSaving())}}var da=500,MC="guito.commitDraft";function CA(){let n=nd(MC,{});return{subject:typeof n.subject=="string"?n.subject:"",description:typeof n.description=="string"?n.description:""}}var Sd=class n{git=I(lt);vscode=I(nn);workingHash=yn;mutationBusy=this.git.mutating;statusLoading=x(!1);statusError=x("");commitDraft=CA();commitSubject=x(this.commitDraft.subject);commitDescription=x(this.commitDraft.description);displayedCommits=x([]);searchLoading=x(!1);historyGeneration=x(0);filterFailed=x(!1);tableLoading=L(()=>this.loading()?"Refreshing commits...":this.searchLoading()||this.search().trim()&&this.historyLoading()?"Searching commits...":this.historyLoading()?"Loading history...":"");commits=x([]);branches=x([]);selectedBranches=x([]);showRemote=x(!0);search=x("");selectedCommit=x(null);loading=x(!1);busy=x(!1);error=x("");repoName=x("");identity=x({name:"",email:""});lastRepositoryState=null;stateSub=null;refreshTimer=window.setInterval(()=>this.checkRepository(),3e3);workingChanges=x(null);totalCommits=x(0);historyLoading=x(!1);contextMenuState=x(null);contextMenuTarget=x(null);promptState=x(null);azureSettings=x(null);hasAzureUrl=L(()=>!!this.azureSettings()?.azureDevOpsUrl);autoReload=L(()=>this.azureSettings()?.autoReload!==!1);showGraph=L(()=>this.azureSettings()?.showGraph!==!1);showStashes=L(()=>this.azureSettings()?.showStashes===!0);showTags=L(()=>this.azureSettings()?.showTags!==!1);issueLinking=L(()=>this.azureSettings()?.issueLinking??null);fileListView=L(()=>this.azureSettings()?.fileListView==="tree"?"tree":"flat");refListView=L(()=>this.azureSettings()?.refListView==="tree"?"tree":"flat");filterSearch=L(()=>this.azureSettings()?.searchMode==="filter");searchCaseSensitive=L(()=>this.azureSettings()?.searchCaseSensitive===!0);prDialogOpen=x(!1);settingsDialogOpen=x(!1);settingsSaving=x(!1);pendingDiscard=x(null);panelOpen=x(!1);panelInitialized=x(!1);panelRenderVersion=x(0);panelRendered=x(!1);panelExpanded=x(!1);panelOpenFrame=null;panelLoading=x(!1);stashes=x([]);worktrees=x([]);worktreeDialogOpen=x(!1);worktreeDialogError=x("");tags=x([]);pullRequests=x(null);pullRequestsError=x("");prDetailId=x(null);searchFocusHash=x("");pendingSearchHash=x("");scrollRequest=x(null);scrollRequestCounter=0;bodyMatches=x([]);searchHistoryIndices=x({});refreshSub=null;historySub=null;workingSub=null;searchSub=null;panelSub=null;prListSub=null;unloadedCommits=L(()=>Math.max(0,this.totalCommits()-this.commits().length));commitIndex=L(()=>{let t=new Map;for(let e of this.commits())t.set(e.hash,e);return t});filteredCommits=L(()=>{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=L(()=>{let t=this.search().trim(),e=this.searchCaseSensitive(),i=Ci(t,e);if(!i)return[];let r=new Set(this.bodyMatches()),o=this.filteredCommits().filter(l=>Ci(l.message,e).includes(i)||Ci(l.author_name,e).includes(i)||Ci(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=L(()=>{let t=this.searchFocusHash();return t?this.searchMatches().indexOf(t):-1});constructor(){this.refresh(),Ce(()=>{let t=this.search().trim();this.selectedBranches(),this.historyGeneration(),this.filterSearch();let e=this.searchCaseSensitive();tt(()=>{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))})}),Ce(()=>{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())}}),Ce(()=>{let t=this.pendingSearchHash();if(!t||this.filterFailed())return;let e=this.displayedCommits().find(i=>i.hash===t);if(e)tt(()=>{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)/da)*da;tt(()=>this.loadHistory(this.git.getCommits(o,r)))}else!this.historyLoading()&&!this.loading()&&this.pendingSearchHash.set("")}),Ce(()=>{id(MC,{subject:this.commitSubject(),description:this.commitDescription()})}),Ce(()=>{this.vscode.settingsVersion()!==0&&tt(()=>{this.git.getSettings().subscribe({next:t=>this.applySettings(t),error:t=>this.error.set(this.errorMessage(t))})})})}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();this.panelRendered.set(!0),e?this.panelExpanded.set(!0):this.panelAnimationsEnabled()?this.panelOpenFrame=window.requestAnimationFrame(()=>{this.panelOpenFrame=null,this.panelOpen()&&this.panelRendered()&&this.panelExpanded.set(!0)}):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=rl({stashes:this.git.getStashes(),worktrees:this.git.getWorktrees(),tags:this.git.getTags().pipe(ot(()=>we([])))}).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.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=rl({history:this.git.getCommits(t?Math.max(da,this.commits().length):da),repositoryState:this.git.getRepositoryState().pipe(ot(()=>we(null))),branches:this.git.getAllBranches(),repo:this.git.getRepoInfo(),settings:this.git.getSettings().pipe(ot(()=>we(null))),stashes:this.git.getStashes().pipe(ot(()=>we([]))),working:this.git.getWorkingChanges().pipe(ot(e=>(this.lastRepositoryState=null,this.statusError.set(this.errorMessage(e)),we(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 d=this.selectedBranches();if(d.length){let y=new Set(r.map(E=>E.name)),w=d.filter(E=>y.has(E));w.length!==d.length&&this.selectedBranches.set(w)}let m=this.selectedCommit();if(m&&m.hash!==yn){let y=e.commits.find(w=>w.hash===m.hash);y&&this.selectedCommit.set(W(W({},m),y))}s&&this.applySettings(s,!1),l&&(this.workingChanges.set(l),this.statusError.set("")),this.statusLoading.set(!1),this.loading.set(!1),this.historyGeneration.update(y=>y+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.git.stashSave(void 0,t).subscribe({next:()=>this.refresh(),error:e=>this.error.set(this.errorMessage(e))})}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)}}))}loadMoreCommits(){this.loadHistory(this.git.getCommits(da,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(!0):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";this.azureSettings.set(t),this.showRemote.set(t.showRemoteBranches!==!1),e&&i!==null&&r!==o&&(this.panelInitialized()&&this.panelRenderVersion.update(s=>s+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=le(W({},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";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"})),e.push({label:"Delete Remote Branch...",action:"delete-remote-branch",danger:!0}),e.push({label:"Merge into current branch...",action:"merge-branch"}),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: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)}openWorktreeDialog(){this.worktreeDialogError.set(""),this.worktreeDialogOpen.set(!0)}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()||this.statusLoading())return;let e=this.contextMenuTarget()?.commit??this.selectedCommit();switch(t){case"add-tag":this.promptState.set({title:"Add Tag",label:"Tag name",placeholder:"v1.0.0",okLabel:"Add Tag"});break;case"create-branch":this.promptState.set({title:"Create Branch",label:"Branch name",placeholder:"feature/my-branch",okLabel:"Create Branch"});break;case"checkout-commit":e&&this.git.checkout(e.hash).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"cherry-pick":e&&this.git.cherryPick(e.hash).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"open-commit":this.selectedCommit()===null&&this.selectedCommit.set(this.commits()[0]??null);break;case"copy-hash":e&&navigator.clipboard?.writeText(e.hash);break;case"copy-subject":e&&navigator.clipboard?.writeText(e.message);break;case"view-commit-diff":e&&this.selectedCommit.set(e);break;case"revert-commit":e&&this.git.revert(e.hash).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"drop-commit":this.promptState.set({title:"Drop commit?",label:"This will reset the current branch to the commit before it.",confirmOnly:!0,okLabel:"Drop",danger:!0});break;case"merge-commit":e&&this.git.merge(e.hash).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"rebase-commit":e&&this.git.rebase(e.hash).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"reset-commit":this.promptState.set({title:"Reset current branch to this commit?",label:"Choose the reset type:",options:[{value:"soft",label:"Soft",description:"Keep all changes staged"},{value:"mixed",label:"Mixed",description:"Keep changes, but unstage them"},{value:"hard",label:"Hard",description:"Discard all changes",danger:!0}],okLabel:"Reset",danger:!0});break;case"checkout-branch":this.contextMenuTarget()?.branch?.name&&this.git.checkout(this.contextMenuTarget().branch.name).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"delete-remote-branch":{let i=this.contextMenuTarget()?.branch?.name??"",r=i.indexOf("/");r>0&&this.git.deleteRemoteBranch(i.slice(0,r),i.slice(r+1)).subscribe({next:()=>this.refresh(),error:o=>this.error.set(this.errorMessage(o))});break}case"merge-branch":this.contextMenuTarget()?.branch?.name&&this.git.merge(this.contextMenuTarget().branch.name).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"pull-branch":this.git.pull().subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"create-archive":{let i=this.contextMenuTarget(),r=i?.kind==="tag"?i.branch?.name:i?.commit?.hash;r&&window.open(by(`/api/archive?ref=${encodeURIComponent(r)}`),"_blank");break}case"tag-details":this.contextMenuTarget()?.commit&&this.selectedCommit.set(this.contextMenuTarget().commit);break;case"tag-delete":{let i=this.contextMenuTarget()?.branch?.name??"";this.promptState.set({title:"Delete tag?",label:`This will delete the tag "${i}".`,confirmOnly:!0,okLabel:"Delete",danger:!0});break}case"tag-push":{let i=this.contextMenuTarget()?.branch?.name??"";this.promptState.set({title:"Push tag?",label:`This will push the tag "${i}" to the remote.`,confirmOnly:!0,okLabel:"Push"});break}case"copy-tag-name":this.contextMenuTarget()?.branch?.name&&navigator.clipboard?.writeText(this.contextMenuTarget().branch.name);break;case"unselect-branch":this.selectedBranches.set([]);break;case"stash-apply":{let i=this.contextMenuTarget()?.stash?.index;i!==void 0&&this.git.stashApply(i).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});break}case"stash-pop":{let i=this.contextMenuTarget()?.stash?.index;i!==void 0&&this.git.stashPop(i).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});break}case"stash-drop":{let i=this.contextMenuTarget()?.stash;i&&this.promptState.set({title:"Drop stash?",label:`This will permanently drop stash@{${i.index}}.`,confirmOnly:!0,okLabel:"Drop",danger:!0});break}case"copy-stash-name":{let i=this.contextMenuTarget()?.stash;i&&navigator.clipboard?.writeText(`stash@{${i.index}}`);break}case"copy-worktree-path":{let i=this.contextMenuTarget()?.worktree?.path;i&&navigator.clipboard?.writeText(i);break}case"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&&navigator.clipboard?.writeText(this.contextMenuTarget().branch.name);break;case"rename-branch":this.promptState.set({title:"Rename branch",label:"New branch name",placeholder:"feature/my-branch",value:this.contextMenuTarget()?.branch?.name,okLabel:"Rename"});break;case"delete-branch":this.promptState.set({title:"Delete branch?",label:"This will delete the local branch.",confirmOnly:!0,okLabel:"Delete",danger:!0});break;case"open-working":this.selectedCommit.set({hash:yn,date:new Date().toISOString(),message:"Uncommitted changes",refs:"",body:"",author_name:this.identity().name||"You",author_email:this.identity().email,parents:[]});break;case"stash-working":this.promptState.set({title:"Stash uncommitted changes",label:"Stash message (optional)",placeholder:"WIP",allowEmpty:!0,okLabel:"Stash"});break;case"reset-working":this.promptState.set({title:"Reset uncommitted changes?",label:"Tracked changes will be discarded. Untracked files will remain.",confirmOnly:!0,okLabel:"Reset",danger:!0});break;case"clean-untracked":this.promptState.set({title:"Clean untracked files?",label:"Untracked files will be permanently deleted.",confirmOnly:!0,okLabel:"Clean",danger:!0});break;case"discard-working":this.git.getWorkingChanges().subscribe({next:i=>{let r=[...i.files.map(o=>o.path),...i.untracked];r.length>0&&this.git.discard(r).subscribe({next:()=>this.refreshWorking(),error:o=>this.error.set(this.errorMessage(o))})},error:i=>this.error.set(this.errorMessage(i))});break;case"refresh-status":this.refresh();break;case"open-source-control":window.open("vscode://command/workbench.view.scm","_blank");break;default:break}this.contextMenuState.set(null)}openWorktree(t){t.bare||this.vscode.switchRepository(t.path)}onPromptConfirm(t){if(this.busy()||this.mutationBusy()||this.statusLoading())return;let e=this.promptState();if(!e)return;this.promptState.set(null);let i=this.contextMenuTarget()?.commit;if(e.title==="Add Tag"&&i){this.git.createTag(t,i.hash).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});return}if(e.title==="Create Branch"&&i){this.git.createBranch(t,i.hash).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});return}if(e.title==="Drop commit?"&&i){this.git.dropCommit(i.hash).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});return}if(e.title==="Reset current branch to this commit?"&&i){let r=t==="soft"||t==="mixed"?t:"hard";this.git.resetToCommit(i.hash,r).subscribe({next:()=>this.refresh(),error:o=>this.error.set(this.errorMessage(o))});return}if(e.title==="Delete tag?"){let r=this.contextMenuTarget()?.branch?.name;r&&this.git.deleteTag(r).subscribe({next:()=>this.refresh(),error:o=>this.error.set(this.errorMessage(o))});return}if(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(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||void 0).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(r,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(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.rebase(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=pe({type:n,selectors:[["app-root"]],hostBindings:function(e,i){e&1&&D("focus",function(){return i.checkRepository()},_f)("visibilitychange",function(){return i.checkRepository()},Ye)},decls:15,vars:32,consts:[[1,"app"],[3,"menuToggle","refresh","remoteAction","settingsClick","searchChange","searchNavigate","busy","prEnabled","panelOpen","matchIndex","matchCount","filterMode"],["retryLabel","Retry",3,"message","busy"],["retryLabel","Retry status",3,"message","busy"],[1,"content-row"],[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,"branches","worktrees","busy","error"],[3,"branches"],[3,"prId","settings"],[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","searchCaseSensitive","selectedCommitHash","loading","azureEnabled","pullRequests","prError"],[3,"transitionend","transitioncancel","branchChange","tagSelect","contextMenu","worktreeCreate","worktreeOpen","prSelect","prRefresh","hidden","branches","selectedBranches","showRemote","stashes","worktrees","tags","refListView","searchCaseSensitive","selectedCommitHash","loading","azureEnabled","pullRequests","prError"],[3,"changes","busy","statusLoading","statusError","subject","description","fileListView"],[3,"commit","fileListView","issueLinking"],[3,"subjectChange","descriptionChange","stageChange","stashChange","discardRequest","commitRequested","conflictResolved","retry","closed","changes","busy","statusLoading","statusError","subject","description","fileListView"],[3,"closed","commit","fileListView","issueLinking"],[3,"created","closed","branches","worktrees","busy","error"],[3,"closed","created","branches"],[3,"changed","closed","prId","settings"],[3,"saved","settingsUpdated","identityChanged","repositoryChanged","closed","settings","identity","saving"]],template:function(e,i){if(e&1&&(f(0,"div",0)(1,"app-toolbar",1),D("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)}),h(),S(2,dA,1,2,"app-error-banner",2),S(3,uA,1,2,"app-error-banner",3),f(4,"div",4),S(5,fA,2,2),f(6,"main",5)(7,"app-commit-table",6),D("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()}),h(),S(8,gA,2,1),h()(),f(9,"app-context-menu",7),D("select",function(o){return i.onContextAction(o)})("closed",function(){return i.contextMenuState.set(null)}),h(),f(10,"app-prompt-dialog",8),D("confirmed",function(o){return i.onPromptConfirm(o)})("cancelled",function(){return i.onPromptCancel()}),h(),S(11,_A,1,4,"app-worktree-dialog",9),S(12,vA,1,1,"app-create-pr-dialog",10),S(13,bA,1,2,"app-pr-dialog",11),S(14,yA,1,3,"app-settings-dialog",12),h()),e&2){let r,o,s,a,l;c(),k("busy",i.busy()||i.mutationBusy()||i.statusLoading())("prEnabled",i.hasAzureUrl())("panelOpen",i.panelOpen())("matchIndex",i.searchIndex())("matchCount",i.searchMatches().length)("filterMode",i.filterSearch()),c(),T(i.error()?2:-1),c(),T(i.statusError()&&((r=i.selectedCommit())==null?null:r.hash)!==i.workingHash?3:-1),c(2),T(i.panelInitialized()?5:-1),c(2),k("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(),T((s=i.selectedCommit())?8:-1,s),c(),k("menu",i.contextMenuState()),c(),k("state",i.promptState()),c(),T(i.worktreeDialogOpen()?11:-1),c(),T(i.prDialogOpen()?12:-1),c(),T((a=i.prDetailId())?13:-1,a),c(),T((l=i.settingsDialogOpen()&&i.azureSettings())?14:-1,l)}},dependencies:[at,Dd,yd,rd,Zc,xo,ad,xd,od,sd,_d,wd],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})};Ih(Sd,yy).catch(n=>console.error(n));
|