@codeursenior/pek 0.1.10 → 0.1.12
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/README.md +8 -5
- package/dist/browser/index.html +2 -2
- package/dist/browser/main-5BMXWHWL.js +8 -0
- package/dist/browser/{styles-2QCIL5GS.css → styles-AWH5SAZF.css} +1 -1
- package/dist/scan/assets.js +17 -1
- package/dist/scan/metadata.js +3 -0
- package/dist/scanner.js +2 -2
- package/dist/token-estimator.js +69 -19
- package/docs/architecture.md +1 -1
- package/docs/token-optimizer.md +35 -11
- package/package.json +1 -1
- package/dist/browser/main-ITCUKQ5X.js +0 -8
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var Lv=Object.defineProperty,jv=Object.defineProperties;var Bv=Object.getOwnPropertyDescriptors;var Vd=Object.getOwnPropertySymbols;var Vv=Object.prototype.hasOwnProperty,Hv=Object.prototype.propertyIsEnumerable;var Hd=(e,t,n)=>t in e?Lv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B=(e,t)=>{for(var n in t||={})Vv.call(t,n)&&Hd(e,n,t[n]);if(Vd)for(var n of Vd(t))Hv.call(t,n)&&Hd(e,n,t[n]);return e},Q=(e,t)=>jv(e,Bv(t));var We=null,Ai=!1,Wn=1,$v=null,Re=Symbol("SIGNAL");function F(e){let t=We;return We=e,t}function ki(){return We}var xn={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 ln(e){if(Ai)throw new Error("");if(We===null)return;We.consumerOnSignalRead(e);let t=We.producersTail;if(t!==void 0&&t.producer===e)return;let n,r=We.recomputing;if(r&&(n=t!==void 0?t.nextProducer:We.producers,n!==void 0&&n.producer===e)){We.producersTail=n,n.lastReadVersion=e.version,n.knownValidAtEpoch=Wn;return}let o=e.consumersTail;if(o!==void 0&&o.consumer===We&&(!r||o.knownValidAtEpoch===Wn))return;let i=Ar(We),s={producer:e,consumer:We,nextProducer:n,prevConsumer:void 0,knownValidAtEpoch:Wn,lastReadVersion:e.version,nextConsumer:void 0};We.producersTail=s,t!==void 0?t.nextProducer=s:We.producers=s,i&&Gd(e,s)}function $d(){Wn++}function In(e){if(!(Ar(e)&&!e.dirty)&&!(!e.dirty&&e.lastCleanEpoch===Wn)){if(!e.producerMustRecompute(e)&&!Nr(e)){Mr(e);return}e.producerRecomputeValue(e),Mr(e)}}function mc(e){if(e.consumers===void 0)return;let t=Ai;Ai=!0;try{for(let n=e.consumers;n!==void 0;n=n.nextConsumer){let r=n.consumer;r.dirty||Uv(r)}}finally{Ai=t}}function gc(){return We?.consumerAllowSignalWrites!==!1}function Uv(e){e.dirty=!0,mc(e),e.consumerMarkedDirty?.(e)}function Mr(e){e.dirty=!1,e.lastCleanEpoch=Wn}function un(e){return e&&Ud(e),F(e)}function Ud(e){if(e.producersTail?.knownValidAtEpoch===Wn){let t=e.producers;for(;t!==void 0;)t.knownValidAtEpoch=null,t=t.nextProducer}e.producersTail=void 0,e.recomputing=!0}function Tn(e,t){F(t),e&&zd(e)}function zd(e){e.recomputing=!1;let t=e.producersTail,n=t!==void 0?t.nextProducer:e.producers;if(n!==void 0){if(Ar(e))do n=yc(n);while(n!==void 0);t!==void 0?t.nextProducer=void 0:e.producers=void 0}}function Nr(e){for(let t=e.producers;t!==void 0;t=t.nextProducer){let n=t.producer,r=t.lastReadVersion;if(r!==n.version||(In(n),r!==n.version))return!0}return!1}function Sn(e){if(Ar(e)){let t=e.producers;for(;t!==void 0;)t=yc(t)}e.producers=void 0,e.producersTail=void 0,e.consumers=void 0,e.consumersTail=void 0}function Gd(e,t){let n=e.consumersTail,r=Ar(e);if(n!==void 0?(t.nextConsumer=n.nextConsumer,n.nextConsumer=t):(t.nextConsumer=void 0,e.consumers=t),t.prevConsumer=n,e.consumersTail=t,!r)for(let o=e.producers;o!==void 0;o=o.nextProducer)Gd(o.producer,o)}function yc(e){let t=e.producer,n=e.nextProducer,r=e.nextConsumer,o=e.prevConsumer;if(e.nextConsumer=void 0,e.prevConsumer=void 0,r!==void 0?r.prevConsumer=o:t.consumersTail=o,o!==void 0)o.nextConsumer=r;else if(t.consumers=r,!Ar(t)){let i=t.producers;for(;i!==void 0;)i=yc(i)}return n}function Ar(e){return e.consumerIsAlwaysLive||e.consumers!==void 0}function Eo(e){$v?.(e)}function Do(e,t){return Object.is(e,t)}function Oi(e,t){let n=Object.create(zv);n.computation=e,t!==void 0&&(n.equal=t);let r=()=>{if(In(n),ln(n),n.value===lt)throw n.error;return n.value};return r[Re]=n,Eo(n),r}var qn=Symbol("UNSET"),Yn=Symbol("COMPUTING"),lt=Symbol("ERRORED"),zv=Q(B({},xn),{value:qn,dirty:!0,error:null,equal:Do,kind:"computed",producerMustRecompute(e){return e.value===qn||e.value===Yn},producerRecomputeValue(e){if(e.value===Yn)throw new Error("");let t=e.value;e.value=Yn;let n=un(e),r,o=!1;try{r=e.computation(),F(null),o=t!==qn&&t!==lt&&r!==lt&&e.equal(t,r)}catch(i){r=lt,e.error=i}finally{Tn(e,n)}if(o){e.value=t;return}e.value=r,e.version++}});function Gv(){throw new Error}var Wd=Gv;function qd(e){Wd(e)}function vc(e){Wd=e}var Wv=null;function Ec(e,t){let n=Object.create(kr);n.value=e,t!==void 0&&(n.equal=t);let r=()=>Yd(n);return r[Re]=n,Eo(n),[r,s=>Mn(n,s),s=>Ri(n,s)]}function Yd(e){return ln(e),e.value}function Mn(e,t){gc()||qd(e),e.equal(e.value,t)||(e.value=t,qv(e))}function Ri(e,t){gc()||qd(e),Mn(e,t(e.value))}var kr=Q(B({},xn),{equal:Do,value:void 0,kind:"signal"});function qv(e){e.version++,$d(),mc(e),Wv?.(e)}var Dc=Q(B({},xn),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:"effect"});function _c(e){if(e.dirty=!1,e.version>0&&!Nr(e))return;e.version++;let t=un(e);try{e.cleanup(),e.fn()}finally{Tn(e,t)}}var wc;function Pi(){return wc}function Bt(e){let t=wc;return wc=e,t}var Zd=Symbol("NotFound");function Or(e){return e===Zd||e?.name==="\u0275NotFound"}function bc(e,t,n){let r=Object.create(Yv);r.source=e,r.computation=t,n!=null&&(r.equal=n);let i=()=>{if(In(r),ln(r),r.value===lt)throw r.error;return r.value};return i[Re]=r,Eo(r),i}function Cc(e,t){In(e),Mn(e,t),Mr(e)}function Xd(e,t){if(In(e),e.value===lt)throw e.error;Ri(e,t),Mr(e)}var Yv=Q(B({},xn),{value:qn,dirty:!0,error:null,equal:Do,kind:"linkedSignal",producerMustRecompute(e){return e.value===qn||e.value===Yn},producerRecomputeValue(e){if(e.value===Yn)throw new Error("");let t=e.value;e.value=Yn;let n=un(e),r,o=!1;try{let i=e.source(),s=t!==qn&&t!==lt,a=s?{source:e.sourceValue,value:t}:void 0;r=e.computation(i,a),e.sourceValue=i,F(null),o=s&&r!==lt&&e.equal(t,r)}catch(i){r=lt,e.error=i}finally{Tn(e,n)}if(o){e.value=t;return}e.value=r,e.version++}});function Kd(e){let t=F(null);try{return e()}finally{F(t)}}function ie(e){return typeof e=="function"}function Rr(e){let n=e(r=>{Error.call(r),r.stack=new Error().stack});return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Fi=Rr(e=>function(n){e(this),this.message=n?`${n.length} errors occurred during unsubscription:
|
|
2
|
+
${n.map((r,o)=>`${o+1}) ${r.toString()}`).join(`
|
|
3
|
+
`)}`:"",this.name="UnsubscriptionError",this.errors=n});function _o(e,t){if(e){let n=e.indexOf(t);0<=n&&e.splice(n,1)}}var qe=class e{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:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(let i of n)i.remove(this);else n.remove(this);let{initialTeardown:r}=this;if(ie(r))try{r()}catch(i){t=i instanceof Fi?i.errors:[i]}let{_finalizers:o}=this;if(o){this._finalizers=null;for(let i of o)try{Qd(i)}catch(s){t=t??[],s instanceof Fi?t=[...t,...s.errors]:t.push(s)}}if(t)throw new Fi(t)}}add(t){var n;if(t&&t!==this)if(this.closed)Qd(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}}_hasParent(t){let{_parentage:n}=this;return n===t||Array.isArray(n)&&n.includes(t)}_addParent(t){let{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t}_removeParent(t){let{_parentage:n}=this;n===t?this._parentage=null:Array.isArray(n)&&_o(n,t)}remove(t){let{_finalizers:n}=this;n&&_o(n,t),t instanceof e&&t._removeParent(this)}};qe.EMPTY=(()=>{let e=new qe;return e.closed=!0,e})();var xc=qe.EMPTY;function Li(e){return e instanceof qe||e&&"closed"in e&&ie(e.remove)&&ie(e.add)&&ie(e.unsubscribe)}function Qd(e){ie(e)?e():e.unsubscribe()}var wt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Pr={setTimeout(e,t,...n){let{delegate:r}=Pr;return r?.setTimeout?r.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){let{delegate:t}=Pr;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function ji(e){Pr.setTimeout(()=>{let{onUnhandledError:t}=wt;if(t)t(e);else throw e})}function Ic(){}var Jd=Tc("C",void 0,void 0);function ef(e){return Tc("E",void 0,e)}function tf(e){return Tc("N",e,void 0)}function Tc(e,t,n){return{kind:e,value:t,error:n}}var Zn=null;function Fr(e){if(wt.useDeprecatedSynchronousErrorHandling){let t=!Zn;if(t&&(Zn={errorThrown:!1,error:null}),e(),t){let{errorThrown:n,error:r}=Zn;if(Zn=null,n)throw r}}else e()}function nf(e){wt.useDeprecatedSynchronousErrorHandling&&Zn&&(Zn.errorThrown=!0,Zn.error=e)}var Xn=class extends qe{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Li(t)&&t.add(this)):this.destination=Kv}static create(t,n,r){return new Nn(t,n,r)}next(t){this.isStopped?Mc(tf(t),this):this._next(t)}error(t){this.isStopped?Mc(ef(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Mc(Jd,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()}}},Zv=Function.prototype.bind;function Sc(e,t){return Zv.call(e,t)}var Nc=class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:n}=this;if(n.next)try{n.next(t)}catch(r){Bi(r)}}error(t){let{partialObserver:n}=this;if(n.error)try{n.error(t)}catch(r){Bi(r)}else Bi(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(n){Bi(n)}}},Nn=class extends Xn{constructor(t,n,r){super();let o;if(ie(t)||!t)o={next:t??void 0,error:n??void 0,complete:r??void 0};else{let i;this&&wt.useDeprecatedNextContext?(i=Object.create(t),i.unsubscribe=()=>this.unsubscribe(),o={next:t.next&&Sc(t.next,i),error:t.error&&Sc(t.error,i),complete:t.complete&&Sc(t.complete,i)}):o=t}this.destination=new Nc(o)}};function Bi(e){wt.useDeprecatedSynchronousErrorHandling?nf(e):ji(e)}function Xv(e){throw e}function Mc(e,t){let{onStoppedNotification:n}=wt;n&&Pr.setTimeout(()=>n(e,t))}var Kv={closed:!0,next:Ic,error:Xv,complete:Ic};var Lr=typeof Symbol=="function"&&Symbol.observable||"@@observable";function rf(e){return e}function of(e){return e.length===0?rf:e.length===1?e[0]:function(n){return e.reduce((r,o)=>o(r),n)}}var _e=class e{constructor(t){t&&(this._subscribe=t)}lift(t){let n=new e;return n.source=this,n.operator=t,n}subscribe(t,n,r){let o=Jv(t)?t:new Nn(t,n,r);return Fr(()=>{let{operator:i,source:s}=this;o.add(i?i.call(o,s):s?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(t){try{return this._subscribe(t)}catch(n){t.error(n)}}forEach(t,n){return n=sf(n),new n((r,o)=>{let i=new Nn({next:s=>{try{t(s)}catch(a){o(a),i.unsubscribe()}},error:o,complete:r});this.subscribe(i)})}_subscribe(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)}[Lr](){return this}pipe(...t){return of(t)(this)}toPromise(t){return t=sf(t),new t((n,r)=>{let o;this.subscribe(i=>o=i,i=>r(i),()=>n(o))})}};_e.create=e=>new _e(e);function sf(e){var t;return(t=e??wt.Promise)!==null&&t!==void 0?t:Promise}function Qv(e){return e&&ie(e.next)&&ie(e.error)&&ie(e.complete)}function Jv(e){return e&&e instanceof Xn||Qv(e)&&Li(e)}function e0(e){return ie(e?.lift)}function ut(e){return t=>{if(e0(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function dn(e,t,n,r,o){return new Ac(e,t,n,r,o)}var Ac=class extends Xn{constructor(t,n,r,o,i,s){super(t),this.onFinalize=i,this.shouldUnsubscribe=s,this._next=n?function(a){try{n(a)}catch(c){t.error(c)}}:super._next,this._error=o?function(a){try{o(a)}catch(c){t.error(c)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(a){t.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:n}=this;super.unsubscribe(),!n&&((t=this.onFinalize)===null||t===void 0||t.call(this))}}};var af=Rr(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var bt=class extends _e{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){let n=new Vi(this,this);return n.operator=t,n}_throwIfClosed(){if(this.closed)throw new af}next(t){Fr(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(t)}})}error(t){Fr(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;let{observers:n}=this;for(;n.length;)n.shift().error(t)}})}complete(){Fr(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:t}=this;for(;t.length;)t.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){let{hasError:n,isStopped:r,observers:o}=this;return n||r?xc:(this.currentObservers=null,o.push(t),new qe(()=>{this.currentObservers=null,_o(o,t)}))}_checkFinalizedStatuses(t){let{hasError:n,thrownError:r,isStopped:o}=this;n?t.error(r):o&&t.complete()}asObservable(){let t=new _e;return t.source=this,t}};bt.create=(e,t)=>new Vi(e,t);var Vi=class extends bt{constructor(t,n){super(),this.destination=t,this.source=n}next(t){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.next)===null||r===void 0||r.call(n,t)}error(t){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.error)===null||r===void 0||r.call(n,t)}complete(){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||n===void 0||n.call(t)}_subscribe(t){var n,r;return(r=(n=this.source)===null||n===void 0?void 0:n.subscribe(t))!==null&&r!==void 0?r:xc}};var wo=class extends bt{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){let n=super._subscribe(t);return!n.closed&&t.next(this._value),n}getValue(){let{hasError:t,thrownError:n,_value:r}=this;if(t)throw n;return this._throwIfClosed(),r}next(t){super.next(this._value=t)}};function cf(e){return e&&ie(e.schedule)}function t0(e){return e[e.length-1]}function lf(e){return cf(t0(e))?e.pop():void 0}function df(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{l(r.next(u))}catch(d){s(d)}}function c(u){try{l(r.throw(u))}catch(d){s(d)}}function l(u){u.done?i(u.value):o(u.value).then(a,c)}l((r=r.apply(e,t||[])).next())})}function uf(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Kn(e){return this instanceof Kn?(this.v=e,this):new Kn(e)}function ff(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),o,i=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),o[Symbol.asyncIterator]=function(){return this},o;function s(f){return function(g){return Promise.resolve(g).then(f,d)}}function a(f,g){r[f]&&(o[f]=function(D){return new Promise(function(y,E){i.push([f,D,y,E])>1||c(f,D)})},g&&(o[f]=g(o[f])))}function c(f,g){try{l(r[f](g))}catch(D){p(i[0][3],D)}}function l(f){f.value instanceof Kn?Promise.resolve(f.value.v).then(u,d):p(i[0][2],f)}function u(f){c("next",f)}function d(f){c("throw",f)}function p(f,g){f(g),i.shift(),i.length&&c(i[0][0],i[0][1])}}function pf(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof uf=="function"?uf(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=e[i]&&function(s){return new Promise(function(a,c){s=e[i](s),o(a,c,s.done,s.value)})}}function o(i,s,a,c){Promise.resolve(c).then(function(l){i({value:l,done:a})},s)}}var Hi=(e=>e&&typeof e.length=="number"&&typeof e!="function");function $i(e){return ie(e?.then)}function Ui(e){return ie(e[Lr])}function zi(e){return Symbol.asyncIterator&&ie(e?.[Symbol.asyncIterator])}function Gi(e){return new TypeError(`You provided ${e!==null&&typeof e=="object"?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function n0(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Wi=n0();function qi(e){return ie(e?.[Wi])}function Yi(e){return ff(this,arguments,function*(){let n=e.getReader();try{for(;;){let{value:r,done:o}=yield Kn(n.read());if(o)return yield Kn(void 0);yield yield Kn(r)}}finally{n.releaseLock()}})}function Zi(e){return ie(e?.getReader)}function Vt(e){if(e instanceof _e)return e;if(e!=null){if(Ui(e))return r0(e);if(Hi(e))return o0(e);if($i(e))return i0(e);if(zi(e))return hf(e);if(qi(e))return s0(e);if(Zi(e))return a0(e)}throw Gi(e)}function r0(e){return new _e(t=>{let n=e[Lr]();if(ie(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function o0(e){return new _e(t=>{for(let n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function i0(e){return new _e(t=>{e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,ji)})}function s0(e){return new _e(t=>{for(let n of e)if(t.next(n),t.closed)return;t.complete()})}function hf(e){return new _e(t=>{c0(e,t).catch(n=>t.error(n))})}function a0(e){return hf(Yi(e))}function c0(e,t){var n,r,o,i;return df(this,void 0,void 0,function*(){try{for(n=pf(e);r=yield n.next(),!r.done;){let s=r.value;if(t.next(s),t.closed)return}}catch(s){o={error:s}}finally{try{r&&!r.done&&(i=n.return)&&(yield i.call(n))}finally{if(o)throw o.error}}t.complete()})}function dt(e,t,n,r=0,o=!1){let i=t.schedule(function(){n(),o?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(i),!o)return i}function Xi(e,t=0){return ut((n,r)=>{n.subscribe(dn(r,o=>dt(r,e,()=>r.next(o),t),()=>dt(r,e,()=>r.complete(),t),o=>dt(r,e,()=>r.error(o),t)))})}function Ki(e,t=0){return ut((n,r)=>{r.add(e.schedule(()=>n.subscribe(r),t))})}function mf(e,t){return Vt(e).pipe(Ki(t),Xi(t))}function gf(e,t){return Vt(e).pipe(Ki(t),Xi(t))}function yf(e,t){return new _e(n=>{let r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function vf(e,t){return new _e(n=>{let r;return dt(n,t,()=>{r=e[Wi](),dt(n,t,()=>{let o,i;try{({value:o,done:i}=r.next())}catch(s){n.error(s);return}i?n.complete():n.next(o)},0,!0)}),()=>ie(r?.return)&&r.return()})}function Qi(e,t){if(!e)throw new Error("Iterable cannot be null");return new _e(n=>{dt(n,t,()=>{let r=e[Symbol.asyncIterator]();dt(n,t,()=>{r.next().then(o=>{o.done?n.complete():n.next(o.value)})},0,!0)})})}function Ef(e,t){return Qi(Yi(e),t)}function Df(e,t){if(e!=null){if(Ui(e))return mf(e,t);if(Hi(e))return yf(e,t);if($i(e))return gf(e,t);if(zi(e))return Qi(e,t);if(qi(e))return vf(e,t);if(Zi(e))return Ef(e,t)}throw Gi(e)}function _f(e,t){return t?Df(e,t):Vt(e)}function kc(...e){let t=lf(e);return _f(e,t)}var wf=Rr(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function Oc(e,t){let n=typeof t=="object";return new Promise((r,o)=>{let i=new Nn({next:s=>{r(s),i.unsubscribe()},error:o,complete:()=>{n?r(t.defaultValue):o(new wf)}});e.subscribe(i)})}function Ht(e,t){return ut((n,r)=>{let o=0;n.subscribe(dn(r,i=>{r.next(e.call(t,i,o++))}))})}function bf(e,t,n,r,o,i,s,a){let c=[],l=0,u=0,d=!1,p=()=>{d&&!c.length&&!l&&t.complete()},f=D=>l<r?g(D):c.push(D),g=D=>{i&&t.next(D),l++;let y=!1;Vt(n(D,u++)).subscribe(dn(t,E=>{o?.(E),i?f(E):t.next(E)},()=>{y=!0},void 0,()=>{if(y)try{for(l--;c.length&&l<r;){let E=c.shift();s?dt(t,s,()=>g(E)):g(E)}p()}catch(E){t.error(E)}}))};return e.subscribe(dn(t,f,()=>{d=!0,p()})),()=>{a?.()}}function Ji(e,t,n=1/0){return ie(t)?Ji((r,o)=>Ht((i,s)=>t(r,i,o,s))(Vt(e(r,o))),n):(typeof t=="number"&&(n=t),ut((r,o)=>bf(r,o,e,n)))}function Rc(e,t){return ut((n,r)=>{let o=0;n.subscribe(dn(r,i=>e.call(t,i,o++)&&r.next(i)))})}function Pc(e,t){return ie(t)?Ji(e,t,1):Ji(e,1)}function Fc(e){return ut((t,n)=>{try{t.subscribe(n)}finally{n.add(e)}})}var as="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",R=class extends Error{code;constructor(t,n){super(nr(t,n)),this.code=t}};function l0(e){return`NG0${Math.abs(e)}`}function nr(e,t){return`${l0(e)}${t?": "+t:""}`}function pe(e){for(let t in e)if(e[t]===pe)return t;throw Error("")}function cs(e){if(typeof e=="string")return e;if(Array.isArray(e))return`[${e.map(cs).join(", ")}]`;if(e==null)return""+e;let t=e.overriddenName||e.name;if(t)return`${t}`;let n=e.toString();if(n==null)return""+n;let r=n.indexOf(`
|
|
4
|
+
`);return r>=0?n.slice(0,r):n}function ls(e,t){return e?t?`${e} ${t}`:e:t||""}var u0=pe({__forward_ref__:pe});function us(e){return e.__forward_ref__=us,e}function ot(e){return Sf(e)?e():e}function Sf(e){return typeof e=="function"&&Object.hasOwn(e,u0)&&e.__forward_ref__===us}function le(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function ds(e){return d0(e,fs)}function d0(e,t){return Object.hasOwn(e,t)&&e[t]||null}function f0(e){let t=e?.[fs]??null;return t||null}function jc(e){return e&&Object.hasOwn(e,ts)?e[ts]:null}var fs=pe({\u0275prov:pe}),ts=pe({\u0275inj:pe}),G=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(t,n){this._desc=t,this.\u0275prov=void 0,typeof n=="number"?this.__NG_ELEMENT_ID__=n:n!==void 0&&(this.\u0275prov=le({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Kc(e){return e&&!!e.\u0275providers}var Qc=pe({\u0275cmp:pe}),Jc=pe({\u0275dir:pe}),el=pe({\u0275pipe:pe});var Bc=pe({\u0275fac:pe}),rr=pe({__NG_ELEMENT_ID__:pe}),Cf=pe({__NG_ENV_ID__:pe});function To(e){return tl(e,"@Component"),e[Qc]||null}function ps(e){return tl(e,"@Directive"),e[Jc]||null}function Mf(e){return tl(e,"@Pipe"),e[el]||null}function tl(e,t){if(e==null)throw new R(-919,!1)}function Vr(e){return typeof e=="string"?e:e==null?"":String(e)}var Nf=pe({ngErrorCode:pe}),p0=pe({ngErrorMessage:pe}),h0=pe({ngTokenPath:pe});function nl(e,t){return Af("",-200,t)}function hs(e,t){throw new R(-201,!1)}function Af(e,t,n){let r=new R(t,e);return r[Nf]=t,r[p0]=e,n&&(r[h0]=n),r}function m0(e){return e[Nf]}var Vc;function kf(){return Vc}function Ye(e){let t=Vc;return Vc=e,t}function rl(e,t,n){let r=ds(e);if(r&&r.providedIn=="root")return r.value===void 0?r.value=r.factory():r.value;if(n&8)return null;if(t!==void 0)return t;hs(e,"")}var or=globalThis;var g0={},Qn=g0,y0="__NG_DI_FLAG__",Hc=class{injector;constructor(t){this.injector=t}retrieve(t,n){let r=Jn(n)||0;try{return this.injector.get(t,r&8?null:Qn,r)}catch(o){if(Or(o))return o;throw o}}};function v0(e,t=0){let n=Pi();if(n===void 0)throw new R(-203,!1);if(n===null)return rl(e,void 0,t);{let r=E0(t),o=n.retrieve(e,r);if(Or(o)){if(r.optional)return null;throw o}return o}}function J(e,t=0){return(kf()||v0)(ot(e),t)}function S(e,t){return J(e,Jn(t))}function Jn(e){return typeof e>"u"||typeof e=="number"?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function E0(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function $c(e){let t=[];for(let n=0;n<e.length;n++){let r=ot(e[n]);if(Array.isArray(r)){if(r.length===0)throw new R(900,!1);let o,i=0;for(let s=0;s<r.length;s++){let a=r[s],c=D0(a);typeof c=="number"?c===-1?o=a.token:i|=c:o=a}t.push(J(o,i))}else t.push(J(r))}return t}function D0(e){return e[y0]}function er(e,t){let n=Object.hasOwn(e,Bc);return n?e[Bc]:null}function ms(e,t){e.forEach(n=>Array.isArray(n)?ms(n,t):t(n))}function Of(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function ol(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function Rf(e,t,n,r){let o=e.length;if(o==t)e.push(n,r);else if(o===1)e.push(r,e[0]),e[0]=n;else{for(o--,e.push(e[o-1],e[o]);o>t;){let i=o-2;e[o]=e[i],o--}e[t]=n,e[t+1]=r}}function gs(e,t,n){let r=Hr(e,t);return r>=0?e[r|1]=n:(r=~r,Rf(e,r,t,n)),r}function ys(e,t){let n=Hr(e,t);if(n>=0)return e[n|1]}function Hr(e,t){return _0(e,t,1)}function _0(e,t,n){let r=0,o=e.length>>n;for(;o!==r;){let i=r+(o-r>>1),s=e[i<<n];if(t===s)return i<<n;s>t?o=i:r=i+1}return~(o<<n)}var vs={},$t=[],$r=new G(""),So=new G("",-1),il=new G(""),Br=class{get(t,n=Qn){if(n===Qn){let o=Af("",-201);throw o.name="\u0275NotFound",o}return n}};function ir(e){return{\u0275providers:e}}function Pf(e){return ir([{provide:$r,multi:!0,useValue:e}])}function Ff(...e){return{\u0275providers:sl(!0,e),\u0275fromNgModule:!0}}function sl(e,...t){let n=[],r=new Set,o,i=s=>{n.push(s)};return ms(t,s=>{let a=s;ns(a,i,[],r)&&(o||=[],o.push(a))}),o!==void 0&&Lf(o,i),n}function Lf(e,t){for(let n=0;n<e.length;n++){let{ngModule:r,providers:o}=e[n];al(o,i=>{t(i,r)})}}function ns(e,t,n,r){if(e=ot(e),!e)return!1;let o=null,i=jc(e),s=!i&&To(e);if(!i&&!s){let c=e.ngModule;if(i=jc(c),i)o=c;else return!1}else{if(s&&!s.standalone)return!1;o=e}let a=r.has(o);if(s){if(a)return!1;if(r.add(o),s.dependencies){let c=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let l of c)ns(l,t,n,r)}}else if(i){if(i.imports!=null&&!a){r.add(o);let l;ms(i.imports,u=>{ns(u,t,n,r)&&(l||=[],l.push(u))}),l!==void 0&&Lf(l,t)}if(!a){let l=er(o)||(()=>new o);t({provide:o,useFactory:l,deps:$t},o),t({provide:il,useValue:o,multi:!0},o),t({provide:$r,useValue:()=>J(o),multi:!0},o)}let c=i.providers;if(c!=null&&!a){let l=e;al(c,u=>{t(u,l)})}}else return!1;return o!==e&&e.providers!==void 0}function al(e,t){for(let n of e)Kc(n)&&(n=n.\u0275providers),Array.isArray(n)?al(n,t):t(n)}var w0=pe({provide:String,useValue:pe});function jf(e){return e!==null&&typeof e=="object"&&w0 in e}function b0(e){return!!(e&&e.useExisting)}function C0(e){return!!(e&&e.useFactory)}function rs(e){return typeof e=="function"}var Mo=new G(""),es={},xf={},Lc;function No(){return Lc===void 0&&(Lc=new Br),Lc}var tt=class{},tr=class extends tt{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(t,n,r,o){super(),this.parent=n,this.source=r,this.scopes=o,zc(t,s=>this.processProvider(s)),this.records.set(So,jr(void 0,this)),o.has("environment")&&this.records.set(tt,jr(void 0,this));let i=this.records.get(Mo);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(il,$t,{self:!0}))}retrieve(t,n){let r=Jn(n)||0;try{return this.get(t,Qn,r)}catch(o){if(Or(o))return o;throw o}}destroy(){bo(this),this._destroyed=!0;let t=F(null);try{for(let r of this._ngOnDestroyHooks)r.ngOnDestroy();let n=this._onDestroyHooks;this._onDestroyHooks=[];for(let r of n)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),F(t)}}onDestroy(t){return bo(this),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){bo(this);let n=Bt(this),r=Ye(void 0),o;try{return t()}finally{Bt(n),Ye(r)}}get(t,n=Qn,r){if(bo(this),Object.hasOwn(t,Cf))return t[Cf](this);let o=Jn(r),i,s=Bt(this),a=Ye(void 0);try{if(!(o&4)){let l=this.records.get(t);if(l===void 0){let u=M0(t)&&ds(t);u&&this.injectableDefInScope(u)?l=jr(Uc(t),es):l=null,this.records.set(t,l)}if(l!=null)return this.hydrate(t,l,o)}let c=o&2?No():this.parent;return n=o&8&&n===Qn?null:n,c.get(t,n)}catch(c){let l=m0(c);throw l===-200||l===-201?new R(l,null):c}finally{Ye(a),Bt(s)}}resolveInjectorInitializers(){let t=F(null),n=Bt(this),r=Ye(void 0),o;try{let i=this.get($r,$t,{self:!0});for(let s of i)s()}finally{Bt(n),Ye(r),F(t)}}toString(){return"R3Injector[...]"}processProvider(t){t=ot(t);let n=rs(t)?t:ot(t&&t.provide),r=I0(t);if(!rs(t)&&t.multi===!0){let o=this.records.get(n);o||(o=jr(void 0,es,!0),o.factory=()=>$c(o.multi),this.records.set(n,o)),n=t,o.multi.push(t)}this.records.set(n,r)}hydrate(t,n,r){let o=F(null);try{if(n.value===xf)throw nl("");return n.value===es&&(n.value=xf,n.value=n.factory(void 0,r)),typeof n.value=="object"&&n.value&&S0(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}finally{F(o)}}injectableDefInScope(t){if(!t.providedIn)return!1;let n=ot(t.providedIn);return typeof n=="string"?n==="any"||this.scopes.has(n):this.injectorDefTypes.has(n)}removeOnDestroy(t){let n=this._onDestroyHooks.indexOf(t);n!==-1&&this._onDestroyHooks.splice(n,1)}};function Uc(e){let t=ds(e),n=t!==null?t.factory:er(e);if(n!==null)return n;if(e instanceof G)throw new R(-204,!1);if(e instanceof Function)return x0(e);throw new R(-204,!1)}function x0(e){if(e.length>0)throw new R(-204,!1);let n=f0(e);return n!==null?()=>n.factory(e):()=>new e}function I0(e){if(jf(e))return jr(void 0,e.useValue);{let t=Bf(e);return jr(t,es)}}function Bf(e,t,n){let r;if(rs(e)){let o=ot(e);return er(o)||Uc(o)}else if(jf(e))r=()=>ot(e.useValue);else if(C0(e))r=()=>e.useFactory(...$c(e.deps||[]));else if(b0(e))r=(o,i)=>J(ot(e.useExisting),i!==void 0&&i&8?8:void 0);else{let o=ot(e&&(e.useClass||e.provide));if(T0(e))r=()=>new o(...$c(e.deps));else return er(o)||Uc(o)}return r}function bo(e){if(e.destroyed)throw new R(-205,!1)}function jr(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function T0(e){return!!e.deps}function S0(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function M0(e){return typeof e=="function"||typeof e=="object"&&e.ngMetadataName==="InjectionToken"}function zc(e,t){for(let n of e)Array.isArray(n)?zc(n,t):n&&Kc(n)?zc(n.\u0275providers,t):t(n)}function Ur(e,t){let n;e instanceof tr?(bo(e),n=e):n=new Hc(e);let r,o=Bt(n),i=Ye(void 0);try{return t()}finally{Bt(o),Ye(i)}}function Vf(){return kf()!==void 0||Pi()!=null}var xt=0,L=1,H=2,Be=3,pt=4,ht=5,zr=6,Gr=7,Ce=8,zt=9,It=10,xe=11,Wr=12,cl=13,An=14,it=15,sr=16,ar=17,cr=18,Gt=19,ll=20,pn=21,Es=22,hn=23,st=24,lr=25,Tt=26,ul=27,Ne=28,Hf=1,dl=6,Ao=7,$f=8,ko=9,be=10;function kn(e){return Array.isArray(e)&&typeof e[Hf]=="object"}function nt(e){return Array.isArray(e)&&e[Hf]===!0}function fl(e){return(e.flags&4)!==0}function On(e){return e.componentOffset>-1}function Ds(e){return(e.flags&1)===1}function ur(e){return!!e.template}function qr(e){return(e[H]&512)!==0}function dr(e){return(e[H]&256)===256}var _s=(function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e[e.ATTRIBUTE_NO_BINDING=6]="ATTRIBUTE_NO_BINDING",e})(_s||{});var pl="svg",Uf="math";function ze(e){for(;Array.isArray(e);)e=e[xt];return e}function hl(e,t){return ze(t[e])}function Wt(e,t){return ze(t[e.index])}function ws(e,t){return e.data[t]}function bs(e,t){return e[t]}function ml(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function qt(e,t){let n=t[e];return kn(n)?n:n[xt]}function Cs(e){return(e[H]&128)===128}function Yt(e,t){return t==null?null:e[t]}function gl(e){e[ar]=0}function yl(e){e[H]&1024||(e[H]|=1024,Cs(e)&&fr(e))}function zf(e,t){for(;e>0;)t=t[An],e--;return t}function Oo(e){return!!(e[H]&9216||e[st]?.dirty)}function xs(e){e[It].changeDetectionScheduler?.notify(8),e[H]&64&&(e[H]|=1024),Oo(e)&&fr(e)}function fr(e){e[It].changeDetectionScheduler?.notify(0);let t=mn(e);for(;t!==null&&!(t[H]&8192||(t[H]|=8192,!Cs(t)));)t=mn(t)}function Is(e,t){if(dr(e))throw new R(911,!1);e[pn]===null&&(e[pn]=[]),e[pn].push(t)}function Gf(e,t){if(e[pn]===null)return;let n=e[pn].indexOf(t);n!==-1&&e[pn].splice(n,1)}function mn(e){let t=e[Be];return nt(t)?t[Be]:t}function Wf(e){return e[Gr]??=[]}function qf(e){return e.cleanup??=[]}var Z={lFrame:cp(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var Gc=!1;function Yf(){return Z.lFrame.elementDepthCount}function Zf(){Z.lFrame.elementDepthCount++}function vl(){Z.lFrame.elementDepthCount--}function Xf(){return Z.bindingsEnabled}function Kf(){return Z.skipHydrationRootTNode!==null}function El(e){return Z.skipHydrationRootTNode===e}function Dl(){Z.skipHydrationRootTNode=null}function se(){return Z.lFrame.lView}function Ze(){return Z.lFrame.tView}function $(e){return Z.lFrame.contextLView=e,e[Ce]}function U(e){return Z.lFrame.contextLView=null,e}function Zt(){let e=_l();for(;e!==null&&e.type===64;)e=e.parent;return e}function _l(){return Z.lFrame.currentTNode}function Qf(){let e=Z.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Yr(e,t){let n=Z.lFrame;n.currentTNode=e,n.isParent=t}function wl(){return Z.lFrame.isParent}function Jf(){Z.lFrame.isParent=!1}function ep(){return Z.lFrame.contextLView}function bl(){return Gc}function Co(e){let t=Gc;return Gc=e,t}function Ts(){let e=Z.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function tp(){return Z.lFrame.bindingIndex}function np(e){return Z.lFrame.bindingIndex=e}function pr(){return Z.lFrame.bindingIndex++}function Ss(e){let t=Z.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function rp(){return Z.lFrame.inI18n}function op(e,t){let n=Z.lFrame;n.bindingIndex=n.bindingRootIndex=e,Ms(t)}function ip(){return Z.lFrame.currentDirectiveIndex}function Ms(e){Z.lFrame.currentDirectiveIndex=e}function sp(e){let t=Z.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function Cl(e){Z.lFrame.currentQueryIndex=e}function N0(e){let t=e[L];return t.type===2?t.declTNode:t.type===1?e[ht]:null}function xl(e,t,n){if(n&4){let o=t,i=e;for(;o=o.parent,o===null&&!(n&1);)if(o=N0(i),o===null||(i=i[An],o.type&10))break;if(o===null)return!1;t=o,e=i}let r=Z.lFrame=ap();return r.currentTNode=t,r.lView=e,!0}function Ns(e){let t=ap(),n=e[L];Z.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function ap(){let e=Z.lFrame,t=e===null?null:e.child;return t===null?cp(e):t}function cp(e){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:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function lp(){let e=Z.lFrame;return Z.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var Il=lp;function As(){let e=lp();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function up(e){return(Z.lFrame.contextLView=zf(e,Z.lFrame.contextLView))[Ce]}function Xt(){return Z.lFrame.selectedIndex}function Rn(e){Z.lFrame.selectedIndex=e}function ks(){let e=Z.lFrame;return ws(e.tView,e.selectedIndex)}function mt(){Z.lFrame.currentNamespace=pl}function hr(){A0()}function A0(){Z.lFrame.currentNamespace=null}function Tl(){return Z.lFrame.currentNamespace}var dp=!0;function Os(){return dp}function Rs(e){dp=e}function Wc(e,t=null,n=null,r){let o=fp(e,t,n,r);return o.resolveInjectorInitializers(),o}function fp(e,t=null,n=null,r,o=new Set){let i=[n||$t,Ff(e)],s;return new tr(i,t||No(),s||null,o)}var Ct=class e{static THROW_IF_NOT_FOUND=Qn;static NULL=new Br;static create(t,n){if(Array.isArray(t))return Wc({name:""},n,t,"");{let r=t.name??"";return Wc({name:r},t.parent,t.providers,r)}}static \u0275prov=le({token:e,providedIn:"any",factory:()=>J(So)});static __NG_ELEMENT_ID__=-1},Ve=new G(""),ke=class{static __NG_ELEMENT_ID__=k0;static __NG_ENV_ID__=t=>t},os=class extends ke{_lView;constructor(t){super(),this._lView=t}get destroyed(){return dr(this._lView)}onDestroy(t){let n=this._lView;return Is(n,t),()=>Gf(n,t)}};function k0(){return new os(se())}var pp=!1,hp=new G(""),mr=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new wo(!1);debugTaskTracker=S(hp,{optional:!0});get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new _e(n=>{n.next(!1),n.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),this.debugTaskTracker?.add(n),n}has(n){return this.pendingTasks.has(n)}remove(n){this.pendingTasks.delete(n),this.debugTaskTracker?.remove(n),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=le({token:e,providedIn:"root",factory:()=>new e})}return e})(),qc=class extends bt{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(t=!1){super(),this.__isAsync=t,Vf()&&(this.destroyRef=S(ke,{optional:!0})??void 0,this.pendingTasks=S(mr,{optional:!0})??void 0)}emit(t){let n=F(null);try{super.next(t)}finally{F(n)}}subscribe(t,n,r){let o=t,i=n||(()=>null),s=r;if(t&&typeof t=="object"){let c=t;o=c.next?.bind(c),i=c.error?.bind(c),s=c.complete?.bind(c)}this.__isAsync&&(i=this.wrapInTimeout(i),o&&(o=this.wrapInTimeout(o)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:o,error:i,complete:s});return t instanceof qe&&t.add(a),a}wrapInTimeout(t){return n=>{let r=this.pendingTasks?.add();setTimeout(()=>{try{t(n)}finally{r!==void 0&&this.pendingTasks?.remove(r)}})}}},fn=qc;function is(...e){}function Sl(e){let t,n;function r(){e=is;try{n!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame=="function"&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function mp(e){return queueMicrotask(()=>e()),()=>{e=is}}var Ml="isAngularZone",xo=Ml+"_ID",O0=0,Ue=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new fn(!1);onMicrotaskEmpty=new fn(!1);onStable=new fn(!1);onError=new fn(!1);constructor(t){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:o=!1,scheduleInRootZone:i=pp}=t;if(typeof Zone>"u")throw new R(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)),n&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!o&&r,s.shouldCoalesceRunChangeDetection=o,s.callbackScheduled=!1,s.scheduleInRootZone=i,F0(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Ml)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new R(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new R(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,o){let i=this._inner,s=i.scheduleEventTask("NgZoneEvent: "+o,t,R0,is,is);try{return i.runTask(s,n,r)}finally{i.cancelTask(s)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}},R0={};function Nl(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function P0(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Sl(()=>{e.callbackScheduled=!1,Yc(e),e.isCheckStableRunning=!0,Nl(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Yc(e)}function F0(e){let t=()=>{P0(e)},n=O0++;e._inner=e._inner.fork({name:"angular",properties:{[Ml]:!0,[xo]:n,[xo+n]:!0},onInvokeTask:(r,o,i,s,a,c)=>{if(L0(c))return r.invokeTask(i,s,a,c);try{return If(e),r.invokeTask(i,s,a,c)}finally{(e.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),Tf(e)}},onInvoke:(r,o,i,s,a,c,l)=>{try{return If(e),r.invoke(i,s,a,c,l)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!j0(c)&&t(),Tf(e)}},onHasTask:(r,o,i,s)=>{r.hasTask(i,s),o===i&&(s.change=="microTask"?(e._hasPendingMicrotasks=s.microTask,Yc(e),Nl(e)):s.change=="macroTask"&&(e.hasPendingMacrotasks=s.macroTask))},onHandleError:(r,o,i,s)=>(r.handleError(i,s),e.runOutsideAngular(()=>e.onError.emit(s)),!1)})}function Yc(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function If(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Tf(e){e._nesting--,Nl(e)}var Io=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new fn;onMicrotaskEmpty=new fn;onStable=new fn;onError=new fn;run(t,n,r){return t.apply(n,r)}runGuarded(t,n,r){return t.apply(n,r)}runOutsideAngular(t){return t()}runTask(t,n,r,o){return t.apply(n,r)}};function L0(e){return gp(e,"__ignore_ng_zone__")}function j0(e){return gp(e,"__scheduler_tick__")}function gp(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var ft=class{_console=console;handleError(t){this._console.error("ERROR",t)}};function yp(e){return vp(e)?e:new Zc(e)}function vp(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.name=="string"&&typeof e.message=="string"}var Zc=class extends Error{constructor(t){super(String(t),{cause:t}),this.name="ErrorBoundaryWrappedError"}},gn=new G("",{factory:()=>{let e=S(Ue),t=S(tt),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(ft),n.handleError(r))})}}}),Ep={provide:$r,useValue:()=>{let e=S(ft,{optional:!0})},multi:!0},B0=new G("",{factory:()=>{let e=S(Ve).defaultView;if(!e)return;let t=S(gn),n=i=>{t(i.reason),i.preventDefault()},r=i=>{i.error?t(i.error):t(new Error(i.message,{cause:i})),i.preventDefault()},o=()=>{e.addEventListener("unhandledrejection",n),e.addEventListener("error",r)};typeof Zone<"u"?Zone.root.run(o):o(),S(ke).onDestroy(()=>{e.removeEventListener("error",r),e.removeEventListener("unhandledrejection",n)})}});function Al(){return ir([Pf(()=>{S(B0)})])}function V(e,t){let[n,r,o]=Ec(e,t?.equal),i=n,s=i[Re];return i.set=r,i.update=o,i.asReadonly=Ps.bind(i),i}function Ps(){let e=this[Re];if(e.readonlyFn===void 0){let t=()=>this();t[Re]=e,e.readonlyFn=t}return e.readonlyFn}var Ro=new G("",{factory:()=>V0}),V0="ng";var Fs=new G(""),Po=new G("",{providedIn:"platform",factory:()=>"unknown"});var Fo=new G("",{factory:()=>S(Ve).body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var Lo=(()=>{class e{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=H0}return e})();function H0(){return new Lo(se(),Zt())}var Ut=class{},jo=new G("",{factory:()=>!0});var kl=new G(""),Ls=(()=>{class e{static \u0275prov=le({token:e,providedIn:"root",factory:()=>new Xc})}return e})(),Xc=class{dirtyEffectCount=0;queues=new Map;add(t){this.enqueue(t),this.schedule(t)}schedule(t){t.dirty&&this.dirtyEffectCount++}remove(t){let n=t.zone,r=this.queues.get(n);r.has(t)&&(r.delete(t),t.dirty&&this.dirtyEffectCount--)}enqueue(t){let n=t.zone;this.queues.has(n)||this.queues.set(n,new Set);let r=this.queues.get(n);r.has(t)||r.add(t)}flush(){for(;this.dirtyEffectCount>0;){let t=!1;for(let[n,r]of this.queues)n===null?t||=this.flushQueue(r):t||=n.run(()=>this.flushQueue(r));t||(this.dirtyEffectCount=0)}}flushQueue(t){let n=!1;for(let r of t)r.dirty&&(this.dirtyEffectCount--,n=!0,r.run());return n}},ss=class{[Re];constructor(t){this[Re]=t}destroy(){this[Re].destroy()}};function at(e,t){let n=t?.injector??S(Ct),r=t?.manualCleanup!==!0?n.get(ke):null,o,i=n.get(Lo,null,{optional:!0}),s=n.get(Ut);return i!==null?(o=_p(i.view,s,e),r instanceof os&&r._lView===i.view&&(r=null)):o=z0(e,n.get(Ls),s),o.injector=n,r!==null&&(o.onDestroyFns=[r.onDestroy(()=>o.destroy())]),new ss(o)}var Dp=Q(B({},Dc),{cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=Co(!1);try{_c(this)}finally{Co(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=F(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],F(e)}}}),$0=Q(B({},Dp),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(Sn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}}),U0=Q(B({},Dp),{consumerMarkedDirty(){this.view[H]|=8192,fr(this.view),this.notifier.notify(13)},destroy(){if(Sn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[hn]?.delete(this)}});function _p(e,t,n){let r=Object.create(U0);return r.view=e,r.zone=typeof Zone<"u"?Zone.current:null,r.notifier=t,r.userFn=n,r.fn=wp(r,n),e[hn]??=new Set,e[hn].add(r),r.consumerMarkedDirty(r),r}function z0(e,t,n){let r=Object.create($0);return r.userFn=e,r.fn=wp(r,e),r.scheduler=t,r.notifier=n,r.zone=typeof Zone<"u"?Zone.current:null,r.scheduler.add(r),r.notifier.notify(12),r}function wp(e,t){return()=>{t(n=>(e.cleanupFns??=[]).push(n))}}var Bo=(()=>{class e{internalPendingTasks=S(mr);scheduler=S(Ut);errorHandler=S(gn);add(){let n=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(n)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(n))}}run(n){let r=this.add();try{n().catch(this.errorHandler).finally(r)}catch(o){this.errorHandler(o),r()}}static \u0275prov=le({token:e,providedIn:"root",factory:()=>new e})}return e})();var cu=Symbol("InputSignalNode#UNSET"),Xp=Q(B({},kr),{transformFn:void 0,applyValueToInputSignal(e,t){Mn(e,t)}});function Kp(e){return{toString:e}.toString()}var ae=(function(e){return e[e.TemplateCreateStart=0]="TemplateCreateStart",e[e.TemplateCreateEnd=1]="TemplateCreateEnd",e[e.TemplateUpdateStart=2]="TemplateUpdateStart",e[e.TemplateUpdateEnd=3]="TemplateUpdateEnd",e[e.LifecycleHookStart=4]="LifecycleHookStart",e[e.LifecycleHookEnd=5]="LifecycleHookEnd",e[e.OutputStart=6]="OutputStart",e[e.OutputEnd=7]="OutputEnd",e[e.BootstrapApplicationStart=8]="BootstrapApplicationStart",e[e.BootstrapApplicationEnd=9]="BootstrapApplicationEnd",e[e.BootstrapComponentStart=10]="BootstrapComponentStart",e[e.BootstrapComponentEnd=11]="BootstrapComponentEnd",e[e.ChangeDetectionStart=12]="ChangeDetectionStart",e[e.ChangeDetectionEnd=13]="ChangeDetectionEnd",e[e.ChangeDetectionSyncStart=14]="ChangeDetectionSyncStart",e[e.ChangeDetectionSyncEnd=15]="ChangeDetectionSyncEnd",e[e.AfterRenderHooksStart=16]="AfterRenderHooksStart",e[e.AfterRenderHooksEnd=17]="AfterRenderHooksEnd",e[e.ComponentStart=18]="ComponentStart",e[e.ComponentEnd=19]="ComponentEnd",e[e.DeferBlockStateStart=20]="DeferBlockStateStart",e[e.DeferBlockStateEnd=21]="DeferBlockStateEnd",e[e.DynamicComponentStart=22]="DynamicComponentStart",e[e.DynamicComponentEnd=23]="DynamicComponentEnd",e[e.HostBindingsUpdateStart=24]="HostBindingsUpdateStart",e[e.HostBindingsUpdateEnd=25]="HostBindingsUpdateEnd",e})(ae||{});function rE(e,t,n,r){t!==null?t.applyValueToInputSignal(t,r):e[n]=r}var oE=null;function iE(){return oE}var bp=[];var fe=function(e,t=null,n){for(let r=0;r<bp.length;r++){let o=bp[r];o(e,t,n)}};function sE(e,t,n){let{ngOnChanges:r,ngOnInit:o,ngDoCheck:i}=t.type.prototype;if(r){let s=iE()(t);(n.preOrderHooks??=[]).push(e,s),(n.preOrderCheckHooks??=[]).push(e,s)}o&&(n.preOrderHooks??=[]).push(0-e,o),i&&((n.preOrderHooks??=[]).push(e,i),(n.preOrderCheckHooks??=[]).push(e,i))}function aE(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n<r;n++){let i=e.data[n].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:c,ngAfterViewChecked:l,ngOnDestroy:u}=i;s&&(e.contentHooks??=[]).push(-n,s),a&&((e.contentHooks??=[]).push(n,a),(e.contentCheckHooks??=[]).push(n,a)),c&&(e.viewHooks??=[]).push(-n,c),l&&((e.viewHooks??=[]).push(n,l),(e.viewCheckHooks??=[]).push(n,l)),u!=null&&(e.destroyHooks??=[]).push(n,u)}}function Bs(e,t,n){Qp(e,t,3,n)}function Vs(e,t,n,r){(e[H]&3)===n&&Qp(e,t,n,r)}function Ol(e,t){let n=e[H];(n&3)===t&&(n&=16383,n+=1,e[H]=n)}function Qp(e,t,n,r){let o=r!==void 0?e[ar]&65535:0,i=r??-1,s=t.length-1,a=0;for(let c=o;c<s;c++)if(typeof t[c+1]=="number"){if(a=t[c],r!=null&&a>=r)break}else t[c]<0&&(e[ar]+=65536),(a<i||i==-1)&&(cE(e,n,t,c),e[ar]=(e[ar]&4294901760)+c+2),c++}function Cp(e,t){fe(ae.LifecycleHookStart,e,t);let n=F(null);try{t.call(e)}finally{F(n),fe(ae.LifecycleHookEnd,e,t)}}function cE(e,t,n,r){let o=n[r]<0,i=n[r+1],s=o?-n[r]:n[r],a=e[s];o?e[H]>>14<e[ar]>>16&&(e[H]&3)===t&&(e[H]+=16384,Cp(a,i)):Cp(a,i)}var Kr=-1,Uo=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(t,n,r,o){this.factory=t,this.name=o,this.canSeeViewProviders=n,this.injectImpl=r}};function lE(e){return(e.flags&8)!==0}function uE(e){return(e.flags&16)!==0}function dE(e,t,n){let r=0;for(;r<n.length;){let o=n[r];if(typeof o=="number"){if(o!==0)break;r++;let i=n[r++],s=n[r++],a=n[r++];e.setAttribute(t,s,a,i)}else{let i=o,s=n[++r];pE(i)?e.setProperty(t,i,s):e.setAttribute(t,i,s),r++}}return r}function fE(e){return e===3||e===4||e===6}function pE(e){return e.charCodeAt(0)===64}function na(e,t){if(!(t===null||t.length===0))if(e===null||e.length===0)e=t.slice();else{let n=-1;for(let r=0;r<t.length;r++){let o=t[r];typeof o=="number"?n=o:n===0||(n===-1||n===2?xp(e,n,o,null,t[++r]):xp(e,n,o,null,null))}}return e}function xp(e,t,n,r,o){let i=0,s=e.length;if(t===-1)s=-1;else for(;i<e.length;){let a=e[i++];if(typeof a=="number"){if(a===t){s=-1;break}else if(a>t){s=i-1;break}}}for(;i<e.length;){let a=e[i];if(typeof a=="number")break;if(a===n){o!==null&&(e[i+1]=o);return}i++,o!==null&&i++}s!==-1&&(e.splice(s,0,t),i=s+1),e.splice(i++,0,n),o!==null&&e.splice(i++,0,o)}function hE(e){return e!==Kr}function Vl(e){return e&32767}function mE(e){return e>>16}function Hl(e,t){let n=mE(e),r=t;for(;n>0;)r=r[An],n--;return r}var $l=!0;function Us(e){let t=$l;return $l=e,t}var gE=256,Jp=gE-1,eh=5,yE=0,Kt={};function vE(e,t,n){let r;typeof n=="string"?r=n.charCodeAt(0)||0:Object.hasOwn(n,rr)&&(r=n[rr]),r==null&&(r=n[rr]=yE++);let o=r&Jp,i=1<<o;t.data[e+(o>>eh)]|=i}function th(e,t){let n=nh(e,t);if(n!==-1)return n;let r=t[L];r.firstCreatePass&&(e.injectorIndex=t.length,Rl(r.data,e),Rl(t,null),Rl(r.blueprint,null));let o=rh(e,t),i=e.injectorIndex;if(hE(o)){let s=Vl(o),a=Hl(o,t),c=a[L].data;for(let l=0;l<8;l++)t[i+l]=a[s+l]|c[s+l]}return t[i+8]=o,i}function Rl(e,t){e.push(0,0,0,0,0,0,0,0,t)}function nh(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function rh(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,o=t;for(;o!==null;){if(r=ch(o),r===null)return Kr;if(n++,o=o[An],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return Kr}function EE(e,t,n){vE(e,t,n)}function oh(e,t,n){if(n&8||e!==void 0)return e;hs(t,"NodeInjector")}function ih(e,t,n,r){if(n&8&&r===void 0&&(r=null),(n&3)===0){let o=e[zt],i=Ye(void 0);try{return o?o.get(t,r,n&8):rl(t,r,n&8)}finally{Ye(i)}}return oh(r,t,n)}function sh(e,t,n,r=0,o){if(e!==null){if(t[H]&2048&&!(r&2)){let s=CE(e,t,n,r,Kt);if(s!==Kt)return s}let i=ah(e,t,n,r,Kt);if(i!==Kt)return i}return ih(t,n,r,o)}function ah(e,t,n,r,o){let i=wE(n);if(typeof i=="function"){if(!xl(t,e,r))return r&1?oh(o,n,r):ih(t,n,r,o);try{let s;if(s=i(r),s==null&&!(r&8))hs(n);else return s}finally{Il()}}else if(typeof i=="number"){let s=null,a=nh(e,t),c=Kr,l=r&1?t[it][ht]:null;for((a===-1||r&4)&&(c=a===-1?rh(e,t):t[a+8],c===Kr||!Tp(r,!1)?a=-1:(s=t[L],a=Vl(c),t=Hl(c,t)));a!==-1;){let u=t[L];if(Ip(i,a,u.data)){let d=DE(a,t,n,s,r,l);if(d!==Kt)return d}c=t[a+8],c!==Kr&&Tp(r,t[L].data[a+8]===l)&&Ip(i,a,t)?(s=u,a=Vl(c),t=Hl(c,t)):a=-1}}return o}function DE(e,t,n,r,o,i){let s=t[L],a=s.data[e+8],c=r==null?On(a)&&$l:r!=s&&(a.type&3)!==0,l=o&1&&i===a,u=_E(a,s,n,c,l);return u!==null?Ul(t,s,u,a,o):Kt}function _E(e,t,n,r,o){let i=e.providerIndexes,s=t.data,a=i&1048575,c=e.directiveStart,l=e.directiveEnd,u=i>>20,d=r?a:a+u,p=o?a+u:l;for(let f=d;f<p;f++){let g=s[f];if(f<c&&n===g||f>=c&&g.type===n)return f}if(o){let f=s[c];if(f&&ur(f)&&f.type===n)return c}return null}function Ul(e,t,n,r,o){let i=e[n],s=t.data;if(i instanceof Uo){let a=i;if(a.resolving)throw nl("");let c=Us(a.canSeeViewProviders);a.resolving=!0;let l=s[n].type||s[n],u,d=a.injectImpl?Ye(a.injectImpl):null,p=xl(e,r,0);try{i=e[n]=a.factory(void 0,o,s,e,r),t.firstCreatePass&&n>=r.directiveStart&&sE(n,s[n],t)}finally{d!==null&&Ye(d),Us(c),a.resolving=!1,Il()}}return i}function wE(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=Object.hasOwn(e,rr)?e[rr]:void 0;return typeof t=="number"?t>=0?t&Jp:bE:t}function Ip(e,t,n){let r=1<<e;return!!(n[t+(e>>eh)]&r)}function Tp(e,t){return!(e&2)&&!(e&1&&t)}var zo=class{_tNode;_lView;constructor(t,n){this._tNode=t,this._lView=n}get(t,n,r){return sh(this._tNode,this._lView,t,Jn(r),n)}};function bE(){return new zo(Zt(),se())}function CE(e,t,n,r,o){let i=e,s=t;for(;i!==null&&s!==null&&s[H]&2048&&!qr(s);){let a=ah(i,s,n,r|2,Kt);if(a!==Kt)return a;r&=-5;let c=i.parent;if(!c){let l=s[ll];if(l){let u=l.get(n,Kt,r);if(u!==Kt)return u}c=ch(s),s=s[An]}i=c}return o}function ch(e){let t=e[L],n=t.type;return n===2?t.declTNode:n===1?e[ht]:null}function Fn(e){return{token:e.token,providedIn:e.autoProvided===!1?null:"root",factory:e.factory,value:void 0}}function xE(){return lh(Zt(),se())}function lh(e,t){return new yn(Wt(e,t))}var yn=(()=>{class e{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=xE}return e})();function uh(e){return(e.flags&128)===128}var lu=(function(e){return e[e.OnPush=0]="OnPush",e[e.Eager=1]="Eager",e[e.Default=1]="Default",e})(lu||{}),dh=new Map,IE=0;function TE(){return IE++}function SE(e){dh.set(e[Gt],e)}function zl(e){dh.delete(e[Gt])}var Sp="__ngContext__";function Jr(e,t){kn(t)?(e[Sp]=t[Gt],SE(t)):e[Sp]=t}function fh(e){return hh(e[Wr])}function ph(e){return hh(e[pt])}function hh(e){for(;e!==null&&!nt(e);)e=e[pt];return e}var Gl;function uu(e){Gl=e}function mh(){if(Gl!==void 0)return Gl;if(typeof document<"u")return document;throw new R(210,!1)}var gh="r";var yh="di";var vh=!1,Eh=new G("",{factory:()=>vh});var Mp=new WeakMap;function ME(e,t){if(e==null||typeof e!="object")return;let n=Mp.get(e);n||(n=new WeakSet,Mp.set(e,n)),n.add(t)}var NE=(e,t,n,r)=>{};function AE(e,t,n,r){NE(e,t,n,r)}function du(e){return(e.flags&32)===32}var kE=()=>null;function Dh(e,t,n=!1){return kE(e,t,n)}function _h(e,t){let n=e.contentQueries;if(n!==null){let r=F(null);try{for(let o=0;o<n.length;o+=2){let i=n[o],s=n[o+1];if(s!==-1){let a=e.data[s];Cl(i),a.contentQueries(2,t[s],s)}}}finally{F(r)}}}function Wl(e,t,n){Cl(0);let r=F(null);try{t(e,n)}finally{F(r)}}function wh(e,t,n){if(fl(t)){let r=F(null);try{let o=t.directiveStart,i=t.directiveEnd;for(let s=o;s<i;s++){let a=e.data[s];if(a.contentQueries){let c=n[s];a.contentQueries(1,c,s)}}}finally{F(r)}}}var Nt=(function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e[e.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom",e})(Nt||{});var zs=class{changingThisBreaksApplicationSecurity;constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${as})`}};function Go(e){return e instanceof zs?e.changingThisBreaksApplicationSecurity:e}function bh(e,t){let n=Ch(e);if(n!=null&&n!==t){if(n==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${n} (see ${as})`)}return n===t}function Ch(e){return e instanceof zs&&e.getTypeName()||null}var OE=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function xh(e){return e=String(e),e.match(OE)?e:"unsafe:"+e}function RE(e,t){return e.createText(t)}function PE(e,t,n){e.setValue(t,n)}function Ih(e,t,n){return e.createElement(t,n)}function Qr(e,t,n,r,o){e.insertBefore(t,n,r,o)}function Th(e,t,n){e.appendChild(t,n)}function Np(e,t,n,r,o){r!==null?Qr(e,t,n,r,o):Th(e,t,n)}function Sh(e,t,n,r){e.removeChild(null,t,n,r)}function FE(e,t,n){e.setAttribute(t,"style",n)}function LE(e,t,n){n===""?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n)}function Mh(e,t,n){let{mergedAttrs:r,classes:o,styles:i}=n;r!==null&&dE(e,t,r),o!==null&&LE(e,t,o),i!==null&&FE(e,t,i)}function Ln(e){let t=jE();return t?t.sanitize(_s.URL,e)||"":bh(e,"URL")?Go(e):xh(Vr(e))}function jE(){let e=se();return e&&e[It].sanitizer}function fu(e){return e.ownerDocument}function BE(e,t,n){let r=e.length;for(;;){let o=e.indexOf(t,n);if(o===-1)return o;if(o===0||e.charCodeAt(o-1)<=32){let i=t.length;if(o+i===r||e.charCodeAt(o+i)<=32)return o}n=o+1}}var Nh="ng-template";function VE(e,t,n,r){let o=0;if(r){for(;o<t.length&&typeof t[o]=="string";o+=2)if(t[o]==="class"&&BE(t[o+1].toLowerCase(),n,0)!==-1)return!0}else if(pu(e))return!1;if(o=t.indexOf(1,o),o>-1){let i;for(;++o<t.length&&typeof(i=t[o])=="string";)if(i.toLowerCase()===n)return!0}return!1}function pu(e){return e.type===4&&e.value!==Nh}function HE(e,t,n){let r=e.type===4&&!n?Nh:e.value;return t===r}function $E(e,t,n){let r=4,o=e.attrs,i=o!==null?GE(o):0,s=!1;for(let a=0;a<t.length;a++){let c=t[a];if(typeof c=="number"){if(!s&&!St(r)&&!St(c))return!1;if(s&&St(c))continue;s=!1,r=c|r&1;continue}if(!s)if(r&4){if(r=2|r&1,c!==""&&!HE(e,c,n)||c===""&&t.length===1){if(St(r))return!1;s=!0}}else if(r&8){if(o===null||!VE(e,o,c,n)){if(St(r))return!1;s=!0}}else{let l=t[++a],u=UE(c,o,pu(e),n);if(u===-1){if(St(r))return!1;s=!0;continue}if(l!==""){let d;if(u>i?d="":d=o[u+1].toLowerCase(),r&2&&l!==d){if(St(r))return!1;s=!0}}}}return St(r)||s}function St(e){return(e&1)===0}function UE(e,t,n,r){if(t===null)return-1;let o=0;if(r||!n){let i=!1;for(;o<t.length;){let s=t[o];if(s===e)return o;if(s===3||s===6)i=!0;else if(s===1||s===2){let a=t[++o];for(;typeof a=="string";)a=t[++o];continue}else{if(s===4)break;if(s===0){o+=4;continue}}o+=i?1:2}return-1}else return WE(t,e)}function zE(e,t,n=!1){for(let r=0;r<t.length;r++)if($E(e,t[r],n))return!0;return!1}function GE(e){for(let t=0;t<e.length;t++){let n=e[t];if(fE(n))return t}return e.length}function WE(e,t){let n=e.indexOf(4);if(n>-1)for(n++;n<e.length;){let r=e[n];if(typeof r=="number")return-1;if(r===t)return n;n++}return-1}function Ap(e,t){return e?":not("+t.trim()+")":t}function qE(e){let t=e[0],n=1,r=2,o="",i=!1;for(;n<e.length;){let s=e[n];if(typeof s=="string")if(r&2){let a=e[++n];o+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else r&8?o+="."+s:r&4&&(o+=" "+s);else o!==""&&!St(s)&&(t+=Ap(i,o),o=""),r=s,i=i||!St(r);n++}return o!==""&&(t+=Ap(i,o)),t}function YE(e){return e.map(qE).join(",")}function ZE(e){let t=[],n=[],r=1,o=2;for(;r<e.length;){let i=e[r];if(typeof i=="string")o===2?i!==""&&t.push(i,e[++r]):o===8&&n.push(i);else{if(!St(o))break;o=i}r++}return n.length&&t.push(1,...n),t}var Xe={},Qt=(function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e})(Qt||{}),XE;function hu(e,t){return XE(e,t)}var Pn=new Set;var JA=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";var ql=new WeakMap;function Ah(e){return e?e[An]??e:null}var Zr=new WeakSet;function KE(e,t,n){let r=ql.get(e);if(!r||r.length===0)return;let o=t.parentNode,i=t.previousSibling,s=Ah(n);for(let a=r.length-1;a>=0;a--){let{el:c,declarationView:l}=r[a],u=c.parentNode;c===t?(r.splice(a,1),Zr.add(c),c.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}}))):i&&c===i?(r.splice(a,1),c.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}})),c.parentNode?.removeChild(c)):u&&o&&u!==o&&(s===null||l===null||s===l)&&(r.splice(a,1),c.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}})),c.parentNode?.removeChild(c))}}function QE(e,t,n){let r=Ah(n),o=ql.get(e);o?o.some(i=>i.el===t)||o.push({el:t,declarationView:r}):ql.set(e,[{el:t,declarationView:r}])}var ra=(function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e})(ra||{}),Jt=new G(""),kp=new Set;function to(e){kp.has(e)||(kp.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}var mu=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=le({token:e,providedIn:"root",factory:()=>new e})}return e})(),gu=[0,1,2,3],kh=(()=>{class e{ngZone=S(Ue);scheduler=S(Ut);errorHandler=S(ft,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){S(Jt,{optional:!0})}execute(){let n=this.sequences.size>0;n&&fe(ae.AfterRenderHooksStart),this.executing=!0;for(let r of gu)for(let o of this.sequences)if(!(o.erroredOrDestroyed||!o.hooks[r]))try{o.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let i=o.hooks[r];return i(o.pipelinedValue)},o.snapshot))}catch(i){o.erroredOrDestroyed=!0,this.errorHandler?.handleError(i)}this.executing=!1;for(let r of this.sequences)r.afterRun(),r.once&&(this.sequences.delete(r),r.destroy());for(let r of this.deferredRegistrations)this.sequences.add(r);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),n&&fe(ae.AfterRenderHooksEnd)}register(n){let{view:r}=n;r!==void 0?((r[lr]??=[]).push(n),fr(r),r[H]|=8192):this.executing?this.deferredRegistrations.add(n):this.addSequence(n)}addSequence(n){this.sequences.add(n),this.scheduler.notify(7)}unregister(n){this.executing&&this.sequences.has(n)?(n.erroredOrDestroyed=!0,n.pipelinedValue=void 0,n.once=!0):(this.sequences.delete(n),this.deferredRegistrations.delete(n))}maybeTrace(n,r){return r?r.run(ra.AFTER_NEXT_RENDER,n):n()}static \u0275prov=le({token:e,providedIn:"root",factory:()=>new e})}return e})(),Gs=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(t,n,r,o,i,s=null){this.impl=t,this.hooks=n,this.view=r,this.once=o,this.snapshot=s,this.unregisterOnDestroy=i?.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?.[lr];t&&(this.view[lr]=t.filter(n=>n!==this))}};var yu=new G("",{factory:()=>{let e=S(tt),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function Oh(e,t,n){let r=e.get(yu);if(Array.isArray(t))for(let o of t)r.queue.add(o),n?.detachedLeaveAnimationFns?.push(o);else r.queue.add(t),n?.detachedLeaveAnimationFns?.push(t);r.scheduler&&r.scheduler(e)}function JE(e,t){let n=e.get(yu);if(Array.isArray(t))for(let r of t)n.queue.delete(r);else n.queue.delete(t)}function eD(e,t){let n=e.get(yu);if(t.detachedLeaveAnimationFns){for(let r of t.detachedLeaveAnimationFns)n.queue.delete(r);t.detachedLeaveAnimationFns=void 0}}function tD(e,t){for(let[n,r]of t)Oh(e,r.animateFns)}function Op(e,t,n,r){let o=e?.[Tt]?.enter;t!==null&&o&&o.has(n.index)&&tD(r,o)}function Rp(e,t,n,r){try{n.get(So)}catch{return r(!1)}let o=e?e[Tt]??={}:void 0;o?.enter?.has(t.index)&&JE(n,o.enter.get(t.index).animateFns);let i=nD(e,t,o);if(i.size===0&&!(e?vu(e,t):!1))return r(!1);e&&Pn.add(e[Gt]),Oh(n,()=>rD(e,t,o,i,r),o)}function nD(e,t,n){let r=new Map,o=n?.leave;if(o&&o.has(t.index)&&r.set(t.index,o.get(t.index)),e&&o)for(let[i,s]of o){if(r.has(i))continue;let c=e[L].data[i].parent;for(;c;){if(c===t){r.set(i,s);break}c=c.parent}}return r}function rD(e,t,n,r,o){let i=[];if(n&&n.leave)for(let[s]of r){if(!n.leave.has(s))continue;let a=n.leave.get(s);for(let c of a.animateFns){let{promise:l}=c();i.push(l)}n.detachedLeaveAnimationFns=void 0}if(e&&Eu(e,t,i),i.length>0){let s=n||e?.[Tt];if(s){let a=s.running;a&&i.push(a),s.running=Promise.allSettled(i),sD(e,s.running,o)}else Promise.allSettled(i).then(()=>{e&&Pn.delete(e[Gt]),o(!0)})}else e&&Pn.delete(e[Gt]),o(!1)}function vu(e,t){if(t.type&12){let r=e[t.index];if(nt(r))for(let o=be;o<r.length;o++){let i=r[o];if(i[L].type===2&&oD(i))return!0}}let n=t.child;for(;n;){if(vu(e,n))return!0;n=n.next}return!1}function oD(e){let t=e[Tt];if(t?.leave&&t.leave.size>0)return!0;let n=e[L].firstChild;for(;n;){if(vu(e,n))return!0;n=n.next}return!1}function Eu(e,t,n){if(t.type&12){let o=e[t.index];if(nt(o))for(let i=be;i<o.length;i++){let s=o[i];s[L].type===2&&iD(s,n)}}let r=t.child;for(;r;)Eu(e,r,n),r=r.next}function iD(e,t){let n=e[Tt];if(n&&n.leave)for(let o of n.leave.values())for(let i of o.animateFns){let{promise:s}=i();t.push(s)}let r=e[L].firstChild;for(;r;)Eu(e,r,t),r=r.next}function sD(e,t,n){t.then(()=>{e[Tt]?.running===t&&(e[Tt].running=void 0,Pn.delete(e[Gt])),n(!0)})}function Rh(e){let t=e[Tt]??={};t.detachedLeaveAnimationFns=[];let n=e[L].firstChild;for(;n;)Ph(e,n),n=n.next}function Ph(e,t){if(t.type&12){let r=e[t.index];if(nt(r))for(let o=be;o<r.length;o++){let i=r[o];i[L].type===2&&Rh(i)}}let n=t.child;for(;n;)Ph(e,n),n=n.next}function Fh(e){let t=e[Tt];if(t&&t.detachedLeaveAnimationFns&&t.detachedLeaveAnimationFns.length>0){let r=e[zt];eD(r,t),Pn.delete(e[Gt]),t.detachedLeaveAnimationFns=void 0}else t&&(t.detachedLeaveAnimationFns=void 0);let n=e[L].firstChild;for(;n;)Lh(e,n),n=n.next}function Lh(e,t){if(t.type&12){let r=e[t.index];if(nt(r))for(let o=be;o<r.length;o++){let i=r[o];i[L].type===2&&Fh(i)}}let n=t.child;for(;n;)Lh(e,n),n=n.next}function Xr(e,t,n,r,o,i,s,a){if(o!=null){let c,l=!1;nt(o)?c=o:kn(o)&&(l=!0,o=o[xt]);let u=ze(o);e===0&&r!==null?(Op(a,r,i,n),s==null?Th(t,r,u):Qr(t,r,u,s||null,!0)):e===1&&r!==null?(Qr(t,r,u,s||null,!0),KE(i,u,a),Zr.has(u)||Op(a,r,i,n)):e===2?(a?.[Tt]?.leave?.has(i.index)&&QE(i,u,a),Zr.delete(u),Rp(a,i,n,d=>{if(Zr.has(u)){Zr.delete(u);return}Sh(t,u,l,d)})):e===3&&(Zr.delete(u),Rp(a,i,n,()=>{t.destroyNode(u)})),c!=null&&ED(t,e,n,c,i,r,s)}}function aD(e,t){jh(e,t),t[xt]=null,t[ht]=null}function cD(e,t,n,r,o,i){r[xt]=o,r[ht]=t,oa(e,r,n,1,o,i)}function jh(e,t){t[It].changeDetectionScheduler?.notify(9),oa(e,t,t[xe],2,null,null)}function lD(e){let t=e[Wr];if(!t)return Pl(e[L],e);for(;t;){let n=null;if(kn(t))n=t[Wr];else{let r=t[be];r&&(n=r)}if(!n){for(;t&&!t[pt]&&t!==e;)kn(t)&&Pl(t[L],t),t=t[Be];t===null&&(t=e),kn(t)&&Pl(t[L],t),n=t&&t[pt]}t=n}}function Du(e,t){let n=e[ko],r=n.indexOf(t);n.splice(r,1)}function _u(e,t){if(dr(t))return;let n=t[xe];n.destroyNode&&oa(e,t,n,3,null,null),lD(t)}function Pl(e,t){if(dr(t))return;let n=F(null);try{t[H]&=-129,t[H]|=256,t[st]&&Sn(t[st]),dD(e,t),uD(e,t),t[L].type===1&&t[xe].destroy();let r=t[sr];if(r!==null&&nt(t[Be])){r!==t[Be]&&Du(r,t);let o=t[cr];o!==null&&o.detachView(e)}zl(t)}finally{F(n)}}function uD(e,t){let n=e.cleanup,r=t[Gr];if(n!==null)for(let s=0;s<n.length-1;s+=2)if(typeof n[s]=="string"){let a=n[s+3];a>=0?r[a]():r[-a].unsubscribe(),s+=2}else{let a=r[n[s+1]];n[s].call(a)}r!==null&&(t[Gr]=null);let o=t[pn];if(o!==null){t[pn]=null;for(let s=0;s<o.length;s++){let a=o[s];a()}}let i=t[hn];if(i!==null){t[hn]=null;for(let s of i)s.destroy()}}function dD(e,t){let n;if(e!=null&&(n=e.destroyHooks)!=null)for(let r=0;r<n.length;r+=2){let o=t[n[r]];if(!(o instanceof Uo)){let i=n[r+1];if(Array.isArray(i))for(let s=0;s<i.length;s+=2){let a=o[i[s]],c=i[s+1];fe(ae.LifecycleHookStart,a,c);try{c.call(a)}finally{fe(ae.LifecycleHookEnd,a,c)}}else{fe(ae.LifecycleHookStart,o,i);try{i.call(o)}finally{fe(ae.LifecycleHookEnd,o,i)}}}}}function fD(e,t,n){if(t===null)throw new R(510,!1);return pD(e,t.parent,n)}function pD(e,t,n){let r=t;for(;r!==null&&r.type&168;)t=r,r=t.parent;if(r===null)return n[xt];if(On(r)){let{encapsulation:o}=e.data[r.directiveStart+r.componentOffset];if(o===Nt.None||o===Nt.Emulated)return null}return Wt(r,n)}function hD(e,t,n){return gD(e,t,n)}function mD(e,t,n){return e.type&40?Wt(e,n):null}var gD=mD,Pp;function wu(e,t,n,r){let o=fD(e,r,t),i=t[xe],s=r.parent||t[ht],a=hD(s,r,t);if(o!=null)if(Array.isArray(n))for(let c=0;c<n.length;c++)Np(i,o,n[c],a,!1);else Np(i,o,n,a,!1);Pp!==void 0&&Pp(i,r,t,n,o)}function Ho(e,t){if(t!==null){let n=t.type;if(n&3)return Wt(t,e);if(n&4)return Yl(-1,e[t.index]);if(n&8){let r=t.child;if(r!==null)return Ho(e,r);{let o=e[t.index];return nt(o)?Yl(-1,o):ze(o)}}else{if(n&128)return Ho(e,t.next);if(n&32)return hu(t,e)()||ze(e[t.index]);{let r=Bh(e,t);if(r!==null){if(Array.isArray(r))return r[0];let o=mn(e[it]);return Ho(o,r)}else return Ho(e,t.next)}}}return null}function Bh(e,t){if(t!==null){let r=e[it][ht],o=t.projection;return r.projection[o]}return null}function Yl(e,t){let n=be+e+1;if(n<t.length){let r=t[n],o=r[L].firstChild;if(o!==null)return Ho(r,o)}return t[Ao]}function bu(e,t,n,r,o,i,s){for(;n!=null;){let a=r[zt];if(n.type===128){n=n.next;continue}let c=r[n.index],l=n.type;if(s&&t===0&&(c&&Jr(ze(c),r),n.flags|=2),!du(n))if(l&8)bu(e,t,n.child,r,o,i,!1),Xr(t,e,a,o,c,n,i,r);else if(l&32){let u=hu(n,r),d;for(;d=u();)Xr(t,e,a,o,d,n,i,r);Xr(t,e,a,o,c,n,i,r)}else l&16?vD(e,t,r,n,o,i):Xr(t,e,a,o,c,n,i,r);n=s?n.projectionNext:n.next}}function oa(e,t,n,r,o,i){e.type===3?yD(n,r,t,o,i):bu(n,r,e.firstChild,t,o,i,!1)}function yD(e,t,n,r,o){let s=n[L].firstChild,a=s.next,c=ze(n[s.index]),l=ze(n[a.index]),u=a.index+1,d=n[u];if(t===1||t===0)r!==null&&(d&&d.hasChildNodes()?Qr(e,r,d,o,!0):(Qr(e,r,c,o,!0),Qr(e,r,l,o,!0)));else if(t===2){if(d||(d=document.createDocumentFragment(),n[u]=d),c&&c.parentNode===d)return;let p=c;for(;p!==null;){let f=p.nextSibling;if(d.appendChild(p),p===l)break;p=f}}}function vD(e,t,n,r,o,i){let s=n[it],c=s[ht].projection[r.projection];if(Array.isArray(c))for(let l=0;l<c.length;l++){let u=c[l];Xr(t,e,n[zt],o,u,r,i,n)}else{let l=c,u=s[Be];uh(r)&&(l.flags|=128),bu(e,t,l,u,o,i,!0)}}function ED(e,t,n,r,o,i,s){let a=r[Ao],c=ze(r);if(a!==c&&Xr(t,e,n,i,a,o,s),(r[H]&4)===0)for(let l=be;l<r.length;l++){let u=r[l];oa(u[L],u,e,t,i,a)}}function DD(e,t,n,r,o){if(t)o?e.addClass(n,r):e.removeClass(n,r);else{let i=r.indexOf("-")===-1?void 0:Qt.DashCase;o==null?e.removeStyle(n,r,i):(typeof o=="string"&&o.endsWith("!important")&&(o=o.slice(0,-10),i|=Qt.Important),e.setStyle(n,r,o,i))}}function Cu(e,t,n,r,o,i,s,a,c,l,u){let d=Ne+r,p=d+o,f=_D(d,p),g=typeof l=="function"?l():l;return f[L]={type:e,blueprint:f,template:n,queries:null,viewQuery:a,declTNode:t,data:f.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:p,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 i=="function"?i():i,pipeRegistry:typeof s=="function"?s():s,firstChild:null,schemas:c,consts:g,incompleteFirstPass:!1,ssrId:u}}function _D(e,t){let n=[];for(let r=0;r<t;r++)n.push(r<e?null:Xe);return n}function wD(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=Cu(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function xu(e,t,n,r,o,i,s,a,c,l,u){let d=t.blueprint.slice();return d[xt]=o,d[H]=r|4|128|8|64|1024,(l!==null||e&&e[H]&2048)&&(d[H]|=2048),gl(d),d[Be]=d[An]=e,d[Ce]=n,d[It]=s||e&&e[It],d[xe]=a||e&&e[xe],d[zt]=c||e&&e[zt]||null,d[ht]=i,d[Gt]=TE(),d[zr]=u,d[ll]=l,d[it]=t.type==2?e[it]:d,d}function bD(e,t,n){let r=Wt(t,e),o=wD(n),i=e[It].rendererFactory,s=$h(e,xu(e,o,null,Vh(n),r,t,null,i.createRenderer(r,n),null,null,null));return e[t.index]=s}function Vh(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function Hh(e,t,n,r){if(n===0)return-1;let o=t.length;for(let i=0;i<n;i++)t.push(r),e.blueprint.push(r),e.data.push(null);return o}function $h(e,t){return e[Wr]?e[cl][pt]=t:e[Wr]=t,e[cl]=t,t}function m(e=1){Uh(Ze(),se(),Xt()+e,!1)}function Uh(e,t,n,r){if(!r)if((t[H]&3)===3){let i=e.preOrderCheckHooks;i!==null&&Bs(t,i,n)}else{let i=e.preOrderHooks;i!==null&&Vs(t,i,0,n)}Rn(n)}var ia=(function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e})(ia||{});function Zl(e,t,n,r){let o=F(null);try{let[i,s,a]=e.inputs[n],c=null;(s&ia.SignalBased)!==0&&(c=t[i][Re]),c!==null&&c.transformFn!==void 0?r=c.transformFn(r):a!==null&&(r=a.call(t,r)),e.setInput!==null?e.setInput(t,c,r,n,i):rE(t,c,i,r)}finally{F(o)}}function zh(e,t,n,r,o){let i=Xt(),s=r&2;try{Rn(-1),s&&t.length>Ne&&Uh(e,t,Ne,!1);let a=s?ae.TemplateUpdateStart:ae.TemplateCreateStart;fe(a,o,n),n(r,o)}finally{Rn(i);let a=s?ae.TemplateUpdateEnd:ae.TemplateCreateEnd;fe(a,o,n)}}function Gh(e,t,n){ND(e,t,n),(n.flags&64)===64&&AD(e,t,n)}function Iu(e,t,n=Wt){let r=t.localNames;if(r!==null){let o=t.index+1;for(let i=0;i<r.length;i+=2){let s=r[i+1],a=s===-1?n(t,e):e[s];e[o++]=a}}}function CD(e,t,n,r){let i=r.get(Eh,vh)||n===Nt.ShadowDom||n===Nt.ExperimentalIsolatedShadowDom,s=e.selectRootElement(t,i);return xD(s),s}function xD(e){ID(e)}var ID=()=>null;function TD(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function SD(e,t,n,r,o,i){let s=t[L];if(Tu(e,s,t,n,r)){On(e)&&MD(t,e.index);return}e.type&3&&(n=TD(n)),Wh(e,t,n,r,o,i)}function Wh(e,t,n,r,o,i){if(e.type&3){let s=Wt(e,t);r=i!=null?i(r,e.value||"",n):r,o.setProperty(s,n,r)}else e.type&12}function MD(e,t){let n=qt(t,e);n[H]&16||(n[H]|=64)}function ND(e,t,n){let r=n.directiveStart,o=n.directiveEnd;On(n)&&bD(t,n,e.data[r+n.componentOffset]),e.firstCreatePass||th(n,t);let i=n.initialInputs;for(let s=r;s<o;s++){let a=e.data[s],c=Ul(t,e,s,n);if(Jr(c,t),i!==null&&FD(t,s-r,c,a,n,i),ur(a)){let l=qt(n.index,t);l[Ce]=Ul(t,e,s,n)}}}function AD(e,t,n){let r=n.directiveStart,o=n.directiveEnd,i=n.index,s=ip();try{Rn(i);for(let a=r;a<o;a++){let c=e.data[a],l=t[a];Ms(a),(c.hostBindings!==null||c.hostVars!==0||c.hostAttrs!==null)&&kD(c,l)}}finally{Rn(-1),Ms(s)}}function kD(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function OD(e,t){let n=e.directiveRegistry,r=null;if(n)for(let o=0;o<n.length;o++){let i=n[o];zE(t,i.selectors,!1)&&(r??=[],ur(i)?r.unshift(i):r.push(i))}return r}function RD(e,t,n,r,o,i){let s=Wt(e,t);PD(t[xe],s,i,e.value,n,r,o)}function PD(e,t,n,r,o,i,s){if(i==null)s?.(i,r||"",o),e.removeAttribute(t,o,n);else{let a=s==null?Vr(i):s(i,r||"",o);e.setAttribute(t,o,a,n)}}function FD(e,t,n,r,o,i){let s=i[t];if(s!==null)for(let a=0;a<s.length;a+=2){let c=s[a],l=s[a+1];Zl(r,n,c,l)}}function qh(e,t,n,r,o){let i=Ne+n,s=t[L],a=o(s,t,e,r,n);t[i]=a,Yr(e,!0);let c=e.type===2;return c?(Mh(t[xe],a,e),(Yf()===0||Ds(e))&&Jr(a,t),Zf()):Jr(a,t),Os()&&(!c||!du(e))&&wu(s,t,a,e),e}function Yh(e){let t=e;return wl()?Jf():(t=t.parent,Yr(t,!1)),t}function LD(e,t){let n=e[zt];if(!n)return;let r;try{r=n.get(gn,null)}catch{r=null}r?.(t)}function Tu(e,t,n,r,o){let i=e.inputs?.[r],s=e.hostDirectiveInputs?.[r],a=!1;if(s)for(let c=0;c<s.length;c+=2){let l=s[c],u=s[c+1],d=t.data[l];Zl(d,n[l],u,o),a=!0}if(i)for(let c of i){let l=n[c],u=t.data[c];Zl(u,l,r,o),a=!0}return a}function jD(e,t){let n=qt(t,e),r=n[L];BD(r,n);let o=n[xt];o!==null&&n[zr]===null&&(n[zr]=Dh(o,n[zt])),fe(ae.ComponentStart);try{Su(r,n,n[Ce])}finally{fe(ae.ComponentEnd,n[Ce])}}function BD(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}function Su(e,t,n){Ns(t);try{let r=e.viewQuery;r!==null&&Wl(1,r,n);let o=e.template;o!==null&&zh(e,t,o,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),t[cr]?.finishViewCreation(e),e.staticContentQueries&&_h(e,t),e.staticViewQueries&&Wl(2,e.viewQuery,n);let i=e.components;i!==null&&VD(t,i)}catch(r){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),r}finally{t[H]&=-5,As()}}function VD(e,t){for(let n=0;n<t.length;n++)jD(e,t[n])}function Mu(e,t,n,r){let o=F(null);try{let i=t.tView,a=e[H]&4096?4096:16,c=xu(e,i,n,a,null,t,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null),l=e[t.index];c[sr]=l;let u=e[cr];return u!==null&&(c[cr]=u.createEmbeddedView(i)),Su(i,c,n),c}finally{F(o)}}function Nu(e,t){return!t||t.firstChild===null||uh(e)}function Wo(e,t,n,r,o=!1){if(e.type===3){let i=e.firstChild,s=i.next,a=ze(t[i.index]),c=ze(t[s.index]),l=a;for(;l!==null&&(r.push(l),l!==c);)l=l.nextSibling;return r}for(;n!==null;){if(n.type===128){n=o?n.projectionNext:n.next;continue}let i=t[n.index];if(i!==null)if(nt(i)){let a=i[Ao];a!==i[xt]&&r.push(ze(i)),i[H]&4||Zh(i,r),r.push(a)}else r.push(ze(i));let s=n.type;if(s&8)Wo(e,t,n.child,r);else if(s&32){let a=hu(n,t),c;for(;c=a();)r.push(c)}else if(s&16){let a=Bh(t,n);if(Array.isArray(a))r.push(...a);else{let c=mn(t[it]);Wo(c[L],c,a,r,!0)}}n=o?n.projectionNext:n.next}return r}function Zh(e,t){for(let n=be;n<e.length;n++){let r=e[n],o=r[L].firstChild;o!==null&&Wo(r[L],r,o,t)}}function Xh(e){if(e[lr]!==null){for(let t of e[lr])t.impl.addSequence(t);e[lr].length=0}}var Kh=[];function HD(e){return e[st]??$D(e)}function $D(e){let t=Kh.pop()??Object.create(zD);return t.lView=e,t}function UD(e){e.lView[st]!==e&&(e.lView=null,Kh.push(e))}var zD=Q(B({},xn),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{fr(e.lView)},consumerOnSignalRead(){this.lView[st]=this}});function GD(e){let t=e[st]??Object.create(WD);return t.lView=e,t}var WD=Q(B({},xn),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let t=mn(e.lView);for(;t&&!Qh(t[L]);)t=mn(t);t&&yl(t)},consumerOnSignalRead(){this.lView[st]=this}});function Qh(e){return e.type!==2}function Jh(e){if(e[hn]===null)return;let t=!0;for(;t;){let n=!1;for(let r of e[hn])if(r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()),e[hn]===null))return;t=n&&!!(e[H]&8192)}}var qD=100;function em(e,t=0){let r=e[It].rendererFactory,o=!1;o||r.begin?.();try{YD(e,t)}finally{o||r.end?.()}}function YD(e,t){let n=bl();try{Co(!0),Xl(e,t);let r=0;for(;Oo(e);){if(r===qD)throw new R(103,!1);r++,Xl(e,1)}}finally{Co(n)}}function ZD(e,t,n,r){if(dr(t))return;let o=t[H],i=!1,s=!1;Ns(t);let a=!0,c=null,l=null;i||(Qh(e)?(l=HD(t),c=un(l)):ki()===null?(a=!1,l=GD(t),c=un(l)):t[st]&&(Sn(t[st]),t[st]=null));try{gl(t),np(e.bindingStartIndex),n!==null&&zh(e,t,n,2,r);let u=(o&3)===3;if(!i)if(u){let f=e.preOrderCheckHooks;f!==null&&Bs(t,f,null)}else{let f=e.preOrderHooks;f!==null&&Vs(t,f,0,null),Ol(t,0)}if(s||XD(t),Jh(t),tm(t,0),e.contentQueries!==null&&_h(e,t),!i)if(u){let f=e.contentCheckHooks;f!==null&&Bs(t,f)}else{let f=e.contentHooks;f!==null&&Vs(t,f,1),Ol(t,1)}QD(e,t);let d=e.components;d!==null&&rm(t,d,0);let p=e.viewQuery;if(p!==null&&Wl(2,p,r),!i)if(u){let f=e.viewCheckHooks;f!==null&&Bs(t,f)}else{let f=e.viewHooks;f!==null&&Vs(t,f,2),Ol(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[Es]){for(let f of t[Es])f();t[Es]=null}i||(Xh(t),t[H]&=-73)}catch(u){let d=!1,p=u,f=t;for(;f!==null;){if(nt(f)){f=f[Be];continue}let g=f[ul];if(g)try{let D=t[it][Ce],y=D?.constructor,E={declarationInstance:D,declarationType:y,caughtBy:g};g(yp(p),E),d=!0;break}catch(D){p=D}f=f[Be]}if(!d)throw i||fr(t),p}finally{l!==null&&(Tn(l,c),a&&UD(l)),As()}}function tm(e,t){for(let n=fh(e);n!==null;n=ph(n))for(let r=be;r<n.length;r++){let o=n[r];nm(o,t)}}function XD(e){for(let t=fh(e);t!==null;t=ph(t)){if(!(t[H]&2))continue;let n=t[ko];for(let r=0;r<n.length;r++){let o=n[r];yl(o)}}}function KD(e,t,n){fe(ae.ComponentStart);let r=qt(t,e);try{nm(r,n)}finally{fe(ae.ComponentEnd,r[Ce])}}function nm(e,t){Cs(e)&&Xl(e,t)}function Xl(e,t){let r=e[L],o=e[H],i=e[st],s=!!(t===0&&o&16);if(s||=!!(o&64&&t===0),s||=!!(o&1024),s||=!!(i?.dirty&&Nr(i)),s||=!1,i&&(i.dirty=!1),e[H]&=-9217,s)ZD(r,e,r.template,e[Ce]);else if(o&8192){let a=F(null);try{Jh(e),tm(e,1);let c=r.components;c!==null&&rm(e,c,1),Xh(e)}finally{F(a)}}}function rm(e,t,n){for(let r=0;r<t.length;r++)KD(e,t[r],n)}function QD(e,t){let n=e.hostBindingOpCodes;if(n!==null)try{for(let r=0;r<n.length;r++){let o=n[r];if(o<0)Rn(~o);else{let i=o,s=n[++r],a=n[++r];op(s,i);let c=t[i];fe(ae.HostBindingsUpdateStart,c);try{a(2,c)}finally{fe(ae.HostBindingsUpdateEnd,c)}}}}finally{Rn(-1)}}function Au(e,t){let n=bl()?64:1088;for(e[It].changeDetectionScheduler?.notify(t);e;){e[H]|=n;let r=mn(e);if(qr(e)&&!r)return e;e=r}return null}function JD(e,t,n,r){return[e,!0,0,t,null,r,null,n,null,null]}function om(e,t){let n=be+t;if(n<e.length)return e[n]}function ku(e,t,n,r=!0){let o=t[L];if(e_(o,t,e,n),r){let s=Yl(n,e),a=t[xe],c=a.parentNode(e[Ao]);c!==null&&cD(o,e[ht],a,t,c,s)}let i=t[zr];i!==null&&i.firstChild!==null&&(i.firstChild=null)}function im(e,t){let n=Ou(e,t);return n!==void 0&&_u(n[L],n),n}function Ou(e,t){if(e.length<=be)return;let n=be+t,r=e[n];if(r){let o=r[sr];o!==null&&o!==e&&Du(o,r),t>0&&(e[n-1][pt]=r[pt]);let i=ol(e,be+t);aD(r[L],r);let s=i[cr];s!==null&&s.detachView(i[L]),r[Be]=null,r[pt]=null,r[H]&=-129}return r}function e_(e,t,n,r){let o=be+r,i=n.length;r>0&&(n[o-1][pt]=t),r<i-be?(t[pt]=n[o],Of(n,be+r,t)):(n.push(t),t[pt]=null),t[Be]=n;let s=t[sr];s!==null&&n!==s&&sm(s,t);let a=t[cr];a!==null&&a.insertView(e),xs(t),t[H]|=128}function sm(e,t){let n=e[ko],r=t[Be];if(kn(r))e[H]|=2;else{let o=r[Be][it];t[it]!==o&&(e[H]|=2)}n===null?e[ko]=[t]:n.push(t)}var Ws=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let t=this._lView,n=t[L];return Wo(n,t,n.firstChild,[])}constructor(t,n){this._lView=t,this._cdRefInjectingView=n}get context(){return this._lView[Ce]}set context(t){this._lView[Ce]=t}get destroyed(){return dr(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let t=this._lView[Be];if(nt(t)){let n=t[$f],r=n?n.indexOf(this):-1;r>-1&&(Ou(t,r),ol(n,r))}this._attachedToViewContainer=!1}_u(this._lView[L],this._lView)}onDestroy(t){Is(this._lView,t)}markForCheck(){Au(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[H]&=-129}reattach(){xs(this._lView),this._lView[H]|=128}detectChanges(){this._lView[H]|=1024,em(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new R(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let t=qr(this._lView),n=this._lView[sr];n!==null&&!t&&Du(n,this._lView),jh(this._lView[L],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new R(902,!1);this._appRef=t;let n=qr(this._lView),r=this._lView[sr];r!==null&&!n&&sm(r,this._lView),xs(this._lView)}};function sa(e,t,n,r,o){let i=e.data[t];if(i===null)i=t_(e,t,n,r,o),rp()&&(i.flags|=32);else if(i.type&64){i.type=n,i.value=r,i.attrs=o;let s=Qf();i.injectorIndex=s===null?-1:s.injectorIndex}return Yr(i,!0),i}function t_(e,t,n,r,o){let i=_l(),s=wl(),a=s?i:i&&i.parent,c=e.data[t]=r_(e,a,n,t,r,o);return n_(e,c,i,s),c}function n_(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function r_(e,t,n,r,o,i){let s=t?t.injectorIndex:-1,a=0;return Kf()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,controlDirectiveIndex:-1,customControlIndex:-1,propertyBindings:null,flags:a,providerIndexes:0,value:o,namespace:Tl(),attrs:i,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}}function o_(e){let t=e[dl]??[],r=e[Be][xe],o=[];for(let i of t)i.data[yh]!==void 0?o.push(i):i_(i,r);e[dl]=o}function i_(e,t){let n=0,r=e.firstChild;if(r){let o=e.data[gh];for(;n<o;){let i=r.nextSibling;Sh(t,r,!1),r=i,n++}}}var s_=()=>null,a_=()=>null;function c_(e,t){return s_(e,t)}function am(e,t,n){return a_(e,t,n)}var cm=class{},gr=class{};var lm=(()=>{class e{static \u0275prov=le({token:e,providedIn:"root",factory:()=>null})}return e})();function um(e){return e.debugInfo?.className||e.type.name||null}var Hs={},qs=class{injector;parentInjector;constructor(t,n){this.injector=t,this.parentInjector=n}get(t,n,r){let o=this.injector.get(t,Hs,r);return o!==Hs||n===Hs?o:this.parentInjector.get(t,n,r)}};function Ru(e,t,n){return e[t]=n}function l_(e,t){return e[t]}function At(e,t,n){if(n===Xe)return!1;let r=e[t];return Object.is(r,n)?!1:(e[t]=n,!0)}function dm(e,t,n,r){let o=At(e,t,n);return At(e,t+1,r)||o}function $s(e,t,n){return function r(o){let i=r.__ngNativeEl__;i!==void 0&&ME(o,i);let s=On(e)?qt(e.index,t):t;Au(s,5);let a=t[Ce],c=Fp(t,a,n,o),l=r.__ngNextListenerFn__;for(;l;)c=Fp(t,a,l,o)&&c,l=l.__ngNextListenerFn__;return c}}function Fp(e,t,n,r){let o=F(null);try{return fe(ae.OutputStart,t,n),n(r)!==!1}catch(i){return LD(e,i),!1}finally{fe(ae.OutputEnd,t,n),F(o)}}function fm(e,t,n,r,o,i,s,a){let c=Ds(e),l=!1,u=null;if(!r&&c&&(u=d_(t,n,i,e.index)),u!==null){let d=u.__ngLastListenerFn__||u;d.__ngNextListenerFn__=s,u.__ngLastListenerFn__=s,l=!0}else{let d=Wt(e,n),p=r?r(d):d;AE(n,p,i,a),r||(a.__ngNativeEl__=d);let f=o.listen(p,i,a);if(!u_(i)){let g=r?D=>r(ze(D[e.index])):e.index;pm(g,t,n,i,a,f,!1)}}return l}function u_(e){return e.startsWith("animation")||e.startsWith("transition")}function d_(e,t,n,r){let o=e.cleanup;if(o!=null)for(let i=0;i<o.length-1;i+=2){let s=o[i];if(s===n&&o[i+1]===r){let a=t[Gr],c=o[i+2];return a&&a.length>c?a[c]:null}typeof s=="string"&&(i+=2)}return null}function pm(e,t,n,r,o,i,s){let a=t.firstCreatePass?qf(t):null,c=Wf(n),l=c.length;c.push(o,i),a&&a.push(r,e,l,(l+1)*(s?-1:1))}function Lp(e,t,n,r,o,i){let s=t[n],a=t[L],l=a.data[n].outputs[r],d=s[l].subscribe(i);pm(e.index,a,t,o,i,d,!0)}var Kl=Symbol("BINDING");var vr=new G("");function Ys(e,t,n){let r=n?e.styles:null,o=n?e.classes:null,i=0;if(t!==null)for(let s=0;s<t.length;s++){let a=t[s];if(typeof a=="number")i=a;else if(i==1)o=ls(o,a);else if(i==2){let c=a,l=t[++s];r=ls(r,c+": "+l+";")}}n?e.styles=r:e.stylesWithoutHost=r,n?e.classes=o:e.classesWithoutHost=o}function Xo(e,t=0){let n=se();if(n===null)return J(e,t);let r=Zt();return sh(r,n,ot(e),t)}function f_(e,t,n,r,o){let i=r===null?null:{"":-1},s=o(e,n);if(s!==null){let a=s,c=null,l=null;for(let u of s)if(u.resolveHostDirectives!==null){[a,c,l]=u.resolveHostDirectives(s);break}m_(e,t,n,a,i,c,l)}i!==null&&r!==null&&p_(n,r,i)}function p_(e,t,n){let r=e.localNames=[];for(let o=0;o<t.length;o+=2){let i=n[t[o+1]];if(i==null)throw new R(-301,!1);r.push(t[o],i)}}function h_(e,t,n){t.componentOffset=n,(e.components??=[]).push(t.index)}function m_(e,t,n,r,o,i,s){let a=r.length,c=null;for(let p=0;p<a;p++){let f=r[p];c===null&&ur(f)&&(c=f,h_(e,n,p)),EE(th(n,t),e,f.type)}__(n,e.data.length,a),c?.viewProvidersResolver&&c.viewProvidersResolver(c);for(let p=0;p<a;p++){let f=r[p];f.providersResolver&&f.providersResolver(f)}let l=!1,u=!1,d=Hh(e,t,a,null);a>0&&(n.directiveToIndex=new Map);for(let p=0;p<a;p++){let f=r[p];if(n.mergedAttrs=na(n.mergedAttrs,f.hostAttrs),y_(e,n,t,d,f),D_(d,f,o),s!==null&&s.has(f)){let[D,y]=s.get(f);n.directiveToIndex.set(f.type,[d,D+n.directiveStart,y+n.directiveStart])}else(i===null||!i.has(f))&&n.directiveToIndex.set(f.type,d);f.contentQueries!==null&&(n.flags|=4),(f.hostBindings!==null||f.hostAttrs!==null||f.hostVars!==0)&&(n.flags|=64);let g=f.type.prototype;!l&&(g.ngOnChanges||g.ngOnInit||g.ngDoCheck)&&((e.preOrderHooks??=[]).push(n.index),l=!0),!u&&(g.ngOnChanges||g.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(n.index),u=!0),d++}g_(e,n,i)}function g_(e,t,n){for(let r=t.directiveStart;r<t.directiveEnd;r++){let o=e.data[r];if(n===null||!n.has(o))jp(0,t,o,r),jp(1,t,o,r),Vp(t,r,!1);else{let i=n.get(o);Bp(0,t,i,r),Bp(1,t,i,r),Vp(t,r,!0)}}}function jp(e,t,n,r){let o=e===0?n.inputs:n.outputs;for(let i in o)if(Object.hasOwn(o,i)){let s;e===0?s=t.inputs??={}:s=t.outputs??={},s[i]??=[],s[i].push(r),hm(t,i)}}function Bp(e,t,n,r){let o=e===0?n.inputs:n.outputs;for(let i in o)if(Object.hasOwn(o,i)){let s=o[i],a;e===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[s]??=[],a[s].push(r,i),hm(t,s)}}function hm(e,t){t==="class"?e.flags|=8:t==="style"&&(e.flags|=16)}function Vp(e,t,n){let{attrs:r,inputs:o,hostDirectiveInputs:i}=e;if(r===null||!n&&o===null||n&&i===null||pu(e)){e.initialInputs??=[],e.initialInputs.push(null);return}let s=null,a=0;for(;a<r.length;){let c=r[a];if(c===0){a+=4;continue}else if(c===5){a+=2;continue}else if(typeof c=="number")break;if(!n&&Object.hasOwn(o,c)){let l=o[c];for(let u of l)if(u===t){s??=[],s.push(c,r[a+1]);break}}else if(n&&Object.hasOwn(i,c)){let l=i[c];for(let u=0;u<l.length;u+=2)if(l[u]===t){s??=[],s.push(l[u+1],r[a+1]);break}}a+=2}e.initialInputs??=[],e.initialInputs.push(s)}function y_(e,t,n,r,o){e.data[r]=o;let i=o.factory||(o.factory=er(o.type,!0)),s=new Uo(i,ur(o),Xo,null);e.blueprint[r]=s,n[r]=s,v_(e,t,r,Hh(e,n,o.hostVars,Xe),o)}function v_(e,t,n,r,o){let i=o.hostBindings;if(i){let s=e.hostBindingOpCodes;s===null&&(s=e.hostBindingOpCodes=[]);let a=~t.index;E_(s)!=a&&s.push(a),s.push(n,r,i)}}function E_(e){let t=e.length;for(;t>0;){let n=e[--t];if(typeof n=="number"&&n<0)return n}return 0}function D_(e,t,n){if(n){if(t.exportAs)for(let r=0;r<t.exportAs.length;r++)n[t.exportAs[r]]=e;ur(t)&&(n[""]=e)}}function __(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function mm(e,t,n,r,o,i,s,a){let c=t[L],l=c.consts,u=Yt(l,s),d=sa(c,e,n,r,u);return i&&f_(c,t,d,Yt(l,a),o),d.mergedAttrs=na(d.mergedAttrs,d.attrs),d.attrs!==null&&Ys(d,d.attrs,!1),d.mergedAttrs!==null&&Ys(d,d.mergedAttrs,!0),c.queries!==null&&c.queries.elementStart(c,d),d}function gm(e,t){aE(e,t),fl(t)&&e.queries.elementEnd(t)}function w_(e,t,n,r,o,i){let s=t.consts,a=Yt(s,o),c=sa(t,e,n,r,a);if(c.mergedAttrs=na(c.mergedAttrs,c.attrs),i!=null){let l=Yt(s,i);c.localNames=[];for(let u=0;u<l.length;u+=2)c.localNames.push(l[u],-1)}return c.attrs!==null&&Ys(c,c.attrs,!1),c.mergedAttrs!==null&&Ys(c,c.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,c),c}var ym=typeof ShadowRoot<"u",b_=typeof Document<"u";function C_(e){return Object.keys(e).map(t=>{let[n,r,o]=e[t],i={propName:n,templateName:t,isSignal:(r&ia.SignalBased)!==0};return o&&(i.transform=o),i})}function x_(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function I_(e,t,n){let r=t instanceof tt?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new qs(n,r):n}function T_(e){let t=e.get(gr,null);if(t===null)throw new R(407,!1);let n=e.get(lm,null),r=e.get(Ut,null),o=e.get(Jt,null,{optional:!0});return{rendererFactory:t,sanitizer:n,changeDetectionScheduler:r,ngReflect:!1,tracingService:o}}function S_(e,t,n){let r=vm(e);return Ih(t,r,r==="svg"?pl:r==="math"?Uf:n)}function M_(e){if((e&&"localName"in e&&typeof e.localName=="string"?e.localName:e?.tagName)?.toLowerCase()==="script")throw new R(905,!1)}function vm(e){return(e.selectors[0][0]||"div").toLowerCase()}var Zs=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=C_(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=x_(this.componentDef.outputs),this.cachedOutputs}constructor(t,n){this.componentDef=t,this.ngModule=n,this.componentType=t.type,this.selector=YE(t.selectors),this.ngContentSelectors=t.ngContentSelectors??[],this.isBoundToModule=!!n}create(t,n,r,o,i,s,a,c){fe(ae.DynamicComponentStart);let l=F(null);try{let u=this.componentDef,d=I_(u,o||this.ngModule,t),p=T_(d),f=p.tracingService;return f&&f.componentCreate?f.componentCreate(um(u),()=>this.createComponentRef(p,d,n,r,i,s,a,c)):this.createComponentRef(p,d,n,r,i,s,a,c)}finally{F(l)}}createComponentRef(t,n,r,o,i,s,a,c){let l=this.componentDef,u=N_(o,l,s,i,c),d=t.rendererFactory.createRenderer(null,l),p=o?CD(d,o,l.encapsulation,n):S_(l,d,a??null);M_(p);let f=n.get(vr,null),g=A_(p,()=>n.get(Ve,null)??mh());f&&f.addHost(g);let D=s?.some(Hp)||i?.some(h=>typeof h!="function"&&h.bindings.some(Hp)),y=xu(null,u,null,512|Vh(l),null,null,t,d,n,null,Dh(p,n,!0));f&&ym&&g instanceof ShadowRoot&&Is(y,()=>{f.removeHost(g)}),y[Ne]=p,Ns(y);let E=null;try{let h=mm(Ne,y,2,"#host",()=>u.directiveRegistry,!0,0);Mh(d,p,h),Jr(p,y),Gh(u,y,h),wh(u,h,y),gm(u,h),r!==void 0&&O_(h,this.ngContentSelectors,r),E=qt(h.index,y),y[Ce]=E[Ce],Su(u,y,null)}catch(h){throw E!==null&&zl(E),zl(y),h}finally{fe(ae.DynamicComponentEnd),As()}return new Xs(this.componentType,y,!!D)}};function N_(e,t,n,r,o){let i=e?["ng-version","22.2.0"]:ZE(t.selectors[0]),s=null,a=null,c=0;if(n)for(let d of n)c+=d[Kl].requiredVars,d.create&&(d.targetIdx=0,(s??=[]).push(d)),d.update&&(d.targetIdx=0,(a??=[]).push(d));if(r)for(let d=0;d<r.length;d++){let p=r[d];if(typeof p!="function")for(let f of p.bindings){c+=f[Kl].requiredVars;let g=d+1;f.create&&(f.targetIdx=g,(s??=[]).push(f)),f.update&&(f.targetIdx=g,(a??=[]).push(f))}}let l=[t];if(r)for(let d of r){let p=typeof d=="function"?d:d.type,f=ps(p);l.push(f)}return Cu(0,null,k_(s,a),1,c,l,null,null,null,[i],null)}function A_(e,t){let n=e.getRootNode?.();return b_&&n instanceof Document?n.head:n&&ym&&n instanceof ShadowRoot?n:t().head}function k_(e,t){return!e&&!t?null:n=>{if(n&1&&e)for(let r of e)r.create();if(n&2&&t)for(let r of t)r.update()}}function Hp(e){let t=e[Kl].kind;return t==="input"||t==="twoWay"}var Xs=class extends cm{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(t,n,r){super(),this._rootLView=n,this._hasInputBindings=r,this._tNode=ws(n[L],Ne),this.location=lh(this._tNode,n),this.instance=qt(this._tNode.index,n)[Ce],this.hostView=this.changeDetectorRef=new Ws(n,void 0),this.componentType=t}setInput(t,n){this._hasInputBindings;let r=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(t)&&Object.is(this.previousInputValues.get(t),n))return;let o=this._rootLView,i=Tu(r,o[L],o,t,n);this.previousInputValues.set(t,n);let s=qt(r.index,o);Au(s,1)}get injector(){return new zo(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}};function O_(e,t,n){let r=e.projection=[];for(let o=0;o<t.length;o++){let i=n[o];r.push(i!=null&&i.length?Array.from(i):null)}}var R_=()=>!1;function P_(e,t,n){return R_(e,t,n)}function aa(e){return!!e&&typeof e.then=="function"}function Pu(e){return!!e&&typeof e.subscribe=="function"}var qo=class{};var Yo=class extends qo{injector;instance=null;constructor(t){super();let n=new tr([...t.providers,{provide:qo,useValue:this}],t.parent||No(),t.debugName,new Set(["environment"]));this.injector=n,t.runEnvironmentInitializers&&n.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}};function Em(e,t,n=null){return new Yo({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var F_=(()=>{class e{_injector;cachedInjectors=new Map;constructor(n){this._injector=n}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let r=sl(!1,n.type),o=r.length>0?Em([r],this._injector,""):null;this.cachedInjectors.set(n,o)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=le({token:e,providedIn:"environment",factory:()=>new e(J(tt))})}return e})();function Ie(e){return Kp(()=>{let t=V_(e),n=Q(B({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==lu.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?o=>o.get(F_).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Nt.Emulated,styles:e.styles||$t,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&&to("NgStandalone"),H_(n);let r=e.dependencies;return n.directiveDefs=$p(r,L_),n.pipeDefs=$p(r,Mf),n.id=$_(n),n})}function L_(e){return To(e)||ps(e)}function j_(e,t){if(e==null)return vs;let n={};for(let r in e)if(Object.hasOwn(e,r)){let o=e[r],i,s,a,c;Array.isArray(o)?(a=o[0],i=o[1],s=o[2]??i,c=o[3]||null):(i=o,s=o,a=ia.None,c=null),n[i]=[r,a,c],t[i]=s}return n}function B_(e){if(e==null)return vs;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Fu(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function V_(e){let t={};return{type:e.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||vs,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||$t,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:j_(e.inputs,t),outputs:B_(e.outputs),debugInfo:null}}function H_(e){e.features?.forEach(t=>t(e))}function $p(e,t){return e?()=>{let n=typeof e=="function"?e():e,r=[];for(let o of n){let i=t(o);i!==null&&r.push(i)}return r}:null}function $_(e){let t=0,n=typeof e.consts=="function"?"":e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let i of r.join("|"))t=Math.imul(31,t)+i.charCodeAt(0)<<0;return t+=2147483648,"c"+t}var Dm=new G("");var Lu=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=S(Dm,{optional:!0})??[];injector=S(Ct);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let o of this.appInits){let i=Ur(this.injector,o);if(aa(i))n.push(i);else if(Pu(i)){let s=new Promise((a,c)=>{i.subscribe({complete:a,error:c})});n.push(s)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(o=>{this.reject(o)}),n.length===0&&r(),this.initialized=!0}static \u0275fac=function(r){return new(r||e)};static \u0275prov=Fn({token:e,factory:e.\u0275fac})}return e})();function U_(e,t,n,r,o,i,s,a){if(n.firstCreatePass){e.mergedAttrs=na(e.mergedAttrs,e.attrs);let u=e.tView=Cu(2,e,o,i,s,n.directiveRegistry,n.pipeRegistry,null,n.schemas,n.consts,null);n.queries!==null&&(n.queries.template(n,e),u.queries=n.queries.embeddedTView(e))}a&&(e.flags|=a),Yr(e,!1);let c=z_(n,t,e,r);Os()&&wu(n,t,c,e),Jr(c,t);let l=JD(c,t,c,e);t[r+Ne]=l,$h(t,l),P_(l,e,t)}function Ks(e,t,n,r,o,i,s,a,c,l,u){let d=n+Ne,p;if(t.firstCreatePass){if(p=sa(t,d,4,s||null,a||null),l!=null){let f=Yt(t.consts,l);p.localNames=[];for(let g=0;g<f.length;g+=2)p.localNames.push(f[g],-1)}}else p=t.data[d];return U_(p,e,t,n,r,o,i,c),l!=null&&Iu(e,p,u),p}var z_=G_;function G_(e,t,n,r){return Rs(!0),t[xe].createComment("")}var ju=new G("");var _m=new G("");function wm(){vc(()=>{let e="";throw new R(-600,e)})}var W_=10;var ca=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=S(gn);afterRenderManager=S(mu);zonelessEnabled=S(jo);rootEffectScheduler=S(Ls);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new bt;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=S(mr);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(Ht(n=>!n))}constructor(){S(Jt,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:o=>{o&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=S(tt);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){return this.bootstrapImpl(n,r)}bootstrapImpl(n,r,o=Ct.NULL){return this._injector.get(Ue).run(()=>{if(fe(ae.BootstrapComponentStart),!this._injector.get(Lu).done){let E="";throw new R(405,E)}let a=To(n),c=this._injector.get(qo),l=new Zs(a,c);this.componentTypes.push(n);let{hostElement:u,directives:d,bindings:p}=q_(r),f=u||l.selector,g=l.create(o,[],f,c.injector,d,p),D=g.location.nativeElement,y=g.injector.get(ju,null);return y?.registerApplication(D),g.onDestroy(()=>{this.detachView(g.hostView),$o(this.components,g),y?.unregisterApplication(D)}),this._loadComponent(g),fe(ae.BootstrapComponentEnd,g),g})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){fe(ae.ChangeDetectionStart),this.tracingSnapshot!==null?this.tracingSnapshot.run(ra.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw fe(ae.ChangeDetectionEnd),new R(101,!1);let n=F(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,F(n),this.afterTick.next(),fe(ae.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(gr,null,{optional:!0}));let n=0;for(;this.dirtyFlags!==0&&n++<W_;){fe(ae.ChangeDetectionSyncStart);try{this.synchronizeOnce()}finally{fe(ae.ChangeDetectionSyncEnd)}}}synchronizeOnce(){this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush());let n=!1;if(this.dirtyFlags&7){let r=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:o}of this.allViews){if(!r&&!Oo(o))continue;let i=r&&!this.zonelessEnabled?0:1;em(o,i),n=!0}if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}n||(this._rendererFactory?.begin?.(),this._rendererFactory?.end?.()),this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:n})=>Oo(n))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(n){let r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){let r=n;$o(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView);try{this.tick()}catch(o){this.internalErrorHandler(o)}this.components.push(n),this._injector.get(_m,[]).forEach(o=>o(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>$o(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new R(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(r){return new(r||e)};static \u0275prov=Fn({token:e,factory:e.\u0275fac})}return e})();function q_(e){return e===void 0||typeof e=="string"||e instanceof Element?{hostElement:e}:e}function $o(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function ne(e,t,n,r){let o=se(),i=pr();if(At(o,i,t)){let s=Ze(),a=ks();RD(a,o,e,t,n,r)}return ne}var Ql=class{destroy(t){}updateValue(t,n){}swap(t,n){let r=Math.min(t,n),o=Math.max(t,n),i=this.detach(o);if(o-r>1){let s=this.detach(r);this.attach(r,i),this.attach(o,s)}else this.attach(r,i)}move(t,n){this.attach(n,this.detach(t))}};function Fl(e,t,n,r,o){return e===n&&Object.is(t,r)?1:Object.is(o(e,t),o(n,r))?-1:0}function Y_(e,t,n,r){let o,i,s=0,a=e.length-1,c=void 0;if(Array.isArray(t)){F(r);let l=t.length-1;for(F(null);s<=a&&s<=l;){let u=e.at(s),d=t[s],p=Fl(s,u,s,d,n);if(p!==0){p<0&&e.updateValue(s,d),s++;continue}let f=e.at(a),g=t[l],D=Fl(a,f,l,g,n);if(D!==0){D<0&&e.updateValue(a,g),a--,l--;continue}let y=n(s,u),E=n(a,f),h=n(s,d);if(Object.is(h,E)){let I=n(l,g);Object.is(I,y)?(e.swap(s,a),e.updateValue(a,g),l--,a--):e.move(a,s),e.updateValue(s,d),s++;continue}if(o??=new Qs,i??=zp(e,s,a,n),Jl(e,o,s,h))e.updateValue(s,d),s++,a++;else if(i.has(h))o.set(y,e.detach(s)),a--;else{let I=e.create(s,t[s]);e.attach(s,I),s++,a++}}for(;s<=l;)Up(e,o,n,s,t[s]),s++}else if(t!=null){F(r);let l=t[Symbol.iterator]();F(null);let u=l.next();for(;!u.done&&s<=a;){let d=e.at(s),p=u.value,f=Fl(s,d,s,p,n);if(f!==0)f<0&&e.updateValue(s,p),s++,u=l.next();else{o??=new Qs,i??=zp(e,s,a,n);let g=n(s,p);if(Jl(e,o,s,g))e.updateValue(s,p),s++,a++,u=l.next();else if(!i.has(g))e.attach(s,e.create(s,p)),s++,a++,u=l.next();else{let D=n(s,d);o.set(D,e.detach(s)),a--}}}for(;!u.done;)Up(e,o,n,e.length,u.value),u=l.next()}for(;s<=a;)e.destroy(e.detach(a--));o?.forEach(l=>{e.destroy(l)})}function Jl(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Up(e,t,n,r,o){if(Jl(e,t,r,n(r,o)))e.updateValue(r,o);else{let i=e.create(r,o);e.attach(r,i)}}function zp(e,t,n,r){let o=new Set;for(let i=t;i<=n;i++)o.add(r(i,e.at(i)));return o}var Qs=class{kvMap=new Map;_vMap=void 0;has(t){return this.kvMap.has(t)}delete(t){if(!this.has(t))return!1;let n=this.kvMap.get(t);return this._vMap!==void 0&&this._vMap.has(n)?(this.kvMap.set(t,this._vMap.get(n)),this._vMap.delete(n)):this.kvMap.delete(t),!0}get(t){return this.kvMap.get(t)}set(t,n){if(this.kvMap.has(t)){let r=this.kvMap.get(t);this._vMap===void 0&&(this._vMap=new Map);let o=this._vMap;for(;o.has(r);)r=o.get(r);o.set(r,n)}else this.kvMap.set(t,n)}forEach(t){for(let[n,r]of this.kvMap)if(t(r,n),this._vMap!==void 0){let o=this._vMap;for(;o.has(r);)r=o.get(r),t(r,n)}}};function ee(e,t,n,r,o,i,s,a){to("NgControlFlow");let c=se(),l=Ze(),u=Yt(l.consts,i);return Ks(c,l,e,t,n,r,o,u,256,s,a),Bu}function Bu(e,t,n,r,o,i,s,a){return to("NgControlFlow"),Z_(e,t,n,r,o,i,s,a),Bu}function Z_(e,t,n,r,o,i,s,a){let c=se(),l=Ze(),u=Yt(l.consts,i);Ks(c,l,e,t,n,r,o,u,512,s,a)}function te(e,t){to("NgControlFlow");let n=se(),r=pr(),o=n[r]!==Xe?n[r]:-1,i=o!==-1?Js(n,Ne+o):void 0,s=0;if(At(n,r,e)){let a=F(null);try{if(i!==void 0&&im(i,s),e!==-1){let c=Ne+e,l=Js(n,c),u=ru(n[L],c),d=am(l,u,n),p=Mu(n,u,t,{dehydratedView:d});ku(l,p,s,Nu(u,d))}}finally{F(a)}}else if(i!==void 0){let a=om(i,s);a!==void 0&&(a[Ce]=t)}}var eu=class{lContainer;$implicit;$index;constructor(t,n,r){this.lContainer=t,this.$implicit=n,this.$index=r}get $count(){return this.lContainer.length-be}};function gt(e,t){return t}var tu=class{hasEmptyBlock;trackByFn;liveCollection;constructor(t,n,r){this.hasEmptyBlock=t,this.trackByFn=n,this.liveCollection=r}};function me(e,t,n,r,o,i,s,a,c,l,u,d,p){to("NgControlFlow");let f=se(),g=Ze(),D=c!==void 0,y=se(),E=a?s.bind(y[it][Ce]):s,h=new tu(D,E);y[Ne+e]=h,Ks(f,g,e+1,t,n,r,o,Yt(g.consts,i),256),D&&Ks(f,g,e+2,c,l,u,d,Yt(g.consts,p),512)}var nu=class extends Ql{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(t,n,r){super(),this.lContainer=t,this.hostLView=n,this.templateTNode=r}get length(){return this.lContainer.length-be}at(t){return this.getLView(t)[Ce].$implicit}attach(t,n){let r=n[zr];this.needsIndexUpdate||=t!==this.length,ku(this.lContainer,n,t,Nu(this.templateTNode,r)),X_(this.lContainer,t)}detach(t){return this.needsIndexUpdate||=t!==this.length-1,K_(this.lContainer,t),Q_(this.lContainer,t)}create(t,n){let r=c_(this.lContainer,this.templateTNode.tView.ssrId);return Mu(this.hostLView,this.templateTNode,new eu(this.lContainer,n,t),{dehydratedView:r})}destroy(t){_u(t[L],t)}updateValue(t,n){this.getLView(t)[Ce].$implicit=n}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let t=0;t<this.length;t++)this.getLView(t)[Ce].$index=t}getLView(t){return J_(this.lContainer,t)}};function ge(e){let t=F(null),n=Xt();try{let r=se(),o=r[L],i=r[n],s=n+1,a=Js(r,s);if(i.liveCollection===void 0){let l=ru(o,s);i.liveCollection=new nu(a,r,l)}else i.liveCollection.reset();let c=i.liveCollection;if(Y_(c,e,i.trackByFn,t),c.updateIndexes(),i.hasEmptyBlock){let l=pr(),u=c.length===0;if(At(r,l,u)){let d=n+2,p=Js(r,d);if(u){let f=ru(o,d),g=am(p,f,r),D=Mu(r,f,void 0,{dehydratedView:g});ku(p,D,0,Nu(f,g))}else o.firstUpdatePass&&o_(p),im(p,0)}}}finally{F(t)}}function Js(e,t){return e[t]}function X_(e,t){if(e.length<=be)return;let n=be+t,r=e[n];r&&Fh(r)}function K_(e,t){if(e.length<=be)return;let n=be+t,r=e[n];r&&Rh(r)}function Q_(e,t){return Ou(e,t)}function J_(e,t){return om(e,t)}function ru(e,t){return ws(e,t)}function he(e,t,n){let r=se(),o=pr();if(At(r,o,t)){let i=Ze(),s=ks();SD(s,r,e,t,r[xe],n)}return he}function ou(e,t,n,r,o){Tu(t,e,n,o?"class":"style",r)}function M(e,t,n,r){let o=se(),i=o[L],s=e+Ne,a=i.firstCreatePass?mm(s,o,2,t,OD,Xf(),n,r):i.data[s];if(On(a)){let c=o[It].tracingService;if(c&&c.componentCreate){let l=i.data[a.directiveStart+a.componentOffset];return c.componentCreate(um(l),()=>(Gp(e,t,o,a,r),M))}}return Gp(e,t,o,a,r),M}function Gp(e,t,n,r,o){if(qh(r,n,e,t,bm),Ds(r)){let i=n[L];Gh(i,n,r),wh(i,r,n)}o!=null&&Iu(n,r)}function N(){let e=Ze(),t=Zt(),n=Yh(t);return e.firstCreatePass&&gm(e,n),El(n)&&Dl(),vl(),n.classesWithoutHost!=null&&lE(n)&&ou(e,n,se(),n.classesWithoutHost,!0),n.stylesWithoutHost!=null&&uE(n)&&ou(e,n,se(),n.stylesWithoutHost,!1),N}function Ke(e,t,n,r){return M(e,t,n,r),N(),Ke}function b(e,t,n,r){let o=se(),i=o[L],s=e+Ne,a=i.firstCreatePass?w_(s,i,2,t,n,r):i.data[s];return qh(a,o,e,t,bm),r!=null&&Iu(o,a),b}function C(){let e=Zt(),t=Yh(e);return El(t)&&Dl(),vl(),C}function ye(e,t,n,r){return b(e,t,n,r),C(),ye}var bm=(e,t,n,r,o)=>(Rs(!0),Ih(t[xe],r,Tl()));function ue(){return se()}function re(e,t,n){let r=se(),o=pr();if(At(r,o,t)){let i=Ze(),s=ks();Wh(s,r,e,t,r[xe],n)}return re}var Vo=void 0;function ew(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return t===1&&n===0?1:5}var tw=["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"]],Vo,[["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"]],Vo,[["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\u202Fa","h:mm:ss\u202Fa","h:mm:ss\u202Fa z","h:mm:ss\u202Fa zzzz"],["{1}, {0}",Vo,Vo,Vo],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",ew],Ll=Object.create(null);function la(e){let t=nw(e),n=Wp(t);if(n)return n;let r=t.split("-")[0];if(n=Wp(r),n)return n;if(r==="en")return tw;throw new R(701,!1)}function Wp(e){if(!(e in Ll)){let t=or.ng&&or.ng.common&&or.ng.common.locales&&or.ng.common.locales[e];return t!==void 0&&(Ll[e]=t),t}return Ll[e]}var no={LocaleId:0,DayPeriodsFormat:1,DayPeriodsStandalone:2,DaysFormat:3,DaysStandalone:4,MonthsFormat:5,MonthsStandalone:6,Eras:7,FirstDayOfWeek:8,WeekendRange:9,DateFormat:10,TimeFormat:11,DateTimeFormat:12,NumberSymbols:13,NumberFormats:14,CurrencyCode:15,CurrencySymbol:16,CurrencyName:17,Currencies:18,Directionality:19,PluralCase:20,ExtraData:21};function nw(e){return e.toLowerCase().replace(/_/g,"-")}var Ko="en-US";var rw=Ko;function Cm(e){typeof e=="string"&&(rw=e.toLowerCase().replace(/_/g,"-"))}function we(e,t,n){let r=se(),o=Ze(),i=Zt();return ow(o,r,r[xe],i,e,t,n),we}function W(e,t,n){let r=se(),o=Ze(),i=Zt();return(i.type&3||n)&&fm(i,o,r,n,r[xe],e,t,$s(i,r,t)),W}function ow(e,t,n,r,o,i,s){let a=!0,c=null;if((r.type&3||s)&&(c??=$s(r,t,i),fm(r,e,t,s,n,o,i,c)&&(a=!1)),a){let l=r.outputs?.[o],u=r.hostDirectiveOutputs?.[o];if(u&&u.length)for(let d=0;d<u.length;d+=2){let p=u[d],f=u[d+1];c??=$s(r,t,i),Lp(r,t,p,f,o,c)}if(l&&l.length)for(let d of l)c??=$s(r,t,i),Lp(r,t,d,o,o,c)}}function x(e=1){return up(e)}function ct(e){let t=ep();return bs(t,Ne+e)}function js(e,t){return e<<17|t<<2}function yr(e){return e>>17&32767}function iw(e){return(e&2)==2}function sw(e,t){return e&131071|t<<17}function iu(e){return e|2}function eo(e){return(e&131068)>>2}function jl(e,t){return e&-131069|t<<2}function aw(e){return(e&1)===1}function su(e){return e|1}function cw(e,t,n,r,o,i){let s=i?t.classBindings:t.styleBindings,a=yr(s),c=eo(s);e[r]=n;let l=!1,u;if(Array.isArray(n)){let d=n;u=d[1],(u===null||Hr(d,u)>0)&&(l=!0)}else u=n;if(o)if(c!==0){let p=yr(e[a+1]);e[r+1]=js(p,a),p!==0&&(e[p+1]=jl(e[p+1],r)),e[a+1]=sw(e[a+1],r)}else e[r+1]=js(a,0),a!==0&&(e[a+1]=jl(e[a+1],r)),a=r;else e[r+1]=js(c,0),a===0?a=r:e[c+1]=jl(e[c+1],r),c=r;l&&(e[r+1]=iu(e[r+1])),qp(e,u,r,!0),qp(e,u,r,!1),lw(t,u,e,r,i),s=js(a,c),i?t.classBindings=s:t.styleBindings=s}function lw(e,t,n,r,o){let i=o?e.residualClasses:e.residualStyles;i!=null&&typeof t=="string"&&Hr(i,t)>=0&&(n[r+1]=su(n[r+1]))}function qp(e,t,n,r){let o=e[n+1],i=t===null,s=r?yr(o):eo(o),a=!1;for(;s!==0&&(a===!1||i);){let c=e[s],l=e[s+1];uw(c,t)&&(a=!0,e[s+1]=r?su(l):iu(l)),s=r?yr(l):eo(l)}a&&(e[n+1]=r?iu(o):su(o))}function uw(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?Hr(e,t)>=0:!1}var Mt={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function dw(e){return e.substring(Mt.key,Mt.keyEnd)}function fw(e){return pw(e),xm(e,Im(e,0,Mt.textEnd))}function xm(e,t){let n=Mt.textEnd;return n===t?-1:(t=Mt.keyEnd=hw(e,Mt.key=t,n),Im(e,t,n))}function pw(e){Mt.key=0,Mt.keyEnd=0,Mt.value=0,Mt.valueEnd=0,Mt.textEnd=e.length}function Im(e,t,n){for(;t<n&&e.charCodeAt(t)<=32;)t++;return t}function hw(e,t,n){for(;t<n&&e.charCodeAt(t)>32;)t++;return t}function Te(e,t){return gw(e,t,null,!0),Te}function Er(e){yw(bw,mw,e,!0)}function mw(e,t){for(let n=fw(t);n>=0;n=xm(t,n))gs(e,dw(t),!0)}function gw(e,t,n,r){let o=se(),i=Ze(),s=Ss(2);if(i.firstUpdatePass&&Sm(i,e,s,r),t!==Xe&&At(o,s,t)){let a=i.data[Xt()];Mm(i,a,o,o[xe],e,o[s+1]=xw(t,n),r,s)}}function yw(e,t,n,r){let o=Ze(),i=Ss(2);o.firstUpdatePass&&Sm(o,null,i,r);let s=se();if(n!==Xe&&At(s,i,n)){let a=o.data[Xt()];if(Nm(a,r)&&!Tm(o,i)){let c=r?a.classesWithoutHost:a.stylesWithoutHost;c!==null&&(n=ls(c,n||"")),ou(o,a,s,n,r)}else Cw(o,a,s,s[xe],s[i+1],s[i+1]=ww(e,t,n),r,i)}}function Tm(e,t){return t>=e.expandoStartIndex}function Sm(e,t,n,r){let o=e.data;if(o[n+1]===null){let i=o[Xt()],s=Tm(e,n);Nm(i,r)&&t===null&&!s&&(t=!1),t=vw(o,i,t,r),cw(o,i,t,n,s,r)}}function vw(e,t,n,r){let o=sp(e),i=r?t.residualClasses:t.residualStyles;if(o===null)(r?t.classBindings:t.styleBindings)===0&&(n=Bl(null,e,t,n,r),n=Zo(n,t.attrs,r),i=null);else{let s=t.directiveStylingLast;if(s===-1||e[s]!==o)if(n=Bl(o,e,t,n,r),i===null){let c=Ew(e,t,r);c!==void 0&&Array.isArray(c)&&(c=Bl(null,e,t,c[1],r),c=Zo(c,t.attrs,r),Dw(e,t,r,c))}else i=_w(e,t,r)}return i!==void 0&&(r?t.residualClasses=i:t.residualStyles=i),n}function Ew(e,t,n){let r=n?t.classBindings:t.styleBindings;if(eo(r)!==0)return e[yr(r)]}function Dw(e,t,n,r){let o=n?t.classBindings:t.styleBindings;e[yr(o)]=r}function _w(e,t,n){let r,o=t.directiveEnd;for(let i=1+t.directiveStylingLast;i<o;i++){let s=e[i].hostAttrs;r=Zo(r,s,n)}return Zo(r,t.attrs,n)}function Bl(e,t,n,r,o){let i=null,s=n.directiveEnd,a=n.directiveStylingLast;for(a===-1?a=n.directiveStart:a++;a<s&&(i=t[a],r=Zo(r,i.hostAttrs,o),i!==e);)a++;return e!==null&&(n.directiveStylingLast=a),r}function Zo(e,t,n){let r=n?1:2,o=-1;if(t!==null)for(let i=0;i<t.length;i++){let s=t[i];typeof s=="number"?o=s:o===r&&(Array.isArray(e)||(e=e===void 0?[]:["",e]),gs(e,s,n?!0:t[++i]))}return e===void 0?null:e}function ww(e,t,n){if(n==null||n==="")return $t;let r=[],o=Go(n);if(Array.isArray(o))for(let i=0;i<o.length;i++)e(r,o[i],!0);else if(o instanceof Set)for(let i of o)e(r,i,!0);else if(typeof o=="object")for(let i in o)Object.hasOwn(o,i)&&e(r,i,o[i]);else typeof o=="string"&&t(r,o);return r}function bw(e,t,n){let r=String(t);r!==""&&!r.includes(" ")&&gs(e,r,n)}function Cw(e,t,n,r,o,i,s,a){o===Xe&&(o=$t);let c=0,l=0,u=0<o.length?o[0]:null,d=0<i.length?i[0]:null;for(;u!==null||d!==null;){let p=c<o.length?o[c+1]:void 0,f=l<i.length?i[l+1]:void 0,g=null,D;u===d?(c+=2,l+=2,p!==f&&(g=d,D=f)):d===null||u!==null&&u<d?(c+=2,g=u):(l+=2,g=d,D=f),g!==null&&Mm(e,t,n,r,g,D,s,a),u=c<o.length?o[c]:null,d=l<i.length?i[l]:null}}function Mm(e,t,n,r,o,i,s,a){if(!(t.type&3))return;let c=e.data,l=c[a+1],u=aw(l)?Yp(c,t,n,o,eo(l),s):void 0;if(!ea(u)){ea(i)||iw(l)&&(i=Yp(c,null,n,o,a,s));let d=hl(Xt(),n);DD(r,s,d,o,i)}}function Yp(e,t,n,r,o,i){let s=t===null,a;for(;o>0;){let c=e[o],l=Array.isArray(c),u=l?c[1]:c,d=u===null,p=n[o+1];p===Xe&&(p=d?$t:void 0);let f=d?ys(p,r):u===r?p:void 0;if(l&&!ea(f)&&(f=ys(c,r)),ea(f)&&(a=f,s))return a;let g=e[o+1];o=s?yr(g):eo(g)}if(t!==null){let c=i?t.residualClasses:t.residualStyles;c!=null&&(a=ys(c,r))}return a}function ea(e){return e!==void 0}function xw(e,t){return e==null||e===""||(typeof t=="string"?e=Go(e)+t:typeof e=="object"&&(e=cs(Go(e)))),e}function Nm(e,t){return(e.flags&(t?8:16))!==0}function v(e,t=""){let n=se(),r=Ze(),o=e+Ne,i=r.firstCreatePass?sa(r,o,1,t,null):r.data[o],s=Iw(r,n,i,t);n[o]=s,Os()&&wu(r,n,s,i),Yr(i,!1)}var Iw=(e,t,n,r)=>(Rs(!0),RE(t[xe],r));function Tw(e,t,n,r=""){return At(e,pr(),n)?t+Vr(n)+r:Xe}function Sw(e,t,n,r,o,i=""){let s=tp(),a=dm(e,s,n,o);return Ss(2),a?t+Vr(n)+r+Vr(o)+i:Xe}function j(e){return de("",e),j}function de(e,t,n){let r=se(),o=Tw(r,e,t,n);return o!==Xe&&Am(r,Xt(),o),de}function kt(e,t,n,r,o){let i=se(),s=Sw(i,e,t,n,r,o);return s!==Xe&&Am(i,Xt(),s),kt}function Am(e,t,n){let r=hl(t,e);PE(e[xe],r,n)}function Qo(e,t){let n=Ts()+e,r=se();return r[n]===Xe?Ru(r,n,t()):l_(r,n)}function km(e,t){let n=e[t];return n===Xe?void 0:n}function Mw(e,t,n,r,o,i){let s=t+n;return At(e,s,o)?Ru(e,s+1,i?r.call(i,o):r(o)):km(e,s+1)}function Nw(e,t,n,r,o,i,s){let a=t+n;return dm(e,a,o,i)?Ru(e,a+2,s?r.call(s,o,i):r(o,i)):km(e,a+2)}function en(e,t){let n=Ze(),r,o=e+Ne;n.firstCreatePass?(r=Aw(t,n.pipeRegistry),n.data[o]=r,r.onDestroy&&(n.destroyHooks??=[]).push(o,r.onDestroy)):r=n.data[o];let i=r.factory||(r.factory=er(r.type,!0)),s,a=Ye(Xo);try{let c=Us(!1),l=i();return Us(c),ml(n,se(),o,l),l}finally{Ye(a)}}function Aw(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function jn(e,t,n){let r=e+Ne,o=se(),i=bs(o,r);return Om(o,r)?Mw(o,Ts(),t,i.transform,n,i):i.transform(n)}function ua(e,t,n,r){let o=e+Ne,i=se(),s=bs(i,o);return Om(i,o)?Nw(i,Ts(),t,s.transform,n,r,s):s.transform(n,r)}function Om(e,t){return e[L].data[t].pure}var Rm=(()=>{class e{applicationErrorHandler=S(gn);appRef=S(ca);taskService=S(mr);ngZone=S(Ue);zonelessEnabled=S(jo);tracing=S(Jt,{optional:!0});zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new qe;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(xo):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(S(kl,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{let n=this.taskService.add();if(!this.runningTick&&(this.cleanup(),!this.zonelessEnabled||this.appRef.includeAllTestViews)){this.taskService.remove(n);return}this.switchToMicrotaskScheduler(),this.taskService.remove(n)})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()}))}switchToMicrotaskScheduler(){this.ngZone.runOutsideAngular(()=>{let n=this.taskService.add();this.useMicrotaskScheduler=!0,queueMicrotask(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(n)})})}notify(n){if(!this.zonelessEnabled&&n===5)return;switch(n){case 0:case 2:{this.appRef.dirtyFlags|=2;break}case 3:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2;break}case 12:{this.appRef.dirtyFlags|=16;break}case 13:{this.appRef.dirtyFlags|=2;break}case 11:break;default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick())return;let r=this.useMicrotaskScheduler?mp:Sl;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>r(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>r(()=>this.tick()))}shouldScheduleTick(){return!(this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(xo+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 n=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){this.applicationErrorHandler(r)}finally{this.taskService.remove(n),this.cleanup()}}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}static \u0275fac=function(r){return new(r||e)};static \u0275prov=Fn({token:e,factory:e.\u0275fac})}return e})();function Pm(){return[{provide:Ut,useExisting:Rm},{provide:Ue,useClass:Io},{provide:jo,useValue:!0}]}function kw(){return typeof $localize<"u"&&$localize.locale||Ko}var Jo=new G("",{factory:()=>S(Jo,{optional:!0,skipSelf:!0})||kw()});var da=class{destroyed=!1;listeners=null;errorHandler=S(ft,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=S(ke);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(t){if(this.destroyed)throw new R(953,!1);return(this.listeners??=[]).push(t),{unsubscribe:()=>{let n=this.listeners?this.listeners.indexOf(t):-1;n>-1&&(this.isEmitting?(this.hasNullListeners=!0,this.listeners[n]=null):this.listeners.splice(n,1))}}}emit(t){if(this.destroyed){console.warn(nr(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let n=F(null);try{for(let r of this.listeners)try{r!==null&&r(t)}catch(o){this.errorHandler?.handleError(o)}}finally{this.hasNullListeners&&(this.hasNullListeners=!1,this.listeners&&Ow(this.listeners)),F(n),this.isEmitting=!1}}};function Ow(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function ve(e,t){return Oi(e,t?.equal)}function Bn(e){return Kd(e)}var Fm=class e extends Error{_brand;constructor(t){super(t)}static IDLE=new e("IDLE");static LOADING=new e("LOADING")},Rw=e=>e;function Vu(e,t){if(typeof e=="function"){let n=bc(e,Rw,t?.equal);return Lm(n,t?.debugName,t?.set)}else{let n=bc(e.source,e.computation,e.equal);return Lm(n,e.debugName,e.set)}}function Lm(e,t,n){let r=e[Re],o=e;if(n!==void 0){let i=s=>Cc(r,s);o.set=s=>n(s,i),o.update=s=>n(s(Bn(e)),i)}else o.set=i=>Cc(r,i),o.update=i=>Xd(r,i);return o.asReadonly=Ps.bind(e),o}function Bm(e,t){let n=Object.create(Xp);n.value=e,n.transformFn=t?.transform;function r(){if(ln(n),n.value===cu){let o=null;throw new R(-950,o)}return n.value}return r[Re]=n,r}function ro(e){return new da}function jm(e,t){return Bm(e,t)}function Kw(e){return Bm(cu,e)}var Ge=(jm.required=Kw,jm);var Qw=1e4;var X2=Qw-1e3;var $u=new G(""),Jw=new G("");function ei(e){return!e.moduleRef}function eb(e){let t=ei(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Ue);return n.run(()=>{ei(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(gn),o;if(n.runOutsideAngular(()=>{o=n.onError.subscribe({next:r})}),ei(e)){let i=()=>t.destroy(),s=e.platformInjector.get($u);s.add(i),t.onDestroy(()=>{o.unsubscribe(),s.delete(i)})}else{let i=()=>e.moduleRef.destroy(),s=e.platformInjector.get($u);s.add(i),e.moduleRef.onDestroy(()=>{$o(e.allPlatformModules,e.moduleRef),o.unsubscribe(),s.delete(i)})}return nb(r,n,()=>{let i=t.get(mr),s=i.add(),a=t.get(Lu);return a.runInitializers(),a.donePromise.then(()=>{let c=t.get(Jo,Ko);if(Cm(c||Ko),!t.get(Jw,!0))return ei(e)?t.get(ca):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(ei(e)){let u=t.get(ca);return e.rootComponent!==void 0&&u.bootstrap(e.rootComponent),u}else return tb?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>{i.remove(s)})})})}var tb;function nb(e,t,n){try{let r=n();return aa(r)?r.catch(o=>{throw t.runOutsideAngular(()=>e(o)),o}):r}catch(r){throw t.runOutsideAngular(()=>e(r)),r}}var fa=null;function rb(e=[],t){return Ct.create({name:t,providers:[{provide:Mo,useValue:"platform"},{provide:$u,useValue:new Set([()=>fa=null])},...e]})}function ob(e=[]){if(fa)return fa;let t=rb(e);return fa=t,wm(),ib(t),t}function ib(e){let t=e.get(Fs,null);Ur(e,()=>{t?.forEach(n=>n())})}function Vm(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:o}=e;fe(ae.BootstrapApplicationStart);try{let i=o?.injector??ob(r),s=[Pm(),Ep,...n||[]],a=new Yo({providers:s,parent:i,debugName:"",runEnvironmentInitializers:!1});return eb({r3Injector:a.injector,platformInjector:i,rootComponent:t})}catch(i){return Promise.reject(i)}finally{fe(ae.BootstrapApplicationEnd)}}var Hu=Symbol("NOT_SET"),Hm=new Set,sb=Q(B({},kr),{kind:"afterRenderEffectPhase",consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:Hu,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(e){if(this.sequence.lastPhase=this.phase,!this.dirty)return this.signal;if(this.dirty=!1,this.value!==Hu&&!Nr(this))return this.signal;try{for(let o of this.cleanup??Hm)o()}finally{this.cleanup?.clear()}let t=[];e!==void 0&&t.push(e),t.push(this.registerCleanupFn);let n=un(this),r;try{r=this.userFn.apply(null,t)}finally{Tn(this,n)}return(this.value===Hu||!this.equal(this.value,r))&&(this.value=r,this.version++),this.signal}}),Uu=class extends Gs{scheduler;lastPhase=null;nodes=[void 0,void 0,void 0,void 0];onDestroyFns=null;constructor(t,n,r,o,i,s=null){super(t,[void 0,void 0,void 0,void 0],r,!1,i.get(ke),s),this.scheduler=o;for(let a of gu){let c=n[a];if(c===void 0)continue;let l=Object.create(sb);l.sequence=this,l.phase=a,l.userFn=c,l.dirty=!0,l.signal=()=>(ln(l),l.value),l.signal[Re]=l,l.registerCleanupFn=u=>(l.cleanup??=new Set).add(u),this.nodes[a]=l,this.hooks[a]=u=>l.phaseFn(u)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){if(this.onDestroyFns!==null)for(let t of this.onDestroyFns)t();super.destroy();for(let t of this.nodes)if(t)try{for(let n of t.cleanup??Hm)n()}finally{Sn(t)}}};function $m(e,t){let n=t?.injector??S(Ct),r=n.get(Ut),o=n.get(mu),i=n.get(Jt,null,{optional:!0});o.impl??=n.get(kh);let s=e;typeof s=="function"&&(s={mixedReadWrite:e});let a=n.get(Lo,null,{optional:!0}),c=new Uu(o.impl,[s.earlyRead,s.write,s.mixedReadWrite,s.read],a?.view,r,n,i?.snapshot(null));return o.impl.register(c),c}function ni(e,t){t=encodeURIComponent(t);for(let n of e.split(";")){let r=n.indexOf("="),[o,i]=r==-1?[n,""]:[n.slice(0,r),n.slice(r+1)];if(o.trim()!==t)continue;let s=i;try{s=decodeURIComponent(i)}catch{}return s.length>1&&s[0]==='"'&&s[s.length-1]==='"'&&(s=s.slice(1,-1)),s}return null}var Um=null;function Vn(){return Um}function Gu(e){Um??=e}var ri=class{},pa=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(r){return new(r||e)};static \u0275prov=le({token:e,factory:()=>S(zm),providedIn:"platform"})}return e})();var zm=(()=>{class e extends pa{_location;_history;_doc=S(Ve);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Vn().getBaseHref(this._doc)}onPopState(n){let r=Vn().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=Vn().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",n,!1),()=>r.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,r,o){this._history.pushState(n,r,o)}replaceState(n,r,o){this._history.replaceState(n,r,o)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static \u0275fac=function(r){return new(r||e)};static \u0275prov=le({token:e,factory:()=>new e,providedIn:"platform"})}return e})();var Dn=class e{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(t){t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(`
|
|
5
|
+
`).forEach(n=>{let r=n.indexOf(":");if(r>0){let o=n.slice(0,r),i=n.slice(r+1).trim();this.addHeaderEntry(o,i)}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((n,r)=>{this.addHeaderEntry(r,n)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([n,r])=>{this.setHeaderEntries(n,r)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let n=this.headers.get(t.toLowerCase());return n&&n.length>0?n[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,n){return this.clone({name:t,value:n,op:"a"})}set(t,n){return this.clone({name:t,value:n,op:"s"})}delete(t,n){return this.clone({name:t,value:n,op:"d"})}maybeSetNormalizedName(t,n){this.normalizedNames.has(n)||this.normalizedNames.set(n,t)}init(){this.lazyInit&&(this.lazyInit instanceof e?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[n,r]of t.headers.entries())this.headers.set(n,r),this.normalizedNames.set(n,t.normalizedNames.get(n))}clone(t){let n=new e;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof e?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([t]),n}applyUpdate(t){let n=t.name.toLowerCase();switch(t.op){case"a":case"s":let r=t.value;if(typeof r=="string"&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(t.name,n);let o=t.op==="a"?(this.headers.get(n)||[]).slice():[];o.push(...r),this.headers.set(n,o);break;case"d":let i=t.value;if(i===void 0)this.headers.delete(n),this.normalizedNames.delete(n);else{let s=Array.isArray(i)?i:[i],a=this.headers.get(n);if(!a)return;a=a.filter(c=>s.indexOf(c)===-1),a.length===0?(this.headers.delete(n),this.normalizedNames.delete(n)):this.headers.set(n,a)}break}}addHeaderEntry(t,n){let r=t.toLowerCase();this.maybeSetNormalizedName(t,r),this.headers.has(r)?this.headers.get(r).push(n):this.headers.set(r,[n])}setHeaderEntries(t,n){let r=(Array.isArray(n)?n:[n]).map(i=>i.toString()),o=t.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(t,o)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(n=>t(this.normalizedNames.get(n),this.headers.get(n)))}};var ma=class{map=new Map;set(t,n){return this.map.set(t,n),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()}},ga=class{encodeKey(t){return Gm(t)}encodeValue(t){return Gm(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function cb(e,t){let n=new Map;return e.length>0&&e.replace(/^\?/,"").split("&").forEach(o=>{let i=o.indexOf("="),[s,a]=i==-1?[t.decodeKey(o),""]:[t.decodeKey(o.slice(0,i)),t.decodeValue(o.slice(i+1))],c=n.get(s)||[];c.push(a),n.set(s,c)}),n}var lb=/%(\d[a-f0-9])/gi,ub={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Gm(e){return encodeURIComponent(e).replace(lb,(t,n)=>ub[n]??t)}function ha(e){return`${e}`}var En=class e{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new ga,t.fromString){if(t.fromObject)throw new R(2805,!1);this.map=cb(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(n=>{let r=t.fromObject[n],o=Array.isArray(r)?r.map(ha):[ha(r)];this.map.set(n,o)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let n=this.map.get(t);return n?n[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,n){return this.clone({param:t,value:n,op:"a"})}appendAll(t){let n=[];return Object.keys(t).forEach(r=>{let o=t[r];Array.isArray(o)?o.forEach(i=>{n.push({param:r,value:i,op:"a"})}):n.push({param:r,value:o,op:"a"})}),this.clone(n)}set(t,n){return this.clone({param:t,value:n,op:"s"})}delete(t,n){return this.clone({param:t,value:n,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let n=this.encoder.encodeKey(t);return this.map.get(t).map(r=>n+"="+this.encoder.encodeValue(r)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let n=new e({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat(t),n}init(){if(this.map===null&&(this.map=new Map),this.cloneFrom!==null){this.cloneFrom.init();for(let[t,n]of this.cloneFrom.map.entries())this.map.set(t,n);this.updates.forEach(t=>{switch(t.op){case"a":case"s":let n=t.op==="a"?(this.map.get(t.param)||[]).slice():[];n.push(ha(t.value)),this.map.set(t.param,n);break;case"d":if(t.value!==void 0){let r=(this.map.get(t.param)||[]).slice(),o=r.indexOf(ha(t.value));o!==-1&&r.splice(o,1),r.length>0?this.map.set(t.param,r):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null}}};function db(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Wm(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer}function qm(e){return typeof Blob<"u"&&e instanceof Blob}function Ym(e){return typeof FormData<"u"&&e instanceof FormData}function fb(e){return typeof URLSearchParams<"u"&&e instanceof URLSearchParams}var Wu="Content-Type",Zm="Accept",Qm="text/plain",Jm="application/json",pb=`${Jm}, ${Qm}, */*`,oo=class e{url;body=null;headers;context;reportProgress=!1;reportUploadProgress=!1;reportDownloadProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(t,n,r,o){this.url=n,this.method=t.toUpperCase();let i;if(db(this.method)||o?(this.body=r!==void 0?r:null,i=o):i=r,i){if(this.reportProgress=!!i.reportProgress,this.reportUploadProgress=!!i.reportUploadProgress,this.reportDownloadProgress=!!i.reportDownloadProgress,this.withCredentials=!!i.withCredentials,this.keepalive=!!i.keepalive,i.responseType&&(this.responseType=i.responseType),i.headers&&(this.headers=i.headers),i.context&&(this.context=i.context),i.params&&(this.params=i.params),i.priority&&(this.priority=i.priority),i.cache&&(this.cache=i.cache),i.credentials&&(this.credentials=i.credentials),typeof i.timeout=="number"){if(i.timeout<1||!Number.isInteger(i.timeout))throw new R(2822,"");this.timeout=i.timeout}i.mode&&(this.mode=i.mode),i.redirect&&(this.redirect=i.redirect),i.integrity&&(this.integrity=i.integrity),i.referrer!==void 0&&(this.referrer=i.referrer),i.referrerPolicy&&(this.referrerPolicy=i.referrerPolicy),this.transferCache=i.transferCache}if(this.headers??=new Dn,this.context??=new ma,!this.params)this.params=new En,this.urlWithParams=n;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=n;else{let a=n,c="",l=n.indexOf("#");l!==-1&&(c=n.substring(l),a=n.substring(0,l));let u=a.indexOf("?"),d=u===-1?"?":u<a.length-1?"&":"";this.urlWithParams=a+d+s+c}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||Wm(this.body)||qm(this.body)||Ym(this.body)||fb(this.body)?this.body:this.body instanceof En?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||Ym(this.body)?null:qm(this.body)?this.body.type||null:Wm(this.body)?null:typeof this.body=="string"?Qm:this.body instanceof En?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Jm:null}clone(t={}){let n=t.method||this.method,r=t.url||this.url,o=t.responseType||this.responseType,i=t.keepalive??this.keepalive,s=t.priority||this.priority,a=t.cache||this.cache,c=t.mode||this.mode,l=t.redirect||this.redirect,u=t.credentials||this.credentials,d=t.referrer??this.referrer,p=t.integrity||this.integrity,f=t.referrerPolicy||this.referrerPolicy,g=t.transferCache??this.transferCache,D=t.timeout??this.timeout,y=t.body!==void 0?t.body:this.body,E=t.withCredentials??this.withCredentials,h=t.reportProgress??this.reportProgress,I=t.reportUploadProgress??this.reportUploadProgress,_=t.reportDownloadProgress??this.reportDownloadProgress,A=t.headers||this.headers,P=t.params||this.params,z=t.context??this.context;return t.setHeaders!==void 0&&(A=Object.keys(t.setHeaders).reduce((q,oe)=>q.set(oe,t.setHeaders[oe]),A)),t.setParams&&(P=Object.keys(t.setParams).reduce((q,oe)=>q.set(oe,t.setParams[oe]),P)),new e(n,r,y,{params:P,headers:A,context:z,reportProgress:h,reportUploadProgress:I,reportDownloadProgress:_,responseType:o,withCredentials:E,transferCache:g,keepalive:i,cache:a,priority:s,timeout:D,mode:c,redirect:l,credentials:u,referrer:d,integrity:p,referrerPolicy:f})}},Dr=(function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e})(Dr||{}),io=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(t,n=200,r="OK"){this.headers=t.headers||new Dn,this.status=t.status!==void 0?t.status:n,this.statusText=t.statusText||r,this.url=t.url||null,this.redirected=t.redirected,this.responseType=t.responseType,this.ok=this.status>=200&&this.status<300}},ya=class e extends io{constructor(t={}){super(t)}type=Dr.ResponseHeader;clone(t={}){return new e({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})}},oi=class e extends io{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=Dr.Response;clone(t={}){return new e({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,responseType:t.responseType??this.responseType})}},vn=class extends io{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}},hb=200;var mb=/^\)\]\}',?\n/,gj=1024*1024,eg=new G("",{factory:()=>null}),va=(()=>{class e{fetchImpl=S(Yu,{optional:!0})?.fetch??((...n)=>globalThis.fetch(...n));ngZone=S(Ue);destroyRef=S(ke);maxResponseSize=S(eg);handle(n){return new _e(r=>{let o=new AbortController,i=!1,s={next:c=>{c.type===Dr.Response&&(i=!0),r.next(c)},error:c=>{i=!0,r.error(c)},complete:()=>{i=!0,r.complete()}};this.doRequest(n,o.signal,s).then(Zu,c=>s.error(new vn({error:c})));let a;return n.timeout&&(a=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{o.signal.aborted||o.abort(new DOMException("signal timed out","TimeoutError"))},n.timeout))),()=>{a!==void 0&&clearTimeout(a),!i&&!o.signal.aborted&&o.abort()}})}async doRequest(n,r,o){let i=this.createRequestInit(n),s;try{let y=this.ngZone.runOutsideAngular(()=>this.fetchImpl(n.urlWithParams,B({signal:r},i)));gb(y),o.next({type:Dr.Sent}),s=await y}catch(y){o.error(new vn({error:y,status:y.status??0,statusText:y.statusText,url:n.urlWithParams,headers:y.headers}));return}let a=new Dn(s.headers),c=s.statusText,l=s.url||n.urlWithParams,u=s.status,d=null,p=n.reportProgress||n.reportDownloadProgress;if(p&&o.next(new ya({headers:a,status:u,statusText:c,url:l})),s.body){let y=s.headers.get(Wu)??"",E=s.headers.get("content-length"),h=E!==null?Number(E):NaN;this.maxResponseSize!==null&&Number.isFinite(h)&&h>this.maxResponseSize&&(await s.body.cancel(),Xm(this.maxResponseSize));let I=[],_=s.body.getReader(),A=0,P,z,q=typeof Zone<"u"&&Zone.current,oe=!1;if(await this.ngZone.runOutsideAngular(async()=>{for(;;){if(this.destroyRef.destroyed){await _.cancel(),oe=!0;break}let{done:De,value:Fe}=await _.read();if(De)break;if(I.push(Fe),A+=Fe.length,this.maxResponseSize!==null&&A>this.maxResponseSize&&(await _.cancel(),Xm(this.maxResponseSize)),p){z=n.responseType==="text"?(z??"")+(P??=Km(y)).decode(Fe,{stream:!0}):void 0;let Le=()=>o.next({type:Dr.DownloadProgress,total:Number.isFinite(h)?h:void 0,loaded:A,partialText:z});q?q.run(Le):Le()}}}),oe){o.complete();return}let ce=this.concatChunks(I,A);try{d=this.parseBody(n,ce,y,u)}catch(De){o.error(new vn({error:De,headers:new Dn(s.headers),status:s.status,statusText:s.statusText,url:s.url||n.urlWithParams}));return}}u===0&&(u=d?hb:0);let f=u>=200&&u<300,g=s.redirected,D=s.type;f?(o.next(new oi({body:d,headers:a,status:u,statusText:c,url:l,redirected:g,responseType:D})),o.complete()):o.error(new vn({error:d,headers:a,status:u,statusText:c,url:l,redirected:g,responseType:D}))}parseBody(n,r,o,i){switch(n.responseType){case"json":let s=new TextDecoder().decode(r).replace(mb,"");if(s==="")return null;try{return JSON.parse(s)}catch(a){if(i<200||i>=300)return s;throw a}case"text":return Km(o).decode(r);case"blob":return new Blob([r],{type:o});case"arraybuffer":return r.buffer}}createRequestInit(n){if(n.reportUploadProgress)throw new R(2824,!1);let r={},o;if(o=n.credentials,n.withCredentials&&(o="include"),n.headers.forEach((i,s)=>r[i]=s.join(",")),n.headers.has(Zm)||(r[Zm]=pb),!n.headers.has(Wu)){let i=n.detectContentTypeHeader();i!==null&&(r[Wu]=i)}return{body:n.serializeBody(),method:n.method,headers:r,credentials:o,keepalive:n.keepalive,cache:n.cache,priority:n.priority,mode:n.mode,redirect:n.redirect,referrer:n.referrer,integrity:n.integrity,referrerPolicy:n.referrerPolicy}}concatChunks(n,r){let o=new Uint8Array(r),i=0;for(let s of n)o.set(s,i),i+=s.length;return o}static \u0275fac=function(r){return new(r||e)};static \u0275prov=Fn({token:e,factory:e.\u0275fac})}return e})(),Yu=class{};function Zu(){}function gb(e){e.then(Zu,Zu)}function Xm(e){throw new R(-2825,!1)}var yb=/charset=\s*["']?([^;"'\s]+)["']?/i;function Km(e){let t=e.match(yb);if(t!==null)try{return new TextDecoder(t[1])}catch{}return new TextDecoder}var vb=new G("",{factory:()=>!0}),Eb="XSRF-TOKEN",Db=new G("",{factory:()=>Eb}),_b="X-XSRF-TOKEN",wb=new G("",{factory:()=>_b}),bb=(()=>{class e{cookieName=S(Db);doc=S(Ve);lastCookieString="";lastToken=null;parseCount=0;getToken(){let n=this.doc.cookie||"";return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=ni(n,this.cookieName),this.lastCookieString=n),this.lastToken}static \u0275fac=function(r){return new(r||e)};static \u0275prov=Fn({token:e,factory:e.\u0275fac})}return e})(),tg=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=le({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=J(bb),o},providedIn:"root"})}return e})();function ng(e,t){if(!S(vb)||e.method==="GET"||e.method==="HEAD")return t(e);try{let o=S(pa).href,{origin:i}=new URL(o),{origin:s}=new URL(e.url,i);if(i!==s)return t(e)}catch{return t(e)}let n=S(tg).getToken(),r=S(wb);return n!=null&&!e.headers.has(r)&&(e=e.clone({headers:e.headers.set(r,n)})),t(e)}function Cb(e,t){return t(e)}function xb(e,t,n){return(r,o)=>Ur(n,()=>t(r,i=>e(i,o)))}var rg=new G("",{factory:()=>[ng]}),og=new G(""),ig=new G("",{factory:()=>!0});var Xu=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=le({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=J(va),o},providedIn:"root"})}return e})();var Ea=(()=>{class e{backend;injector;chain=null;pendingTasks=S(Bo);contributeToStability=S(ig);constructor(n,r){this.backend=n,this.injector=r}handle(n){if(this.chain===null){let o=this.injector.get(Da,null,{skipSelf:!0}),i=o!==null&&this.backend===o,s=this.injector.get(og,[],i?{self:!0}:void 0),a=Array.from(new Set([...this.injector.get(rg),...s]));this.chain=a.reduceRight((c,l)=>xb(c,l,this.injector),Cb)}let r=this.chain;if(this.contributeToStability){let o=this.pendingTasks.add();return Bn(()=>r(n,i=>this.backend.handle(i))).pipe(Fc(o))}else return Bn(()=>r(n,o=>this.backend.handle(o)))}static \u0275fac=function(r){return new(r||e)(J(Xu),J(tt))};static \u0275prov=le({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Da=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=le({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=J(Ea),o},providedIn:"root"})}return e})();function qu(e,t){return B({body:t},e)}var _a=(()=>{class e{handler;constructor(n){this.handler=n}request(n,r,o={}){let i;if(n instanceof oo)i=n;else{let c;o.headers instanceof Dn?c=o.headers:c=new Dn(o.headers);let l;o.params&&(o.params instanceof En?l=o.params:l=new En({fromObject:o.params})),i=new oo(n,r,o.body!==void 0?o.body:null,{headers:c,context:o.context,params:l,reportProgress:o.reportProgress,reportUploadProgress:o.reportUploadProgress,reportDownloadProgress:o.reportDownloadProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials,referrer:o.referrer,referrerPolicy:o.referrerPolicy,integrity:o.integrity,timeout:o.timeout})}let s=kc(i).pipe(Pc(c=>this.handler.handle(c)));if(n instanceof oo||o.observe==="events")return s;let a=s.pipe(Rc(c=>c instanceof oi));switch(o.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return a.pipe(Ht(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new R(2806,!1);return c.body}));case"blob":return a.pipe(Ht(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new R(2807,!1);return c.body}));case"text":return a.pipe(Ht(c=>{if(c.body!==null&&typeof c.body!="string")throw new R(2808,!1);return c.body}));default:return a.pipe(Ht(c=>c.body))}case"response":return a;default:throw new R(2809,!1)}}delete(n,r={}){return this.request("DELETE",n,r)}get(n,r={}){return this.request("GET",n,r)}head(n,r={}){return this.request("HEAD",n,r)}jsonp(n,r){return this.request("JSONP",n,{params:new En().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(n,r={}){return this.request("OPTIONS",n,r)}patch(n,r,o={}){return this.request("PATCH",n,qu(o,r))}post(n,r,o={}){return this.request("POST",n,qu(o,r))}put(n,r,o={}){return this.request("PUT",n,qu(o,r))}static \u0275fac=function(r){return new(r||e)(J(Da))};static \u0275prov=le({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Ku(...e){let t=[_a,va,Ea,{provide:Da,useExisting:Ea},{provide:Xu,useFactory:()=>S(va)},{provide:rg,useValue:ng,multi:!0}];for(let n of e)t.push(...n.\u0275providers);return ir(t)}var ed=(function(e){return e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency",e[e.Scientific=3]="Scientific",e})(ed||{});var Ot={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 so(e,t){let n=la(e),r=n[no.NumberSymbols][t];if(typeof r>"u"){if(t===Ot.CurrencyDecimal)return n[no.NumberSymbols][Ot.Decimal];if(t===Ot.CurrencyGroup)return n[no.NumberSymbols][Ot.Group]}return r}function ag(e,t){return la(e)[no.NumberFormats][t]}var Ib=/^(\d+)?\.((\d+)(-(\d+))?)?$/,sg=22,wa=".",ii="0",Tb=";",Sb=",",Qu="#";function Mb(e,t,n,r,o,i,s=!1){let a="",c=!1;if(!isFinite(e))a=so(n,Number.isNaN(e)?Ot.NaN:Ot.Infinity);else{let l=kb(e);s&&(l=Ab(l));let u=t.minInt,d=t.minFrac,p=t.maxFrac;if(i){let h=i.match(Ib);if(h===null)throw new R(2306,!1);let I=h[1],_=h[3],A=h[5];I!=null&&(u=Ju(I)),_!=null&&(d=Ju(_)),A!=null?p=Ju(A):_!=null&&d>p&&(p=d);let P=100;if(u>P||d>P||p>P)throw new R(2306,!1)}Ob(l,d,p);let f=l.digits,g=l.integerLen,D=l.exponent,y=[];for(c=f.every(h=>!h);g<u;g++)f.unshift(0);for(;g<0;g++)f.unshift(0);g>0?y=f.splice(g,f.length):(y=f,f=[0]);let E=[];for(f.length>=t.lgSize&&E.unshift(f.splice(-t.lgSize,f.length).join(""));f.length>t.gSize;)E.unshift(f.splice(-t.gSize,f.length).join(""));f.length&&E.unshift(f.join("")),a=E.join(so(n,r)),y.length&&(a+=so(n,o)+y.join("")),D&&(a+=so(n,Ot.Exponential)+"+"+D)}return e<0&&!c?a=t.negPre+a+t.negSuf:a=t.posPre+a+t.posSuf,a}function cg(e,t,n){let r=ag(t,ed.Decimal),o=Nb(r,so(t,Ot.MinusSign));return Mb(e,o,t,Ot.Group,Ot.Decimal,n)}function Nb(e,t="-"){let n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},r=e.split(Tb),o=r[0],i=r[1],s=o.indexOf(wa)!==-1?o.split(wa):[o.substring(0,o.lastIndexOf(ii)+1),o.substring(o.lastIndexOf(ii)+1)],a=s[0],c=s[1]||"";n.posPre=a.substring(0,a.indexOf(Qu));for(let u=0;u<c.length;u++){let d=c.charAt(u);d===ii?n.minFrac=n.maxFrac=u+1:d===Qu?n.maxFrac=u+1:n.posSuf+=d}let l=a.split(Sb);if(n.gSize=l[1]?l[1].length:0,n.lgSize=l[2]||l[1]?(l[2]||l[1]).length:0,i){let u=o.length-n.posPre.length-n.posSuf.length,d=i.indexOf(Qu);n.negPre=i.substring(0,d).replace(/'/g,""),n.negSuf=i.slice(d+u).replace(/'/g,"")}else n.negPre=t+n.posPre,n.negSuf=n.posSuf;return n}function Ab(e){if(e.digits[0]===0)return e;let t=e.digits.length-e.integerLen;return e.exponent?e.exponent+=2:(t===0?e.digits.push(0,0):t===1&&e.digits.push(0),e.integerLen+=2),e}function kb(e){let t=Math.abs(e)+"",n=0,r,o,i,s,a;for((o=t.indexOf(wa))>-1&&(t=t.replace(wa,"")),(i=t.search(/e/i))>0?(o<0&&(o=i),o+=+t.slice(i+1),t=t.substring(0,i)):o<0&&(o=t.length),i=0;t.charAt(i)===ii;i++);if(i===(a=t.length))r=[0],o=1;else{for(a--;t.charAt(a)===ii;)a--;for(o-=i,r=[],s=0;i<=a;i++,s++)r[s]=Number(t.charAt(i))}return o>sg&&(r=r.splice(0,sg-1),n=o-1,o=1),{digits:r,exponent:n,integerLen:o}}function Ob(e,t,n){if(t>n)throw new R(2307,!1);let r=e.digits,o=r.length-e.integerLen,i=Math.min(Math.max(t,o),n),s=i+e.integerLen,a=r[s];if(s>0){r.splice(Math.max(e.integerLen,s));for(let d=s;d<r.length;d++)r[d]=0}else{o=Math.max(0,o),e.integerLen=1,r.length=Math.max(1,s=i+1),r[0]=0;for(let d=1;d<s;d++)r[d]=0}if(a>=5)if(s-1<0){for(let d=0;d>s;d--)r.unshift(0),e.integerLen++;r.unshift(1),e.integerLen++}else r[s-1]++;for(;o<Math.max(0,i);o++)r.push(0);let c=i!==0,l=t+e.integerLen,u=r.reduceRight(function(d,p,f,g){return p=p+d,g[f]=p<10?p:p-10,c&&(g[f]===0&&f>=l?g.pop():c=!1),p>=10?1:0},0);u&&(r.unshift(u),e.integerLen++)}function Ju(e){let t=parseInt(e);if(isNaN(t))throw new R(2305,!1);return t}function Rb(e,t){return new R(2100,!1)}var td=(()=>{class e{_locale;constructor(n){this._locale=n}transform(n,r,o){if(!Pb(n))return null;o||=this._locale;try{let i=Fb(n);return cg(i,o,r)}catch(i){throw Rb(e,i.message)}}static \u0275fac=function(r){return new(r||e)(Xo(Jo,16))};static \u0275pipe=Fu({name:"number",type:e,pure:!0})}return e})();function Pb(e){return!(e==null||e===""||e!==e)}function Fb(e){if(typeof e=="string"&&!isNaN(Number(e)-parseFloat(e)))return Number(e);if(typeof e!="number")throw new R(2309,!1);return e}var lg="browser";var si=class{_doc;constructor(t){this._doc=t}manager},ba=(()=>{class e extends si{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,o,i){return n.addEventListener(r,o,i),()=>this.removeEventListener(n,r,o,i)}removeEventListener(n,r,o,i){return n.removeEventListener(r,o,i)}static \u0275fac=function(r){return new(r||e)(J(Ve))};static \u0275prov=le({token:e,factory:e.\u0275fac})}return e})(),Ia=new G(""),id=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(n,r){this._zone=r,n.forEach(s=>{s.manager=this});let o=n.filter(s=>!(s instanceof ba));this._plugins=o.slice().reverse();let i=n.find(s=>s instanceof ba);i&&this._plugins.push(i)}addEventListener(n,r,o,i){return this._findPluginFor(r).addEventListener(n,r,o,i)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(i=>i.supports(n)),!r)throw new R(-5101,!1);return this._eventNameToPlugin.set(n,r),r}static \u0275fac=function(r){return new(r||e)(J(Ia),J(Ue))};static \u0275prov=le({token:e,factory:e.\u0275fac})}return e})(),nd="ng-app-id";function ug(e){for(let t of e)t.remove()}function dg(e,t){let n=t.createElement("style");return n.textContent=e,n}function Bb(e,t,n,r){let o=e.head?.querySelectorAll(`style[${nd}="${t}"],link[${nd}="${t}"]`);if(!o||o.length===0)return!1;for(let i of o)i.removeAttribute(nd),i instanceof HTMLLinkElement?r.set(i.href.slice(i.href.lastIndexOf("/")+1),{usage:0,elements:[i]}):i.textContent&&n.set(i.textContent,{usage:0,elements:[i]});return!0}function od(e,t){let n=t.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n}var sd=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(n,r,o,i={}){this.doc=n,this.appId=r,this.nonce=o,Bb(n,r,this.inline,this.external)&&this.hosts.add(n.head)}addStyles(n,r){for(let o of n)this.addUsage(o,this.inline,dg);r?.forEach(o=>this.addUsage(o,this.external,od))}removeStyles(n,r){for(let o of n)this.removeUsage(o,this.inline);r?.forEach(o=>this.removeUsage(o,this.external))}addUsage(n,r,o){let i=r.get(n);i?i.usage++:r.set(n,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,o(n,this.doc)))})}removeUsage(n,r){let o=r.get(n);o&&(o.usage--,o.usage<=0&&(ug(o.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])ug(n);this.hosts.clear()}addHost(n){if(!this.hosts.has(n)){this.hosts.add(n);for(let[r,{elements:o}]of this.inline)o.push(this.addElement(n,dg(r,this.doc)));for(let[r,{elements:o}]of this.external)o.push(this.addElement(n,od(r,this.doc)))}}removeHost(n){this.hosts.delete(n);for(let r of[...this.inline.values(),...this.external.values()]){let o=[];for(let i of r.elements)i.parentNode===n?i.remove():o.push(i);r.elements=o}}addElement(n,r){return this.nonce&&r.setAttribute("nonce",this.nonce),n.appendChild(r)}static \u0275fac=function(r){return new(r||e)(J(Ve),J(Ro),J(Fo,8),J(Po))};static \u0275prov=le({token:e,factory:e.\u0275fac})}return e})(),rd={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"},ad=/%COMP%/g;var pg="%COMP%",Vb=`_nghost-${pg}`,Hb=`_ngcontent-${pg}`,$b=!0,Ub=new G("",{factory:()=>$b}),zb=new G("");function Gb(e){return Hb.replace(ad,e)}function Wb(e){return Vb.replace(ad,e)}function hg(e,t){return t.map(n=>n.replace(ad,e))}var cd=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;cssVarNamespace;constructor(n,r,o,i,s,a,c=null,l=null,u=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=o,this.removeStylesOnCompDestroy=i,this.doc=s,this.ngZone=a,this.nonce=c,this.tracingService=l,this.cssVarNamespace=u??"",this.defaultRenderer=new ai(n,s,a,this.tracingService,this.cssVarNamespace)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;let o=this.getOrCreateRenderer(n,r);return o instanceof xa?o.applyToHost(n):o instanceof ci&&o.applyStyles(),o}getOrCreateRenderer(n,r){let o=this.rendererByCompId,i=o.get(r.id);if(!i){let s=this.doc,a=this.ngZone,c=this.eventManager,l=this.sharedStylesHost,u=this.removeStylesOnCompDestroy,d=this.tracingService;switch(r.encapsulation){case Nt.Emulated:i=new xa(c,l,r,this.appId,u,s,a,d,this.cssVarNamespace);break;case Nt.ShadowDom:return new Ca(c,n,r,s,a,this.nonce,d,this.cssVarNamespace,l);case Nt.ExperimentalIsolatedShadowDom:return new Ca(c,n,r,s,a,this.nonce,d,this.cssVarNamespace);default:i=new ci(c,l,r,u,s,a,d,this.cssVarNamespace);break}o.set(r.id,i)}return i}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(n){this.rendererByCompId.delete(n)}static \u0275fac=function(r){return new(r||e)(J(id),J(vr),J(Ro),J(Ub),J(Ve),J(Ue),J(Fo),J(Jt,8),J(zb,8))};static \u0275prov=le({token:e,factory:e.\u0275fac})}return e})(),ai=class{eventManager;doc;ngZone;tracingService;cssVarNamespace;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,n,r,o,i=""){this.eventManager=t,this.doc=n,this.ngZone=r,this.tracingService=o,this.cssVarNamespace=i}destroy(){}destroyNode=null;createElement(t,n){return n?this.doc.createElementNS(rd[n]||n,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,n){(fg(t)?t.content:t).appendChild(n)}insertBefore(t,n,r){if(t){let o=fg(t)?t.content:t;if(r!=null&&r.parentNode!==o)throw new R(-5106,!1);o.insertBefore(n,r)}}removeChild(t,n){n.remove()}selectRootElement(t,n){let r=typeof t=="string"?this.doc.querySelector(t):t;if(!r)throw new R(-5104,!1);return n||(r.textContent=""),r}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,n,r,o){if(o){n=o+":"+n;let i=rd[o];i?t.setAttributeNS(i,n,r):t.setAttribute(n,r)}else t.setAttribute(n,r)}removeAttribute(t,n,r){if(r){let o=rd[r];o?t.removeAttributeNS(o,n):t.removeAttribute(`${r}:${n}`)}else t.removeAttribute(n)}addClass(t,n){t.classList.add(n)}removeClass(t,n){t.classList.remove(n)}setStyle(t,n,r,o){let i=n.startsWith("--");i&&(n=n.replace("%NS%",this.cssVarNamespace)),i||o&(Qt.DashCase|Qt.Important)?t.style.setProperty(n,r,o&Qt.Important?"important":""):t.style[n]=r}removeStyle(t,n,r){let o=n.startsWith("--");o&&(n=n.replace("%NS%",this.cssVarNamespace)),o||r&Qt.DashCase?t.style.removeProperty(n):t.style[n]=""}setProperty(t,n,r){t!=null&&(t[n]=r)}setValue(t,n){t.nodeValue=n}listen(t,n,r,o){if(typeof t=="string"&&(t=Vn().getGlobalEventTarget(this.doc,t),!t))throw new R(-5102,!1);let i=this.decoratePreventDefault(r);return this.tracingService?.wrapEventListener&&(i=this.tracingService.wrapEventListener(t,n,i)),this.eventManager.addEventListener(t,n,i,o)}decoratePreventDefault(t){return n=>{if(n==="__ngUnwrap__")return t;t(n)===!1&&n.preventDefault()}}};function fg(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var Ca=class extends ai{hostEl;sharedStylesHost;shadowRoot;constructor(t,n,r,o,i,s,a,c,l){super(t,o,i,a,c),this.hostEl=n,this.sharedStylesHost=l,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let u=r.styles;u=hg(r.id,u).map(p=>p.replace(/%NS%/g,c));for(let p of u){let f=document.createElement("style");s&&f.setAttribute("nonce",s),f.textContent=p,this.shadowRoot.appendChild(f)}let d=r.getExternalStyles?.();if(d)for(let p of d){let f=od(p,o);s&&f.setAttribute("nonce",s),this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,n){return super.appendChild(this.nodeOrShadowRoot(t),n)}insertBefore(t,n,r){return super.insertBefore(this.nodeOrShadowRoot(t),n,r)}removeChild(t,n){return super.removeChild(null,n)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},ci=class extends ai{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,n,r,o,i,s,a,c,l){super(t,i,s,a,c),this.sharedStylesHost=n,this.removeStylesOnCompDestroy=o;let u=r.styles,d=l?hg(l,u):u;this.styles=d.map(p=>p.replace(/%NS%/g,c)),this.styleUrls=r.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Pn.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},xa=class extends ci{contentAttr;hostAttr;constructor(t,n,r,o,i,s,a,c,l){let u=o+"-"+r.id;super(t,n,r,i,s,a,c,l,u),this.contentAttr=Gb(u),this.hostAttr=Wb(u)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,n){let r=super.createElement(t,n);return super.setAttribute(r,this.contentAttr,""),r}};var Ta=class e extends ri{supportsDOMEvents=!0;static makeCurrent(){Gu(new e)}onAndCancel(t,n,r,o){return t.addEventListener(n,r,o),()=>{t.removeEventListener(n,r,o)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.remove()}createElement(t,n){return n=n||this.getDefaultDocument(),n.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,n){return n==="window"?window:n==="document"?t:n==="body"?t.body:null}getBaseHref(t){let n=qb();return n==null?null:Yb(n)}resetBaseElement(){li=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return ni(document.cookie,t)}},li=null;function qb(){return li=li||document.head.querySelector("base"),li?li.getAttribute("href"):null}function Yb(e){return new URL(e,document.baseURI).pathname}var mg=["alt","control","meta","shift"],Zb={"\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"},Xb={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},gg=(()=>{class e extends si{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,o,i){let s=e.parseEventName(r),a=e.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Vn().onAndCancel(n,s.domEventName,a,i))}static parseEventName(n){let r=n.toLowerCase().split("."),o=r.shift();if(r.length===0||!(o==="keydown"||o==="keyup"))return null;let i=e._normalizeKey(r.pop()),s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),mg.forEach(l=>{let u=r.indexOf(l);u>-1&&(r.splice(u,1),s+=l+".")}),s+=i,r.length!=0||i.length===0)return null;let c={};return c.domEventName=o,c.fullKey=s,c}static matchEventFullKeyCode(n,r){let o=Zb[n.key]||n.key,i="";return r.indexOf("code.")>-1&&(o=n.code,i="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),mg.forEach(s=>{if(s!==o){let a=Xb[s];a(n)&&(i+=s+".")}}),i+=o,i===r)}static eventCallback(n,r,o){return i=>{e.matchEventFullKeyCode(i,n)&&o.runGuarded(()=>r(i))}}static _normalizeKey(n){return n==="esc"?"escape":n}static \u0275fac=function(r){return new(r||e)(J(Ve))};static \u0275prov=le({token:e,factory:e.\u0275fac})}return e})();async function ld(e,t,n){let r=B({rootComponent:e},Kb(t,n));return Vm(r)}function Kb(e,t){return{platformRef:t?.platformRef,appProviders:[...nC,...e?.providers??[]],platformProviders:tC}}function Qb(){Ta.makeCurrent()}function Jb(){return new ft}function eC(){return uu(document),document}var tC=[{provide:Po,useValue:lg},{provide:Fs,useValue:Qb,multi:!0},{provide:Ve,useFactory:eC}];var nC=[{provide:Mo,useValue:"root"},{provide:ft,useFactory:Jb},{provide:Ia,useClass:ba,multi:!0},{provide:Ia,useClass:gg,multi:!0},cd,{provide:vr,useClass:sd},{provide:sd,useExisting:vr},id,{provide:gr,useExisting:cd},[]];var Rt={cursor:"Cursor",claude:"Claude Code",codex:"Codex",copilot:"GitHub Copilot"},ao=["cursor","claude","codex","copilot"],Sa={cursor:"/client-logos/cursor.png",claude:"/client-logos/claude.png",codex:"/client-logos/chatgpt.webp",copilot:"/client-logos/copilot.svg"},yg={optimizer:["Your context iceberg.","Estimate local context and the input cost of loading it once."],checklist:["Optimize your workflow.","Check local tools and follow recommended installation steps."],context:["See what your agent can find.","Explore the files each coding agent can reach from its context."],rules:["Rules in your workspace.","Browse the rule files discovered for Cursor, Claude Code, and GitHub Copilot."],skills:["Skills your agent can use.","Find each workflow and see which clients discover it."],mcp:["Configured MCP servers.","See where each server is configured and which clients can find it."]},Ma=e=>"paths"in e?e.paths:"aliases"in e?e.aliases:[e.path],ui=e=>"description"in e?e.description:"",Na=(e,t)=>"invocation"in e?e.invocation[t]??"":"";function vg(e){return e.legacy?"Legacy .cursorrules":[e.alwaysApply?"Cursor alwaysApply":"",e.globs.length?`Cursor globs: ${e.globs.join(", ")}`:"",e.pathsCondition.length?`Claude paths: ${e.pathsCondition.join(", ")}`:"",e.applyTo.length?`Copilot applyTo: ${e.applyTo.join(", ")}`:""].filter(Boolean).join(" \xB7 ")||"No path condition"}function co(e,t,n,r){let o=r.toLowerCase();return e.filter(i=>(t==="all"||i.scope===t)&&(n==="all"||i.clients.includes(n))&&(!o||`${i.name} ${"path"in i?i.path:i.paths.join(" ")} ${ui(i)} ${"globs"in i?i.globs.join(" "):""} ${"pathsCondition"in i?i.pathsCondition.join(" "):""} ${"applyTo"in i?i.applyTo.join(" "):""}`.toLowerCase().includes(o)))}var nn=e=>e instanceof Error?e.message:"Unable to read the workspace.";var lo=class e{assetScope=Ge.required();static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ie({type:e,selectors:[["","appScope",""]],hostVars:2,hostBindings:function(n,r){n&2&&Er("badge "+r.assetScope())},inputs:{assetScope:[1,"assetScope"]},decls:2,vars:3,template:function(n,r){n&1&&(ye(0,"i"),v(1)),n&2&&(Er("dot "+r.assetScope()),m(),j(r.assetScope()==="user"?"User":"Project"))},encapsulation:2})},uo=class e{client=Ge.required();active=Ge.required();hint=Ge("");icons=Sa;text(){return`${Rt[this.client()]}: ${this.active()?"discovered":"not discovered"}${this.hint()?" \xB7 "+this.hint():""}`}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ie({type:e,selectors:[["","appClient",""]],hostAttrs:["role","img"],hostVars:4,hostBindings:function(n,r){n&2&&(re("title",r.text()),ne("aria-label",r.text()),Er("client-icon client-icon--"+r.client()+(r.active()?"":" off")))},inputs:{client:[1,"client"],active:[1,"active"],hint:[1,"hint"]},decls:1,vars:1,consts:[["alt","","aria-hidden","true",3,"src"]],template:function(n,r){n&1&&ye(0,"img",0),n&2&&re("src",r.icons[r.client()],Ln)},encapsulation:2})};var rC=(e,t)=>t.id;function oC(e,t){if(e&1&&(M(0,"th",1),v(1),N()),e&2){let n=t.$implicit;m(),j(n)}}function iC(e,t){if(e&1&&(M(0,"td"),v(1),N()),e&2){let n=x().$implicit,r=x();m(),j(r.conditions(n))}}function sC(e,t){if(e&1&&(M(0,"td")(1,"span",8),v(2),N()()),e&2){let n=x().$implicit;m(2),j(n.mode)}}function aC(e,t){if(e&1&&(M(0,"td")(1,"span",9),v(2),N()(),M(3,"td"),v(4),N()),e&2){let n=x().$implicit;m(),Te("neutral",n.status==="Disabled")("warn",n.status!=="Disabled"),m(),de("\u25CB ",n.status),m(2),j(n.transport)}}function cC(e,t){if(e&1&&(M(0,"td"),v(1),N(),M(2,"td",10),v(3),N()),e&2){let n=x().$implicit;m(),j(n.kind),m(2),j(n.lines.toLocaleString())}}function lC(e,t){if(e&1&&Ke(0,"span",7),e&2){let n=t.$implicit,r=x().$implicit,o=x();he("client",n)("active",r.clients.includes(n))("hint",o.invocation(r,n))}}function uC(e,t){if(e&1){let n=ue();M(0,"tr")(1,"td",2)(2,"button",3),we("click",function(){let o=$(n).$implicit,i=x();return U(i.selected.emit(o))}),v(3),N(),M(4,"p",4),v(5),N()(),ee(6,iC,2,1,"td"),ee(7,sC,3,1,"td"),ee(8,aC,5,6),ee(9,cC,4,2),M(10,"td"),Ke(11,"span",5),N(),M(12,"td")(13,"div",6),me(14,lC,1,3,"span",7,gt),N()()()}if(e&2){let n=t.$implicit,r=x();m(2),ne("data-detail",n.id),m(),de(" ",n.name," "),m(),he("title","path"in n?n.path:n.paths.join(`
|
|
6
|
+
`)),m(),de(" ",r.description(n)||r.paths(n)[0]," "),m(),te("globs"in n?6:-1),m(),te("mode"in n?7:-1),m(),te("status"in n?8:-1),m(),te("kind"in n?9:-1),m(2),he("assetScope",n.scope),m(3),ge(r.clients)}}var Aa=class e{rows=Ge.required();tab=Ge.required();selected=ro();paths=Ma;description=ui;conditions=vg;invocation=Na;clients=ao;headers={context:["File","Type","Lines","Scope","Clients"],rules:["Rule","Conditions","Scope","Clients"],skills:["Skill","Invocation","Scope","Clients"],mcp:["Server","Connection","Transport","Scope","Clients"]};help={context:"Client icons show entry points and linked documents that each agent can discover. They do not confirm a file loaded in a session. Unlinked knowledge has no client entry point.",rules:"Dedicated Cursor, Claude Code, and GitHub Copilot instruction files. File metadata describes conditions; it does not prove a rule loaded in a session. General instructions remain in Context.",skills:"Client icons: Cursor \xB7 Claude Code \xB7 Codex \xB7 GitHub Copilot. Active means a discovery path was found, not a running session. Hover for invocation details. Identical copies are grouped.",mcp:"Client icons: Cursor \xB7 Claude Code \xB7 Codex \xB7 GitHub Copilot. Configuration does not prove a live connection. The viewer never launches a server or sends credentials."};static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ie({type:e,selectors:[["div","appAssetTable",""]],inputs:{rows:[1,"rows"],tab:[1,"tab"]},outputs:{selected:"selected"},decls:10,vars:1,consts:[[1,"table-help"],["scope","col"],[1,"name"],[3,"click"],[3,"title"],["appScope","",3,"assetScope"],[1,"client-icons"],["appClient","",3,"client","active","hint"],[1,"badge","neutral"],[1,"badge"],[1,"line-count"]],template:function(n,r){n&1&&(M(0,"div",0),v(1),N(),M(2,"table")(3,"thead")(4,"tr"),me(5,oC,2,1,"th",1,gt),N()(),M(7,"tbody"),me(8,uC,16,9,"tr",null,rC),N()()),n&2&&(m(),j(r.help[r.tab()]),m(4),ge(r.headers[r.tab()]),m(3),ge(r.rows()))},dependencies:[lo,uo],encapsulation:2})};var rn=class e{http=S(_a);token=new URLSearchParams(location.hash.slice(1)).get("token")||sessionStorage.getItem("boyscout-token")||"";constructor(){this.token&&sessionStorage.setItem("boyscout-token",this.token),history.replaceState(null,"",location.pathname)}async request(t,n,r){try{return await Oc(this.http.request(t,n,{body:r,headers:{Authorization:`Bearer ${this.token}`}}))}catch(o){if(o instanceof vn){let i=o.error;if(i&&typeof i=="object"&&"error"in i&&typeof i.error=="string")throw new Error(i.error)}throw new Error("Unable to read the workspace.")}}scan(t=!1){return this.request("GET",`/api/scan${t?"?refresh=1":""}`)}estimate(t,n){return this.request("GET",`/api/token-estimate?client=${t}&model=${encodeURIComponent(n)}`)}optimizationChecks(){return this.request("GET","/api/optimization-checks")}content(t){return this.request("GET",`/api/content?id=${encodeURIComponent(t)}`)}file(t){return this.request("GET",`/api/file?id=${encodeURIComponent(t)}`)}save(t,n){return this.request("PUT",`/api/file?id=${encodeURIComponent(t)}`,n)}delete(t,n){return this.request("DELETE",`/api/file?id=${encodeURIComponent(t)}`,{revision:n})}static \u0275fac=function(n){return new(n||e)};static \u0275prov=le({token:e,factory:e.\u0275fac,providedIn:"root"})};var Eg="pek:filters:v1";function dC(){try{let e=JSON.parse(localStorage.getItem(Eg)??"null");if(e&&typeof e=="object"){let t=e;return{scope:t.scope==="project"||t.scope==="user"?t.scope:"all"}}}catch{}return{scope:"all"}}var yt=class e{api=S(rn);data=V(null);tab=V("optimizer");assetTab=ve(()=>{let t=this.tab();return t==="optimizer"||t==="checklist"?"context":t});savedFilters=dC();scope=V(this.savedFilters.scope);client=V("all");filterStorageError=V("");boardSkills=ve(()=>co(this.data()?.skills??[],"all",this.client(),""));search=V("");view=V("graph");skillsView=V("list");whiteboard=ve(()=>this.tab()==="skills"&&this.skillsView()==="board");loading=V(!1);error=V("");selection=V(null);theme=V(localStorage.getItem("boyscout-theme")==="dark"?"dark":"light");rows=ve(()=>{let t=this.data(),n=this.tab();if(n==="optimizer"||n==="checklist")return[];let r=t?n==="context"?t.nodes:t[n]:[];return co(r,this.scope(),this.client(),this.search())});nodes=ve(()=>co(this.data()?.nodes??[],this.scope(),this.client(),this.search()));summary=ve(()=>{if(this.error())return"Session unavailable";if(!this.data())return"Reading local assets";if(this.tab()==="checklist")return"Local installation checks";let t=this.whiteboard()?this.boardSkills():this.rows(),n=t.filter(o=>o.scope==="project").length,r=this.tab()==="context"?"files":this.tab()==="mcp"?"servers":this.tab();return`${t.length} ${r} \xB7 ${n} project \xB7 ${t.length-n} user`});constructor(){document.documentElement.dataset.theme=this.theme(),at(()=>{let t={scope:this.scope()};try{localStorage.setItem(Eg,JSON.stringify(t)),this.filterStorageError.set("")}catch{this.filterStorageError.set("Filters could not be saved in this browser.")}})}async load(t=!1){this.loading.set(!0);try{let n=await this.api.scan(t);this.data.set(n),this.error.set(""),document.title=`${n.project.name} \xB7 Agent Visualizer`}catch(n){this.error.set(nn(n))}finally{this.loading.set(!1)}}selectTab(t){this.tab.set(t),this.search.set(""),this.selection.set(null)}toggleClient(t){this.client.update(n=>n===t?"all":t),this.selection.set(null)}toggleTheme(){let t=this.theme()==="dark"?"light":"dark";this.theme.set(t),localStorage.setItem("boyscout-theme",t),document.documentElement.dataset.theme=t}static \u0275fac=function(n){return new(n||e)};static \u0275prov=le({token:e,factory:e.\u0275fac,providedIn:"root"})};var fC=(e,t)=>t.id;function pC(e,t){if(e&1&&(M(0,"p",6),v(1),N()),e&2){let n=t.$implicit;m(),j(n)}}function hC(e,t){if(e&1&&me(0,pC,2,1,"p",6,gt),e&2){let n=x(),r=x();ge(r.paths(n))}}function mC(e,t){if(e&1&&(M(0,"p",6),v(1),N()),e&2){let n=t.$implicit;m(),j(n)}}function gC(e,t){if(e&1&&(M(0,"p"),v(1),N(),M(2,"h3"),v(3),N(),me(4,mC,2,1,"p",6,gt)),e&2){let n=x(),r=x();m(),j(r.description(n)),m(2),de("Source ",r.paths(n).length>1?"paths":"path"),m(),ge(r.paths(n))}}function yC(e,t){if(e&1&&(M(0,"div",5),Ke(1,"span",7),v(2),N()),e&2){let n=t.$implicit,r=x(),o=x();m(),he("client",n)("active",r.clients.includes(n)),m(),kt("",o.labels[n]," \xB7 ",o.invocation(r,n)||(r.clients.includes(n)?o.state.selection()?.tab==="context"?"Entry point or linked":"Configured":"Not discovered")," ")}}function vC(e,t){e&1&&(M(0,"p"),v(1," Includes a legacy .codex/skills discovery path. Client behavior can depend on its installed version. "),N())}function EC(e,t){if(e&1&&(M(0,"h3"),v(1,"Declared conditions"),N(),M(2,"p"),v(3),N(),M(4,"p"),v(5," File discovery does not confirm whether this rule loaded in an agent session. "),N()),e&2){let n=x(),r=x();m(3),j(r.ruleConditions(n))}}function DC(e,t){if(e&1&&(M(0,"h3"),v(1,"Connection status"),N(),M(2,"p"),v(3),N(),M(4,"p"),v(5),N(),M(6,"p"),v(7," Commands, arguments, server URLs, headers, and credentials are intentionally omitted. "),N()),e&2){let n=x();m(3),kt(" ",n.status,". ",n.status==="Disabled"?"Disabled in this file.":"Check the client\u2019s MCP panel to confirm its live connection."," "),m(2),j(n.origin)}}function _C(e,t){if(e&1&&(M(0,"option",20),v(1),N()),e&2){let n=t.$implicit;he("value",n.id),m(),j(n.path)}}function wC(e,t){if(e&1){let n=ue();M(0,"label",9),v(1,"Source file"),M(2,"select",19,1),we("change",function(){$(n);let o=ct(3),i=x(4);return U(i.source(o.value))}),me(4,_C,2,2,"option",20,fC),N()()}if(e&2){let n=x(4);m(2),he("value",n.targetId())("disabled",n.mode()!=="preview"),m(2),ge(n.targets())}}function bC(e,t){if(e&1){let n=ue();ee(0,wC,6,2,"label",9),M(1,"button",10),we("click",function(){$(n);let o=x(3);return U(o.edit())}),v(2," Edit file "),N(),M(3,"button",11),we("click",function(){$(n);let o=x(3);return U(o.confirmDelete())}),v(4," Delete file "),N(),M(5,"div",12)(6,"p"),v(7),N(),M(8,"button",13),we("click",function(){$(n);let o=x(3);return U(o.remove())}),v(9," Delete permanently"),N(),M(10,"button",13),we("click",function(){$(n);let o=x(3);return U(o.cancel())}),v(11," Cancel "),N()(),M(12,"form",14),we("submit",function(o){$(n);let i=x(3);return U(i.save(o))}),M(13,"textarea",15,0),we("input",function(){$(n);let o=ct(14),i=x(3);return U(i.draft.set(o.value))}),N(),M(15,"div",16)(16,"button",17),v(17,"Save"),N(),M(18,"button",13),we("click",function(){$(n);let o=x(3);return U(o.cancel())}),v(19," Cancel "),N()()(),M(20,"p",18),v(21),N()}if(e&2){let n=x(2),r=x();te(r.targets().length>1?0:-1),m(),he("disabled",!r.file())("hidden",r.mode()!=="preview"),m(2),he("disabled",!r.file())("hidden",r.mode()!=="preview"||!r.target()?.deletable),m(2),he("hidden",r.mode()!=="delete"),m(2),de("Delete ",r.target()?.path," permanently?"),m(),he("disabled",r.busy()),m(2),he("disabled",r.busy()),m(2),he("hidden",r.mode()!=="edit"),m(),he("value",r.draft()),ne("aria-label","Edit "+n.name),m(3),he("disabled",r.busy()),m(2),he("disabled",r.busy()),m(3),j(r.status())}}function CC(e,t){if(e&1&&(M(0,"h3"),v(1,"File preview"),N(),M(2,"pre",8),v(3),N(),ee(4,bC,22,15)),e&2){let n=x(2);m(2),he("hidden",n.mode()==="edit"),m(),j(n.preview()),m(),te(n.targets().length?4:-1)}}function xC(e,t){if(e&1&&(Ke(0,"span",4),M(1,"h2"),v(2),N(),ee(3,hC,2,0)(4,gC,6,2),M(5,"h3"),v(6,"Client discovery"),N(),me(7,yC,3,4,"div",5,gt),ee(9,vC,2,0,"p"),ee(10,EC,6,1),ee(11,DC,8,3)(12,CC,5,3)),e&2){let n=t,r=x();he("assetScope",n.scope),m(2),j(n.name),m(),te(r.state.selection()?.tab==="context"?3:4),m(4),ge(r.clients),m(2),te("legacy"in n&&n.legacy&&r.state.selection()?.tab==="skills"?9:-1),m(),te(r.state.selection()?.tab==="rules"?10:-1),m(),te("status"in n?11:12)}}var ka=class e{state=S(yt);api=S(rn);element=S(yn);paths=Ma;clients=ao;labels=Rt;invocation=Na;row=ve(()=>this.state.selection()?.row??null);targets=ve(()=>{let t=this.row();return t&&"editTargets"in t?t.editTargets:[]});targetId=V("");target=ve(()=>this.targets().find(t=>t.id===this.targetId())??this.targets()[0]);preview=V("Loading\u2026");file=V(null);mode=V("preview");draft=V("");status=V("");busy=V(!1);sequence=0;lastFocus=null;focusTimer;constructor(){at(()=>{let t=this.state.selection();Bn(()=>this.show(t))}),S(ke).onDestroy(()=>{this.sequence++,clearTimeout(this.focusTimer)})}description(t){return ui(t)||("kind"in t?t.path:"MCP server configuration")}ruleConditions(t){return"globs"in t?t.legacy?"Legacy .cursorrules":[t.alwaysApply?"Cursor alwaysApply: true":"",t.globs.length?`Cursor globs: ${t.globs.join(", ")}`:"",t.pathsCondition.length?`Claude paths: ${t.pathsCondition.join(", ")}`:"",t.applyTo.length?`Copilot applyTo: ${t.applyTo.join(", ")}`:""].filter(Boolean).join(" \xB7 ")||"No path condition declared":""}focus(t){clearTimeout(this.focusTimer),this.focusTimer=setTimeout(()=>this.element.nativeElement.querySelector(t)?.focus())}show(t){if(this.sequence++,clearTimeout(this.focusTimer),!t){this.lastFocus?.isConnected&&this.lastFocus.focus(),this.lastFocus=null;return}this.lastFocus=document.activeElement instanceof HTMLElement?document.activeElement:null,this.mode.set("preview"),this.status.set(""),this.busy.set(!1),this.file.set(null),this.preview.set("Loading\u2026"),this.targetId.set(this.targets()[0]?.id??""),this.focus("#close-detail"),t.tab!=="mcp"&&this.loadPreview()}async loadPreview(){let t=++this.sequence;this.preview.set("Loading\u2026"),this.file.set(null),this.status.set(""),this.mode.set("preview");let n=this.row();if(!n)return;let r=this.target();try{if(r){let o=await this.api.file(r.id);if(t!==this.sequence)return;this.file.set(o),this.preview.set(o.text)}else{let o=await this.api.content(n.id);t===this.sequence&&this.preview.set(o.text)}}catch(o){t===this.sequence&&this.preview.set(nn(o))}}source(t){this.targetId.set(t),this.loadPreview()}edit(){let t=this.file();t&&(this.draft.set(t.text),this.mode.set("edit"),this.status.set(""),this.focus("textarea"))}confirmDelete(){this.mode.set("delete"),this.status.set(""),this.focus(".delete-confirm button")}cancel(){let t=this.mode();this.mode.set("preview"),this.focus(t==="edit"?".edit-button":".delete-button")}close(){this.state.selection.set(null)}async save(t){t.preventDefault();let n=this.target(),r=this.file();if(!n||!r||this.busy())return;let o=this.sequence,i=this.draft();this.busy.set(!0),this.status.set("Saving\u2026");try{let s=await this.api.save(n.id,{text:i,revision:r.revision});if(o!==this.sequence)return;this.file.set({text:i,revision:s.revision}),this.preview.set(i),this.mode.set("preview"),this.status.set("Saved. Workspace rescanned."),await this.state.load(!0)}catch(s){o===this.sequence&&this.status.set(nn(s))}finally{o===this.sequence&&this.busy.set(!1)}}async remove(){let t=this.target(),n=this.file();if(!t||!n||this.busy())return;let r=this.sequence;this.busy.set(!0),this.status.set("Deleting\u2026");try{if(await this.api.delete(t.id,n.revision),r!==this.sequence)return;this.close(),await this.state.load(!0)}catch(o){r===this.sequence&&this.status.set(nn(o))}finally{r===this.sequence&&this.busy.set(!1)}}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ie({type:e,selectors:[["aside","appDetail",""]],decls:4,vars:1,consts:[["text",""],["sourceFile",""],["id","close-detail","aria-label","Close details",1,"close-button",3,"click"],["id","detail-body"],["appScope","",3,"assetScope"],[1,"client-line"],[1,"mono","source-path"],["appClient","",3,"client","active"],[3,"hidden"],[1,"edit-source"],[1,"edit-button",3,"click","disabled","hidden"],[1,"delete-button",3,"click","disabled","hidden"],[1,"delete-confirm",3,"hidden"],["type","button",3,"click","disabled"],[1,"edit-form",3,"submit","hidden"],["spellcheck","false",3,"input","value"],[1,"edit-actions"],["type","submit",3,"disabled"],["role","status",1,"edit-status"],[3,"change","value","disabled"],[3,"value"]],template:function(n,r){if(n&1&&(M(0,"button",2),we("click",function(){return r.close()}),v(1,` \xD7
|
|
7
|
+
`),N(),M(2,"div",3),ee(3,xC,13,6),N()),n&2){let o;m(3),te((o=r.row())?3:-1,o)}},dependencies:[lo,uo],encapsulation:2})};var Oa=class e{state=S(yt);query=V("");timeout;constructor(){at(()=>{this.state.tab(),clearTimeout(this.timeout),this.query.set("")}),S(ke).onDestroy(()=>clearTimeout(this.timeout))}search(t){this.query.set(t),clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.state.search.set(t),130)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ie({type:e,selectors:[["div","appFilters",""]],decls:16,vars:11,consts:[["searchInput",""],["role","group","aria-label","Asset scope",1,"scope-tabs"],["data-scope","all",3,"click"],["data-scope","project","title","Shared with your team",3,"click"],[1,"dot","project"],["data-scope","user","title","Not shared with your team",3,"click"],[1,"dot","user"],[1,"filters"],[1,"search"],["id","search","aria-label","Search assets",3,"input","value","placeholder"]],template:function(n,r){if(n&1){let o=ue();b(0,"div",1)(1,"button",2),W("click",function(){return r.state.scope.set("all")}),v(2," All assets "),C(),b(3,"button",3),W("click",function(){return r.state.scope.set("project")}),ye(4,"i",4),v(5,"Project "),C(),b(6,"button",5),W("click",function(){return r.state.scope.set("user")}),ye(7,"i",6),v(8,"On Your Machine "),C()(),b(9,"div",7)(10,"label",8),v(11,"\u2315"),b(12,"input",9,0),W("input",function(){$(o);let s=ct(13);return U(r.search(s.value))}),C(),b(14,"kbd"),v(15,"/"),C()()()}n&2&&(m(),Te("selected",r.state.scope()==="all"),ne("aria-pressed",r.state.scope()==="all"),m(2),Te("selected",r.state.scope()==="project"),ne("aria-pressed",r.state.scope()==="project"),m(3),Te("selected",r.state.scope()==="user"),ne("aria-pressed",r.state.scope()==="user"),m(6),re("value",r.query())("placeholder",r.state.tab()==="context"?"Find a file\u2026":r.state.tab()==="rules"?"Find a rule\u2026":r.state.tab()==="skills"?"Find a skill\u2026":"Find a server\u2026"))},encapsulation:2})};var IC={value:()=>{}};function _g(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Ra(n)}function Ra(e){this._=e}function TC(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ra.prototype=_g.prototype={constructor:Ra,on:function(e,t){var n=this._,r=TC(e+"",n),o,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((o=(e=r[i]).type)&&(o=SC(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<s;)if(o=(e=r[i]).type)n[o]=Dg(n[o],e.name,t);else if(t==null)for(o in n)n[o]=Dg(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Ra(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,i;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],r=0,o=i.length;r<o;++r)i[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};function SC(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function Dg(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=IC,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var _n=_g;var Pa="http://www.w3.org/1999/xhtml",ud={svg:"http://www.w3.org/2000/svg",xhtml:Pa,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function wn(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),ud.hasOwnProperty(t)?{space:ud[t],local:e}:e}function MC(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Pa&&t.documentElement.namespaceURI===Pa?t.createElement(e):t.createElementNS(n,e)}}function NC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Fa(e){var t=wn(e);return(t.local?NC:MC)(t)}function AC(){}function _r(e){return e==null?AC:function(){return this.querySelector(e)}}function wg(e){typeof e!="function"&&(e=_r(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,a=r[o]=new Array(s),c,l,u=0;u<s;++u)(c=i[u])&&(l=e.call(c,c.__data__,u,i))&&("__data__"in c&&(l.__data__=c.__data__),a[u]=l);return new Se(r,this._parents)}function dd(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function kC(){return[]}function di(e){return e==null?kC:function(){return this.querySelectorAll(e)}}function OC(e){return function(){return dd(e.apply(this,arguments))}}function bg(e){typeof e=="function"?e=OC(e):e=di(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var s=t[i],a=s.length,c,l=0;l<a;++l)(c=s[l])&&(r.push(e.call(c,c.__data__,l,s)),o.push(c));return new Se(r,o)}function fi(e){return function(){return this.matches(e)}}function La(e){return function(t){return t.matches(e)}}var RC=Array.prototype.find;function PC(e){return function(){return RC.call(this.children,e)}}function FC(){return this.firstElementChild}function Cg(e){return this.select(e==null?FC:PC(typeof e=="function"?e:La(e)))}var LC=Array.prototype.filter;function jC(){return Array.from(this.children)}function BC(e){return function(){return LC.call(this.children,e)}}function xg(e){return this.selectAll(e==null?jC:BC(typeof e=="function"?e:La(e)))}function Ig(e){typeof e!="function"&&(e=fi(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,a=r[o]=[],c,l=0;l<s;++l)(c=i[l])&&e.call(c,c.__data__,l,i)&&a.push(c);return new Se(r,this._parents)}function ja(e){return new Array(e.length)}function Tg(){return new Se(this._enter||this._groups.map(ja),this._parents)}function pi(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}pi.prototype={constructor:pi,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Sg(e){return function(){return e}}function VC(e,t,n,r,o,i){for(var s=0,a,c=t.length,l=i.length;s<l;++s)(a=t[s])?(a.__data__=i[s],r[s]=a):n[s]=new pi(e,i[s]);for(;s<c;++s)(a=t[s])&&(o[s]=a)}function HC(e,t,n,r,o,i,s){var a,c,l=new Map,u=t.length,d=i.length,p=new Array(u),f;for(a=0;a<u;++a)(c=t[a])&&(p[a]=f=s.call(c,c.__data__,a,t)+"",l.has(f)?o[a]=c:l.set(f,c));for(a=0;a<d;++a)f=s.call(e,i[a],a,i)+"",(c=l.get(f))?(r[a]=c,c.__data__=i[a],l.delete(f)):n[a]=new pi(e,i[a]);for(a=0;a<u;++a)(c=t[a])&&l.get(p[a])===c&&(o[a]=c)}function $C(e){return e.__data__}function Mg(e,t){if(!arguments.length)return Array.from(this,$C);var n=t?HC:VC,r=this._parents,o=this._groups;typeof e!="function"&&(e=Sg(e));for(var i=o.length,s=new Array(i),a=new Array(i),c=new Array(i),l=0;l<i;++l){var u=r[l],d=o[l],p=d.length,f=UC(e.call(u,u&&u.__data__,l,r)),g=f.length,D=a[l]=new Array(g),y=s[l]=new Array(g),E=c[l]=new Array(p);n(u,d,D,y,E,f,t);for(var h=0,I=0,_,A;h<g;++h)if(_=D[h]){for(h>=I&&(I=h+1);!(A=y[I])&&++I<g;);_._next=A||null}}return s=new Se(s,r),s._enter=a,s._exit=c,s}function UC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ng(){return new Se(this._exit||this._groups.map(ja),this._parents)}function Ag(e,t,n){var r=this.enter(),o=this,i=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?i.remove():n(i),r&&o?r.merge(o).order():o}function kg(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,s=Math.min(o,i),a=new Array(o),c=0;c<s;++c)for(var l=n[c],u=r[c],d=l.length,p=a[c]=new Array(d),f,g=0;g<d;++g)(f=l[g]||u[g])&&(p[g]=f);for(;c<o;++c)a[c]=n[c];return new Se(a,this._parents)}function Og(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],o=r.length-1,i=r[o],s;--o>=0;)(s=r[o])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function Rg(e){e||(e=zC);function t(d,p){return d&&p?e(d.__data__,p.__data__):!d-!p}for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var s=n[i],a=s.length,c=o[i]=new Array(a),l,u=0;u<a;++u)(l=s[u])&&(c[u]=l);c.sort(t)}return new Se(o,this._parents).order()}function zC(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Pg(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Fg(){return Array.from(this)}function Lg(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length;o<i;++o){var s=r[o];if(s)return s}return null}function jg(){let e=0;for(let t of this)++e;return e}function Bg(){return!this.node()}function Vg(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],i=0,s=o.length,a;i<s;++i)(a=o[i])&&e.call(a,a.__data__,i,o);return this}function GC(e){return function(){this.removeAttribute(e)}}function WC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function qC(e,t){return function(){this.setAttribute(e,t)}}function YC(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ZC(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function XC(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Hg(e,t){var n=wn(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?WC:GC:typeof t=="function"?n.local?XC:ZC:n.local?YC:qC)(n,t))}function Ba(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function KC(e){return function(){this.style.removeProperty(e)}}function QC(e,t,n){return function(){this.style.setProperty(e,t,n)}}function JC(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function $g(e,t,n){return arguments.length>1?this.each((t==null?KC:typeof t=="function"?JC:QC)(e,t,n??"")):Hn(this.node(),e)}function Hn(e,t){return e.style.getPropertyValue(t)||Ba(e).getComputedStyle(e,null).getPropertyValue(t)}function ex(e){return function(){delete this[e]}}function tx(e,t){return function(){this[e]=t}}function nx(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Ug(e,t){return arguments.length>1?this.each((t==null?ex:typeof t=="function"?nx:tx)(e,t)):this.node()[e]}function zg(e){return e.trim().split(/^|\s+/)}function fd(e){return e.classList||new Gg(e)}function Gg(e){this._node=e,this._names=zg(e.getAttribute("class")||"")}Gg.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Wg(e,t){for(var n=fd(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function qg(e,t){for(var n=fd(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function rx(e){return function(){Wg(this,e)}}function ox(e){return function(){qg(this,e)}}function ix(e,t){return function(){(t.apply(this,arguments)?Wg:qg)(this,e)}}function Yg(e,t){var n=zg(e+"");if(arguments.length<2){for(var r=fd(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?ix:t?rx:ox)(n,t))}function sx(){this.textContent=""}function ax(e){return function(){this.textContent=e}}function cx(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Zg(e){return arguments.length?this.each(e==null?sx:(typeof e=="function"?cx:ax)(e)):this.node().textContent}function lx(){this.innerHTML=""}function ux(e){return function(){this.innerHTML=e}}function dx(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Xg(e){return arguments.length?this.each(e==null?lx:(typeof e=="function"?dx:ux)(e)):this.node().innerHTML}function fx(){this.nextSibling&&this.parentNode.appendChild(this)}function Kg(){return this.each(fx)}function px(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Qg(){return this.each(px)}function Jg(e){var t=typeof e=="function"?e:Fa(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function hx(){return null}function ey(e,t){var n=typeof e=="function"?e:Fa(e),r=t==null?hx:typeof t=="function"?t:_r(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function mx(){var e=this.parentNode;e&&e.removeChild(this)}function ty(){return this.each(mx)}function gx(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function yx(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ny(e){return this.select(e?yx:gx)}function ry(e){return arguments.length?this.property("__data__",e):this.node().__data__}function vx(e){return function(t){e.call(this,t,this.__data__)}}function Ex(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function Dx(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,i;n<o;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++r]=i;++r?t.length=r:delete this.__on}}}function _x(e,t,n){return function(){var r=this.__on,o,i=vx(t);if(r){for(var s=0,a=r.length;s<a;++s)if((o=r[s]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),o.value=t;return}}this.addEventListener(e.type,i,n),o={type:e.type,name:e.name,value:t,listener:i,options:n},r?r.push(o):this.__on=[o]}}function oy(e,t,n){var r=Ex(e+""),o,i=r.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var c=0,l=a.length,u;c<l;++c)for(o=0,u=a[c];o<i;++o)if((s=r[o]).type===u.type&&s.name===u.name)return u.value}return}for(a=t?_x:Dx,o=0;o<i;++o)this.each(a(r[o],t,n));return this}function iy(e,t,n){var r=Ba(e),o=r.CustomEvent;typeof o=="function"?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function wx(e,t){return function(){return iy(this,e,t)}}function bx(e,t){return function(){return iy(this,e,t.apply(this,arguments))}}function sy(e,t){return this.each((typeof t=="function"?bx:wx)(e,t))}function*ay(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length,s;o<i;++o)(s=r[o])&&(yield s)}var pd=[null];function Se(e,t){this._groups=e,this._parents=t}function cy(){return new Se([[document.documentElement]],pd)}function Cx(){return this}Se.prototype=cy.prototype={constructor:Se,select:wg,selectAll:bg,selectChild:Cg,selectChildren:xg,filter:Ig,data:Mg,enter:Tg,exit:Ng,join:Ag,merge:kg,selection:Cx,order:Og,sort:Rg,call:Pg,nodes:Fg,node:Lg,size:jg,empty:Bg,each:Vg,attr:Hg,style:$g,property:Ug,classed:Yg,text:Zg,html:Xg,raise:Kg,lower:Qg,append:Jg,insert:ey,remove:ty,clone:ny,datum:ry,on:oy,dispatch:sy,[Symbol.iterator]:ay};var bn=cy;function Qe(e){return typeof e=="string"?new Se([[document.querySelector(e)]],[document.documentElement]):new Se([[e]],pd)}function ly(e){let t;for(;t=e.sourceEvent;)e=t;return e}function vt(e,t){if(e=ly(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}var uy={passive:!1},wr={capture:!0,passive:!1};function Va(e){e.stopImmediatePropagation()}function $n(e){e.preventDefault(),e.stopImmediatePropagation()}function hi(e){var t=e.document.documentElement,n=Qe(e).on("dragstart.drag",$n,wr);"onselectstart"in t?n.on("selectstart.drag",$n,wr):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function mi(e,t){var n=e.document.documentElement,r=Qe(e).on("dragstart.drag",null);t&&(r.on("click.drag",$n,wr),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var gi=e=>()=>e;function yi(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:s,y:a,dx:c,dy:l,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:u}})}yi.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function xx(e){return!e.ctrlKey&&!e.button}function Ix(){return this.parentNode}function Tx(e,t){return t??{x:e.x,y:e.y}}function Sx(){return navigator.maxTouchPoints||"ontouchstart"in this}function hd(){var e=xx,t=Ix,n=Tx,r=Sx,o={},i=_n("start","drag","end"),s=0,a,c,l,u,d=0;function p(_){_.on("mousedown.drag",f).filter(r).on("touchstart.drag",y).on("touchmove.drag",E,uy).on("touchend.drag touchcancel.drag",h).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(_,A){if(!(u||!e.call(this,_,A))){var P=I(this,t.call(this,_,A),_,A,"mouse");P&&(Qe(_.view).on("mousemove.drag",g,wr).on("mouseup.drag",D,wr),hi(_.view),Va(_),l=!1,a=_.clientX,c=_.clientY,P("start",_))}}function g(_){if($n(_),!l){var A=_.clientX-a,P=_.clientY-c;l=A*A+P*P>d}o.mouse("drag",_)}function D(_){Qe(_.view).on("mousemove.drag mouseup.drag",null),mi(_.view,l),$n(_),o.mouse("end",_)}function y(_,A){if(e.call(this,_,A)){var P=_.changedTouches,z=t.call(this,_,A),q=P.length,oe,ce;for(oe=0;oe<q;++oe)(ce=I(this,z,_,A,P[oe].identifier,P[oe]))&&(Va(_),ce("start",_,P[oe]))}}function E(_){var A=_.changedTouches,P=A.length,z,q;for(z=0;z<P;++z)(q=o[A[z].identifier])&&($n(_),q("drag",_,A[z]))}function h(_){var A=_.changedTouches,P=A.length,z,q;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),z=0;z<P;++z)(q=o[A[z].identifier])&&(Va(_),q("end",_,A[z]))}function I(_,A,P,z,q,oe){var ce=i.copy(),De=vt(oe||P,A),Fe,Le,w;if((w=n.call(_,new yi("beforestart",{sourceEvent:P,target:p,identifier:q,active:s,x:De[0],y:De[1],dx:0,dy:0,dispatch:ce}),z))!=null)return Fe=w.x-De[0]||0,Le=w.y-De[1]||0,function k(T,O,Y){var X=De,K;switch(T){case"start":o[q]=k,K=s++;break;case"end":delete o[q],--s;case"drag":De=vt(Y||O,A),K=s;break}ce.call(T,_,new yi(T,{sourceEvent:O,subject:w,target:p,identifier:q,active:K,x:De[0]+Fe,y:De[1]+Le,dx:De[0]-X[0],dy:De[1]-X[1],dispatch:ce}),z)}}return p.filter=function(_){return arguments.length?(e=typeof _=="function"?_:gi(!!_),p):e},p.container=function(_){return arguments.length?(t=typeof _=="function"?_:gi(_),p):t},p.subject=function(_){return arguments.length?(n=typeof _=="function"?_:gi(_),p):n},p.touchable=function(_){return arguments.length?(r=typeof _=="function"?_:gi(!!_),p):r},p.on=function(){var _=i.on.apply(i,arguments);return _===i?p:_},p.clickDistance=function(_){return arguments.length?(d=(_=+_)*_,p):Math.sqrt(d)},p}function Ha(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function md(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Di(){}var vi=.7,za=1/vi,fo="\\s*([+-]?\\d+)\\s*",Ei="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",on="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Mx=/^#([0-9a-f]{3,8})$/,Nx=new RegExp(`^rgb\\(${fo},${fo},${fo}\\)$`),Ax=new RegExp(`^rgb\\(${on},${on},${on}\\)$`),kx=new RegExp(`^rgba\\(${fo},${fo},${fo},${Ei}\\)$`),Ox=new RegExp(`^rgba\\(${on},${on},${on},${Ei}\\)$`),Rx=new RegExp(`^hsl\\(${Ei},${on},${on}\\)$`),Px=new RegExp(`^hsla\\(${Ei},${on},${on},${Ei}\\)$`),dy={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ha(Di,Un,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:fy,formatHex:fy,formatHex8:Fx,formatHsl:Lx,formatRgb:py,toString:py});function fy(){return this.rgb().formatHex()}function Fx(){return this.rgb().formatHex8()}function Lx(){return Ey(this).formatHsl()}function py(){return this.rgb().formatRgb()}function Un(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Mx.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?hy(t):n===3?new rt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?$a(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?$a(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Nx.exec(e))?new rt(t[1],t[2],t[3],1):(t=Ax.exec(e))?new rt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=kx.exec(e))?$a(t[1],t[2],t[3],t[4]):(t=Ox.exec(e))?$a(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Rx.exec(e))?yy(t[1],t[2]/100,t[3]/100,1):(t=Px.exec(e))?yy(t[1],t[2]/100,t[3]/100,t[4]):dy.hasOwnProperty(e)?hy(dy[e]):e==="transparent"?new rt(NaN,NaN,NaN,0):null}function hy(e){return new rt(e>>16&255,e>>8&255,e&255,1)}function $a(e,t,n,r){return r<=0&&(e=t=n=NaN),new rt(e,t,n,r)}function jx(e){return e instanceof Di||(e=Un(e)),e?(e=e.rgb(),new rt(e.r,e.g,e.b,e.opacity)):new rt}function po(e,t,n,r){return arguments.length===1?jx(e):new rt(e,t,n,r??1)}function rt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Ha(rt,po,md(Di,{brighter(e){return e=e==null?za:Math.pow(za,e),new rt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?vi:Math.pow(vi,e),new rt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new rt(Cr(this.r),Cr(this.g),Cr(this.b),Ga(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:my,formatHex:my,formatHex8:Bx,formatRgb:gy,toString:gy}));function my(){return`#${br(this.r)}${br(this.g)}${br(this.b)}`}function Bx(){return`#${br(this.r)}${br(this.g)}${br(this.b)}${br((isNaN(this.opacity)?1:this.opacity)*255)}`}function gy(){let e=Ga(this.opacity);return`${e===1?"rgb(":"rgba("}${Cr(this.r)}, ${Cr(this.g)}, ${Cr(this.b)}${e===1?")":`, ${e})`}`}function Ga(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Cr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function br(e){return e=Cr(e),(e<16?"0":"")+e.toString(16)}function yy(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Pt(e,t,n,r)}function Ey(e){if(e instanceof Pt)return new Pt(e.h,e.s,e.l,e.opacity);if(e instanceof Di||(e=Un(e)),!e)return new Pt;if(e instanceof Pt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,a=i-o,c=(i+o)/2;return a?(t===i?s=(n-r)/a+(n<r)*6:n===i?s=(r-t)/a+2:s=(t-n)/a+4,a/=c<.5?i+o:2-i-o,s*=60):a=c>0&&c<1?0:s,new Pt(s,a,c,e.opacity)}function Dy(e,t,n,r){return arguments.length===1?Ey(e):new Pt(e,t,n,r??1)}function Pt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ha(Pt,Dy,md(Di,{brighter(e){return e=e==null?za:Math.pow(za,e),new Pt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?vi:Math.pow(vi,e),new Pt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new rt(gd(e>=240?e-240:e+120,o,r),gd(e,o,r),gd(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Pt(vy(this.h),Ua(this.s),Ua(this.l),Ga(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=Ga(this.opacity);return`${e===1?"hsl(":"hsla("}${vy(this.h)}, ${Ua(this.s)*100}%, ${Ua(this.l)*100}%${e===1?")":`, ${e})`}`}}));function vy(e){return e=(e||0)%360,e<0?e+360:e}function Ua(e){return Math.max(0,Math.min(1,e||0))}function gd(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function yd(e,t,n,r,o){var i=e*e,s=i*e;return((1-3*e+3*i-s)*t+(4-6*i+3*s)*n+(1+3*e+3*i-3*s)*r+s*o)/6}function _y(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),o=e[r],i=e[r+1],s=r>0?e[r-1]:2*o-i,a=r<t-1?e[r+2]:2*i-o;return yd((n-r/t)*t,s,o,i,a)}}function wy(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),o=e[(r+t-1)%t],i=e[r%t],s=e[(r+1)%t],a=e[(r+2)%t];return yd((n-r/t)*t,o,i,s,a)}}var vd=e=>()=>e;function Vx(e,t){return function(n){return e+n*t}}function Hx(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function by(e){return(e=+e)==1?Wa:function(t,n){return n-t?Hx(t,n,e):vd(isNaN(t)?n:t)}}function Wa(e,t){var n=t-e;return n?Vx(e,n):vd(isNaN(e)?t:e)}var qa=(function e(t){var n=by(t);function r(o,i){var s=n((o=po(o)).r,(i=po(i)).r),a=n(o.g,i.g),c=n(o.b,i.b),l=Wa(o.opacity,i.opacity);return function(u){return o.r=s(u),o.g=a(u),o.b=c(u),o.opacity=l(u),o+""}}return r.gamma=e,r})(1);function Cy(e){return function(t){var n=t.length,r=new Array(n),o=new Array(n),i=new Array(n),s,a;for(s=0;s<n;++s)a=po(t[s]),r[s]=a.r||0,o[s]=a.g||0,i[s]=a.b||0;return r=e(r),o=e(o),i=e(i),a.opacity=1,function(c){return a.r=r(c),a.g=o(c),a.b=i(c),a+""}}}var $x=Cy(_y),Ux=Cy(wy);function Et(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Dd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ed=new RegExp(Dd.source,"g");function zx(e){return function(){return e}}function Gx(e){return function(t){return e(t)+""}}function _d(e,t){var n=Dd.lastIndex=Ed.lastIndex=0,r,o,i,s=-1,a=[],c=[];for(e=e+"",t=t+"";(r=Dd.exec(e))&&(o=Ed.exec(t));)(i=o.index)>n&&(i=t.slice(n,i),a[s]?a[s]+=i:a[++s]=i),(r=r[0])===(o=o[0])?a[s]?a[s]+=o:a[++s]=o:(a[++s]=null,c.push({i:s,x:Et(r,o)})),n=Ed.lastIndex;return n<t.length&&(i=t.slice(n),a[s]?a[s]+=i:a[++s]=i),a.length<2?c[0]?Gx(c[0].x):zx(t):(t=c.length,function(l){for(var u=0,d;u<t;++u)a[(d=c[u]).i]=d.x(l);return a.join("")})}var xy=180/Math.PI,Ya={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function wd(e,t,n,r,o,i){var s,a,c;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,c/=a),e*r<t*n&&(e=-e,t=-t,c=-c,s=-s),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*xy,skewX:Math.atan(c)*xy,scaleX:s,scaleY:a}}var Za;function Iy(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ya:wd(t.a,t.b,t.c,t.d,t.e,t.f)}function Ty(e){return e==null?Ya:(Za||(Za=document.createElementNS("http://www.w3.org/2000/svg","g")),Za.setAttribute("transform",e),(e=Za.transform.baseVal.consolidate())?(e=e.matrix,wd(e.a,e.b,e.c,e.d,e.e,e.f)):Ya)}function Sy(e,t,n,r){function o(l){return l.length?l.pop()+" ":""}function i(l,u,d,p,f,g){if(l!==d||u!==p){var D=f.push("translate(",null,t,null,n);g.push({i:D-4,x:Et(l,d)},{i:D-2,x:Et(u,p)})}else(d||p)&&f.push("translate("+d+t+p+n)}function s(l,u,d,p){l!==u?(l-u>180?u+=360:u-l>180&&(l+=360),p.push({i:d.push(o(d)+"rotate(",null,r)-2,x:Et(l,u)})):u&&d.push(o(d)+"rotate("+u+r)}function a(l,u,d,p){l!==u?p.push({i:d.push(o(d)+"skewX(",null,r)-2,x:Et(l,u)}):u&&d.push(o(d)+"skewX("+u+r)}function c(l,u,d,p,f,g){if(l!==d||u!==p){var D=f.push(o(f)+"scale(",null,",",null,")");g.push({i:D-4,x:Et(l,d)},{i:D-2,x:Et(u,p)})}else(d!==1||p!==1)&&f.push(o(f)+"scale("+d+","+p+")")}return function(l,u){var d=[],p=[];return l=e(l),u=e(u),i(l.translateX,l.translateY,u.translateX,u.translateY,d,p),s(l.rotate,u.rotate,d,p),a(l.skewX,u.skewX,d,p),c(l.scaleX,l.scaleY,u.scaleX,u.scaleY,d,p),l=u=null,function(f){for(var g=-1,D=p.length,y;++g<D;)d[(y=p[g]).i]=y.x(f);return d.join("")}}}var bd=Sy(Iy,"px, ","px)","deg)"),Cd=Sy(Ty,", ",")",")");var Wx=1e-12;function My(e){return((e=Math.exp(e))+1/e)/2}function qx(e){return((e=Math.exp(e))-1/e)/2}function Yx(e){return((e=Math.exp(2*e))-1)/(e+1)}var xd=(function e(t,n,r){function o(i,s){var a=i[0],c=i[1],l=i[2],u=s[0],d=s[1],p=s[2],f=u-a,g=d-c,D=f*f+g*g,y,E;if(D<Wx)E=Math.log(p/l)/t,y=function(z){return[a+z*f,c+z*g,l*Math.exp(t*z*E)]};else{var h=Math.sqrt(D),I=(p*p-l*l+r*D)/(2*l*n*h),_=(p*p-l*l-r*D)/(2*p*n*h),A=Math.log(Math.sqrt(I*I+1)-I),P=Math.log(Math.sqrt(_*_+1)-_);E=(P-A)/t,y=function(z){var q=z*E,oe=My(A),ce=l/(n*h)*(oe*Yx(t*q+A)-qx(A));return[a+ce*f,c+ce*g,l*oe/My(t*q+A)]}}return y.duration=E*1e3*t/Math.SQRT2,y}return o.rho=function(i){var s=Math.max(.001,+i),a=s*s,c=a*a;return e(s,a,c)},o})(Math.SQRT2,2,4);var ho=0,wi=0,_i=0,Ay=1e3,Xa,bi,Ka=0,xr=0,Qa=0,Ci=typeof performance=="object"&&performance.now?performance:Date,ky=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ii(){return xr||(ky(Zx),xr=Ci.now()+Qa)}function Zx(){xr=0}function xi(){this._call=this._time=this._next=null}xi.prototype=mo.prototype={constructor:xi,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Ii():+n)+(t==null?0:+t),!this._next&&bi!==this&&(bi?bi._next=this:Xa=this,bi=this),this._call=e,this._time=n,Id()},stop:function(){this._call&&(this._call=null,this._time=1/0,Id())}};function mo(e,t,n){var r=new xi;return r.restart(e,t,n),r}function Oy(){Ii(),++ho;for(var e=Xa,t;e;)(t=xr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ho}function Ny(){xr=(Ka=Ci.now())+Qa,ho=wi=0;try{Oy()}finally{ho=0,Kx(),xr=0}}function Xx(){var e=Ci.now(),t=e-Ka;t>Ay&&(Qa-=t,Ka=e)}function Kx(){for(var e,t=Xa,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Xa=n);bi=e,Id(r)}function Id(e){if(!ho){wi&&(wi=clearTimeout(wi));var t=e-xr;t>24?(e<1/0&&(wi=setTimeout(Ny,e-Ci.now()-Qa)),_i&&(_i=clearInterval(_i))):(_i||(Ka=Ci.now(),_i=setInterval(Xx,Ay)),ho=1,ky(Ny))}}function Ja(e,t,n){var r=new xi;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var Qx=_n("start","end","cancel","interrupt"),Jx=[],Fy=0,Ry=1,tc=2,ec=3,Py=4,nc=5,Ti=6;function zn(e,t,n,r,o,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;eI(e,n,{name:t,index:r,group:o,on:Qx,tween:Jx,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Fy})}function Si(e,t){var n=Oe(e,t);if(n.state>Fy)throw new Error("too late; already scheduled");return n}function $e(e,t){var n=Oe(e,t);if(n.state>ec)throw new Error("too late; already running");return n}function Oe(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function eI(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=mo(i,0,n.time);function i(l){n.state=Ry,n.timer.restart(s,n.delay,n.time),n.delay<=l&&s(l-n.delay)}function s(l){var u,d,p,f;if(n.state!==Ry)return c();for(u in r)if(f=r[u],f.name===n.name){if(f.state===ec)return Ja(s);f.state===Py?(f.state=Ti,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete r[u]):+u<t&&(f.state=Ti,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete r[u])}if(Ja(function(){n.state===ec&&(n.state=Py,n.timer.restart(a,n.delay,n.time),a(l))}),n.state=tc,n.on.call("start",e,e.__data__,n.index,n.group),n.state===tc){for(n.state=ec,o=new Array(p=n.tween.length),u=0,d=-1;u<p;++u)(f=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(o[++d]=f);o.length=d+1}}function a(l){for(var u=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(c),n.state=nc,1),d=-1,p=o.length;++d<p;)o[d].call(e,u);n.state===nc&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=Ti,n.timer.stop(),delete r[t];for(var l in r)return;delete e.__transition}}function Gn(e,t){var n=e.__transition,r,o,i=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){i=!1;continue}o=r.state>tc&&r.state<nc,r.state=Ti,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}i&&delete e.__transition}}function Ly(e){return this.each(function(){Gn(this,e)})}function tI(e,t){var n,r;return function(){var o=$e(this,e),i=o.tween;if(i!==n){r=n=i;for(var s=0,a=r.length;s<a;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}o.tween=r}}function nI(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var i=$e(this,e),s=i.tween;if(s!==r){o=(r=s).slice();for(var a={name:t,value:n},c=0,l=o.length;c<l;++c)if(o[c].name===t){o[c]=a;break}c===l&&o.push(a)}i.tween=o}}function jy(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Oe(this.node(),n).tween,o=0,i=r.length,s;o<i;++o)if((s=r[o]).name===e)return s.value;return null}return this.each((t==null?tI:nI)(n,e,t))}function go(e,t,n){var r=e._id;return e.each(function(){var o=$e(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return Oe(o,r).value[t]}}function rc(e,t){var n;return(typeof t=="number"?Et:t instanceof Un?qa:(n=Un(t))?(t=n,qa):_d)(e,t)}function rI(e){return function(){this.removeAttribute(e)}}function oI(e){return function(){this.removeAttributeNS(e.space,e.local)}}function iI(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttribute(e);return s===o?null:s===r?i:i=t(r=s,n)}}function sI(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===r?i:i=t(r=s,n)}}function aI(e,t,n){var r,o,i;return function(){var s,a=n(this),c;return a==null?void this.removeAttribute(e):(s=this.getAttribute(e),c=a+"",s===c?null:s===r&&c===o?i:(o=c,i=t(r=s,a)))}}function cI(e,t,n){var r,o,i;return function(){var s,a=n(this),c;return a==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),c=a+"",s===c?null:s===r&&c===o?i:(o=c,i=t(r=s,a)))}}function By(e,t){var n=wn(e),r=n==="transform"?Cd:rc;return this.attrTween(e,typeof t=="function"?(n.local?cI:aI)(n,r,go(this,"attr."+e,t)):t==null?(n.local?oI:rI)(n):(n.local?sI:iI)(n,r,t))}function lI(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function uI(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function dI(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&uI(e,i)),n}return o._value=t,o}function fI(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&lI(e,i)),n}return o._value=t,o}function Vy(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=wn(e);return this.tween(n,(r.local?dI:fI)(r,t))}function pI(e,t){return function(){Si(this,e).delay=+t.apply(this,arguments)}}function hI(e,t){return t=+t,function(){Si(this,e).delay=t}}function Hy(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?pI:hI)(t,e)):Oe(this.node(),t).delay}function mI(e,t){return function(){$e(this,e).duration=+t.apply(this,arguments)}}function gI(e,t){return t=+t,function(){$e(this,e).duration=t}}function $y(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?mI:gI)(t,e)):Oe(this.node(),t).duration}function yI(e,t){if(typeof t!="function")throw new Error;return function(){$e(this,e).ease=t}}function Uy(e){var t=this._id;return arguments.length?this.each(yI(t,e)):Oe(this.node(),t).ease}function vI(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;$e(this,e).ease=n}}function zy(e){if(typeof e!="function")throw new Error;return this.each(vI(this._id,e))}function Gy(e){typeof e!="function"&&(e=fi(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,a=r[o]=[],c,l=0;l<s;++l)(c=i[l])&&e.call(c,c.__data__,l,i)&&a.push(c);return new Je(r,this._parents,this._name,this._id)}function Wy(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,i=Math.min(r,o),s=new Array(r),a=0;a<i;++a)for(var c=t[a],l=n[a],u=c.length,d=s[a]=new Array(u),p,f=0;f<u;++f)(p=c[f]||l[f])&&(d[f]=p);for(;a<r;++a)s[a]=t[a];return new Je(s,this._parents,this._name,this._id)}function EI(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function DI(e,t,n){var r,o,i=EI(t)?Si:$e;return function(){var s=i(this,e),a=s.on;a!==r&&(o=(r=a).copy()).on(t,n),s.on=o}}function qy(e,t){var n=this._id;return arguments.length<2?Oe(this.node(),n).on.on(e):this.each(DI(n,e,t))}function _I(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Yy(){return this.on("end.remove",_I(this._id))}function Zy(e){var t=this._name,n=this._id;typeof e!="function"&&(e=_r(e));for(var r=this._groups,o=r.length,i=new Array(o),s=0;s<o;++s)for(var a=r[s],c=a.length,l=i[s]=new Array(c),u,d,p=0;p<c;++p)(u=a[p])&&(d=e.call(u,u.__data__,p,a))&&("__data__"in u&&(d.__data__=u.__data__),l[p]=d,zn(l[p],t,n,p,l,Oe(u,n)));return new Je(i,this._parents,t,n)}function Xy(e){var t=this._name,n=this._id;typeof e!="function"&&(e=di(e));for(var r=this._groups,o=r.length,i=[],s=[],a=0;a<o;++a)for(var c=r[a],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var p=e.call(u,u.__data__,d,c),f,g=Oe(u,n),D=0,y=p.length;D<y;++D)(f=p[D])&&zn(f,t,n,D,p,g);i.push(p),s.push(u)}return new Je(i,s,t,n)}var wI=bn.prototype.constructor;function Ky(){return new wI(this._groups,this._parents)}function bI(e,t){var n,r,o;return function(){var i=Hn(this,e),s=(this.style.removeProperty(e),Hn(this,e));return i===s?null:i===n&&s===r?o:o=t(n=i,r=s)}}function Qy(e){return function(){this.style.removeProperty(e)}}function CI(e,t,n){var r,o=n+"",i;return function(){var s=Hn(this,e);return s===o?null:s===r?i:i=t(r=s,n)}}function xI(e,t,n){var r,o,i;return function(){var s=Hn(this,e),a=n(this),c=a+"";return a==null&&(c=a=(this.style.removeProperty(e),Hn(this,e))),s===c?null:s===r&&c===o?i:(o=c,i=t(r=s,a))}}function II(e,t){var n,r,o,i="style."+t,s="end."+i,a;return function(){var c=$e(this,e),l=c.on,u=c.value[i]==null?a||(a=Qy(t)):void 0;(l!==n||o!==u)&&(r=(n=l).copy()).on(s,o=u),c.on=r}}function Jy(e,t,n){var r=(e+="")=="transform"?bd:rc;return t==null?this.styleTween(e,bI(e,r)).on("end.style."+e,Qy(e)):typeof t=="function"?this.styleTween(e,xI(e,r,go(this,"style."+e,t))).each(II(this._id,e)):this.styleTween(e,CI(e,r,t),n).on("end.style."+e,null)}function TI(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function SI(e,t,n){var r,o;function i(){var s=t.apply(this,arguments);return s!==o&&(r=(o=s)&&TI(e,s,n)),r}return i._value=t,i}function ev(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,SI(e,t,n??""))}function MI(e){return function(){this.textContent=e}}function NI(e){return function(){var t=e(this);this.textContent=t??""}}function tv(e){return this.tween("text",typeof e=="function"?NI(go(this,"text",e)):MI(e==null?"":e+""))}function AI(e){return function(t){this.textContent=e.call(this,t)}}function kI(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&AI(o)),t}return r._value=e,r}function nv(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,kI(e))}function rv(){for(var e=this._name,t=this._id,n=oc(),r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],a=s.length,c,l=0;l<a;++l)if(c=s[l]){var u=Oe(c,t);zn(c,e,n,l,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Je(r,this._parents,e,n)}function ov(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(i,s){var a={value:s},c={value:function(){--o===0&&i()}};n.each(function(){var l=$e(this,r),u=l.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(c)),l.on=t}),o===0&&i()})}var OI=0;function Je(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function iv(e){return bn().transition(e)}function oc(){return++OI}var Cn=bn.prototype;Je.prototype=iv.prototype={constructor:Je,select:Zy,selectAll:Xy,selectChild:Cn.selectChild,selectChildren:Cn.selectChildren,filter:Gy,merge:Wy,selection:Ky,transition:rv,call:Cn.call,nodes:Cn.nodes,node:Cn.node,size:Cn.size,empty:Cn.empty,each:Cn.each,on:qy,attr:By,attrTween:Vy,style:Jy,styleTween:ev,text:tv,textTween:nv,remove:Yy,tween:jy,delay:Hy,duration:$y,ease:Uy,easeVarying:zy,end:ov,[Symbol.iterator]:Cn[Symbol.iterator]};function ic(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var RI={time:null,delay:0,duration:250,ease:ic};function PI(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function sv(e){var t,n;e instanceof Je?(t=e._id,e=e._name):(t=oc(),(n=RI).time=Ii(),e=e==null?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],a=s.length,c,l=0;l<a;++l)(c=s[l])&&zn(c,e,t,l,s,n||PI(c,t));return new Je(r,this._parents,e,t)}bn.prototype.interrupt=Ly;bn.prototype.transition=sv;var{abs:F4,max:L4,min:j4}=Math;function av(e){return[+e[0],+e[1]]}function FI(e){return[av(e[0]),av(e[1])]}var B4={name:"x",handles:["w","e"].map(Td),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},V4={name:"y",handles:["n","s"].map(Td),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},H4={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Td),input:function(e){return e==null?null:FI(e)},output:function(e){return e}};function Td(e){return{type:e}}function cv(e){let t=+this._x.call(null,e),n=+this._y.call(null,e);return lv(this.cover(t,n),t,n,e)}function lv(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var o,i=e._root,s={data:r},a=e._x0,c=e._y0,l=e._x1,u=e._y1,d,p,f,g,D,y,E,h;if(!i)return e._root=s,e;for(;i.length;)if((D=t>=(d=(a+l)/2))?a=d:l=d,(y=n>=(p=(c+u)/2))?c=p:u=p,o=i,!(i=i[E=y<<1|D]))return o[E]=s,e;if(f=+e._x.call(null,i.data),g=+e._y.call(null,i.data),t===f&&n===g)return s.next=i,o?o[E]=s:e._root=s,e;do o=o?o[E]=new Array(4):e._root=new Array(4),(D=t>=(d=(a+l)/2))?a=d:l=d,(y=n>=(p=(c+u)/2))?c=p:u=p;while((E=y<<1|D)===(h=(g>=p)<<1|f>=d));return o[h]=i,o[E]=s,e}function uv(e){var t,n,r=e.length,o,i,s=new Array(r),a=new Array(r),c=1/0,l=1/0,u=-1/0,d=-1/0;for(n=0;n<r;++n)isNaN(o=+this._x.call(null,t=e[n]))||isNaN(i=+this._y.call(null,t))||(s[n]=o,a[n]=i,o<c&&(c=o),o>u&&(u=o),i<l&&(l=i),i>d&&(d=i));if(c>u||l>d)return this;for(this.cover(c,l).cover(u,d),n=0;n<r;++n)lv(this,s[n],a[n],e[n]);return this}function dv(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,o=this._x1,i=this._y1;if(isNaN(n))o=(n=Math.floor(e))+1,i=(r=Math.floor(t))+1;else{for(var s=o-n||1,a=this._root,c,l;n>e||e>=o||r>t||t>=i;)switch(l=(t<r)<<1|e<n,c=new Array(4),c[l]=a,a=c,s*=2,l){case 0:o=n+s,i=r+s;break;case 1:n=o-s,i=r+s;break;case 2:o=n+s,r=i-s;break;case 3:n=o-s,r=i-s;break}this._root&&this._root.length&&(this._root=a)}return this._x0=n,this._y0=r,this._x1=o,this._y1=i,this}function fv(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function pv(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Pe(e,t,n,r,o){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=o}function hv(e,t,n){var r,o=this._x0,i=this._y0,s,a,c,l,u=this._x1,d=this._y1,p=[],f=this._root,g,D;for(f&&p.push(new Pe(f,o,i,u,d)),n==null?n=1/0:(o=e-n,i=t-n,u=e+n,d=t+n,n*=n);g=p.pop();)if(!(!(f=g.node)||(s=g.x0)>u||(a=g.y0)>d||(c=g.x1)<o||(l=g.y1)<i))if(f.length){var y=(s+c)/2,E=(a+l)/2;p.push(new Pe(f[3],y,E,c,l),new Pe(f[2],s,E,y,l),new Pe(f[1],y,a,c,E),new Pe(f[0],s,a,y,E)),(D=(t>=E)<<1|e>=y)&&(g=p[p.length-1],p[p.length-1]=p[p.length-1-D],p[p.length-1-D]=g)}else{var h=e-+this._x.call(null,f.data),I=t-+this._y.call(null,f.data),_=h*h+I*I;if(_<n){var A=Math.sqrt(n=_);o=e-A,i=t-A,u=e+A,d=t+A,r=f.data}}return r}function mv(e){if(isNaN(u=+this._x.call(null,e))||isNaN(d=+this._y.call(null,e)))return this;var t,n=this._root,r,o,i,s=this._x0,a=this._y0,c=this._x1,l=this._y1,u,d,p,f,g,D,y,E;if(!n)return this;if(n.length)for(;;){if((g=u>=(p=(s+c)/2))?s=p:c=p,(D=d>=(f=(a+l)/2))?a=f:l=f,t=n,!(n=n[y=D<<1|g]))return this;if(!n.length)break;(t[y+1&3]||t[y+2&3]||t[y+3&3])&&(r=t,E=y)}for(;n.data!==e;)if(o=n,!(n=n.next))return this;return(i=n.next)&&delete n.next,o?(i?o.next=i:delete o.next,this):t?(i?t[y]=i:delete t[y],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[E]=n:this._root=n),this):(this._root=i,this)}function gv(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function yv(){return this._root}function vv(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function Ev(e){var t=[],n,r=this._root,o,i,s,a,c;for(r&&t.push(new Pe(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,i=n.x0,s=n.y0,a=n.x1,c=n.y1)&&r.length){var l=(i+a)/2,u=(s+c)/2;(o=r[3])&&t.push(new Pe(o,l,u,a,c)),(o=r[2])&&t.push(new Pe(o,i,u,l,c)),(o=r[1])&&t.push(new Pe(o,l,s,a,u)),(o=r[0])&&t.push(new Pe(o,i,s,l,u))}return this}function Dv(e){var t=[],n=[],r;for(this._root&&t.push(new Pe(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var o=r.node;if(o.length){var i,s=r.x0,a=r.y0,c=r.x1,l=r.y1,u=(s+c)/2,d=(a+l)/2;(i=o[0])&&t.push(new Pe(i,s,a,u,d)),(i=o[1])&&t.push(new Pe(i,u,a,c,d)),(i=o[2])&&t.push(new Pe(i,s,d,u,l)),(i=o[3])&&t.push(new Pe(i,u,d,c,l))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function _v(e){return e[0]}function wv(e){return arguments.length?(this._x=e,this):this._x}function bv(e){return e[1]}function Cv(e){return arguments.length?(this._y=e,this):this._y}function Ir(e,t,n){var r=new Sd(t??_v,n??bv,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function Sd(e,t,n,r,o,i){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=o,this._y1=i,this._root=void 0}function xv(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var et=Ir.prototype=Sd.prototype;et.copy=function(){var e=new Sd(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=xv(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var o=0;o<4;++o)(r=t.source[o])&&(r.length?n.push({source:r,target:t.target[o]=new Array(4)}):t.target[o]=xv(r));return e};et.add=cv;et.addAll=uv;et.cover=dv;et.data=fv;et.extent=pv;et.find=hv;et.remove=mv;et.removeAll=gv;et.root=yv;et.size=vv;et.visit=Ev;et.visitAfter=Dv;et.x=wv;et.y=Cv;function Ae(e){return function(){return e}}function Ft(e){return(e()-.5)*1e-6}function LI(e){return e.x+e.vx}function jI(e){return e.y+e.vy}function Md(e){var t,n,r,o=1,i=1;typeof e!="function"&&(e=Ae(e==null?1:+e));function s(){for(var l,u=t.length,d,p,f,g,D,y,E=0;E<i;++E)for(d=Ir(t,LI,jI).visitAfter(a),l=0;l<u;++l)p=t[l],D=n[p.index],y=D*D,f=p.x+p.vx,g=p.y+p.vy,d.visit(h);function h(I,_,A,P,z){var q=I.data,oe=I.r,ce=D+oe;if(q){if(q.index>p.index){var De=f-q.x-q.vx,Fe=g-q.y-q.vy,Le=De*De+Fe*Fe;Le<ce*ce&&(De===0&&(De=Ft(r),Le+=De*De),Fe===0&&(Fe=Ft(r),Le+=Fe*Fe),Le=(ce-(Le=Math.sqrt(Le)))/Le*o,p.vx+=(De*=Le)*(ce=(oe*=oe)/(y+oe)),p.vy+=(Fe*=Le)*ce,q.vx-=De*(ce=1-ce),q.vy-=Fe*ce)}return}return _>f+ce||P<f-ce||A>g+ce||z<g-ce}}function a(l){if(l.data)return l.r=n[l.data.index];for(var u=l.r=0;u<4;++u)l[u]&&l[u].r>l.r&&(l.r=l[u].r)}function c(){if(t){var l,u=t.length,d;for(n=new Array(u),l=0;l<u;++l)d=t[l],n[d.index]=+e(d,l,t)}}return s.initialize=function(l,u){t=l,r=u,c()},s.iterations=function(l){return arguments.length?(i=+l,s):i},s.strength=function(l){return arguments.length?(o=+l,s):o},s.radius=function(l){return arguments.length?(e=typeof l=="function"?l:Ae(+l),c(),s):e},s}function BI(e){return e.index}function Iv(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function Nd(e){var t=BI,n=d,r,o=Ae(30),i,s,a,c,l,u=1;e==null&&(e=[]);function d(y){return 1/Math.min(a[y.source.index],a[y.target.index])}function p(y){for(var E=0,h=e.length;E<u;++E)for(var I=0,_,A,P,z,q,oe,ce;I<h;++I)_=e[I],A=_.source,P=_.target,z=P.x+P.vx-A.x-A.vx||Ft(l),q=P.y+P.vy-A.y-A.vy||Ft(l),oe=Math.sqrt(z*z+q*q),oe=(oe-i[I])/oe*y*r[I],z*=oe,q*=oe,P.vx-=z*(ce=c[I]),P.vy-=q*ce,A.vx+=z*(ce=1-ce),A.vy+=q*ce}function f(){if(s){var y,E=s.length,h=e.length,I=new Map(s.map((A,P)=>[t(A,P,s),A])),_;for(y=0,a=new Array(E);y<h;++y)_=e[y],_.index=y,typeof _.source!="object"&&(_.source=Iv(I,_.source)),typeof _.target!="object"&&(_.target=Iv(I,_.target)),a[_.source.index]=(a[_.source.index]||0)+1,a[_.target.index]=(a[_.target.index]||0)+1;for(y=0,c=new Array(h);y<h;++y)_=e[y],c[y]=a[_.source.index]/(a[_.source.index]+a[_.target.index]);r=new Array(h),g(),i=new Array(h),D()}}function g(){if(s)for(var y=0,E=e.length;y<E;++y)r[y]=+n(e[y],y,e)}function D(){if(s)for(var y=0,E=e.length;y<E;++y)i[y]=+o(e[y],y,e)}return p.initialize=function(y,E){s=y,l=E,f()},p.links=function(y){return arguments.length?(e=y,f(),p):e},p.id=function(y){return arguments.length?(t=y,p):t},p.iterations=function(y){return arguments.length?(u=+y,p):u},p.strength=function(y){return arguments.length?(n=typeof y=="function"?y:Ae(+y),g(),p):n},p.distance=function(y){return arguments.length?(o=typeof y=="function"?y:Ae(+y),D(),p):o},p}function Tv(){let e=1;return()=>(e=(1664525*e+1013904223)%4294967296)/4294967296}function Sv(e){return e.x}function Mv(e){return e.y}var VI=10,HI=Math.PI*(3-Math.sqrt(5));function Ad(e){var t,n=1,r=.001,o=1-Math.pow(r,1/300),i=0,s=.6,a=new Map,c=mo(d),l=_n("tick","end"),u=Tv();e==null&&(e=[]);function d(){p(),l.call("tick",t),n<r&&(c.stop(),l.call("end",t))}function p(D){var y,E=e.length,h;D===void 0&&(D=1);for(var I=0;I<D;++I)for(n+=(i-n)*o,a.forEach(function(_){_(n)}),y=0;y<E;++y)h=e[y],h.fx==null?h.x+=h.vx*=s:(h.x=h.fx,h.vx=0),h.fy==null?h.y+=h.vy*=s:(h.y=h.fy,h.vy=0);return t}function f(){for(var D=0,y=e.length,E;D<y;++D){if(E=e[D],E.index=D,E.fx!=null&&(E.x=E.fx),E.fy!=null&&(E.y=E.fy),isNaN(E.x)||isNaN(E.y)){var h=VI*Math.sqrt(.5+D),I=D*HI;E.x=h*Math.cos(I),E.y=h*Math.sin(I)}(isNaN(E.vx)||isNaN(E.vy))&&(E.vx=E.vy=0)}}function g(D){return D.initialize&&D.initialize(e,u),D}return f(),t={tick:p,restart:function(){return c.restart(d),t},stop:function(){return c.stop(),t},nodes:function(D){return arguments.length?(e=D,f(),a.forEach(g),t):e},alpha:function(D){return arguments.length?(n=+D,t):n},alphaMin:function(D){return arguments.length?(r=+D,t):r},alphaDecay:function(D){return arguments.length?(o=+D,t):+o},alphaTarget:function(D){return arguments.length?(i=+D,t):i},velocityDecay:function(D){return arguments.length?(s=1-D,t):1-s},randomSource:function(D){return arguments.length?(u=D,a.forEach(g),t):u},force:function(D,y){return arguments.length>1?(y==null?a.delete(D):a.set(D,g(y)),t):a.get(D)},find:function(D,y,E){var h=0,I=e.length,_,A,P,z,q;for(E==null?E=1/0:E*=E,h=0;h<I;++h)z=e[h],_=D-z.x,A=y-z.y,P=_*_+A*A,P<E&&(q=z,E=P);return q},on:function(D,y){return arguments.length>1?(l.on(D,y),t):l.on(D)}}}function kd(){var e,t,n,r,o=Ae(-30),i,s=1,a=1/0,c=.81;function l(f){var g,D=e.length,y=Ir(e,Sv,Mv).visitAfter(d);for(r=f,g=0;g<D;++g)t=e[g],y.visit(p)}function u(){if(e){var f,g=e.length,D;for(i=new Array(g),f=0;f<g;++f)D=e[f],i[D.index]=+o(D,f,e)}}function d(f){var g=0,D,y,E=0,h,I,_;if(f.length){for(h=I=_=0;_<4;++_)(D=f[_])&&(y=Math.abs(D.value))&&(g+=D.value,E+=y,h+=y*D.x,I+=y*D.y);f.x=h/E,f.y=I/E}else{D=f,D.x=D.data.x,D.y=D.data.y;do g+=i[D.data.index];while(D=D.next)}f.value=g}function p(f,g,D,y){if(!f.value)return!0;var E=f.x-t.x,h=f.y-t.y,I=y-g,_=E*E+h*h;if(I*I/c<_)return _<a&&(E===0&&(E=Ft(n),_+=E*E),h===0&&(h=Ft(n),_+=h*h),_<s&&(_=Math.sqrt(s*_)),t.vx+=E*f.value*r/_,t.vy+=h*f.value*r/_),!0;if(f.length||_>=a)return;(f.data!==t||f.next)&&(E===0&&(E=Ft(n),_+=E*E),h===0&&(h=Ft(n),_+=h*h),_<s&&(_=Math.sqrt(s*_)));do f.data!==t&&(I=i[f.data.index]*r/_,t.vx+=E*I,t.vy+=h*I);while(f=f.next)}return l.initialize=function(f,g){e=f,n=g,u()},l.strength=function(f){return arguments.length?(o=typeof f=="function"?f:Ae(+f),u(),l):o},l.distanceMin=function(f){return arguments.length?(s=f*f,l):Math.sqrt(s)},l.distanceMax=function(f){return arguments.length?(a=f*f,l):Math.sqrt(a)},l.theta=function(f){return arguments.length?(c=f*f,l):Math.sqrt(c)},l}function Od(e){var t=Ae(.1),n,r,o;typeof e!="function"&&(e=Ae(e==null?0:+e));function i(a){for(var c=0,l=n.length,u;c<l;++c)u=n[c],u.vx+=(o[c]-u.x)*r[c]*a}function s(){if(n){var a,c=n.length;for(r=new Array(c),o=new Array(c),a=0;a<c;++a)r[a]=isNaN(o[a]=+e(n[a],a,n))?0:+t(n[a],a,n)}}return i.initialize=function(a){n=a,s()},i.strength=function(a){return arguments.length?(t=typeof a=="function"?a:Ae(+a),s(),i):t},i.x=function(a){return arguments.length?(e=typeof a=="function"?a:Ae(+a),s(),i):e},i}function Rd(e){var t=Ae(.1),n,r,o;typeof e!="function"&&(e=Ae(e==null?0:+e));function i(a){for(var c=0,l=n.length,u;c<l;++c)u=n[c],u.vy+=(o[c]-u.y)*r[c]*a}function s(){if(n){var a,c=n.length;for(r=new Array(c),o=new Array(c),a=0;a<c;++a)r[a]=isNaN(o[a]=+e(n[a],a,n))?0:+t(n[a],a,n)}}return i.initialize=function(a){n=a,s()},i.strength=function(a){return arguments.length?(t=typeof a=="function"?a:Ae(+a),s(),i):t},i.y=function(a){return arguments.length?(e=typeof a=="function"?a:Ae(+a),s(),i):e},i}var Mi=e=>()=>e;function Pd(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function Lt(e,t,n){this.k=e,this.x=t,this.y=n}Lt.prototype={constructor:Lt,scale:function(e){return e===1?this:new Lt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Lt(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Tr=new Lt(1,0,0);Fd.prototype=Lt.prototype;function Fd(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Tr;return e.__zoom}function sc(e){e.stopImmediatePropagation()}function yo(e){e.preventDefault(),e.stopImmediatePropagation()}function $I(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function UI(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Nv(){return this.__zoom||Tr}function zI(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function GI(){return navigator.maxTouchPoints||"ontouchstart"in this}function WI(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function Ld(){var e=$I,t=UI,n=WI,r=zI,o=GI,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,c=xd,l=_n("start","zoom","end"),u,d,p,f=500,g=150,D=0,y=10;function E(w){w.property("__zoom",Nv).on("wheel.zoom",q,{passive:!1}).on("mousedown.zoom",oe).on("dblclick.zoom",ce).filter(o).on("touchstart.zoom",De).on("touchmove.zoom",Fe).on("touchend.zoom touchcancel.zoom",Le).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}E.transform=function(w,k,T,O){var Y=w.selection?w.selection():w;Y.property("__zoom",Nv),w!==Y?A(w,k,T,O):Y.interrupt().each(function(){P(this,arguments).event(O).start().zoom(null,typeof k=="function"?k.apply(this,arguments):k).end()})},E.scaleBy=function(w,k,T,O){E.scaleTo(w,function(){var Y=this.__zoom.k,X=typeof k=="function"?k.apply(this,arguments):k;return Y*X},T,O)},E.scaleTo=function(w,k,T,O){E.transform(w,function(){var Y=t.apply(this,arguments),X=this.__zoom,K=T==null?_(Y):typeof T=="function"?T.apply(this,arguments):T,Ee=X.invert(K),Me=typeof k=="function"?k.apply(this,arguments):k;return n(I(h(X,Me),K,Ee),Y,s)},T,O)},E.translateBy=function(w,k,T,O){E.transform(w,function(){return n(this.__zoom.translate(typeof k=="function"?k.apply(this,arguments):k,typeof T=="function"?T.apply(this,arguments):T),t.apply(this,arguments),s)},null,O)},E.translateTo=function(w,k,T,O,Y){E.transform(w,function(){var X=t.apply(this,arguments),K=this.__zoom,Ee=O==null?_(X):typeof O=="function"?O.apply(this,arguments):O;return n(Tr.translate(Ee[0],Ee[1]).scale(K.k).translate(typeof k=="function"?-k.apply(this,arguments):-k,typeof T=="function"?-T.apply(this,arguments):-T),X,s)},O,Y)};function h(w,k){return k=Math.max(i[0],Math.min(i[1],k)),k===w.k?w:new Lt(k,w.x,w.y)}function I(w,k,T){var O=k[0]-T[0]*w.k,Y=k[1]-T[1]*w.k;return O===w.x&&Y===w.y?w:new Lt(w.k,O,Y)}function _(w){return[(+w[0][0]+ +w[1][0])/2,(+w[0][1]+ +w[1][1])/2]}function A(w,k,T,O){w.on("start.zoom",function(){P(this,arguments).event(O).start()}).on("interrupt.zoom end.zoom",function(){P(this,arguments).event(O).end()}).tween("zoom",function(){var Y=this,X=arguments,K=P(Y,X).event(O),Ee=t.apply(Y,X),Me=T==null?_(Ee):typeof T=="function"?T.apply(Y,X):T,jt=Math.max(Ee[1][0]-Ee[0][0],Ee[1][1]-Ee[0][1]),je=Y.__zoom,Dt=typeof k=="function"?k.apply(Y,X):k,an=c(je.invert(Me).concat(jt/je.k),Dt.invert(Me).concat(jt/Dt.k));return function(_t){if(_t===1)_t=Dt;else{var cn=an(_t),hc=jt/cn[2];_t=new Lt(hc,Me[0]-cn[0]*hc,Me[1]-cn[1]*hc)}K.zoom(null,_t)}})}function P(w,k,T){return!T&&w.__zooming||new z(w,k)}function z(w,k){this.that=w,this.args=k,this.active=0,this.sourceEvent=null,this.extent=t.apply(w,k),this.taps=0}z.prototype={event:function(w){return w&&(this.sourceEvent=w),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(w,k){return this.mouse&&w!=="mouse"&&(this.mouse[1]=k.invert(this.mouse[0])),this.touch0&&w!=="touch"&&(this.touch0[1]=k.invert(this.touch0[0])),this.touch1&&w!=="touch"&&(this.touch1[1]=k.invert(this.touch1[0])),this.that.__zoom=k,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(w){var k=Qe(this.that).datum();l.call(w,this.that,new Pd(w,{sourceEvent:this.sourceEvent,target:E,type:w,transform:this.that.__zoom,dispatch:l}),k)}};function q(w,...k){if(!e.apply(this,arguments))return;var T=P(this,k).event(w),O=this.__zoom,Y=Math.max(i[0],Math.min(i[1],O.k*Math.pow(2,r.apply(this,arguments)))),X=vt(w);if(T.wheel)(T.mouse[0][0]!==X[0]||T.mouse[0][1]!==X[1])&&(T.mouse[1]=O.invert(T.mouse[0]=X)),clearTimeout(T.wheel);else{if(O.k===Y)return;T.mouse=[X,O.invert(X)],Gn(this),T.start()}yo(w),T.wheel=setTimeout(K,g),T.zoom("mouse",n(I(h(O,Y),T.mouse[0],T.mouse[1]),T.extent,s));function K(){T.wheel=null,T.end()}}function oe(w,...k){if(p||!e.apply(this,arguments))return;var T=w.currentTarget,O=P(this,k,!0).event(w),Y=Qe(w.view).on("mousemove.zoom",Me,!0).on("mouseup.zoom",jt,!0),X=vt(w,T),K=w.clientX,Ee=w.clientY;hi(w.view),sc(w),O.mouse=[X,this.__zoom.invert(X)],Gn(this),O.start();function Me(je){if(yo(je),!O.moved){var Dt=je.clientX-K,an=je.clientY-Ee;O.moved=Dt*Dt+an*an>D}O.event(je).zoom("mouse",n(I(O.that.__zoom,O.mouse[0]=vt(je,T),O.mouse[1]),O.extent,s))}function jt(je){Y.on("mousemove.zoom mouseup.zoom",null),mi(je.view,O.moved),yo(je),O.event(je).end()}}function ce(w,...k){if(e.apply(this,arguments)){var T=this.__zoom,O=vt(w.changedTouches?w.changedTouches[0]:w,this),Y=T.invert(O),X=T.k*(w.shiftKey?.5:2),K=n(I(h(T,X),O,Y),t.apply(this,k),s);yo(w),a>0?Qe(this).transition().duration(a).call(A,K,O,w):Qe(this).call(E.transform,K,O,w)}}function De(w,...k){if(e.apply(this,arguments)){var T=w.touches,O=T.length,Y=P(this,k,w.changedTouches.length===O).event(w),X,K,Ee,Me;for(sc(w),K=0;K<O;++K)Ee=T[K],Me=vt(Ee,this),Me=[Me,this.__zoom.invert(Me),Ee.identifier],Y.touch0?!Y.touch1&&Y.touch0[2]!==Me[2]&&(Y.touch1=Me,Y.taps=0):(Y.touch0=Me,X=!0,Y.taps=1+!!u);u&&(u=clearTimeout(u)),X&&(Y.taps<2&&(d=Me[0],u=setTimeout(function(){u=null},f)),Gn(this),Y.start())}}function Fe(w,...k){if(this.__zooming){var T=P(this,k).event(w),O=w.changedTouches,Y=O.length,X,K,Ee,Me;for(yo(w),X=0;X<Y;++X)K=O[X],Ee=vt(K,this),T.touch0&&T.touch0[2]===K.identifier?T.touch0[0]=Ee:T.touch1&&T.touch1[2]===K.identifier&&(T.touch1[0]=Ee);if(K=T.that.__zoom,T.touch1){var jt=T.touch0[0],je=T.touch0[1],Dt=T.touch1[0],an=T.touch1[1],_t=(_t=Dt[0]-jt[0])*_t+(_t=Dt[1]-jt[1])*_t,cn=(cn=an[0]-je[0])*cn+(cn=an[1]-je[1])*cn;K=h(K,Math.sqrt(_t/cn)),Ee=[(jt[0]+Dt[0])/2,(jt[1]+Dt[1])/2],Me=[(je[0]+an[0])/2,(je[1]+an[1])/2]}else if(T.touch0)Ee=T.touch0[0],Me=T.touch0[1];else return;T.zoom("touch",n(I(K,Ee,Me),T.extent,s))}}function Le(w,...k){if(this.__zooming){var T=P(this,k).event(w),O=w.changedTouches,Y=O.length,X,K;for(sc(w),p&&clearTimeout(p),p=setTimeout(function(){p=null},f),X=0;X<Y;++X)K=O[X],T.touch0&&T.touch0[2]===K.identifier?delete T.touch0:T.touch1&&T.touch1[2]===K.identifier&&delete T.touch1;if(T.touch1&&!T.touch0&&(T.touch0=T.touch1,delete T.touch1),T.touch0)T.touch0[1]=this.__zoom.invert(T.touch0[0]);else if(T.end(),T.taps===2&&(K=vt(K,this),Math.hypot(d[0]-K[0],d[1]-K[1])<y)){var Ee=Qe(this).on("dblclick.zoom");Ee&&Ee.apply(this,arguments)}}}return E.wheelDelta=function(w){return arguments.length?(r=typeof w=="function"?w:Mi(+w),E):r},E.filter=function(w){return arguments.length?(e=typeof w=="function"?w:Mi(!!w),E):e},E.touchable=function(w){return arguments.length?(o=typeof w=="function"?w:Mi(!!w),E):o},E.extent=function(w){return arguments.length?(t=typeof w=="function"?w:Mi([[+w[0][0],+w[0][1]],[+w[1][0],+w[1][1]]]),E):t},E.scaleExtent=function(w){return arguments.length?(i[0]=+w[0],i[1]=+w[1],E):[i[0],i[1]]},E.translateExtent=function(w){return arguments.length?(s[0][0]=+w[0][0],s[1][0]=+w[1][0],s[0][1]=+w[0][1],s[1][1]=+w[1][1],E):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},E.constrain=function(w){return arguments.length?(n=w,E):n},E.duration=function(w){return arguments.length?(a=+w,E):a},E.interpolate=function(w){return arguments.length?(c=w,E):c},E.on=function(){var w=l.on.apply(l,arguments);return w===l?E:w},E.clickDistance=function(w){return arguments.length?(D=(w=+w)*w,E):Math.sqrt(D)},E.tapDistance=function(w){return arguments.length?(y=+w,E):y},E}function vo(e){if(typeof e=="string")throw new Error("Graph link has not been initialized");return e}function Av(e,t,n,r){let o=e.clientWidth,i=e.clientHeight,s=t.find(h=>h.scope==="project"&&h.aliases.some(I=>/^AGENTS(?:\.override)?\.md$/i.test(I)))||t.find(h=>h.scope==="project"&&h.kind==="instruction"),a=t.map((h,I)=>Q(B({},h),{radius:h.id===s?.id?30:h.kind==="instruction"?18:h.kind==="rule"?11:8,x:o/2+Math.cos(I*2.39996)*90,y:i/2+Math.sin(I*2.39996)*90})),c=new Set(a.map(h=>h.id)),l=n.filter(h=>c.has(h.source)&&c.has(h.target)).map(h=>B({},h)),u=Qe(e).append("svg").attr("class","graph").attr("role","img").attr("aria-label",`Context graph with ${a.length} files. Use the Files view for a table.`),d=u.append("g"),p=d.append("g").selectAll("line").data(l).join("line").attr("stroke",h=>h.kind==="scope"?"#b6c3ac":"#c6d3bc").attr("stroke-width",1).attr("stroke-dasharray",h=>h.kind==="scope"?"4 5":null),f=d.append("g").selectAll("g").data(a).join("g").attr("class",h=>`graph-node ${h.scope} ${h.kind} ${h.id===s?.id?"root":""}`).attr("role","button").attr("tabindex",0).attr("aria-label",h=>`${h.name}, ${h.scope}, ${h.path}, ${h.clients.map(I=>Rt[I]).join(", ")||"no client entry point"}`).on("click",(h,I)=>r(I)).on("keydown",(h,I)=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),r(I))});f.append("circle").attr("r",h=>h.radius).attr("fill",h=>h.id===s?.id?"#d6e6c7":h.scope==="user"?"#eee6f6":h.kind==="instruction"?"#e3edda":"#eaf0e1").attr("stroke",h=>h.scope==="user"?"#b7a1c9":"#a9c08e"),f.filter(h=>h.kind==="instruction").append("text").attr("class","node-icon").attr("dy",5).text(h=>h.id===s?.id?"\u2733":"\u25C7"),f.append("text").attr("class",h=>`node-label ${h.id===s?.id?"root-label":""}`).attr("y",h=>h.radius+17).text(h=>h.name.length>30?h.name.slice(0,27)+"\u2026":h.name),f.append("title").text(h=>`${h.path}
|
|
8
|
+
${h.clients.map(I=>Rt[I]).join(", ")||"No client entry point"}`);let g=Ld().scaleExtent([.06,4]).on("zoom",h=>d.attr("transform",h.transform));u.call(g).on("dblclick.zoom",null);function D(){let h=d.node()?.getBBox();if(!h)return;let I=Math.min(1.4,(o-100)/Math.max(h.width,1),(i-105)/Math.max(h.height,1));u.call(g.transform,Tr.translate(o/2-(h.x+h.width/2)*I,i/2-(h.y+h.height/2)*I).scale(I))}let y=Ad(a).force("link",Nd(l).id(h=>h.id).distance(h=>vo(h.source).id===s?.id||vo(h.target).id===s?.id?140:95).strength(.35)).force("charge",kd().strength(-150)).force("collide",Md().radius(h=>h.radius+35)).force("x",Od(h=>h.scope==="user"?o*.77:o*.43).strength(.035)).force("y",Rd(i/2).strength(.055)).stop();if(s){let h=a.find(I=>I.id===s.id);h&&(h.fx=o*.45),h&&(h.fy=i/2)}let E=()=>{p.attr("x1",h=>vo(h.source).x??0).attr("y1",h=>vo(h.source).y??0).attr("x2",h=>vo(h.target).x??0).attr("y2",h=>vo(h.target).y??0),f.attr("transform",h=>`translate(${h.x},${h.y})`)};return y.tick(Math.min(180,a.length>700?60:180)),E(),D(),y.on("tick",E),f.call(hd().on("start",(h,I)=>{h.active||y.alphaTarget(.2).restart(),I.fx=I.x,I.fy=I.y}).on("drag",(h,I)=>{I.fx=h.x,I.fy=h.y}).on("end",(h,I)=>{h.active||y.alphaTarget(0),I.fx=null,I.fy=null})),{fit:D,zoomIn:()=>{u.call(g.scaleBy,1.3)},zoomOut:()=>{u.call(g.scaleBy,1/1.3)},destroy:()=>{y.stop(),y.on("tick",null),f.on(".drag",null).on("click",null).on("keydown",null),u.on(".zoom",null),u.remove()}}}var ac=class e{nodes=Ge.required();edges=Ge.required();selected=ro();element=S(yn);size=V(0);handle;constructor(){$m(r=>{this.size();let o=Av(this.element.nativeElement,this.nodes(),this.edges(),i=>this.selected.emit(i));this.handle=o,r(()=>o.destroy())});let t,n=()=>{clearTimeout(t),t=setTimeout(()=>this.size.update(r=>r+1),150)};window.addEventListener("resize",n),S(ke).onDestroy(()=>{clearTimeout(t),window.removeEventListener("resize",n)})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ie({type:e,selectors:[["section","appGraph",""]],inputs:{nodes:[1,"nodes"],edges:[1,"edges"]},outputs:{selected:"selected"},decls:22,vars:0,consts:[[1,"graph-key"],[1,"dot","project"],[1,"dot","user"],[1,"key-line"],[1,"key-line","dashed"],[1,"graph-controls"],["id","zoom-in","aria-label","Zoom in",3,"click"],["id","zoom-out","aria-label","Zoom out",3,"click"],["id","fit","aria-label","Fit graph",3,"click"],[1,"graph-hint"]],template:function(n,r){n&1&&(b(0,"div",0)(1,"span"),ye(2,"i",1),v(3,"Project context"),C(),b(4,"span"),ye(5,"i",2),v(6,"User context"),C(),b(7,"span"),ye(8,"i",3),v(9,"Reference"),C(),b(10,"span"),ye(11,"i",4),v(12,"Folder scope"),C()(),b(13,"div",5)(14,"button",6),W("click",function(){return r.handle?.zoomIn()}),v(15,"+"),C(),b(16,"button",7),W("click",function(){return r.handle?.zoomOut()}),v(17," \u2212"),C(),b(18,"button",8),W("click",function(){return r.handle?.fit()}),v(19,"Fit"),C()(),b(20,"div",9),v(21,"Scroll to zoom \xB7 Drag to explore \xB7 Click a file"),C())},encapsulation:2})};var qI=(e,t)=>t.id,YI=(e,t)=>t.label;function ZI(e,t){e&1&&(b(0,"p",2),v(1,"Checking installation\u2026"),C())}function XI(e,t){if(e&1){let n=ue();b(0,"p",4),v(1),C(),b(2,"button",5),W("click",function(){$(n);let o=x();return U(o.checkAgain())}),v(3," Check again "),C()}if(e&2){let n=x();m(),j(n.checkError()),m(),re("disabled",n.checking())}}function KI(e,t){if(e&1&&(b(0,"p"),v(1),C(),b(2,"code"),v(3),C()),e&2){let n=t.$implicit;m(),j(n.label),m(2),j(n.command)}}function QI(e,t){if(e&1){let n=ue();b(0,"details")(1,"summary"),v(2,"Installation instructions"),C(),me(3,KI,4,2,null,null,YI),b(5,"p")(6,"a",7),v(7,"Official installation guide"),C()()(),b(8,"button",5),W("click",function(){$(n);let o=x(2);return U(o.checkAgain())}),v(9," Check again "),C()}if(e&2){let n=x().$implicit,r=x();m(3),ge(n.instructions),m(3),re("href",n.guide,Ln),m(2),re("disabled",r.checking())}}function JI(e,t){if(e&1&&(b(0,"article",3)(1,"label"),ye(2,"input",6),v(3),C(),b(4,"p"),v(5),C(),ee(6,QI,10,2),C()),e&2){let n=t.$implicit;m(2),re("checked",n.detected),m(),de(" ",n.label),m(2),j(n.detail),m(),te(n.detected?-1:6)}}var cc=class e{api=S(rn);checks=V([]);checking=V(!1);checkError=V("");constructor(){this.checkAgain()}async checkAgain(){if(!this.checking()){this.checking.set(!0),this.checkError.set("");try{this.checks.set((await this.api.optimizationChecks()).checks)}catch(t){this.checkError.set(nn(t))}finally{this.checking.set(!1)}}}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ie({type:e,selectors:[["app-optimization-checklist"]],decls:9,vars:2,consts:[["aria-labelledby","checklist-title",1,"checklist"],["id","checklist-title"],["role","status"],[1,"check-item"],["role","alert"],[1,"small-button","check-again",3,"click","disabled"],["type","checkbox","disabled","",3,"checked"],["target","_blank","rel","noreferrer",3,"href"]],template:function(n,r){n&1&&(b(0,"section",0)(1,"h2",1),v(2,"Optimization checklist"),C(),b(3,"p"),v(4," Installation checks are detected locally. RTK does not reduce these static file estimates. "),C(),ee(5,ZI,2,0,"p",2),ee(6,XI,4,2),me(7,JI,7,4,"article",3,qI),C()),n&2&&(m(5),te(r.checking()?5:-1),m(),te(r.checkError()?6:-1),m(),ge(r.checks()))},styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{margin:8px 0;font-size:19px;letter-spacing:-.4px}p[_ngcontent-%COMP%]{line-height:1.6;font-size:13px}summary[_ngcontent-%COMP%]{cursor:pointer;font-size:13px;padding:8px 0}.checklist[_ngcontent-%COMP%]{padding:24px 40px 32px}.check-item[_ngcontent-%COMP%]{padding:18px;border:1px solid var(--%NS%line);border-radius:10px}.check-item[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:600}.check-item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{accent-color:var(--%NS%green)}.check-again[_ngcontent-%COMP%]{margin-top:14px}code[_ngcontent-%COMP%]{display:block;padding:10px;background:#7c918515;border-radius:6px;overflow-wrap:anywhere}a[_ngcontent-%COMP%]{color:inherit}@media(max-width:750px){.checklist[_ngcontent-%COMP%]{padding:20px}}"]})};var eT=()=>[],kv=(e,t)=>t.id;function tT(e,t){if(e&1&&(b(0,"option",5),v(1),C()),e&2){let n=t.$implicit,r=x();re("value",n.id)("selected",n.id===r.model()),m(),de(" ",n.name," ")}}function nT(e,t){e&1&&(b(0,"p",6),v(1,"Estimating context\u2026"),C())}function rT(e,t){e&1&&(b(0,"p",8),v(1," User context is excluded because this server was started with user discovery disabled. "),C())}function oT(e,t){if(e&1&&(b(0,"tr")(1,"th",27)(2,"strong"),v(3),C(),b(4,"small"),v(5),C(),b(6,"small"),v(7),C()(),b(8,"td"),v(9),en(10,"number"),C(),b(11,"td"),v(12),en(13,"number"),C()()),e&2){let n=t.$implicit;m(3),j(n.name),m(2),j(n.path),m(2),kt("",n.scope," \xB7 ",n.kind),m(2),j(jn(10,6,n.tokens)),m(3),j(jn(13,8,n.words))}}function iT(e,t){if(e&1&&(b(0,"tr")(1,"td",28),v(2),C()()),e&2){let n=x(),r=x();m(2),de(" No startup context discovered for ",r.labels[n.client],". ")}}function sT(e,t){if(e&1&&(ee(0,rT,2,0,"p",8),b(1,"div",9)(2,"div",10),mt(),b(3,"svg",11)(4,"title",12),v(5," Context iceberg: startup above water, on-demand below. "),C(),ye(6,"path",13)(7,"path",14)(8,"path",15)(9,"path",16)(10,"path",17),C()(),hr(),b(11,"div",18)(12,"article",19)(13,"span",20),v(14,"Above water"),C(),b(15,"h2"),v(16,"Estimated startup context"),C(),b(17,"p"),v(18,"Applicable instructions and skill catalog entries."),C(),b(19,"strong",21),v(20),en(21,"number"),b(22,"span"),v(23,"estimated tokens"),C()(),b(24,"p"),v(25),en(26,"number"),C(),b(27,"strong",22),v(28),en(29,"number"),b(30,"span"),v(31,"one-load input cost"),C()()(),b(32,"article",23)(33,"span",20),v(34,"Below water"),C(),b(35,"h2"),v(36,"On-demand context"),C(),b(37,"p"),v(38,"Linked documents, skill bodies and scoped instructions."),C(),b(39,"strong",21),v(40),en(41,"number"),b(42,"span"),v(43,"estimated tokens"),C()(),b(44,"p"),v(45),en(46,"number"),C(),b(47,"strong",22),v(48),en(49,"number"),b(50,"span"),v(51,"hypothetical one-load input cost"),C()()()()(),b(52,"h2",24),v(53,"Startup context breakdown"),C(),b(54,"div",25)(55,"table")(56,"caption"),v(57," Startup context only. Largest estimates first. "),C(),b(58,"thead")(59,"tr")(60,"th",26),v(61,"File or skill"),C(),b(62,"th",26),v(63,"Tokens \u2248"),C(),b(64,"th",26),v(65,"Words"),C()()(),b(66,"tbody"),me(67,oT,14,10,"tr",null,kv,!1,iT,3,1,"tr"),C()()()),e&2){let n=t,r=x();te(n.includeUser?-1:0),m(20),de("",jn(21,10,n.startup.tokens)," "),m(5),de("",jn(26,12,n.startup.words)," words"),m(2),re("title","$"+n.startup.inputCost),m(),de("$",ua(29,14,n.startup.inputCost,"1.4-4")," "),m(12),de("",jn(41,17,n.onDemand.tokens)," "),m(5),de("",jn(46,19,n.onDemand.words)," words"),m(2),re("title","$"+n.onDemand.inputCost),m(),de("$",ua(49,21,n.onDemand.inputCost,"1.4-4")," "),m(19),ge(r.startupEntries())}}function aT(e,t){e&1&&v(0," Previous estimate shown. ")}function cT(e,t){if(e&1&&(b(0,"p",7),v(1),ee(2,aT,1,0),C()),e&2){let n=x();m(),de(" ",n.error()," "),m(),te(n.estimate()?2:-1)}}var lc=class e{api=S(rn);state=S(yt);labels=Q(B({},Rt),{all:"all agents"});client=this.state.client;model=V("gpt-6.1-sol");estimate=V(null);startupEntries=ve(()=>(this.estimate()?.entries??[]).filter(t=>t.portion==="startup"));loading=V(!1);error=V("");constructor(){at(t=>{this.state.data();let n=this.client(),r=this.model(),o=!0;t(()=>{o=!1}),this.loading.set(!0),this.error.set(""),this.api.estimate(n,r).then(i=>{o&&this.estimate.set(i)}).catch(i=>{o&&this.error.set(nn(i))}).finally(()=>{o&&this.loading.set(!1)})})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ie({type:e,selectors:[["app-token-optimizer"]],decls:11,vars:6,consts:[["modelSelect",""],["aria-label","Token Optimizer",1,"optimizer"],[1,"optimizer-controls"],["for","optimizer-model"],["id","optimizer-model",3,"change","disabled"],[3,"value","selected"],["role","status"],["role","alert"],[1,"notice"],[1,"iceberg-panel"],[1,"iceberg-art"],["viewBox","0 0 320 330","role","img","aria-labelledby","iceberg-title"],["id","iceberg-title"],["d","M75 110 132 30 162 58 188 18 249 110Z",1,"ice-tip"],["d","M132 30 145 110 75 110Z M188 18 183 110 249 110Z",1,"ice-face"],["d","M52 118 270 118 247 223 189 310 136 275 88 211Z",1,"ice-base"],["d","M52 118 183 118 189 310 136 275Z",1,"ice-facet"],["d","M10 114H310",1,"waterline"],["aria-live","polite",1,"portions"],[1,"portion","startup"],[1,"eyebrow"],[1,"token-total"],[1,"cost",3,"title"],[1,"portion","on-demand"],[1,"section-title"],[1,"breakdown"],["scope","col"],["scope","row"],["colspan","3"]],template:function(n,r){if(n&1){let o=ue();b(0,"section",1)(1,"div",2)(2,"label",3),v(3,"Model for price estimate "),b(4,"select",4,0),W("change",function(){$(o);let s=ct(5);return U(r.model.set(s.value))}),me(6,tT,2,3,"option",5,kv),C()()(),ee(8,nT,2,0,"p",6),ee(9,sT,70,24),ee(10,cT,3,2,"p",7),C()}if(n&2){let o;ne("aria-busy",r.loading()),m(4),re("disabled",r.loading()||!r.estimate()),m(2),ge(r.estimate()?.models??Qo(5,eT)),m(2),te(r.loading()&&!r.estimate()?8:-1),m(),te((o=r.estimate())?9:-1,o),m(),te(r.error()?10:-1)}},dependencies:[td],styles:["[_nghost-%COMP%]{display:block}.optimizer[_ngcontent-%COMP%]{padding:24px 40px 32px}.optimizer-controls[_ngcontent-%COMP%]{display:flex;gap:20px;flex-wrap:wrap}.optimizer-controls[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:grid;gap:8px;font-size:13px;font-weight:600}select[_ngcontent-%COMP%]{width:100%;min-width:220px;padding:10px 36px 10px 12px;border:1px solid var(--%NS%line);border-radius:8px;background:transparent;color:inherit}p[_ngcontent-%COMP%]{line-height:1.6;font-size:13px}.iceberg-panel[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(200px,1fr) 2fr;border:1px solid var(--%NS%line);border-radius:14px;overflow:hidden;margin:24px 0 16px;background:linear-gradient(to bottom,#72afb909 0 44%,#368caa12 44% 100%)}.iceberg-art[_ngcontent-%COMP%]{display:grid;align-content:center;padding:24px;text-align:center}svg[_ngcontent-%COMP%]{width:100%;max-height:390px}.ice-tip[_ngcontent-%COMP%]{fill:#d2e8e8}.ice-face[_ngcontent-%COMP%]{fill:#a8d1d7}.ice-base[_ngcontent-%COMP%]{fill:#81b9ca}.ice-facet[_ngcontent-%COMP%]{fill:#619daf}.waterline[_ngcontent-%COMP%]{stroke:#619daf;stroke-width:2;stroke-dasharray:5 5}small[_ngcontent-%COMP%]{font-size:11px;color:var(--%NS%muted)}.portion[_ngcontent-%COMP%]{padding:24px}.startup[_ngcontent-%COMP%]{border-bottom:1px solid var(--%NS%line)}h2[_ngcontent-%COMP%]{margin:8px 0;font-size:19px;letter-spacing:-.4px}.portion[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:8px 0}.token-total[_ngcontent-%COMP%]{font-size:clamp(24px,3vw,38px);font-weight:600}.token-total[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .cost[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:12px;font-weight:400}.cost[_ngcontent-%COMP%]{font-size:18px;font-variant-numeric:tabular-nums}.section-title[_ngcontent-%COMP%]{margin:32px 0 14px}.breakdown[_ngcontent-%COMP%]{overflow-x:auto;border:1px solid var(--%NS%line);border-radius:10px}table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:12px}caption[_ngcontent-%COMP%]{text-align:left;padding:14px;color:var(--%NS%muted)}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding:12px 14px;border-bottom:1px solid var(--%NS%line);text-align:left}thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:500;color:var(--%NS%muted);white-space:nowrap}tbody[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:400;min-width:190px;max-width:340px;overflow-wrap:anywhere}tbody[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{display:block;margin-top:4px}td[_ngcontent-%COMP%]{white-space:nowrap;font-variant-numeric:tabular-nums}a[_ngcontent-%COMP%]{color:inherit}@media(max-width:750px){.optimizer[_ngcontent-%COMP%]{padding:20px}.iceberg-panel[_ngcontent-%COMP%]{grid-template-columns:1fr}.iceberg-art[_ngcontent-%COMP%]{display:none}.optimizer-controls[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{width:100%}}"]})};var lT=(e,t)=>t.id;function uT(e,t){if(e&1){let n=ue();b(0,"img",18),W("error",function(){let o=$(n),i=x();return U(i.failedAvatar.set(o))}),C()}e&2&&re("src",t,Ln)}function dT(e,t){e&1&&ye(0,"img",3)}function fT(e,t){if(e&1){let n=ue();b(0,"button",19),W("click",function(){let o=$(n).$implicit,i=x();return U(i.state.toggleClient(o))}),ye(1,"img",20),C()}if(e&2){let n=t.$implicit,r=x();Er("client-icon client-icon--"+n),Te("selected",r.state.client()==="all"||r.state.client()===n)("dimmed",r.state.client()!=="all"&&r.state.client()!==n),re("title",r.labels[n]),ne("aria-label",r.labels[n])("aria-pressed",r.state.client()==="all"||r.state.client()===n),m(),re("src",r.icons[n],Ln)}}function pT(e,t){if(e&1&&(b(0,"span",7),v(1),C()),e&2){let n=x();m(),j(n.state.filterStorageError())}}function hT(e,t){if(e&1){let n=ue();b(0,"button",21),W("click",function(){let o=$(n).$implicit,i=x();return U(i.state.selectTab(o.id))}),b(1,"span",22),v(2),C(),v(3),b(4,"span",23),v(5),C()()}if(e&2){let n=t.$implicit,r=x();Te("active",r.state.tab()===n.id),ne("data-tab",n.id)("aria-current",r.state.tab()===n.id?"page":"false"),m(2),j(n.icon),m(),j(n.label),m(),re("hidden",n.id==="optimizer"||n.id==="checklist")("id","count-"+n.id),m(),j(r.count(n.id))}}var uc=class e{state=S(yt);clients=ao;icons=Sa;labels=Rt;agentName=ve(()=>{let t=this.state.data();if(t?.agent?.name)return t.agent.name;let n=t?.project.name;return n?n.charAt(0).toUpperCase()+n.slice(1):"Loading\u2026"});failedAvatar=V(void 0);avatar=ve(()=>{let t=this.state.data()?.agent?.avatar;return t!==this.failedAvatar()?t:void 0});tabs=[{id:"context",label:"Context",icon:"\u2318"},{id:"skills",label:"Skills",icon:"\u2727"},{id:"mcp",label:"MCP servers",icon:"\u2387"}];count(t){if(t==="optimizer"||t==="checklist")return 0;let n=this.state.data();return n?co(t==="context"?n.nodes:n[t],"all",this.state.client(),"").length:0}refresh(){this.state.selection.set(null),this.state.load(!0)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ie({type:e,selectors:[["aside","appSidebar",""]],decls:28,vars:12,consts:[[1,"brand"],["href","#",1,"agent-portrait",3,"click"],["alt","","width","198","height","198",1,"agent-avatar",3,"src"],["src","/favicon.svg","alt","","width","198","height","198"],["role","group","aria-label","Filter by agent",1,"agent-filter"],[1,"agent-filter-icons"],["type","button",1,"client-icon",3,"class","selected","dimmed","title"],["role","status"],[1,"brand-text"],["href","#",1,"agent-name",3,"click","title"],[1,"brand-sub"],["id","project-path","href","#",1,"factory-path","mono",3,"click","title"],["aria-label","Views"],[1,"nav-item",3,"active"],[1,"sidebar-rescan"],["id","refresh",1,"small-button",3,"click","disabled"],["id","theme-toggle","type","button",1,"small-button",3,"click","title"],["href","https://codeursenior.substack.com/","target","_blank","rel","noreferrer",1,"brand-credit"],["alt","","width","198","height","198",1,"agent-avatar",3,"error","src"],["type","button",1,"client-icon",3,"click","title"],["alt","","width","18","height","18",3,"src"],[1,"nav-item",3,"click"],["aria-hidden","true",1,"nav-icon"],[1,"count",3,"hidden","id"]],template:function(n,r){if(n&1&&(b(0,"div",0)(1,"a",1),W("click",function(){return r.state.selectTab("optimizer")}),ee(2,uT,1,1,"img",2)(3,dT,1,0,"img",3),C(),b(4,"div",4)(5,"div",5),me(6,fT,2,10,"button",6,gt),C(),ee(8,pT,2,1,"span",7),C(),b(9,"div",8)(10,"a",9),W("click",function(){return r.state.selectTab("optimizer")}),v(11),C(),b(12,"span",10),v(13,"Agent Visualizer"),C(),b(14,"a",11),W("click",function(){return r.state.selectTab("optimizer")}),v(15),C()()(),b(16,"nav",12),me(17,hT,6,9,"button",13,lT),C(),b(19,"div",14)(20,"button",15),W("click",function(){return r.refresh()}),v(21," \u21BB "),b(22,"span"),v(23,"Rescan"),C()(),b(24,"button",16),W("click",function(){return r.state.toggleTheme()}),v(25),C()(),b(26,"a",17),v(27,"Par @codeursenior"),C()),n&2){let o;m(),ne("aria-label","Home \xB7 "+r.agentName()),m(),te((o=r.avatar())?2:3,o),m(4),ge(r.clients),m(2),te(r.state.filterStorageError()?8:-1),m(2),re("title",r.agentName()),m(),j(r.agentName()),m(3),re("title",r.state.data()?.project?.path??""),m(),j(r.state.data()?.project?.path),m(2),ge(r.tabs),m(3),re("disabled",r.state.loading()),m(4),re("title",r.state.theme()==="dark"?"Light mode":"Dark mode"),ne("aria-label",r.state.theme()==="dark"?"Switch to light mode":"Switch to dark mode")("aria-pressed",r.state.theme()==="dark"),m(),de(" ",r.state.theme()==="dark"?"\u2600":"\u263E"," ")}},encapsulation:2})};var sn={width:220,height:82},mT=()=>({version:1,nodes:[],arrows:[],titles:[]}),jd=e=>`pek:skill-board:v1:${e}`,dc=e=>e!==null&&typeof e=="object"&&!Array.isArray(e)?e:{},Sr=e=>typeof e=="string",Ov=e=>typeof e.x=="number"&&Number.isFinite(e.x)&&typeof e.y=="number"&&Number.isFinite(e.y);function Rv(e){let t=localStorage.getItem(jd(e));if(!t)return mT();let n=dc(JSON.parse(t));if(n.version!==1||!Array.isArray(n.nodes)||!Array.isArray(n.arrows)||!Array.isArray(n.titles))throw new Error("Unsupported whiteboard data");let r=[],o=[],i=[];for(let s of n.nodes){let a=dc(s);if(!Sr(a.key)||!Array.isArray(a.files)||!a.files.every(Sr)||!Ov(a))throw new Error("Invalid position");r.push({key:a.key,files:a.files,x:Number(a.x),y:Number(a.y)})}for(let s of n.arrows){let a=dc(s);if(!Sr(a.id)||!Sr(a.source)||!Sr(a.target))throw new Error("Invalid arrow");o.push({id:a.id,source:a.source,target:a.target})}for(let s of n.titles){let a=dc(s);if(!Sr(a.id)||!Sr(a.text)||!Ov(a))throw new Error("Invalid title");i.push({id:a.id,text:a.text.slice(0,160),x:Number(a.x),y:Number(a.y)})}return{version:1,nodes:r,arrows:o,titles:i}}function Pv(e,t){let n=[],r=new Set,o=[];for(let c of[...e].sort((l,u)=>l.name.localeCompare(u.name))){let l=c.editTargets.map(d=>d.id),u=t.nodes.find(d=>!r.has(d.key)&&d.files.some(p=>l.includes(p)));u?(r.add(u.key),n.push(Q(B({},u),{files:l}))):o.push(c)}let i=Math.max(0,...n.map(c=>c.x+sn.width),...t.titles.map(c=>c.x+320)),s=i?i+80:40;o.forEach((c,l)=>{let u=c.editTargets.map(p=>p.id),d=u.slice().sort().find(p=>!r.has(p))??c.id;r.add(d),n.push({key:d,files:u,x:s+l%4*270,y:60+Math.floor(l/4)*140})});let a=new Set(n.map(c=>c.key));return Q(B({},t),{nodes:n,arrows:t.arrows.filter(c=>a.has(c.source)&&a.has(c.target))})}function Ni(e,t){let n=t.x-e.x,r=t.y-e.y,o=1/Math.max(Math.abs(n)/(sn.width/2),Math.abs(r)/(sn.height/2),1);return{x:e.x+sn.width/2+n*o,y:e.y+sn.height/2+r*o}}var gT=(e,t)=>t.source+":"+t.target,Fv=(e,t)=>t.id,Bd=(e,t)=>t.key;function yT(e,t){if(e&1&&(b(0,"option",31),v(1),C()),e&2){let n=t.$implicit;re("value",n.key),m(),kt(" ",n.skill.name," (",n.skill.scope,") ")}}function vT(e,t){if(e&1&&(b(0,"option",31),v(1),C()),e&2){let n=t.$implicit;re("value",n.key),m(),kt(" ",n.skill.name," (",n.skill.scope,") ")}}function ET(e,t){if(e&1){let n=ue();b(0,"label"),v(1,"From "),b(2,"select",30,1),W("change",function(){$(n);let o=ct(3),i=x();return U(i.reconnect("source",o.value))}),me(4,yT,2,3,"option",31,Bd),C()(),b(6,"label"),v(7,"To "),b(8,"select",32,2),W("change",function(){$(n);let o=ct(9),i=x();return U(i.reconnect("target",o.value))}),me(10,vT,2,3,"option",31,Bd),C()(),b(12,"button",6),W("click",function(){$(n);let o=x();return U(o.remove())}),v(13,"Delete arrow"),C()}if(e&2){let n=t,r=x();m(2),re("value",n.source),m(2),ge(r.cards()),m(4),re("value",n.target),m(2),ge(r.cards())}}function DT(e,t){if(e&1){let n=ue();b(0,"input",33,3),W("input",function(){$(n);let o=ct(1),i=x();return U(i.editTitle(o.value))}),C(),b(2,"button",6),W("click",function(){$(n);let o=x();return U(o.remove())}),v(3,"Delete title"),C()}e&2&&re("value",t.text)}function _T(e,t){if(e&1){let n=ue();b(0,"strong"),v(1),C(),b(2,"button",6),W("click",function(){let o=$(n),i=x();return U(i.openSkill(o))}),v(3,"Open skill"),C()}e&2&&(m(),j(t.name))}function wT(e,t){if(e&1&&(b(0,"span"),v(1),C()),e&2){let n=x();m(),j(n.client()==="all"?"All agents \xB7 All skills":"Skills discoverable by the selected agent")}}function bT(e,t){if(e&1&&(mt(),b(0,"path",21)(1,"title"),v(2,"Explicit reference from SKILL.md (read only)"),C()()),e&2){let n=t.$implicit,r=x();ne("d",r.path(n))}}function CT(e,t){if(e&1){let n=ue();mt(),b(0,"g",34),W("click",function(){let o=$(n).$implicit,i=x();return U(i.choose("arrow",o.id))})("keydown",function(o){let i=$(n).$implicit,s=x();return U(s.key(o,"arrow",i.id))}),ye(1,"path",35)(2,"path",36),C()}if(e&2){let n=t.$implicit,r=t.$index,o=x();Te("chosen",o.arrow()?.id===n.id),ne("aria-label","Your arrow "+(r+1)),m(),ne("d",o.path(n)),m(),ne("d",o.path(n))}}function xT(e,t){if(e&1){let n=ue();mt(),b(0,"g",37),W("pointerdown",function(o){let i=$(n).$implicit,s=x();return U(s.start(o,"skill",i.key))})("click",function(){let o=$(n).$implicit,i=x();return U(i.choose("skill",o.key))})("keydown",function(o){let i=$(n).$implicit,s=x();return U(s.key(o,"skill",i.key))}),b(1,"title"),v(2),C(),ye(3,"rect",38),b(4,"foreignObject",39),hr(),b(5,"div",40),v(6),C()(),mt(),b(7,"text",41),v(8),C()()}if(e&2){let n=t.$implicit,r=x();Te("user",n.skill.scope==="user")("chosen",r.selection()?.kind==="skill"&&r.selection()?.id===n.key)("connection-source",r.source()===n.key),ne("data-skill",n.skill.name)("aria-label","Skill "+n.skill.name)("transform","translate("+n.x+" "+n.y+")"),m(2),kt("",n.skill.name,": ",n.skill.description),m(4),de(" ",n.skill.name," "),m(2),de(" ",n.skill.scope==="project"?"Project skill":"On your machine"," ")}}function IT(e,t){if(e&1){let n=ue();mt(),b(0,"g",42),W("pointerdown",function(o){let i=$(n).$implicit,s=x();return U(s.start(o,"title",i.id))})("click",function(){let o=$(n).$implicit,i=x();return U(i.choose("title",o.id))})("keydown",function(o){let i=$(n).$implicit,s=x();return U(s.key(o,"title",i.id))}),b(1,"text",43),v(2),C()()}if(e&2){let n=t.$implicit,r=x();Te("chosen",r.title()?.id===n.id),ne("aria-label","Title "+n.text)("transform","translate("+n.x+" "+n.y+")"),m(2),j(n.text||"Untitled")}}function TT(e,t){if(e&1){let n=ue();mt(),b(0,"circle",45),W("pointerdown",function(o){let i=$(n).$implicit,s=x(),a=x();return U(a.startEndpoint(o,s,i))}),b(1,"title"),v(2,"Drag to another skill, or use the From and To menus"),C()()}if(e&2){let n=t.$implicit,r=x(),o=x();ne("cx",o.endpoint(r,n).x)("cy",o.endpoint(r,n).y)}}function ST(e,t){if(e&1&&me(0,TT,3,2,":svg:circle",44,gt),e&2){let n=x();ge(n.ends)}}function MT(e,t){if(e&1&&(b(0,"p",28),v(1),C()),e&2){let n=x();m(),de(" ",n.skills().length?"No skills found for the selected agent. Select another agent or click it again to show all.":"Add a SKILL.md in an agent skills folder, then Rescan."," ")}}var fc=class e{ends=["source","target"];project=Ge.required();skills=Ge.required();client=Ge("all");edges=Ge.required();selected=ro();element=S(yn);storageError=V("");fullscreen=V(!1);state=Vu({source:()=>({project:this.project(),skills:this.skills()}),computation:(t,n)=>{let r={version:1,nodes:[],arrows:[],titles:[]},o="";if(n?.value.project===t.project)r=n.value.data,o=n.value.restoreError;else try{r=Rv(t.project)}catch{o="Could not restore this whiteboard. Changes in this session will not overwrite the saved data."}return{project:t.project,data:Pv(t.skills,r),restoreError:o}}});board=ve(()=>this.state().data);selection=V(null);connecting=V(!1);source=V(null);titleText=V("");pan=V({x:0,y:0});scale=V(1);pointer=V(null);transform=ve(()=>`translate(${this.pan().x} ${this.pan().y}) scale(${this.scale()})`);gesture;cards=ve(()=>this.board().nodes.flatMap(t=>{let n=this.skills().find(o=>o.editTargets.some(i=>t.files.includes(i.id))),r=this.client();return n&&(r==="all"||n.clients.includes(r))?[Q(B({},t),{skill:n})]:[]}));automatic=ve(()=>this.edges().flatMap(t=>{let n=this.cards().find(o=>o.skill.id===t.source),r=this.cards().find(o=>o.skill.id===t.target);return n&&r?[{source:n.key,target:r.key}]:[]}));drawings=ve(()=>{let t=new Set(this.cards().map(n=>n.key));return this.board().arrows.filter(n=>t.has(n.source)&&t.has(n.target))});arrow=ve(()=>this.drawings().find(t=>this.selection()?.kind==="arrow"&&t.id===this.selection()?.id));title=ve(()=>this.board().titles.find(t=>this.selection()?.kind==="title"&&t.id===this.selection()?.id));skill=ve(()=>this.cards().find(t=>this.selection()?.kind==="skill"&&t.key===this.selection()?.id)?.skill);hint=ve(()=>this.connecting()?this.source()?"Choose the destination skill. Escape cancels.":"Choose the starting skill. Escape cancels.":"Drag skills and titles. Drag the background to pan. Select a skill and use arrow keys to move it.");constructor(){at(t=>{if(!this.fullscreen())return;let n=document.body.style.overflow;document.body.style.overflow="hidden",t(()=>{document.body.style.overflow=n})}),at(()=>{let t=this.state();if(!t.restoreError)try{localStorage.setItem(jd(t.project),JSON.stringify(t.data)),this.storageError.set("")}catch{this.storageError.set("Autosave unavailable. Keep this tab open; changes are only held in memory.")}})}toggleFullscreen(){this.fullscreen.update(t=>!t)}exitFullscreen(){this.fullscreen.set(!1),this.element.nativeElement.querySelector(".board-fullscreen")?.focus()}openSkill(t){this.fullscreen()&&this.exitFullscreen(),this.selected.emit(t)}fullscreenKey(t){if(!this.fullscreen()||(t.key==="Escape"&&(t.preventDefault(),t.stopPropagation(),this.escape(),this.exitFullscreen()),t.key!=="Tab"))return;let n=this.element.nativeElement.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), a[href], [tabindex="0"]'),r=n[0],o=n[n.length-1];t.shiftKey&&document.activeElement===r?(t.preventDefault(),o?.focus()):!t.shiftKey&&document.activeElement===o&&(t.preventDefault(),r?.focus())}change(t){this.state.update(n=>Q(B({},n),{data:t(n.data)}))}choose(t,n){if(t==="skill"&&this.connecting()){let r=this.source();if(!r||!this.cards().some(o=>o.key===r))this.source.set(n);else if(r!==n){let o={id:crypto.randomUUID(),source:r,target:n};this.change(i=>Q(B({},i),{arrows:[...i.arrows,o]})),this.connecting.set(!1),this.source.set(null),this.selection.set({kind:"arrow",id:o.id})}return}this.selection.set({kind:t,id:n})}toggleConnect(){this.connecting.update(t=>!t),this.source.set(null)}addTitle(){let t=this.titleText().trim();if(!t)return;let r=((this.svg()?.clientWidth??800)/2-this.pan().x)/this.scale(),o=(0-this.pan().y)/this.scale(),i={id:crypto.randomUUID(),text:t.slice(0,160),x:r,y:o};this.change(s=>Q(B({},s),{titles:[...s.titles,i]})),this.selection.set({kind:"title",id:i.id}),this.titleText.set("")}editTitle(t){let n=this.title()?.id;this.change(r=>Q(B({},r),{titles:r.titles.map(o=>o.id===n?Q(B({},o),{text:t.slice(0,160)}):o)}))}remove(){let t=this.selection();!t||t.kind==="skill"||(this.change(n=>Q(B({},n),{arrows:n.arrows.filter(r=>t.kind!=="arrow"||r.id!==t.id),titles:n.titles.filter(r=>t.kind!=="title"||r.id!==t.id)})),this.selection.set(null))}reconnect(t,n){let r=this.arrow();!r||r[t==="source"?"target":"source"]===n||this.change(o=>Q(B({},o),{arrows:o.arrows.map(i=>i.id===r.id?Q(B({},i),{[t]:n}):i)}))}path(t){let n=this.board().nodes.find(s=>s.key===t.source),r=this.board().nodes.find(s=>s.key===t.target);if(!n||!r)return"";let o=Ni(n,r),i=Ni(r,n);if(this.gesture?.kind==="endpoint"&&"id"in t&&this.gesture.id===t.id&&this.pointer()&&(this.gesture.end==="source"?o=this.pointer():i=this.pointer()),"id"in t){let s=Math.hypot(i.x-o.x,i.y-o.y)||1,a={x:(o.x+i.x)/2-(i.y-o.y)/s*28,y:(o.y+i.y)/2+(i.x-o.x)/s*28};return`M ${o.x} ${o.y} Q ${a.x} ${a.y} ${i.x} ${i.y}`}return`M ${o.x} ${o.y} L ${i.x} ${i.y}`}endpoint(t,n){let r=this.board().nodes.find(i=>i.key===t.source),o=this.board().nodes.find(i=>i.key===t.target);return r&&o?n==="source"?Ni(r,o):Ni(o,r):{x:0,y:0}}svg(){return this.element.nativeElement.querySelector("svg.board-surface")}screenPoint(t){return{x:t.clientX,y:t.clientY}}world(t){let n=this.svg().getBoundingClientRect();return{x:(t.clientX-n.left-this.pan().x)/this.scale(),y:(t.clientY-n.top-this.pan().y)/this.scale()}}start(t,n,r){if(t.button!==0||this.connecting())return;t.stopPropagation();let o=n==="skill"?this.board().nodes.find(i=>i.key===r):this.board().titles.find(i=>i.id===r);o&&(this.gesture={kind:n,id:r,start:this.screenPoint(t),origin:{x:o.x,y:o.y}},this.svg()?.setPointerCapture(t.pointerId),this.selection.set({kind:n,id:r}))}startEndpoint(t,n,r){t.button===0&&(t.stopPropagation(),this.gesture={kind:"endpoint",id:n.id,end:r},this.pointer.set(this.world(t)),this.svg()?.setPointerCapture(t.pointerId))}startPan(t){t.button!==0||t.target instanceof Element&&t.target.closest("[data-board-item]")||(this.gesture={kind:"pan",start:this.screenPoint(t),origin:this.pan()},this.svg()?.setPointerCapture(t.pointerId),this.selection.set(null))}move(t){let n=this.gesture;if(!n)return;if(n.kind==="endpoint"){this.pointer.set(this.world(t));return}let r=n.kind==="pan"?1:this.scale(),o={x:n.origin.x+(t.clientX-n.start.x)/r,y:n.origin.y+(t.clientY-n.start.y)/r};n.kind==="pan"?this.pan.set(o):this.position(n.kind,n.id,o)}end(t){if(this.gesture?.kind==="endpoint"){let n=this.world(t),r=this.cards().find(o=>n.x>=o.x&&n.x<=o.x+sn.width&&n.y>=o.y&&n.y<=o.y+sn.height);r&&this.reconnect(this.gesture.end,r.key)}this.cancelGesture(t)}cancelGesture(t){this.gesture=void 0,this.pointer.set(null),this.svg()?.hasPointerCapture(t.pointerId)&&this.svg()?.releasePointerCapture(t.pointerId)}position(t,n,r){this.change(o=>t==="skill"?Q(B({},o),{nodes:o.nodes.map(i=>i.key===n?B(B({},i),r):i)}):Q(B({},o),{titles:o.titles.map(i=>i.id===n?B(B({},i),r):i)}))}key(t,n,r){["Enter"," "].includes(t.key)&&(t.preventDefault(),this.choose(n,r)),(t.key==="Delete"||t.key==="Backspace")&&(t.preventDefault(),this.selection.set({kind:n,id:r}),this.remove());let i={ArrowLeft:{x:-20,y:0},ArrowRight:{x:20,y:0},ArrowUp:{x:0,y:-20},ArrowDown:{x:0,y:20}}[t.key];if(i&&n!=="arrow"){t.preventDefault();let s=n==="skill"?this.board().nodes.find(a=>a.key===r):this.board().titles.find(a=>a.id===r);s&&this.position(n,r,{x:s.x+i.x,y:s.y+i.y})}}escape(){this.connecting.set(!1),this.source.set(null),this.selection.set(null)}zoom(t,n){let r=this.svg(),o=Math.max(.05,Math.min(3,this.scale()*t)),i=o/this.scale(),s=n??{x:(r?.clientWidth??800)/2,y:(r?.clientHeight??500)/2};this.pan.update(a=>({x:s.x-(s.x-a.x)*i,y:s.y-(s.y-a.y)*i})),this.scale.set(o)}wheel(t){if(t.preventDefault(),!t.deltaY)return;let n=this.svg(),r=n?.getBoundingClientRect(),o=t.deltaMode===1?16:t.deltaMode===2?n?.clientHeight||500:1,i=Math.max(-100,Math.min(100,t.deltaY*o));this.zoom(Math.exp(-i*.001),{x:t.clientX-(r?.left??0),y:t.clientY-(r?.top??0)})}fit(){let t=[...this.cards(),...this.board().titles];if(!t.length)return;let n=Math.min(...t.map(c=>c.x))-40,r=Math.min(...t.map(c=>c.y))-40,o=Math.max(...t.map(c=>c.x+("text"in c?Math.max(320,c.text.length*15):sn.width)))-n+40,i=Math.max(...t.map(c=>c.y+sn.height))-r+40,s=this.svg(),a=Math.max(.05,Math.min(1,(s?.clientWidth??800)/o,(s?.clientHeight??500)/i));this.scale.set(a),this.pan.set({x:-n*a,y:-r*a})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ie({type:e,selectors:[["app-skill-board"]],hostVars:5,hostBindings:function(n,r){n&1&&we("keydown",function(i){return r.fullscreenKey(i)}),n&2&&(ne("role",r.fullscreen()?"dialog":null)("aria-modal",r.fullscreen()?"true":null)("aria-label",r.fullscreen()?"Skills whiteboard fullscreen":null),Te("fullscreen",r.fullscreen()))},inputs:{project:[1,"project"],skills:[1,"skills"],client:[1,"client"],edges:[1,"edges"]},outputs:{selected:"selected"},decls:51,vars:14,consts:[["newTitle",""],["from",""],["to",""],["titleEditor",""],[1,"board-tools"],[1,"board-actions"],["type","button",3,"click"],["aria-label","Title text","placeholder","Name an outcome or a stage","maxlength","160",3,"input","keydown.enter","value"],["type","button","data-action","add-title",3,"click","disabled"],["aria-label","Arrow legend",1,"board-legend"],[1,"reference-sample"],[1,"drawing-sample"],["type","button",1,"board-fullscreen",3,"click","title"],[1,"board-selection"],["role","status",1,"board-save"],[1,"board-viewport"],["aria-label","Skills whiteboard","role","group","tabindex","0",1,"board-surface",3,"pointerdown","pointermove","pointerup","pointercancel","lostpointercapture","wheel","keydown.escape"],["id","board-reference-head","viewBox","0 0 10 10","refX","9","refY","5","markerWidth","7","markerHeight","7","orient","auto-start-reverse"],["d","M 0 0 L 10 5 L 0 10 z",1,"reference-head"],["id","board-drawing-head","viewBox","0 0 10 10","refX","9","refY","5","markerWidth","7","markerHeight","7","orient","auto-start-reverse"],["d","M 0 0 L 10 5 L 0 10 z",1,"drawing-head"],["marker-end","url(#board-reference-head)",1,"board-reference"],["data-board-item","arrow","role","button","tabindex","0",1,"board-arrow",3,"chosen"],["data-board-item","skill","role","button","tabindex","0",1,"board-card",3,"user","chosen","connection-source"],["data-board-item","title","role","button","tabindex","0",1,"board-title",3,"chosen"],["role","group","aria-label","Whiteboard zoom",1,"board-zoom"],["type","button","aria-label","Zoom in whiteboard",3,"click"],["type","button","aria-label","Zoom out whiteboard",3,"click"],[1,"board-empty"],["aria-live","polite",1,"board-hint"],["aria-label","Arrow source",3,"change","value"],[3,"value"],["aria-label","Arrow destination",3,"change","value"],["aria-label","Edit title","maxlength","160",3,"input","value"],["data-board-item","arrow","role","button","tabindex","0",1,"board-arrow",3,"click","keydown"],[1,"arrow-hit"],["marker-end","url(#board-drawing-head)",1,"board-drawing"],["data-board-item","skill","role","button","tabindex","0",1,"board-card",3,"pointerdown","click","keydown"],["width","220","height","82","rx","5"],["x","14","y","12","width","192","height","44"],[1,"board-card-name"],["x","14","y","68",1,"board-card-scope"],["data-board-item","title","role","button","tabindex","0",1,"board-title",3,"pointerdown","click","keydown"],["x","0","y","25"],["data-board-item","endpoint","r","8",1,"board-endpoint"],["data-board-item","endpoint","r","8",1,"board-endpoint",3,"pointerdown"]],template:function(n,r){if(n&1){let o=ue();b(0,"div",4)(1,"div",5)(2,"button",6),W("click",function(){return r.toggleConnect()}),v(3," Add arrow "),C(),b(4,"input",7,0),W("input",function(){$(o);let s=ct(5);return U(r.titleText.set(s.value))})("keydown.enter",function(){return r.addTitle()}),C(),b(6,"button",8),W("click",function(){return r.addTitle()}),v(7," Add title "),C()(),b(8,"div",9)(9,"span"),ye(10,"i",10),v(11,"From SKILL.md (read only)"),C(),b(12,"span"),ye(13,"i",11),v(14,"Your arrows"),C()(),b(15,"button",12),W("click",function(){return r.toggleFullscreen()}),v(16),C()(),b(17,"div",13),ee(18,ET,14,2)(19,DT,4,1)(20,_T,4,1)(21,wT,2,1,"span"),b(22,"span",14),v(23),C()(),b(24,"div",15),mt(),b(25,"svg",16),W("pointerdown",function(s){return r.startPan(s)})("pointermove",function(s){return r.move(s)})("pointerup",function(s){return r.end(s)})("pointercancel",function(s){return r.cancelGesture(s)})("lostpointercapture",function(s){return r.cancelGesture(s)})("wheel",function(s){return r.wheel(s)})("keydown.escape",function(){return r.escape()}),b(26,"defs")(27,"marker",17),ye(28,"path",18),C(),b(29,"marker",19),ye(30,"path",20),C()(),b(31,"g"),me(32,bT,3,1,":svg:path",21,gT),me(34,CT,3,5,":svg:g",22,Fv),me(36,xT,9,13,":svg:g",23,Bd),me(38,IT,3,5,":svg:g",24,Fv),ee(40,ST,2,0),C()(),hr(),b(41,"div",25)(42,"button",26),W("click",function(){return r.zoom(1.2)}),v(43," + "),C(),b(44,"button",27),W("click",function(){return r.zoom(1/1.2)}),v(45," \u2212 "),C(),b(46,"button",6),W("click",function(){return r.fit()}),v(47,"Fit skills"),C()(),ee(48,MT,2,1,"p",28),C(),b(49,"p",29),v(50),C()}if(n&2){let o,i;m(2),Te("active",r.connecting()),ne("aria-pressed",r.connecting()),m(2),re("value",r.titleText()),m(2),re("disabled",!r.titleText().trim()),m(9),re("title",r.fullscreen()?"Exit fullscreen (Esc)":"Fullscreen"),ne("aria-pressed",r.fullscreen()),m(),de(" ",r.fullscreen()?"Exit fullscreen":"Fullscreen"," "),m(2),te((o=r.arrow())?18:(o=r.title())?19:(o=r.skill())?20:21,o),m(5),j(r.state().restoreError||r.storageError()||"Saved locally for this project"),m(8),ne("transform",r.transform()),m(),ge(r.automatic()),m(2),ge(r.drawings()),m(2),ge(r.cards()),m(2),ge(r.board().titles),m(2),te((i=r.arrow())?40:-1,i),m(8),te(r.cards().length?-1:48),m(2),j(r.hint())}},styles:['[_nghost-%COMP%]{--%NS%board-reference: #406b9e;--%NS%board-drawing: #a45b16;--%NS%board-paper: #fffdf9;--%NS%board-ink: #26332d;display:flex;flex-direction:column;min-width:0;margin:18px 42px 0;color:var(--%NS%board-ink)}.board-tools[_ngcontent-%COMP%], .board-actions[_ngcontent-%COMP%], .board-legend[_ngcontent-%COMP%], .board-selection[_ngcontent-%COMP%], .board-zoom[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.board-tools[_ngcontent-%COMP%]{justify-content:space-between;gap:16px}button[_ngcontent-%COMP%], input[_ngcontent-%COMP%], select[_ngcontent-%COMP%]{border:1px solid var(--%NS%line);background:var(--%NS%board-paper);color:inherit;border-radius:4px;padding:8px 11px;font-size:12px}input[_ngcontent-%COMP%]{width:240px;max-width:100%}select[_ngcontent-%COMP%]{max-width:200px}button.active[_ngcontent-%COMP%]{outline:2px solid var(--%NS%board-drawing)}.board-legend[_ngcontent-%COMP%]{font-size:11px}.board-legend[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px}.board-legend[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{display:inline-block;width:25px;border-top:2px solid var(--%NS%board-reference)}.board-legend[_ngcontent-%COMP%] .drawing-sample[_ngcontent-%COMP%]{border-color:var(--%NS%board-drawing);border-top-style:dashed}.board-selection[_ngcontent-%COMP%]{min-height:58px;padding:8px 0;font-size:12px}.board-selection[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{overflow-wrap:anywhere}.board-selection[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}.board-save[_ngcontent-%COMP%]{margin-left:auto;max-width:390px;color:var(--%NS%muted);font-size:11px}.board-viewport[_ngcontent-%COMP%]{position:relative;height:max(480px,calc(100vh - 510px));border:1px solid var(--%NS%line);border-radius:5px;overflow:hidden;background:var(--%NS%board-paper)}.board-surface[_ngcontent-%COMP%]{width:100%;height:100%;display:block;touch-action:none;-webkit-user-select:none;user-select:none;background-image:radial-gradient(#dce1d8 .8px,transparent .8px);background-size:22px 22px;cursor:grab}.board-surface[_ngcontent-%COMP%]:active{cursor:grabbing}.board-reference[_ngcontent-%COMP%], .board-drawing[_ngcontent-%COMP%]{fill:none;stroke-width:2}.board-reference[_ngcontent-%COMP%]{stroke:var(--%NS%board-reference)}.reference-head[_ngcontent-%COMP%]{fill:var(--%NS%board-reference)}.board-drawing[_ngcontent-%COMP%]{stroke:var(--%NS%board-drawing);stroke-dasharray:7 4;pointer-events:none}.drawing-head[_ngcontent-%COMP%]{fill:var(--%NS%board-drawing)}.arrow-hit[_ngcontent-%COMP%]{stroke:transparent;stroke-width:18;fill:none;cursor:pointer}.board-arrow.chosen[_ngcontent-%COMP%] .board-drawing[_ngcontent-%COMP%]{stroke-width:4}.board-card[_ngcontent-%COMP%]{cursor:move}.board-card[_ngcontent-%COMP%] rect[_ngcontent-%COMP%]{fill:var(--%NS%board-paper);stroke:#769274;stroke-width:1.5}.board-card.user[_ngcontent-%COMP%] rect[_ngcontent-%COMP%]{stroke:#9781b1}.board-card-name[_ngcontent-%COMP%]{color:var(--%NS%board-ink);font-weight:650;font-size:13px;line-height:19px;overflow-wrap:anywhere}.board-card-scope[_ngcontent-%COMP%]{fill:#536450;font-size:10px}.board-card.user[_ngcontent-%COMP%] .board-card-scope[_ngcontent-%COMP%]{fill:#7c629a}.board-card.chosen[_ngcontent-%COMP%] rect[_ngcontent-%COMP%], .board-card.connection-source[_ngcontent-%COMP%] rect[_ngcontent-%COMP%], .board-card[_ngcontent-%COMP%]:focus-visible rect[_ngcontent-%COMP%]{stroke-width:3}.board-card.connection-source[_ngcontent-%COMP%] rect[_ngcontent-%COMP%]{stroke:var(--%NS%board-drawing)}.board-title[_ngcontent-%COMP%]{cursor:move}.board-title[_ngcontent-%COMP%] text[_ngcontent-%COMP%]{fill:var(--%NS%board-ink);font-size:25px;font-weight:650}.board-title.chosen[_ngcontent-%COMP%] text[_ngcontent-%COMP%], .board-title[_ngcontent-%COMP%]:focus-visible text[_ngcontent-%COMP%]{text-decoration:underline;text-decoration-color:var(--%NS%board-drawing)}.board-endpoint[_ngcontent-%COMP%]{fill:var(--%NS%board-paper);stroke:var(--%NS%board-drawing);stroke-width:3;cursor:crosshair}.board-zoom[_ngcontent-%COMP%]{position:absolute;bottom:12px;right:12px;gap:0}.board-zoom[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border-radius:0}.board-hint[_ngcontent-%COMP%]{margin:10px 0;font-size:11px;color:var(--%NS%muted)}.board-empty[_ngcontent-%COMP%]{position:absolute;top:90px;left:30px;font-size:13px}[data-theme="dark"][_nghost-%COMP%], [data-theme="dark"] [_nghost-%COMP%]{--%NS%board-paper: #252b27;--%NS%board-ink: #e2e8dd;--%NS%board-reference: #85b3eb;--%NS%board-drawing: #edb06a}[data-theme="dark"][_nghost-%COMP%] .board-surface[_ngcontent-%COMP%], [data-theme="dark"] [_nghost-%COMP%] .board-surface[_ngcontent-%COMP%]{background-image:radial-gradient(#495149 .8px,transparent .8px)}[data-theme="dark"][_nghost-%COMP%] .board-card-scope[_ngcontent-%COMP%], [data-theme="dark"] [_nghost-%COMP%] .board-card-scope[_ngcontent-%COMP%]{fill:#a4bd9d}[data-theme="dark"][_nghost-%COMP%] .board-card.user[_ngcontent-%COMP%] .board-card-scope[_ngcontent-%COMP%], [data-theme="dark"] [_nghost-%COMP%] .board-card.user[_ngcontent-%COMP%] .board-card-scope[_ngcontent-%COMP%]{fill:#c4acd9}@media(max-width:900px){[_nghost-%COMP%]{margin:18px 20px 0}.board-save[_ngcontent-%COMP%]{margin-left:0}}@media(max-width:640px){[_nghost-%COMP%]{margin:16px 12px 0}.board-actions[_ngcontent-%COMP%]{align-items:stretch}.board-viewport[_ngcontent-%COMP%]{height:520px}}.board-legend[_ngcontent-%COMP%]{margin-left:auto}.fullscreen[_nghost-%COMP%]{position:fixed;inset:0;z-index:1000;margin:0;padding:20px;box-sizing:border-box;height:100dvh;overflow:auto;background:var(--%NS%board-paper)}.fullscreen[_nghost-%COMP%] .board-tools[_ngcontent-%COMP%], .fullscreen[_nghost-%COMP%] .board-selection[_ngcontent-%COMP%], .fullscreen[_nghost-%COMP%] .board-hint[_ngcontent-%COMP%]{flex-shrink:0}.fullscreen[_nghost-%COMP%] .board-viewport[_ngcontent-%COMP%]{flex:1;min-height:200px;height:auto}']})};var NT=()=>[];function AT(e,t){if(e&1){let n=ue();M(0,"div",10)(1,"button",18),we("click",function(){$(n);let o=x();return U(o.state.skillsView.set("list"))}),v(2," Files "),N(),M(3,"button",19),we("click",function(){$(n);let o=x();return U(o.state.skillsView.set("board"))}),v(4," Whiteboard "),N()()}if(e&2){let n=x();m(),Te("selected",n.state.skillsView()==="list"),ne("aria-pressed",n.state.skillsView()==="list"),m(2),Te("selected",n.state.skillsView()==="board"),ne("aria-pressed",n.state.skillsView()==="board")}}function kT(e,t){e&1&&Ke(0,"div",11)}function OT(e,t){e&1&&Ke(0,"app-token-optimizer")}function RT(e,t){e&1&&Ke(0,"app-optimization-checklist")}function PT(e,t){if(e&1){let n=ue();M(0,"app-skill-board",20),we("selected",function(o){$(n);let i=x();return U(i.select(o))}),N()}if(e&2){let n=t,r=x();he("project",n.project.path)("skills",n.skills)("client",r.state.client())("edges",n.skillEdges)}}function FT(e,t){if(e&1){let n=ue();M(0,"section",21),we("selected",function(o){$(n);let i=x();return U(i.select(o))}),N()}if(e&2){let n=x();he("nodes",n.state.nodes())("edges",n.state.data()?.edges??Qo(2,NT))}}function LT(e,t){if(e&1&&(M(0,"div",22)(1,"span",25),v(2,"\u2301"),N(),M(3,"strong"),v(4,"Couldn\u2019t load this workspace"),N(),M(5,"p"),v(6),N()()),e&2){let n=x(2);m(6),j(n.state.error())}}function jT(e,t){e&1&&(M(0,"div",23),v(1,"Mapping your agent\u2019s world\u2026"),N())}function BT(e,t){if(e&1&&(M(0,"div",22)(1,"span",25),v(2,"\u2733"),N(),M(3,"strong"),v(4),N(),M(5,"p"),v(6),N()()),e&2){let n=x(2);m(4),j(n.state.search()||n.state.scope()!=="all"||n.state.client()!=="all"?"No matching assets":"A blank canvas, for now"),m(2),j(n.empty())}}function VT(e,t){if(e&1){let n=ue();M(0,"div",26),we("selected",function(o){$(n);let i=x(2);return U(i.select(o))}),N()}if(e&2){let n=x(2);he("rows",n.state.rows())("tab",n.state.assetTab())}}function HT(e,t){if(e&1&&(M(0,"section",15),ee(1,LT,7,1,"div",22)(2,jT,2,0,"div",23)(3,BT,7,2,"div",22)(4,VT,1,2,"div",24),N()),e&2){let n=x();ne("aria-label",n.state.tab()==="context"?"Context graph":n.state.tab()==="mcp"?"MCP servers list":n.state.tab()==="rules"?"Rules list":"Skills list"),m(),te(n.state.error()?1:n.state.data()?n.state.rows().length?4:3:2)}}function $T(e,t){if(e&1&&(M(0,"footer",16)(1,"span",27),v(2),N()()),e&2){let n=x();m(2),j(n.state.summary())}}var pc=class e{state=S(yt);titles=yg;constructor(){this.state.load()}select(t){this.state.selection.set({tab:this.state.assetTab(),row:t})}key(t){t.key==="Escape"&&this.state.selection.set(null),t.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName??"")&&(t.preventDefault(),document.getElementById("search")?.focus())}empty(){if(this.state.search()||this.state.scope()!=="all"||this.state.client()!=="all")return"Try another scope, client, or search.";switch(this.state.tab()){case"checklist":return"No optimization checks available.";case"optimizer":return"No local context discovered for this agent.";case"context":return"Context appears here when your folder contains AGENTS.md, CLAUDE.md, .github/copilot-instructions.md, or linked knowledge files.";case"rules":return"Add .cursor/rules, .claude/rules, .github/instructions, or a legacy .cursorrules file to see rules here. General instructions stay in Context.";case"skills":return"Add a SKILL.md in an agent skills folder to see it here.";case"mcp":return"No MCP servers found in the supported configuration files."}}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ie({type:e,selectors:[["app-root"]],hostBindings:function(n,r){n&1&&we("keydown",function(i){return r.key(i)},fu)},decls:26,vars:14,consts:[[1,"app"],["appSidebar","",1,"sidebar"],[1,"page-heading"],["src","/mountain-context.jpg","alt","","aria-hidden","true",1,"page-heading-image"],[1,"page-heading-copy"],["id","page-title"],["id","page-description"],["id","view-switch",1,"view-switch",3,"hidden"],["id","graph-view",3,"click"],["id","list-view",3,"click"],["role","group","aria-label","Skills view",1,"view-switch"],["appFilters","",1,"toolbar"],["id","notice",1,"notice",3,"hidden"],[3,"project","skills","client","edges"],["appGraph","","id","canvas","aria-label","Context graph",1,"graph-canvas",3,"nodes","edges"],["id","canvas"],[1,"main-footer"],["appDetail","","id","detail","aria-label","Asset details",1,"detail",3,"hidden"],["id","skills-list-view",3,"click"],["id","skills-board-view",3,"click"],[3,"selected","project","skills","client","edges"],["appGraph","","id","canvas","aria-label","Context graph",1,"graph-canvas",3,"selected","nodes","edges"],[1,"empty"],[1,"loading"],["appAssetTable","",1,"table-wrap",3,"rows","tab"],[1,"empty-mark"],["appAssetTable","",1,"table-wrap",3,"selected","rows","tab"],["id","summary","aria-live","polite"]],template:function(n,r){if(n&1&&(M(0,"div",0),Ke(1,"aside",1),M(2,"main")(3,"section",2),Ke(4,"img",3),M(5,"div",4)(6,"h1",5),v(7),N(),M(8,"p",6),v(9),N()(),M(10,"div",7)(11,"button",8),we("click",function(){return r.state.view.set("graph")}),v(12," \u2318 Graph"),N(),M(13,"button",9),we("click",function(){return r.state.view.set("list")}),v(14," \u2637 Files "),N()(),ee(15,AT,5,6,"div",10),N(),ee(16,kT,1,0,"div",11),M(17,"div",12),v(18),N(),ee(19,OT,1,0,"app-token-optimizer")(20,RT,1,0,"app-optimization-checklist")(21,PT,1,4,"app-skill-board",13)(22,FT,1,3,"section",14)(23,HT,5,2,"section",15),ee(24,$T,3,1,"footer",16),N(),Ke(25,"aside",17),N()),n&2){let o;m(7),j(r.titles[r.state.tab()][0]),m(2),j(r.titles[r.state.tab()][1]),m(),he("hidden",r.state.tab()!=="context"),m(),Te("selected",r.state.view()==="graph"),m(2),Te("selected",r.state.view()==="list"),m(2),te(r.state.tab()==="skills"?15:-1),m(),te(r.state.tab()!=="optimizer"&&r.state.tab()!=="checklist"&&!r.state.whiteboard()?16:-1),m(),he("hidden",!r.state.data()?.warnings?.length),m(),de(" ",r.state.data()?.warnings?.join(" ")," "),m(),te(r.state.tab()==="optimizer"?19:r.state.tab()==="checklist"?20:(o=r.state.whiteboard()&&!r.state.error()&&r.state.data())?21:!r.state.error()&&r.state.data()&&r.state.rows().length&&r.state.tab()==="context"&&r.state.view()==="graph"?22:23,o),m(5),te(r.state.tab()!=="context"&&r.state.tab()!=="optimizer"?24:-1),m(),he("hidden",!r.state.selection())}},dependencies:[uc,Oa,Aa,ka,ac,lc,cc,fc],encapsulation:2})};ld(pc,{providers:[Al(),Ku()]}).catch(console.error);
|