@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
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
var Fv=Object.defineProperty,Lv=Object.defineProperties;var jv=Object.getOwnPropertyDescriptors;var Bd=Object.getOwnPropertySymbols;var Bv=Object.prototype.hasOwnProperty,Vv=Object.prototype.propertyIsEnumerable;var Vd=(e,t,n)=>t in e?Fv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B=(e,t)=>{for(var n in t||={})Bv.call(t,n)&&Vd(e,n,t[n]);if(Bd)for(var n of Bd(t))Vv.call(t,n)&&Vd(e,n,t[n]);return e},Q=(e,t)=>Lv(e,jv(t));var Ge=null,Ai=!1,Wn=1,Hv=null,Oe=Symbol("SIGNAL");function L(e){let t=Ge;return Ge=e,t}function ki(){return Ge}var Tn={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(Ge===null)return;Ge.consumerOnSignalRead(e);let t=Ge.producersTail;if(t!==void 0&&t.producer===e)return;let n,r=Ge.recomputing;if(r&&(n=t!==void 0?t.nextProducer:Ge.producers,n!==void 0&&n.producer===e)){Ge.producersTail=n,n.lastReadVersion=e.version,n.knownValidAtEpoch=Wn;return}let o=e.consumersTail;if(o!==void 0&&o.consumer===Ge&&(!r||o.knownValidAtEpoch===Wn))return;let i=Nr(Ge),s={producer:e,consumer:Ge,nextProducer:n,prevConsumer:void 0,knownValidAtEpoch:Wn,lastReadVersion:e.version,nextConsumer:void 0};Ge.producersTail=s,t!==void 0?t.nextProducer=s:Ge.producers=s,i&&zd(e,s)}function Hd(){Wn++}function Sn(e){if(!(Nr(e)&&!e.dirty)&&!(!e.dirty&&e.lastCleanEpoch===Wn)){if(!e.producerMustRecompute(e)&&!Mr(e)){Sr(e);return}e.producerRecomputeValue(e),Sr(e)}}function pc(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||$v(r)}}finally{Ai=t}}function hc(){return Ge?.consumerAllowSignalWrites!==!1}function $v(e){e.dirty=!0,pc(e),e.consumerMarkedDirty?.(e)}function Sr(e){e.dirty=!1,e.lastCleanEpoch=Wn}function un(e){return e&&$d(e),L(e)}function $d(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 Mn(e,t){L(t),e&&Ud(e)}function Ud(e){e.recomputing=!1;let t=e.producersTail,n=t!==void 0?t.nextProducer:e.producers;if(n!==void 0){if(Nr(e))do n=mc(n);while(n!==void 0);t!==void 0?t.nextProducer=void 0:e.producers=void 0}}function Mr(e){for(let t=e.producers;t!==void 0;t=t.nextProducer){let n=t.producer,r=t.lastReadVersion;if(r!==n.version||(Sn(n),r!==n.version))return!0}return!1}function Nn(e){if(Nr(e)){let t=e.producers;for(;t!==void 0;)t=mc(t)}e.producers=void 0,e.producersTail=void 0,e.consumers=void 0,e.consumersTail=void 0}function zd(e,t){let n=e.consumersTail,r=Nr(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)zd(o.producer,o)}function mc(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,!Nr(t)){let i=t.producers;for(;i!==void 0;)i=mc(i)}return n}function Nr(e){return e.consumerIsAlwaysLive||e.consumers!==void 0}function yo(e){Hv?.(e)}function vo(e,t){return Object.is(e,t)}function Ri(e,t){let n=Object.create(Uv);n.computation=e,t!==void 0&&(n.equal=t);let r=()=>{if(Sn(n),ln(n),n.value===ut)throw n.error;return n.value};return r[Oe]=n,yo(n),r}var qn=Symbol("UNSET"),Yn=Symbol("COMPUTING"),ut=Symbol("ERRORED"),Uv=Q(B({},Tn),{value:qn,dirty:!0,error:null,equal:vo,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(),L(null),o=t!==qn&&t!==ut&&r!==ut&&e.equal(t,r)}catch(i){r=ut,e.error=i}finally{Mn(e,n)}if(o){e.value=t;return}e.value=r,e.version++}});function zv(){throw new Error}var Gd=zv;function Wd(e){Gd(e)}function gc(e){Gd=e}var Gv=null;function yc(e,t){let n=Object.create(Ar);n.value=e,t!==void 0&&(n.equal=t);let r=()=>qd(n);return r[Oe]=n,yo(n),[r,s=>An(n,s),s=>Oi(n,s)]}function qd(e){return ln(e),e.value}function An(e,t){hc()||Wd(e),e.equal(e.value,t)||(e.value=t,Wv(e))}function Oi(e,t){hc()||Wd(e),An(e,t(e.value))}var Ar=Q(B({},Tn),{equal:vo,value:void 0,kind:"signal"});function Wv(e){e.version++,Hd(),pc(e),Gv?.(e)}var vc=Q(B({},Tn),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:"effect"});function Ec(e){if(e.dirty=!1,e.version>0&&!Mr(e))return;e.version++;let t=un(e);try{e.cleanup(),e.fn()}finally{Mn(e,t)}}var Dc;function Pi(){return Dc}function jt(e){let t=Dc;return Dc=e,t}var Yd=Symbol("NotFound");function kr(e){return e===Yd||e?.name==="\u0275NotFound"}function _c(e,t,n){let r=Object.create(qv);r.source=e,r.computation=t,n!=null&&(r.equal=n);let i=()=>{if(Sn(r),ln(r),r.value===ut)throw r.error;return r.value};return i[Oe]=r,yo(r),i}function wc(e,t){Sn(e),An(e,t),Sr(e)}function Zd(e,t){if(Sn(e),e.value===ut)throw e.error;Oi(e,t),Sr(e)}var qv=Q(B({},Tn),{value:qn,dirty:!0,error:null,equal:vo,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!==ut,a=s?{source:e.sourceValue,value:t}:void 0;r=e.computation(i,a),e.sourceValue=i,L(null),o=s&&r!==ut&&e.equal(t,r)}catch(i){r=ut,e.error=i}finally{Mn(e,n)}if(o){e.value=t;return}e.value=r,e.version++}});function Xd(e){let t=L(null);try{return e()}finally{L(t)}}function te(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 Eo(e,t){if(e){let n=e.indexOf(t);0<=n&&e.splice(n,1)}}var We=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(te(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{Kd(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)Kd(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)&&Eo(n,t)}remove(t){let{_finalizers:n}=this;n&&Eo(n,t),t instanceof e&&t._removeParent(this)}};We.EMPTY=(()=>{let e=new We;return e.closed=!0,e})();var bc=We.EMPTY;function Li(e){return e instanceof We||e&&"closed"in e&&te(e.remove)&&te(e.add)&&te(e.unsubscribe)}function Kd(e){te(e)?e():e.unsubscribe()}var bt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Or={setTimeout(e,t,...n){let{delegate:r}=Or;return r?.setTimeout?r.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){let{delegate:t}=Or;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function ji(e){Or.setTimeout(()=>{let{onUnhandledError:t}=bt;if(t)t(e);else throw e})}function Cc(){}var Qd=xc("C",void 0,void 0);function Jd(e){return xc("E",void 0,e)}function ef(e){return xc("N",e,void 0)}function xc(e,t,n){return{kind:e,value:t,error:n}}var Zn=null;function Pr(e){if(bt.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 tf(e){bt.useDeprecatedSynchronousErrorHandling&&Zn&&(Zn.errorThrown=!0,Zn.error=e)}var Xn=class extends We{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Li(t)&&t.add(this)):this.destination=Xv}static create(t,n,r){return new kn(t,n,r)}next(t){this.isStopped?Tc(ef(t),this):this._next(t)}error(t){this.isStopped?Tc(Jd(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Tc(Qd,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()}}},Yv=Function.prototype.bind;function Ic(e,t){return Yv.call(e,t)}var Sc=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)}}},kn=class extends Xn{constructor(t,n,r){super();let o;if(te(t)||!t)o={next:t??void 0,error:n??void 0,complete:r??void 0};else{let i;this&&bt.useDeprecatedNextContext?(i=Object.create(t),i.unsubscribe=()=>this.unsubscribe(),o={next:t.next&&Ic(t.next,i),error:t.error&&Ic(t.error,i),complete:t.complete&&Ic(t.complete,i)}):o=t}this.destination=new Sc(o)}};function Bi(e){bt.useDeprecatedSynchronousErrorHandling?tf(e):ji(e)}function Zv(e){throw e}function Tc(e,t){let{onStoppedNotification:n}=bt;n&&Or.setTimeout(()=>n(e,t))}var Xv={closed:!0,next:Cc,error:Zv,complete:Cc};var Fr=typeof Symbol=="function"&&Symbol.observable||"@@observable";function nf(e){return e}function rf(e){return e.length===0?nf:e.length===1?e[0]:function(n){return e.reduce((r,o)=>o(r),n)}}var De=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=Qv(t)?t:new kn(t,n,r);return Pr(()=>{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=of(n),new n((r,o)=>{let i=new kn({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)}[Fr](){return this}pipe(...t){return rf(t)(this)}toPromise(t){return t=of(t),new t((n,r)=>{let o;this.subscribe(i=>o=i,i=>r(i),()=>n(o))})}};De.create=e=>new De(e);function of(e){var t;return(t=e??bt.Promise)!==null&&t!==void 0?t:Promise}function Kv(e){return e&&te(e.next)&&te(e.error)&&te(e.complete)}function Qv(e){return e&&e instanceof Xn||Kv(e)&&Li(e)}function Jv(e){return te(e?.lift)}function dt(e){return t=>{if(Jv(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 Mc(e,t,n,r,o)}var Mc=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 sf=Rr(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var Ct=class extends De{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 sf}next(t){Pr(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(t)}})}error(t){Pr(()=>{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(){Pr(()=>{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?bc:(this.currentObservers=null,o.push(t),new We(()=>{this.currentObservers=null,Eo(o,t)}))}_checkFinalizedStatuses(t){let{hasError:n,thrownError:r,isStopped:o}=this;n?t.error(r):o&&t.complete()}asObservable(){let t=new De;return t.source=this,t}};Ct.create=(e,t)=>new Vi(e,t);var Vi=class extends Ct{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:bc}};var Do=class extends Ct{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 af(e){return e&&te(e.schedule)}function e0(e){return e[e.length-1]}function cf(e){return af(e0(e))?e.pop():void 0}function uf(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 lf(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 df(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(y){return Promise.resolve(y).then(f,d)}}function a(f,y){r[f]&&(o[f]=function(D){return new Promise(function(v,E){i.push([f,D,v,E])>1||c(f,D)})},y&&(o[f]=y(o[f])))}function c(f,y){try{l(r[f](y))}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,y){f(y),i.shift(),i.length&&c(i[0][0],i[0][1])}}function ff(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 lf=="function"?lf(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 te(e?.then)}function Ui(e){return te(e[Fr])}function zi(e){return Symbol.asyncIterator&&te(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 t0(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Wi=t0();function qi(e){return te(e?.[Wi])}function Yi(e){return df(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 te(e?.getReader)}function Bt(e){if(e instanceof De)return e;if(e!=null){if(Ui(e))return n0(e);if(Hi(e))return r0(e);if($i(e))return o0(e);if(zi(e))return pf(e);if(qi(e))return i0(e);if(Zi(e))return s0(e)}throw Gi(e)}function n0(e){return new De(t=>{let n=e[Fr]();if(te(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function r0(e){return new De(t=>{for(let n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function o0(e){return new De(t=>{e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,ji)})}function i0(e){return new De(t=>{for(let n of e)if(t.next(n),t.closed)return;t.complete()})}function pf(e){return new De(t=>{a0(e,t).catch(n=>t.error(n))})}function s0(e){return pf(Yi(e))}function a0(e,t){var n,r,o,i;return uf(this,void 0,void 0,function*(){try{for(n=ff(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 ft(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 dt((n,r)=>{n.subscribe(dn(r,o=>ft(r,e,()=>r.next(o),t),()=>ft(r,e,()=>r.complete(),t),o=>ft(r,e,()=>r.error(o),t)))})}function Ki(e,t=0){return dt((n,r)=>{r.add(e.schedule(()=>n.subscribe(r),t))})}function hf(e,t){return Bt(e).pipe(Ki(t),Xi(t))}function mf(e,t){return Bt(e).pipe(Ki(t),Xi(t))}function gf(e,t){return new De(n=>{let r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function yf(e,t){return new De(n=>{let r;return ft(n,t,()=>{r=e[Wi](),ft(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)}),()=>te(r?.return)&&r.return()})}function Qi(e,t){if(!e)throw new Error("Iterable cannot be null");return new De(n=>{ft(n,t,()=>{let r=e[Symbol.asyncIterator]();ft(n,t,()=>{r.next().then(o=>{o.done?n.complete():n.next(o.value)})},0,!0)})})}function vf(e,t){return Qi(Yi(e),t)}function Ef(e,t){if(e!=null){if(Ui(e))return hf(e,t);if(Hi(e))return gf(e,t);if($i(e))return mf(e,t);if(zi(e))return Qi(e,t);if(qi(e))return yf(e,t);if(Zi(e))return vf(e,t)}throw Gi(e)}function Df(e,t){return t?Ef(e,t):Bt(e)}function Nc(...e){let t=cf(e);return Df(e,t)}var _f=Rr(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function Ac(e,t){let n=typeof t=="object";return new Promise((r,o)=>{let i=new kn({next:s=>{r(s),i.unsubscribe()},error:o,complete:()=>{n?r(t.defaultValue):o(new _f)}});e.subscribe(i)})}function Vt(e,t){return dt((n,r)=>{let o=0;n.subscribe(dn(r,i=>{r.next(e.call(t,i,o++))}))})}function wf(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?y(D):c.push(D),y=D=>{i&&t.next(D),l++;let v=!1;Bt(n(D,u++)).subscribe(dn(t,E=>{o?.(E),i?f(E):t.next(E)},()=>{v=!0},void 0,()=>{if(v)try{for(l--;c.length&&l<r;){let E=c.shift();s?ft(t,s,()=>y(E)):y(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 te(t)?Ji((r,o)=>Vt((i,s)=>t(r,i,o,s))(Bt(e(r,o))),n):(typeof t=="number"&&(n=t),dt((r,o)=>wf(r,o,e,n)))}function kc(e,t){return dt((n,r)=>{let o=0;n.subscribe(dn(r,i=>e.call(t,i,o++)&&r.next(i)))})}function Rc(e,t){return te(t)?Ji(e,t,1):Ji(e,1)}function Oc(e){return dt((t,n)=>{try{t.subscribe(n)}finally{n.add(e)}})}var as="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",O=class extends Error{code;constructor(t,n){super(nr(t,n)),this.code=t}};function c0(e){return`NG0${Math.abs(e)}`}function nr(e,t){return`${c0(e)}${t?": "+t:""}`}function fe(e){for(let t in e)if(e[t]===fe)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 l0=fe({__forward_ref__:fe});function us(e){return e.__forward_ref__=us,e}function st(e){return Tf(e)?e():e}function Tf(e){return typeof e=="function"&&Object.hasOwn(e,l0)&&e.__forward_ref__===us}function se(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function ds(e){return u0(e,fs)}function u0(e,t){return Object.hasOwn(e,t)&&e[t]||null}function d0(e){let t=e?.[fs]??null;return t||null}function Fc(e){return e&&Object.hasOwn(e,ts)?e[ts]:null}var fs=fe({\u0275prov:fe}),ts=fe({\u0275inj:fe}),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=se({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Zc(e){return e&&!!e.\u0275providers}var Xc=fe({\u0275cmp:fe}),Kc=fe({\u0275dir:fe}),Qc=fe({\u0275pipe:fe});var Lc=fe({\u0275fac:fe}),rr=fe({__NG_ELEMENT_ID__:fe}),bf=fe({__NG_ENV_ID__:fe});function xo(e){return Jc(e,"@Component"),e[Xc]||null}function ps(e){return Jc(e,"@Directive"),e[Kc]||null}function Sf(e){return Jc(e,"@Pipe"),e[Qc]||null}function Jc(e,t){if(e==null)throw new O(-919,!1)}function Br(e){return typeof e=="string"?e:e==null?"":String(e)}var Mf=fe({ngErrorCode:fe}),f0=fe({ngErrorMessage:fe}),p0=fe({ngTokenPath:fe});function el(e,t){return Nf("",-200,t)}function hs(e,t){throw new O(-201,!1)}function Nf(e,t,n){let r=new O(t,e);return r[Mf]=t,r[f0]=e,n&&(r[p0]=n),r}function h0(e){return e[Mf]}var jc;function Af(){return jc}function qe(e){let t=jc;return jc=e,t}function tl(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 m0={},Qn=m0,g0="__NG_DI_FLAG__",Bc=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(kr(o))return o;throw o}}};function y0(e,t=0){let n=Pi();if(n===void 0)throw new O(-203,!1);if(n===null)return tl(e,void 0,t);{let r=v0(t),o=n.retrieve(e,r);if(kr(o)){if(r.optional)return null;throw o}return o}}function J(e,t=0){return(Af()||y0)(st(e),t)}function T(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 v0(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function Vc(e){let t=[];for(let n=0;n<e.length;n++){let r=st(e[n]);if(Array.isArray(r)){if(r.length===0)throw new O(900,!1);let o,i=0;for(let s=0;s<r.length;s++){let a=r[s],c=E0(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 E0(e){return e[g0]}function er(e,t){let n=Object.hasOwn(e,Lc);return n?e[Lc]:null}function ms(e,t){e.forEach(n=>Array.isArray(n)?ms(n,t):t(n))}function kf(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function nl(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=Vr(e,t);return r>=0?e[r|1]=n:(r=~r,Rf(e,r,t,n)),r}function ys(e,t){let n=Vr(e,t);if(n>=0)return e[n|1]}function Vr(e,t){return D0(e,t,1)}function D0(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={},Ht=[],Hr=new G(""),Io=new G("",-1),rl=new G(""),jr=class{get(t,n=Qn){if(n===Qn){let o=Nf("",-201);throw o.name="\u0275NotFound",o}return n}};function ir(e){return{\u0275providers:e}}function Of(e){return ir([{provide:Hr,multi:!0,useValue:e}])}function Pf(...e){return{\u0275providers:ol(!0,e),\u0275fromNgModule:!0}}function ol(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&&Ff(o,i),n}function Ff(e,t){for(let n=0;n<e.length;n++){let{ngModule:r,providers:o}=e[n];il(o,i=>{t(i,r)})}}function ns(e,t,n,r){if(e=st(e),!e)return!1;let o=null,i=Fc(e),s=!i&&xo(e);if(!i&&!s){let c=e.ngModule;if(i=Fc(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&&Ff(l,t)}if(!a){let l=er(o)||(()=>new o);t({provide:o,useFactory:l,deps:Ht},o),t({provide:rl,useValue:o,multi:!0},o),t({provide:Hr,useValue:()=>J(o),multi:!0},o)}let c=i.providers;if(c!=null&&!a){let l=e;il(c,u=>{t(u,l)})}}else return!1;return o!==e&&e.providers!==void 0}function il(e,t){for(let n of e)Zc(n)&&(n=n.\u0275providers),Array.isArray(n)?il(n,t):t(n)}var _0=fe({provide:String,useValue:fe});function Lf(e){return e!==null&&typeof e=="object"&&_0 in e}function w0(e){return!!(e&&e.useExisting)}function b0(e){return!!(e&&e.useFactory)}function rs(e){return typeof e=="function"}var To=new G(""),es={},Cf={},Pc;function So(){return Pc===void 0&&(Pc=new jr),Pc}var nt=class{},tr=class extends nt{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,$c(t,s=>this.processProvider(s)),this.records.set(Io,Lr(void 0,this)),o.has("environment")&&this.records.set(nt,Lr(void 0,this));let i=this.records.get(To);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(rl,Ht,{self:!0}))}retrieve(t,n){let r=Jn(n)||0;try{return this.get(t,Qn,r)}catch(o){if(kr(o))return o;throw o}}destroy(){_o(this),this._destroyed=!0;let t=L(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(),L(t)}}onDestroy(t){return _o(this),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){_o(this);let n=jt(this),r=qe(void 0),o;try{return t()}finally{jt(n),qe(r)}}get(t,n=Qn,r){if(_o(this),Object.hasOwn(t,bf))return t[bf](this);let o=Jn(r),i,s=jt(this),a=qe(void 0);try{if(!(o&4)){let l=this.records.get(t);if(l===void 0){let u=S0(t)&&ds(t);u&&this.injectableDefInScope(u)?l=Lr(Hc(t),es):l=null,this.records.set(t,l)}if(l!=null)return this.hydrate(t,l,o)}let c=o&2?So():this.parent;return n=o&8&&n===Qn?null:n,c.get(t,n)}catch(c){let l=h0(c);throw l===-200||l===-201?new O(l,null):c}finally{qe(a),jt(s)}}resolveInjectorInitializers(){let t=L(null),n=jt(this),r=qe(void 0),o;try{let i=this.get(Hr,Ht,{self:!0});for(let s of i)s()}finally{jt(n),qe(r),L(t)}}toString(){return"R3Injector[...]"}processProvider(t){t=st(t);let n=rs(t)?t:st(t&&t.provide),r=x0(t);if(!rs(t)&&t.multi===!0){let o=this.records.get(n);o||(o=Lr(void 0,es,!0),o.factory=()=>Vc(o.multi),this.records.set(n,o)),n=t,o.multi.push(t)}this.records.set(n,r)}hydrate(t,n,r){let o=L(null);try{if(n.value===Cf)throw el("");return n.value===es&&(n.value=Cf,n.value=n.factory(void 0,r)),typeof n.value=="object"&&n.value&&T0(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}finally{L(o)}}injectableDefInScope(t){if(!t.providedIn)return!1;let n=st(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 Hc(e){let t=ds(e),n=t!==null?t.factory:er(e);if(n!==null)return n;if(e instanceof G)throw new O(-204,!1);if(e instanceof Function)return C0(e);throw new O(-204,!1)}function C0(e){if(e.length>0)throw new O(-204,!1);let n=d0(e);return n!==null?()=>n.factory(e):()=>new e}function x0(e){if(Lf(e))return Lr(void 0,e.useValue);{let t=jf(e);return Lr(t,es)}}function jf(e,t,n){let r;if(rs(e)){let o=st(e);return er(o)||Hc(o)}else if(Lf(e))r=()=>st(e.useValue);else if(b0(e))r=()=>e.useFactory(...Vc(e.deps||[]));else if(w0(e))r=(o,i)=>J(st(e.useExisting),i!==void 0&&i&8?8:void 0);else{let o=st(e&&(e.useClass||e.provide));if(I0(e))r=()=>new o(...Vc(e.deps));else return er(o)||Hc(o)}return r}function _o(e){if(e.destroyed)throw new O(-205,!1)}function Lr(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function I0(e){return!!e.deps}function T0(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function S0(e){return typeof e=="function"||typeof e=="object"&&e.ngMetadataName==="InjectionToken"}function $c(e,t){for(let n of e)Array.isArray(n)?$c(n,t):n&&Zc(n)?$c(n.\u0275providers,t):t(n)}function $r(e,t){let n;e instanceof tr?(_o(e),n=e):n=new Bc(e);let r,o=jt(n),i=qe(void 0);try{return t()}finally{jt(o),qe(i)}}function Bf(){return Af()!==void 0||Pi()!=null}var It=0,j=1,U=2,Be=3,ht=4,mt=5,Ur=6,zr=7,Ce=8,Ut=9,Tt=10,xe=11,Gr=12,sl=13,Rn=14,at=15,sr=16,ar=17,cr=18,zt=19,al=20,pn=21,Es=22,hn=23,ct=24,lr=25,St=26,cl=27,Me=28,Vf=1,ll=6,Mo=7,Hf=8,No=9,_e=10;function On(e){return Array.isArray(e)&&typeof e[Vf]=="object"}function rt(e){return Array.isArray(e)&&e[Vf]===!0}function ul(e){return(e.flags&4)!==0}function Pn(e){return e.componentOffset>-1}function Ds(e){return(e.flags&1)===1}function ur(e){return!!e.template}function Wr(e){return(e[U]&512)!==0}function dr(e){return(e[U]&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 dl="svg",$f="math";function ze(e){for(;Array.isArray(e);)e=e[It];return e}function fl(e,t){return ze(t[e])}function Gt(e,t){return ze(t[e.index])}function ws(e,t){return e.data[t]}function bs(e,t){return e[t]}function pl(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function Wt(e,t){let n=t[e];return On(n)?n:n[It]}function Cs(e){return(e[U]&128)===128}function qt(e,t){return t==null?null:e[t]}function hl(e){e[ar]=0}function ml(e){e[U]&1024||(e[U]|=1024,Cs(e)&&fr(e))}function Uf(e,t){for(;e>0;)t=t[Rn],e--;return t}function Ao(e){return!!(e[U]&9216||e[ct]?.dirty)}function xs(e){e[Tt].changeDetectionScheduler?.notify(8),e[U]&64&&(e[U]|=1024),Ao(e)&&fr(e)}function fr(e){e[Tt].changeDetectionScheduler?.notify(0);let t=mn(e);for(;t!==null&&!(t[U]&8192||(t[U]|=8192,!Cs(t)));)t=mn(t)}function Is(e,t){if(dr(e))throw new O(911,!1);e[pn]===null&&(e[pn]=[]),e[pn].push(t)}function zf(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 rt(t)?t[Be]:t}function Gf(e){return e[zr]??=[]}function Wf(e){return e.cleanup??=[]}var Y={lFrame:ap(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var Uc=!1;function qf(){return Y.lFrame.elementDepthCount}function Yf(){Y.lFrame.elementDepthCount++}function gl(){Y.lFrame.elementDepthCount--}function Zf(){return Y.bindingsEnabled}function Xf(){return Y.skipHydrationRootTNode!==null}function yl(e){return Y.skipHydrationRootTNode===e}function vl(){Y.skipHydrationRootTNode=null}function ne(){return Y.lFrame.lView}function Ye(){return Y.lFrame.tView}function V(e){return Y.lFrame.contextLView=e,e[Ce]}function H(e){return Y.lFrame.contextLView=null,e}function Yt(){let e=El();for(;e!==null&&e.type===64;)e=e.parent;return e}function El(){return Y.lFrame.currentTNode}function Kf(){let e=Y.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function qr(e,t){let n=Y.lFrame;n.currentTNode=e,n.isParent=t}function Dl(){return Y.lFrame.isParent}function Qf(){Y.lFrame.isParent=!1}function Jf(){return Y.lFrame.contextLView}function _l(){return Uc}function wo(e){let t=Uc;return Uc=e,t}function Ts(){let e=Y.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function ep(){return Y.lFrame.bindingIndex}function tp(e){return Y.lFrame.bindingIndex=e}function pr(){return Y.lFrame.bindingIndex++}function Ss(e){let t=Y.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function np(){return Y.lFrame.inI18n}function rp(e,t){let n=Y.lFrame;n.bindingIndex=n.bindingRootIndex=e,Ms(t)}function op(){return Y.lFrame.currentDirectiveIndex}function Ms(e){Y.lFrame.currentDirectiveIndex=e}function ip(e){let t=Y.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function wl(e){Y.lFrame.currentQueryIndex=e}function M0(e){let t=e[j];return t.type===2?t.declTNode:t.type===1?e[mt]:null}function bl(e,t,n){if(n&4){let o=t,i=e;for(;o=o.parent,o===null&&!(n&1);)if(o=M0(i),o===null||(i=i[Rn],o.type&10))break;if(o===null)return!1;t=o,e=i}let r=Y.lFrame=sp();return r.currentTNode=t,r.lView=e,!0}function Ns(e){let t=sp(),n=e[j];Y.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function sp(){let e=Y.lFrame,t=e===null?null:e.child;return t===null?ap(e):t}function ap(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 cp(){let e=Y.lFrame;return Y.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var Cl=cp;function As(){let e=cp();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 lp(e){return(Y.lFrame.contextLView=Uf(e,Y.lFrame.contextLView))[Ce]}function Zt(){return Y.lFrame.selectedIndex}function Fn(e){Y.lFrame.selectedIndex=e}function ks(){let e=Y.lFrame;return ws(e.tView,e.selectedIndex)}function gt(){Y.lFrame.currentNamespace=dl}function hr(){N0()}function N0(){Y.lFrame.currentNamespace=null}function xl(){return Y.lFrame.currentNamespace}var up=!0;function Rs(){return up}function Os(e){up=e}function zc(e,t=null,n=null,r){let o=dp(e,t,n,r);return o.resolveInjectorInitializers(),o}function dp(e,t=null,n=null,r,o=new Set){let i=[n||Ht,Pf(e)],s;return new tr(i,t||So(),s||null,o)}var xt=class e{static THROW_IF_NOT_FOUND=Qn;static NULL=new jr;static create(t,n){if(Array.isArray(t))return zc({name:""},n,t,"");{let r=t.name??"";return zc({name:r},t.parent,t.providers,r)}}static \u0275prov=se({token:e,providedIn:"any",factory:()=>J(Io)});static __NG_ELEMENT_ID__=-1},Ve=new G(""),ke=class{static __NG_ELEMENT_ID__=A0;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),()=>zf(n,t)}};function A0(){return new os(ne())}var fp=!1,pp=new G(""),mr=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Do(!1);debugTaskTracker=T(pp,{optional:!0});get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new De(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=se({token:e,providedIn:"root",factory:()=>new e})}return e})(),Gc=class extends Ct{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(t=!1){super(),this.__isAsync=t,Bf()&&(this.destroyRef=T(ke,{optional:!0})??void 0,this.pendingTasks=T(mr,{optional:!0})??void 0)}emit(t){let n=L(null);try{super.next(t)}finally{L(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 We&&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=Gc;function is(...e){}function Il(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 hp(e){return queueMicrotask(()=>e()),()=>{e=is}}var Tl="isAngularZone",bo=Tl+"_ID",k0=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=fp}=t;if(typeof Zone>"u")throw new O(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,P0(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Tl)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new O(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new O(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 Sl(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 O0(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Il(()=>{e.callbackScheduled=!1,Wc(e),e.isCheckStableRunning=!0,Sl(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Wc(e)}function P0(e){let t=()=>{O0(e)},n=k0++;e._inner=e._inner.fork({name:"angular",properties:{[Tl]:!0,[bo]:n,[bo+n]:!0},onInvokeTask:(r,o,i,s,a,c)=>{if(F0(c))return r.invokeTask(i,s,a,c);try{return xf(e),r.invokeTask(i,s,a,c)}finally{(e.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),If(e)}},onInvoke:(r,o,i,s,a,c,l)=>{try{return xf(e),r.invoke(i,s,a,c,l)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!L0(c)&&t(),If(e)}},onHasTask:(r,o,i,s)=>{r.hasTask(i,s),o===i&&(s.change=="microTask"?(e._hasPendingMicrotasks=s.microTask,Wc(e),Sl(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 Wc(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function xf(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function If(e){e._nesting--,Sl(e)}var Co=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 F0(e){return mp(e,"__ignore_ng_zone__")}function L0(e){return mp(e,"__scheduler_tick__")}function mp(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var pt=class{_console=console;handleError(t){this._console.error("ERROR",t)}};function gp(e){return yp(e)?e:new qc(e)}function yp(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.name=="string"&&typeof e.message=="string"}var qc=class extends Error{constructor(t){super(String(t),{cause:t}),this.name="ErrorBoundaryWrappedError"}},gn=new G("",{factory:()=>{let e=T(Ue),t=T(nt),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(pt),n.handleError(r))})}}}),vp={provide:Hr,useValue:()=>{let e=T(pt,{optional:!0})},multi:!0},j0=new G("",{factory:()=>{let e=T(Ve).defaultView;if(!e)return;let t=T(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(),T(ke).onDestroy(()=>{e.removeEventListener("error",r),e.removeEventListener("unhandledrejection",n)})}});function Ml(){return ir([Of(()=>{T(j0)})])}function $(e,t){let[n,r,o]=yc(e,t?.equal),i=n,s=i[Oe];return i.set=r,i.update=o,i.asReadonly=Ps.bind(i),i}function Ps(){let e=this[Oe];if(e.readonlyFn===void 0){let t=()=>this();t[Oe]=e,e.readonlyFn=t}return e.readonlyFn}var ko=new G("",{factory:()=>B0}),B0="ng";var Fs=new G(""),Ro=new G("",{providedIn:"platform",factory:()=>"unknown"});var Oo=new G("",{factory:()=>T(Ve).body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var Po=(()=>{class e{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=V0}return e})();function V0(){return new Po(ne(),Yt())}var $t=class{},Fo=new G("",{factory:()=>!0});var Nl=new G(""),Ls=(()=>{class e{static \u0275prov=se({token:e,providedIn:"root",factory:()=>new Yc})}return e})(),Yc=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{[Oe];constructor(t){this[Oe]=t}destroy(){this[Oe].destroy()}};function Xt(e,t){let n=t?.injector??T(xt),r=t?.manualCleanup!==!0?n.get(ke):null,o,i=n.get(Po,null,{optional:!0}),s=n.get($t);return i!==null?(o=Dp(i.view,s,e),r instanceof os&&r._lView===i.view&&(r=null)):o=U0(e,n.get(Ls),s),o.injector=n,r!==null&&(o.onDestroyFns=[r.onDestroy(()=>o.destroy())]),new ss(o)}var Ep=Q(B({},vc),{cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=wo(!1);try{Ec(this)}finally{wo(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=L(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],L(e)}}}),H0=Q(B({},Ep),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(Nn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}}),$0=Q(B({},Ep),{consumerMarkedDirty(){this.view[U]|=8192,fr(this.view),this.notifier.notify(13)},destroy(){if(Nn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[hn]?.delete(this)}});function Dp(e,t,n){let r=Object.create($0);return r.view=e,r.zone=typeof Zone<"u"?Zone.current:null,r.notifier=t,r.userFn=n,r.fn=_p(r,n),e[hn]??=new Set,e[hn].add(r),r.consumerMarkedDirty(r),r}function U0(e,t,n){let r=Object.create(H0);return r.userFn=e,r.fn=_p(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 _p(e,t){return()=>{t(n=>(e.cleanupFns??=[]).push(n))}}var Lo=(()=>{class e{internalPendingTasks=T(mr);scheduler=T($t);errorHandler=T(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=se({token:e,providedIn:"root",factory:()=>new e})}return e})();var su=Symbol("InputSignalNode#UNSET"),Zp=Q(B({},Ar),{transformFn:void 0,applyValueToInputSignal(e,t){An(e,t)}});function Xp(e){return{toString:e}.toString()}var oe=(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})(oe||{});function nE(e,t,n,r){t!==null?t.applyValueToInputSignal(t,r):e[n]=r}var rE=null;function oE(){return rE}var wp=[];var le=function(e,t=null,n){for(let r=0;r<wp.length;r++){let o=wp[r];o(e,t,n)}};function iE(e,t,n){let{ngOnChanges:r,ngOnInit:o,ngDoCheck:i}=t.type.prototype;if(r){let s=oE()(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 sE(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){Kp(e,t,3,n)}function Vs(e,t,n,r){(e[U]&3)===n&&Kp(e,t,n,r)}function Al(e,t){let n=e[U];(n&3)===t&&(n&=16383,n+=1,e[U]=n)}function Kp(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)&&(aE(e,n,t,c),e[ar]=(e[ar]&4294901760)+c+2),c++}function bp(e,t){le(oe.LifecycleHookStart,e,t);let n=L(null);try{t.call(e)}finally{L(n),le(oe.LifecycleHookEnd,e,t)}}function aE(e,t,n,r){let o=n[r]<0,i=n[r+1],s=o?-n[r]:n[r],a=e[s];o?e[U]>>14<e[ar]>>16&&(e[U]&3)===t&&(e[U]+=16384,bp(a,i)):bp(a,i)}var Xr=-1,Ho=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 cE(e){return(e.flags&8)!==0}function lE(e){return(e.flags&16)!==0}function uE(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];fE(i)?e.setProperty(t,i,s):e.setAttribute(t,i,s),r++}}return r}function dE(e){return e===3||e===4||e===6}function fE(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?Cp(e,n,o,null,t[++r]):Cp(e,n,o,null,null))}}return e}function Cp(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 pE(e){return e!==Xr}function jl(e){return e&32767}function hE(e){return e>>16}function Bl(e,t){let n=hE(e),r=t;for(;n>0;)r=r[Rn],n--;return r}var Vl=!0;function Us(e){let t=Vl;return Vl=e,t}var mE=256,Qp=mE-1,Jp=5,gE=0,Kt={};function yE(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]=gE++);let o=r&Qp,i=1<<o;t.data[e+(o>>Jp)]|=i}function eh(e,t){let n=th(e,t);if(n!==-1)return n;let r=t[j];r.firstCreatePass&&(e.injectorIndex=t.length,kl(r.data,e),kl(t,null),kl(r.blueprint,null));let o=nh(e,t),i=e.injectorIndex;if(pE(o)){let s=jl(o),a=Bl(o,t),c=a[j].data;for(let l=0;l<8;l++)t[i+l]=a[s+l]|c[s+l]}return t[i+8]=o,i}function kl(e,t){e.push(0,0,0,0,0,0,0,0,t)}function th(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function nh(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=ah(o),r===null)return Xr;if(n++,o=o[Rn],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return Xr}function vE(e,t,n){yE(e,t,n)}function rh(e,t,n){if(n&8||e!==void 0)return e;hs(t,"NodeInjector")}function oh(e,t,n,r){if(n&8&&r===void 0&&(r=null),(n&3)===0){let o=e[Ut],i=qe(void 0);try{return o?o.get(t,r,n&8):tl(t,r,n&8)}finally{qe(i)}}return rh(r,t,n)}function ih(e,t,n,r=0,o){if(e!==null){if(t[U]&2048&&!(r&2)){let s=bE(e,t,n,r,Kt);if(s!==Kt)return s}let i=sh(e,t,n,r,Kt);if(i!==Kt)return i}return oh(t,n,r,o)}function sh(e,t,n,r,o){let i=_E(n);if(typeof i=="function"){if(!bl(t,e,r))return r&1?rh(o,n,r):oh(t,n,r,o);try{let s;if(s=i(r),s==null&&!(r&8))hs(n);else return s}finally{Cl()}}else if(typeof i=="number"){let s=null,a=th(e,t),c=Xr,l=r&1?t[at][mt]:null;for((a===-1||r&4)&&(c=a===-1?nh(e,t):t[a+8],c===Xr||!Ip(r,!1)?a=-1:(s=t[j],a=jl(c),t=Bl(c,t)));a!==-1;){let u=t[j];if(xp(i,a,u.data)){let d=EE(a,t,n,s,r,l);if(d!==Kt)return d}c=t[a+8],c!==Xr&&Ip(r,t[j].data[a+8]===l)&&xp(i,a,t)?(s=u,a=jl(c),t=Bl(c,t)):a=-1}}return o}function EE(e,t,n,r,o,i){let s=t[j],a=s.data[e+8],c=r==null?Pn(a)&&Vl:r!=s&&(a.type&3)!==0,l=o&1&&i===a,u=DE(a,s,n,c,l);return u!==null?Hl(t,s,u,a,o):Kt}function DE(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 y=s[f];if(f<c&&n===y||f>=c&&y.type===n)return f}if(o){let f=s[c];if(f&&ur(f)&&f.type===n)return c}return null}function Hl(e,t,n,r,o){let i=e[n],s=t.data;if(i instanceof Ho){let a=i;if(a.resolving)throw el("");let c=Us(a.canSeeViewProviders);a.resolving=!0;let l=s[n].type||s[n],u,d=a.injectImpl?qe(a.injectImpl):null,p=bl(e,r,0);try{i=e[n]=a.factory(void 0,o,s,e,r),t.firstCreatePass&&n>=r.directiveStart&&iE(n,s[n],t)}finally{d!==null&&qe(d),Us(c),a.resolving=!1,Cl()}}return i}function _E(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&Qp:wE:t}function xp(e,t,n){let r=1<<e;return!!(n[t+(e>>Jp)]&r)}function Ip(e,t){return!(e&2)&&!(e&1&&t)}var $o=class{_tNode;_lView;constructor(t,n){this._tNode=t,this._lView=n}get(t,n,r){return ih(this._tNode,this._lView,t,Jn(r),n)}};function wE(){return new $o(Yt(),ne())}function bE(e,t,n,r,o){let i=e,s=t;for(;i!==null&&s!==null&&s[U]&2048&&!Wr(s);){let a=sh(i,s,n,r|2,Kt);if(a!==Kt)return a;r&=-5;let c=i.parent;if(!c){let l=s[al];if(l){let u=l.get(n,Kt,r);if(u!==Kt)return u}c=ah(s),s=s[Rn]}i=c}return o}function ah(e){let t=e[j],n=t.type;return n===2?t.declTNode:n===1?e[mt]:null}function jn(e){return{token:e.token,providedIn:e.autoProvided===!1?null:"root",factory:e.factory,value:void 0}}function CE(){return ch(Yt(),ne())}function ch(e,t){return new yn(Gt(e,t))}var yn=(()=>{class e{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=CE}return e})();function lh(e){return(e.flags&128)===128}var au=(function(e){return e[e.OnPush=0]="OnPush",e[e.Eager=1]="Eager",e[e.Default=1]="Default",e})(au||{}),uh=new Map,xE=0;function IE(){return xE++}function TE(e){uh.set(e[zt],e)}function $l(e){uh.delete(e[zt])}var Tp="__ngContext__";function Qr(e,t){On(t)?(e[Tp]=t[zt],TE(t)):e[Tp]=t}function dh(e){return ph(e[Gr])}function fh(e){return ph(e[ht])}function ph(e){for(;e!==null&&!rt(e);)e=e[ht];return e}var Ul;function cu(e){Ul=e}function hh(){if(Ul!==void 0)return Ul;if(typeof document<"u")return document;throw new O(210,!1)}var mh="r";var gh="di";var yh=!1,vh=new G("",{factory:()=>yh});var Sp=new WeakMap;function SE(e,t){if(e==null||typeof e!="object")return;let n=Sp.get(e);n||(n=new WeakSet,Sp.set(e,n)),n.add(t)}var ME=(e,t,n,r)=>{};function NE(e,t,n,r){ME(e,t,n,r)}function lu(e){return(e.flags&32)===32}var AE=()=>null;function Eh(e,t,n=!1){return AE(e,t,n)}function Dh(e,t){let n=e.contentQueries;if(n!==null){let r=L(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];wl(i),a.contentQueries(2,t[s],s)}}}finally{L(r)}}}function zl(e,t,n){wl(0);let r=L(null);try{t(e,n)}finally{L(r)}}function _h(e,t,n){if(ul(t)){let r=L(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{L(r)}}}var At=(function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e[e.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom",e})(At||{});var zs=class{changingThisBreaksApplicationSecurity;constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${as})`}};function Uo(e){return e instanceof zs?e.changingThisBreaksApplicationSecurity:e}function wh(e,t){let n=bh(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 bh(e){return e instanceof zs&&e.getTypeName()||null}var kE=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Ch(e){return e=String(e),e.match(kE)?e:"unsafe:"+e}function RE(e,t){return e.createText(t)}function OE(e,t,n){e.setValue(t,n)}function xh(e,t,n){return e.createElement(t,n)}function Kr(e,t,n,r,o){e.insertBefore(t,n,r,o)}function Ih(e,t,n){e.appendChild(t,n)}function Mp(e,t,n,r,o){r!==null?Kr(e,t,n,r,o):Ih(e,t,n)}function Th(e,t,n,r){e.removeChild(null,t,n,r)}function PE(e,t,n){e.setAttribute(t,"style",n)}function FE(e,t,n){n===""?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n)}function Sh(e,t,n){let{mergedAttrs:r,classes:o,styles:i}=n;r!==null&&uE(e,t,r),o!==null&&FE(e,t,o),i!==null&&PE(e,t,i)}function vn(e){let t=LE();return t?t.sanitize(_s.URL,e)||"":wh(e,"URL")?Uo(e):Ch(Br(e))}function LE(){let e=ne();return e&&e[Tt].sanitizer}function uu(e){return e.ownerDocument}function jE(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 Mh="ng-template";function BE(e,t,n,r){let o=0;if(r){for(;o<t.length&&typeof t[o]=="string";o+=2)if(t[o]==="class"&&jE(t[o+1].toLowerCase(),n,0)!==-1)return!0}else if(du(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 du(e){return e.type===4&&e.value!==Mh}function VE(e,t,n){let r=e.type===4&&!n?Mh:e.value;return t===r}function HE(e,t,n){let r=4,o=e.attrs,i=o!==null?zE(o):0,s=!1;for(let a=0;a<t.length;a++){let c=t[a];if(typeof c=="number"){if(!s&&!Mt(r)&&!Mt(c))return!1;if(s&&Mt(c))continue;s=!1,r=c|r&1;continue}if(!s)if(r&4){if(r=2|r&1,c!==""&&!VE(e,c,n)||c===""&&t.length===1){if(Mt(r))return!1;s=!0}}else if(r&8){if(o===null||!BE(e,o,c,n)){if(Mt(r))return!1;s=!0}}else{let l=t[++a],u=$E(c,o,du(e),n);if(u===-1){if(Mt(r))return!1;s=!0;continue}if(l!==""){let d;if(u>i?d="":d=o[u+1].toLowerCase(),r&2&&l!==d){if(Mt(r))return!1;s=!0}}}}return Mt(r)||s}function Mt(e){return(e&1)===0}function $E(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 GE(t,e)}function UE(e,t,n=!1){for(let r=0;r<t.length;r++)if(HE(e,t[r],n))return!0;return!1}function zE(e){for(let t=0;t<e.length;t++){let n=e[t];if(dE(n))return t}return e.length}function GE(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 Np(e,t){return e?":not("+t.trim()+")":t}function WE(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!==""&&!Mt(s)&&(t+=Np(i,o),o=""),r=s,i=i||!Mt(r);n++}return o!==""&&(t+=Np(i,o)),t}function qE(e){return e.map(WE).join(",")}function YE(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(!Mt(o))break;o=i}r++}return n.length&&t.push(1,...n),t}var Ze={},Qt=(function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e})(Qt||{}),ZE;function fu(e,t){return ZE(e,t)}var Ln=new Set;var YA=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";var Gl=new WeakMap;function Nh(e){return e?e[Rn]??e:null}var Yr=new WeakSet;function XE(e,t,n){let r=Gl.get(e);if(!r||r.length===0)return;let o=t.parentNode,i=t.previousSibling,s=Nh(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),Yr.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 KE(e,t,n){let r=Nh(n),o=Gl.get(e);o?o.some(i=>i.el===t)||o.push({el:t,declarationView:r}):Gl.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(""),Ap=new Set;function eo(e){Ap.has(e)||(Ap.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}var pu=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=se({token:e,providedIn:"root",factory:()=>new e})}return e})(),hu=[0,1,2,3],Ah=(()=>{class e{ngZone=T(Ue);scheduler=T($t);errorHandler=T(pt,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){T(Jt,{optional:!0})}execute(){let n=this.sequences.size>0;n&&le(oe.AfterRenderHooksStart),this.executing=!0;for(let r of hu)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&&le(oe.AfterRenderHooksEnd)}register(n){let{view:r}=n;r!==void 0?((r[lr]??=[]).push(n),fr(r),r[U]|=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=se({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 mu=new G("",{factory:()=>{let e=T(nt),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function kh(e,t,n){let r=e.get(mu);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 QE(e,t){let n=e.get(mu);if(Array.isArray(t))for(let r of t)n.queue.delete(r);else n.queue.delete(t)}function JE(e,t){let n=e.get(mu);if(t.detachedLeaveAnimationFns){for(let r of t.detachedLeaveAnimationFns)n.queue.delete(r);t.detachedLeaveAnimationFns=void 0}}function eD(e,t){for(let[n,r]of t)kh(e,r.animateFns)}function kp(e,t,n,r){let o=e?.[St]?.enter;t!==null&&o&&o.has(n.index)&&eD(r,o)}function Rp(e,t,n,r){try{n.get(Io)}catch{return r(!1)}let o=e?e[St]??={}:void 0;o?.enter?.has(t.index)&&QE(n,o.enter.get(t.index).animateFns);let i=tD(e,t,o);if(i.size===0&&!(e?gu(e,t):!1))return r(!1);e&&Ln.add(e[zt]),kh(n,()=>nD(e,t,o,i,r),o)}function tD(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[j].data[i].parent;for(;c;){if(c===t){r.set(i,s);break}c=c.parent}}return r}function nD(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&&yu(e,t,i),i.length>0){let s=n||e?.[St];if(s){let a=s.running;a&&i.push(a),s.running=Promise.allSettled(i),iD(e,s.running,o)}else Promise.allSettled(i).then(()=>{e&&Ln.delete(e[zt]),o(!0)})}else e&&Ln.delete(e[zt]),o(!1)}function gu(e,t){if(t.type&12){let r=e[t.index];if(rt(r))for(let o=_e;o<r.length;o++){let i=r[o];if(i[j].type===2&&rD(i))return!0}}let n=t.child;for(;n;){if(gu(e,n))return!0;n=n.next}return!1}function rD(e){let t=e[St];if(t?.leave&&t.leave.size>0)return!0;let n=e[j].firstChild;for(;n;){if(gu(e,n))return!0;n=n.next}return!1}function yu(e,t,n){if(t.type&12){let o=e[t.index];if(rt(o))for(let i=_e;i<o.length;i++){let s=o[i];s[j].type===2&&oD(s,n)}}let r=t.child;for(;r;)yu(e,r,n),r=r.next}function oD(e,t){let n=e[St];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[j].firstChild;for(;r;)yu(e,r,t),r=r.next}function iD(e,t,n){t.then(()=>{e[St]?.running===t&&(e[St].running=void 0,Ln.delete(e[zt])),n(!0)})}function Rh(e){let t=e[St]??={};t.detachedLeaveAnimationFns=[];let n=e[j].firstChild;for(;n;)Oh(e,n),n=n.next}function Oh(e,t){if(t.type&12){let r=e[t.index];if(rt(r))for(let o=_e;o<r.length;o++){let i=r[o];i[j].type===2&&Rh(i)}}let n=t.child;for(;n;)Oh(e,n),n=n.next}function Ph(e){let t=e[St];if(t&&t.detachedLeaveAnimationFns&&t.detachedLeaveAnimationFns.length>0){let r=e[Ut];JE(r,t),Ln.delete(e[zt]),t.detachedLeaveAnimationFns=void 0}else t&&(t.detachedLeaveAnimationFns=void 0);let n=e[j].firstChild;for(;n;)Fh(e,n),n=n.next}function Fh(e,t){if(t.type&12){let r=e[t.index];if(rt(r))for(let o=_e;o<r.length;o++){let i=r[o];i[j].type===2&&Ph(i)}}let n=t.child;for(;n;)Fh(e,n),n=n.next}function Zr(e,t,n,r,o,i,s,a){if(o!=null){let c,l=!1;rt(o)?c=o:On(o)&&(l=!0,o=o[It]);let u=ze(o);e===0&&r!==null?(kp(a,r,i,n),s==null?Ih(t,r,u):Kr(t,r,u,s||null,!0)):e===1&&r!==null?(Kr(t,r,u,s||null,!0),XE(i,u,a),Yr.has(u)||kp(a,r,i,n)):e===2?(a?.[St]?.leave?.has(i.index)&&KE(i,u,a),Yr.delete(u),Rp(a,i,n,d=>{if(Yr.has(u)){Yr.delete(u);return}Th(t,u,l,d)})):e===3&&(Yr.delete(u),Rp(a,i,n,()=>{t.destroyNode(u)})),c!=null&&vD(t,e,n,c,i,r,s)}}function sD(e,t){Lh(e,t),t[It]=null,t[mt]=null}function aD(e,t,n,r,o,i){r[It]=o,r[mt]=t,oa(e,r,n,1,o,i)}function Lh(e,t){t[Tt].changeDetectionScheduler?.notify(9),oa(e,t,t[xe],2,null,null)}function cD(e){let t=e[Gr];if(!t)return Rl(e[j],e);for(;t;){let n=null;if(On(t))n=t[Gr];else{let r=t[_e];r&&(n=r)}if(!n){for(;t&&!t[ht]&&t!==e;)On(t)&&Rl(t[j],t),t=t[Be];t===null&&(t=e),On(t)&&Rl(t[j],t),n=t&&t[ht]}t=n}}function vu(e,t){let n=e[No],r=n.indexOf(t);n.splice(r,1)}function Eu(e,t){if(dr(t))return;let n=t[xe];n.destroyNode&&oa(e,t,n,3,null,null),cD(t)}function Rl(e,t){if(dr(t))return;let n=L(null);try{t[U]&=-129,t[U]|=256,t[ct]&&Nn(t[ct]),uD(e,t),lD(e,t),t[j].type===1&&t[xe].destroy();let r=t[sr];if(r!==null&&rt(t[Be])){r!==t[Be]&&vu(r,t);let o=t[cr];o!==null&&o.detachView(e)}$l(t)}finally{L(n)}}function lD(e,t){let n=e.cleanup,r=t[zr];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[zr]=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 uD(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 Ho)){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];le(oe.LifecycleHookStart,a,c);try{c.call(a)}finally{le(oe.LifecycleHookEnd,a,c)}}else{le(oe.LifecycleHookStart,o,i);try{i.call(o)}finally{le(oe.LifecycleHookEnd,o,i)}}}}}function dD(e,t,n){if(t===null)throw new O(510,!1);return fD(e,t.parent,n)}function fD(e,t,n){let r=t;for(;r!==null&&r.type&168;)t=r,r=t.parent;if(r===null)return n[It];if(Pn(r)){let{encapsulation:o}=e.data[r.directiveStart+r.componentOffset];if(o===At.None||o===At.Emulated)return null}return Gt(r,n)}function pD(e,t,n){return mD(e,t,n)}function hD(e,t,n){return e.type&40?Gt(e,n):null}var mD=hD,Op;function Du(e,t,n,r){let o=dD(e,r,t),i=t[xe],s=r.parent||t[mt],a=pD(s,r,t);if(o!=null)if(Array.isArray(n))for(let c=0;c<n.length;c++)Mp(i,o,n[c],a,!1);else Mp(i,o,n,a,!1);Op!==void 0&&Op(i,r,t,n,o)}function Bo(e,t){if(t!==null){let n=t.type;if(n&3)return Gt(t,e);if(n&4)return Wl(-1,e[t.index]);if(n&8){let r=t.child;if(r!==null)return Bo(e,r);{let o=e[t.index];return rt(o)?Wl(-1,o):ze(o)}}else{if(n&128)return Bo(e,t.next);if(n&32)return fu(t,e)()||ze(e[t.index]);{let r=jh(e,t);if(r!==null){if(Array.isArray(r))return r[0];let o=mn(e[at]);return Bo(o,r)}else return Bo(e,t.next)}}}return null}function jh(e,t){if(t!==null){let r=e[at][mt],o=t.projection;return r.projection[o]}return null}function Wl(e,t){let n=_e+e+1;if(n<t.length){let r=t[n],o=r[j].firstChild;if(o!==null)return Bo(r,o)}return t[Mo]}function _u(e,t,n,r,o,i,s){for(;n!=null;){let a=r[Ut];if(n.type===128){n=n.next;continue}let c=r[n.index],l=n.type;if(s&&t===0&&(c&&Qr(ze(c),r),n.flags|=2),!lu(n))if(l&8)_u(e,t,n.child,r,o,i,!1),Zr(t,e,a,o,c,n,i,r);else if(l&32){let u=fu(n,r),d;for(;d=u();)Zr(t,e,a,o,d,n,i,r);Zr(t,e,a,o,c,n,i,r)}else l&16?yD(e,t,r,n,o,i):Zr(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?gD(n,r,t,o,i):_u(n,r,e.firstChild,t,o,i,!1)}function gD(e,t,n,r,o){let s=n[j].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()?Kr(e,r,d,o,!0):(Kr(e,r,c,o,!0),Kr(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 yD(e,t,n,r,o,i){let s=n[at],c=s[mt].projection[r.projection];if(Array.isArray(c))for(let l=0;l<c.length;l++){let u=c[l];Zr(t,e,n[Ut],o,u,r,i,n)}else{let l=c,u=s[Be];lh(r)&&(l.flags|=128),_u(e,t,l,u,o,i,!0)}}function vD(e,t,n,r,o,i,s){let a=r[Mo],c=ze(r);if(a!==c&&Zr(t,e,n,i,a,o,s),(r[U]&4)===0)for(let l=_e;l<r.length;l++){let u=r[l];oa(u[j],u,e,t,i,a)}}function ED(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 wu(e,t,n,r,o,i,s,a,c,l,u){let d=Me+r,p=d+o,f=DD(d,p),y=typeof l=="function"?l():l;return f[j]={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:y,incompleteFirstPass:!1,ssrId:u}}function DD(e,t){let n=[];for(let r=0;r<t;r++)n.push(r<e?null:Ze);return n}function _D(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=wu(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function bu(e,t,n,r,o,i,s,a,c,l,u){let d=t.blueprint.slice();return d[It]=o,d[U]=r|4|128|8|64|1024,(l!==null||e&&e[U]&2048)&&(d[U]|=2048),hl(d),d[Be]=d[Rn]=e,d[Ce]=n,d[Tt]=s||e&&e[Tt],d[xe]=a||e&&e[xe],d[Ut]=c||e&&e[Ut]||null,d[mt]=i,d[zt]=IE(),d[Ur]=u,d[al]=l,d[at]=t.type==2?e[at]:d,d}function wD(e,t,n){let r=Gt(t,e),o=_D(n),i=e[Tt].rendererFactory,s=Hh(e,bu(e,o,null,Bh(n),r,t,null,i.createRenderer(r,n),null,null,null));return e[t.index]=s}function Bh(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function Vh(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 Hh(e,t){return e[Gr]?e[sl][ht]=t:e[Gr]=t,e[sl]=t,t}function g(e=1){$h(Ye(),ne(),Zt()+e,!1)}function $h(e,t,n,r){if(!r)if((t[U]&3)===3){let i=e.preOrderCheckHooks;i!==null&&Bs(t,i,n)}else{let i=e.preOrderHooks;i!==null&&Vs(t,i,0,n)}Fn(n)}var ia=(function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e})(ia||{});function ql(e,t,n,r){let o=L(null);try{let[i,s,a]=e.inputs[n],c=null;(s&ia.SignalBased)!==0&&(c=t[i][Oe]),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):nE(t,c,i,r)}finally{L(o)}}function Uh(e,t,n,r,o){let i=Zt(),s=r&2;try{Fn(-1),s&&t.length>Me&&$h(e,t,Me,!1);let a=s?oe.TemplateUpdateStart:oe.TemplateCreateStart;le(a,o,n),n(r,o)}finally{Fn(i);let a=s?oe.TemplateUpdateEnd:oe.TemplateCreateEnd;le(a,o,n)}}function zh(e,t,n){MD(e,t,n),(n.flags&64)===64&&ND(e,t,n)}function Cu(e,t,n=Gt){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 bD(e,t,n,r){let i=r.get(vh,yh)||n===At.ShadowDom||n===At.ExperimentalIsolatedShadowDom,s=e.selectRootElement(t,i);return CD(s),s}function CD(e){xD(e)}var xD=()=>null;function ID(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function TD(e,t,n,r,o,i){let s=t[j];if(xu(e,s,t,n,r)){Pn(e)&&SD(t,e.index);return}e.type&3&&(n=ID(n)),Gh(e,t,n,r,o,i)}function Gh(e,t,n,r,o,i){if(e.type&3){let s=Gt(e,t);r=i!=null?i(r,e.value||"",n):r,o.setProperty(s,n,r)}else e.type&12}function SD(e,t){let n=Wt(t,e);n[U]&16||(n[U]|=64)}function MD(e,t,n){let r=n.directiveStart,o=n.directiveEnd;Pn(n)&&wD(t,n,e.data[r+n.componentOffset]),e.firstCreatePass||eh(n,t);let i=n.initialInputs;for(let s=r;s<o;s++){let a=e.data[s],c=Hl(t,e,s,n);if(Qr(c,t),i!==null&&PD(t,s-r,c,a,n,i),ur(a)){let l=Wt(n.index,t);l[Ce]=Hl(t,e,s,n)}}}function ND(e,t,n){let r=n.directiveStart,o=n.directiveEnd,i=n.index,s=op();try{Fn(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)&&AD(c,l)}}finally{Fn(-1),Ms(s)}}function AD(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function kD(e,t){let n=e.directiveRegistry,r=null;if(n)for(let o=0;o<n.length;o++){let i=n[o];UE(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=Gt(e,t);OD(t[xe],s,i,e.value,n,r,o)}function OD(e,t,n,r,o,i,s){if(i==null)s?.(i,r||"",o),e.removeAttribute(t,o,n);else{let a=s==null?Br(i):s(i,r||"",o);e.setAttribute(t,o,a,n)}}function PD(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];ql(r,n,c,l)}}function Wh(e,t,n,r,o){let i=Me+n,s=t[j],a=o(s,t,e,r,n);t[i]=a,qr(e,!0);let c=e.type===2;return c?(Sh(t[xe],a,e),(qf()===0||Ds(e))&&Qr(a,t),Yf()):Qr(a,t),Rs()&&(!c||!lu(e))&&Du(s,t,a,e),e}function qh(e){let t=e;return Dl()?Qf():(t=t.parent,qr(t,!1)),t}function FD(e,t){let n=e[Ut];if(!n)return;let r;try{r=n.get(gn,null)}catch{r=null}r?.(t)}function xu(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];ql(d,n[l],u,o),a=!0}if(i)for(let c of i){let l=n[c],u=t.data[c];ql(u,l,r,o),a=!0}return a}function LD(e,t){let n=Wt(t,e),r=n[j];jD(r,n);let o=n[It];o!==null&&n[Ur]===null&&(n[Ur]=Eh(o,n[Ut])),le(oe.ComponentStart);try{Iu(r,n,n[Ce])}finally{le(oe.ComponentEnd,n[Ce])}}function jD(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}function Iu(e,t,n){Ns(t);try{let r=e.viewQuery;r!==null&&zl(1,r,n);let o=e.template;o!==null&&Uh(e,t,o,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),t[cr]?.finishViewCreation(e),e.staticContentQueries&&Dh(e,t),e.staticViewQueries&&zl(2,e.viewQuery,n);let i=e.components;i!==null&&BD(t,i)}catch(r){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),r}finally{t[U]&=-5,As()}}function BD(e,t){for(let n=0;n<t.length;n++)LD(e,t[n])}function Tu(e,t,n,r){let o=L(null);try{let i=t.tView,a=e[U]&4096?4096:16,c=bu(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)),Iu(i,c,n),c}finally{L(o)}}function Su(e,t){return!t||t.firstChild===null||lh(e)}function zo(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(rt(i)){let a=i[Mo];a!==i[It]&&r.push(ze(i)),i[U]&4||Yh(i,r),r.push(a)}else r.push(ze(i));let s=n.type;if(s&8)zo(e,t,n.child,r);else if(s&32){let a=fu(n,t),c;for(;c=a();)r.push(c)}else if(s&16){let a=jh(t,n);if(Array.isArray(a))r.push(...a);else{let c=mn(t[at]);zo(c[j],c,a,r,!0)}}n=o?n.projectionNext:n.next}return r}function Yh(e,t){for(let n=_e;n<e.length;n++){let r=e[n],o=r[j].firstChild;o!==null&&zo(r[j],r,o,t)}}function Zh(e){if(e[lr]!==null){for(let t of e[lr])t.impl.addSequence(t);e[lr].length=0}}var Xh=[];function VD(e){return e[ct]??HD(e)}function HD(e){let t=Xh.pop()??Object.create(UD);return t.lView=e,t}function $D(e){e.lView[ct]!==e&&(e.lView=null,Xh.push(e))}var UD=Q(B({},Tn),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{fr(e.lView)},consumerOnSignalRead(){this.lView[ct]=this}});function zD(e){let t=e[ct]??Object.create(GD);return t.lView=e,t}var GD=Q(B({},Tn),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let t=mn(e.lView);for(;t&&!Kh(t[j]);)t=mn(t);t&&ml(t)},consumerOnSignalRead(){this.lView[ct]=this}});function Kh(e){return e.type!==2}function Qh(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[U]&8192)}}var WD=100;function Jh(e,t=0){let r=e[Tt].rendererFactory,o=!1;o||r.begin?.();try{qD(e,t)}finally{o||r.end?.()}}function qD(e,t){let n=_l();try{wo(!0),Yl(e,t);let r=0;for(;Ao(e);){if(r===WD)throw new O(103,!1);r++,Yl(e,1)}}finally{wo(n)}}function YD(e,t,n,r){if(dr(t))return;let o=t[U],i=!1,s=!1;Ns(t);let a=!0,c=null,l=null;i||(Kh(e)?(l=VD(t),c=un(l)):ki()===null?(a=!1,l=zD(t),c=un(l)):t[ct]&&(Nn(t[ct]),t[ct]=null));try{hl(t),tp(e.bindingStartIndex),n!==null&&Uh(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),Al(t,0)}if(s||ZD(t),Qh(t),em(t,0),e.contentQueries!==null&&Dh(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),Al(t,1)}KD(e,t);let d=e.components;d!==null&&nm(t,d,0);let p=e.viewQuery;if(p!==null&&zl(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),Al(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[Es]){for(let f of t[Es])f();t[Es]=null}i||(Zh(t),t[U]&=-73)}catch(u){let d=!1,p=u,f=t;for(;f!==null;){if(rt(f)){f=f[Be];continue}let y=f[cl];if(y)try{let D=t[at][Ce],v=D?.constructor,E={declarationInstance:D,declarationType:v,caughtBy:y};y(gp(p),E),d=!0;break}catch(D){p=D}f=f[Be]}if(!d)throw i||fr(t),p}finally{l!==null&&(Mn(l,c),a&&$D(l)),As()}}function em(e,t){for(let n=dh(e);n!==null;n=fh(n))for(let r=_e;r<n.length;r++){let o=n[r];tm(o,t)}}function ZD(e){for(let t=dh(e);t!==null;t=fh(t)){if(!(t[U]&2))continue;let n=t[No];for(let r=0;r<n.length;r++){let o=n[r];ml(o)}}}function XD(e,t,n){le(oe.ComponentStart);let r=Wt(t,e);try{tm(r,n)}finally{le(oe.ComponentEnd,r[Ce])}}function tm(e,t){Cs(e)&&Yl(e,t)}function Yl(e,t){let r=e[j],o=e[U],i=e[ct],s=!!(t===0&&o&16);if(s||=!!(o&64&&t===0),s||=!!(o&1024),s||=!!(i?.dirty&&Mr(i)),s||=!1,i&&(i.dirty=!1),e[U]&=-9217,s)YD(r,e,r.template,e[Ce]);else if(o&8192){let a=L(null);try{Qh(e),em(e,1);let c=r.components;c!==null&&nm(e,c,1),Zh(e)}finally{L(a)}}}function nm(e,t,n){for(let r=0;r<t.length;r++)XD(e,t[r],n)}function KD(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)Fn(~o);else{let i=o,s=n[++r],a=n[++r];rp(s,i);let c=t[i];le(oe.HostBindingsUpdateStart,c);try{a(2,c)}finally{le(oe.HostBindingsUpdateEnd,c)}}}}finally{Fn(-1)}}function Mu(e,t){let n=_l()?64:1088;for(e[Tt].changeDetectionScheduler?.notify(t);e;){e[U]|=n;let r=mn(e);if(Wr(e)&&!r)return e;e=r}return null}function QD(e,t,n,r){return[e,!0,0,t,null,r,null,n,null,null]}function rm(e,t){let n=_e+t;if(n<e.length)return e[n]}function Nu(e,t,n,r=!0){let o=t[j];if(JD(o,t,e,n),r){let s=Wl(n,e),a=t[xe],c=a.parentNode(e[Mo]);c!==null&&aD(o,e[mt],a,t,c,s)}let i=t[Ur];i!==null&&i.firstChild!==null&&(i.firstChild=null)}function om(e,t){let n=Au(e,t);return n!==void 0&&Eu(n[j],n),n}function Au(e,t){if(e.length<=_e)return;let n=_e+t,r=e[n];if(r){let o=r[sr];o!==null&&o!==e&&vu(o,r),t>0&&(e[n-1][ht]=r[ht]);let i=nl(e,_e+t);sD(r[j],r);let s=i[cr];s!==null&&s.detachView(i[j]),r[Be]=null,r[ht]=null,r[U]&=-129}return r}function JD(e,t,n,r){let o=_e+r,i=n.length;r>0&&(n[o-1][ht]=t),r<i-_e?(t[ht]=n[o],kf(n,_e+r,t)):(n.push(t),t[ht]=null),t[Be]=n;let s=t[sr];s!==null&&n!==s&&im(s,t);let a=t[cr];a!==null&&a.insertView(e),xs(t),t[U]|=128}function im(e,t){let n=e[No],r=t[Be];if(On(r))e[U]|=2;else{let o=r[Be][at];t[at]!==o&&(e[U]|=2)}n===null?e[No]=[t]:n.push(t)}var Ws=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let t=this._lView,n=t[j];return zo(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(rt(t)){let n=t[Hf],r=n?n.indexOf(this):-1;r>-1&&(Au(t,r),nl(n,r))}this._attachedToViewContainer=!1}Eu(this._lView[j],this._lView)}onDestroy(t){Is(this._lView,t)}markForCheck(){Mu(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[U]&=-129}reattach(){xs(this._lView),this._lView[U]|=128}detectChanges(){this._lView[U]|=1024,Jh(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new O(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let t=Wr(this._lView),n=this._lView[sr];n!==null&&!t&&vu(n,this._lView),Lh(this._lView[j],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new O(902,!1);this._appRef=t;let n=Wr(this._lView),r=this._lView[sr];r!==null&&!n&&im(r,this._lView),xs(this._lView)}};function sa(e,t,n,r,o){let i=e.data[t];if(i===null)i=e_(e,t,n,r,o),np()&&(i.flags|=32);else if(i.type&64){i.type=n,i.value=r,i.attrs=o;let s=Kf();i.injectorIndex=s===null?-1:s.injectorIndex}return qr(i,!0),i}function e_(e,t,n,r,o){let i=El(),s=Dl(),a=s?i:i&&i.parent,c=e.data[t]=n_(e,a,n,t,r,o);return t_(e,c,i,s),c}function t_(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 n_(e,t,n,r,o,i){let s=t?t.injectorIndex:-1,a=0;return Xf()&&(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:xl(),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 r_(e){let t=e[ll]??[],r=e[Be][xe],o=[];for(let i of t)i.data[gh]!==void 0?o.push(i):o_(i,r);e[ll]=o}function o_(e,t){let n=0,r=e.firstChild;if(r){let o=e.data[mh];for(;n<o;){let i=r.nextSibling;Th(t,r,!1),r=i,n++}}}var i_=()=>null,s_=()=>null;function a_(e,t){return i_(e,t)}function sm(e,t,n){return s_(e,t,n)}var am=class{},gr=class{};var cm=(()=>{class e{static \u0275prov=se({token:e,providedIn:"root",factory:()=>null})}return e})();function lm(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 ku(e,t,n){return e[t]=n}function c_(e,t){return e[t]}function kt(e,t,n){if(n===Ze)return!1;let r=e[t];return Object.is(r,n)?!1:(e[t]=n,!0)}function um(e,t,n,r){let o=kt(e,t,n);return kt(e,t+1,r)||o}function $s(e,t,n){return function r(o){let i=r.__ngNativeEl__;i!==void 0&&SE(o,i);let s=Pn(e)?Wt(e.index,t):t;Mu(s,5);let a=t[Ce],c=Pp(t,a,n,o),l=r.__ngNextListenerFn__;for(;l;)c=Pp(t,a,l,o)&&c,l=l.__ngNextListenerFn__;return c}}function Pp(e,t,n,r){let o=L(null);try{return le(oe.OutputStart,t,n),n(r)!==!1}catch(i){return FD(e,i),!1}finally{le(oe.OutputEnd,t,n),L(o)}}function dm(e,t,n,r,o,i,s,a){let c=Ds(e),l=!1,u=null;if(!r&&c&&(u=u_(t,n,i,e.index)),u!==null){let d=u.__ngLastListenerFn__||u;d.__ngNextListenerFn__=s,u.__ngLastListenerFn__=s,l=!0}else{let d=Gt(e,n),p=r?r(d):d;NE(n,p,i,a),r||(a.__ngNativeEl__=d);let f=o.listen(p,i,a);if(!l_(i)){let y=r?D=>r(ze(D[e.index])):e.index;fm(y,t,n,i,a,f,!1)}}return l}function l_(e){return e.startsWith("animation")||e.startsWith("transition")}function u_(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[zr],c=o[i+2];return a&&a.length>c?a[c]:null}typeof s=="string"&&(i+=2)}return null}function fm(e,t,n,r,o,i,s){let a=t.firstCreatePass?Wf(t):null,c=Gf(n),l=c.length;c.push(o,i),a&&a.push(r,e,l,(l+1)*(s?-1:1))}function Fp(e,t,n,r,o,i){let s=t[n],a=t[j],l=a.data[n].outputs[r],d=s[l].subscribe(i);fm(e.index,a,t,o,i,d,!0)}var Zl=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 Yo(e,t=0){let n=ne();if(n===null)return J(e,t);let r=Yt();return ih(r,n,st(e),t)}function d_(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}h_(e,t,n,a,i,c,l)}i!==null&&r!==null&&f_(n,r,i)}function f_(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 O(-301,!1);r.push(t[o],i)}}function p_(e,t,n){t.componentOffset=n,(e.components??=[]).push(t.index)}function h_(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,p_(e,n,p)),vE(eh(n,t),e,f.type)}D_(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=Vh(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),g_(e,n,t,d,f),E_(d,f,o),s!==null&&s.has(f)){let[D,v]=s.get(f);n.directiveToIndex.set(f.type,[d,D+n.directiveStart,v+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 y=f.type.prototype;!l&&(y.ngOnChanges||y.ngOnInit||y.ngDoCheck)&&((e.preOrderHooks??=[]).push(n.index),l=!0),!u&&(y.ngOnChanges||y.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(n.index),u=!0),d++}m_(e,n,i)}function m_(e,t,n){for(let r=t.directiveStart;r<t.directiveEnd;r++){let o=e.data[r];if(n===null||!n.has(o))Lp(0,t,o,r),Lp(1,t,o,r),Bp(t,r,!1);else{let i=n.get(o);jp(0,t,i,r),jp(1,t,i,r),Bp(t,r,!0)}}}function Lp(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),pm(t,i)}}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=o[i],a;e===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[s]??=[],a[s].push(r,i),pm(t,s)}}function pm(e,t){t==="class"?e.flags|=8:t==="style"&&(e.flags|=16)}function Bp(e,t,n){let{attrs:r,inputs:o,hostDirectiveInputs:i}=e;if(r===null||!n&&o===null||n&&i===null||du(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 g_(e,t,n,r,o){e.data[r]=o;let i=o.factory||(o.factory=er(o.type,!0)),s=new Ho(i,ur(o),Yo,null);e.blueprint[r]=s,n[r]=s,y_(e,t,r,Vh(e,n,o.hostVars,Ze),o)}function y_(e,t,n,r,o){let i=o.hostBindings;if(i){let s=e.hostBindingOpCodes;s===null&&(s=e.hostBindingOpCodes=[]);let a=~t.index;v_(s)!=a&&s.push(a),s.push(n,r,i)}}function v_(e){let t=e.length;for(;t>0;){let n=e[--t];if(typeof n=="number"&&n<0)return n}return 0}function E_(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 D_(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function hm(e,t,n,r,o,i,s,a){let c=t[j],l=c.consts,u=qt(l,s),d=sa(c,e,n,r,u);return i&&d_(c,t,d,qt(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 mm(e,t){sE(e,t),ul(t)&&e.queries.elementEnd(t)}function __(e,t,n,r,o,i){let s=t.consts,a=qt(s,o),c=sa(t,e,n,r,a);if(c.mergedAttrs=na(c.mergedAttrs,c.attrs),i!=null){let l=qt(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 gm=typeof ShadowRoot<"u",w_=typeof Document<"u";function b_(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 C_(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function x_(e,t,n){let r=t instanceof nt?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new qs(n,r):n}function I_(e){let t=e.get(gr,null);if(t===null)throw new O(407,!1);let n=e.get(cm,null),r=e.get($t,null),o=e.get(Jt,null,{optional:!0});return{rendererFactory:t,sanitizer:n,changeDetectionScheduler:r,ngReflect:!1,tracingService:o}}function T_(e,t,n){let r=ym(e);return xh(t,r,r==="svg"?dl:r==="math"?$f:n)}function S_(e){if((e&&"localName"in e&&typeof e.localName=="string"?e.localName:e?.tagName)?.toLowerCase()==="script")throw new O(905,!1)}function ym(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??=b_(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=C_(this.componentDef.outputs),this.cachedOutputs}constructor(t,n){this.componentDef=t,this.ngModule=n,this.componentType=t.type,this.selector=qE(t.selectors),this.ngContentSelectors=t.ngContentSelectors??[],this.isBoundToModule=!!n}create(t,n,r,o,i,s,a,c){le(oe.DynamicComponentStart);let l=L(null);try{let u=this.componentDef,d=x_(u,o||this.ngModule,t),p=I_(d),f=p.tracingService;return f&&f.componentCreate?f.componentCreate(lm(u),()=>this.createComponentRef(p,d,n,r,i,s,a,c)):this.createComponentRef(p,d,n,r,i,s,a,c)}finally{L(l)}}createComponentRef(t,n,r,o,i,s,a,c){let l=this.componentDef,u=M_(o,l,s,i,c),d=t.rendererFactory.createRenderer(null,l),p=o?bD(d,o,l.encapsulation,n):T_(l,d,a??null);S_(p);let f=n.get(vr,null),y=N_(p,()=>n.get(Ve,null)??hh());f&&f.addHost(y);let D=s?.some(Vp)||i?.some(h=>typeof h!="function"&&h.bindings.some(Vp)),v=bu(null,u,null,512|Bh(l),null,null,t,d,n,null,Eh(p,n,!0));f&&gm&&y instanceof ShadowRoot&&Is(v,()=>{f.removeHost(y)}),v[Me]=p,Ns(v);let E=null;try{let h=hm(Me,v,2,"#host",()=>u.directiveRegistry,!0,0);Sh(d,p,h),Qr(p,v),zh(u,v,h),_h(u,h,v),mm(u,h),r!==void 0&&k_(h,this.ngContentSelectors,r),E=Wt(h.index,v),v[Ce]=E[Ce],Iu(u,v,null)}catch(h){throw E!==null&&$l(E),$l(v),h}finally{le(oe.DynamicComponentEnd),As()}return new Xs(this.componentType,v,!!D)}};function M_(e,t,n,r,o){let i=e?["ng-version","22.2.0"]:YE(t.selectors[0]),s=null,a=null,c=0;if(n)for(let d of n)c+=d[Zl].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[Zl].requiredVars;let y=d+1;f.create&&(f.targetIdx=y,(s??=[]).push(f)),f.update&&(f.targetIdx=y,(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 wu(0,null,A_(s,a),1,c,l,null,null,null,[i],null)}function N_(e,t){let n=e.getRootNode?.();return w_&&n instanceof Document?n.head:n&&gm&&n instanceof ShadowRoot?n:t().head}function A_(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 Vp(e){let t=e[Zl].kind;return t==="input"||t==="twoWay"}var Xs=class extends am{_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[j],Me),this.location=ch(this._tNode,n),this.instance=Wt(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=xu(r,o[j],o,t,n);this.previousInputValues.set(t,n);let s=Wt(r.index,o);Mu(s,1)}get injector(){return new $o(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}};function k_(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 O_(e,t,n){return R_(e,t,n)}function aa(e){return!!e&&typeof e.then=="function"}function Ru(e){return!!e&&typeof e.subscribe=="function"}var Go=class{};var Wo=class extends Go{injector;instance=null;constructor(t){super();let n=new tr([...t.providers,{provide:Go,useValue:this}],t.parent||So(),t.debugName,new Set(["environment"]));this.injector=n,t.runEnvironmentInitializers&&n.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}};function vm(e,t,n=null){return new Wo({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var P_=(()=>{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=ol(!1,n.type),o=r.length>0?vm([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=se({token:e,providedIn:"environment",factory:()=>new e(J(nt))})}return e})();function Ie(e){return Xp(()=>{let t=B_(e),n=Q(B({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==au.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?o=>o.get(P_).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||At.Emulated,styles:e.styles||Ht,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&&eo("NgStandalone"),V_(n);let r=e.dependencies;return n.directiveDefs=Hp(r,F_),n.pipeDefs=Hp(r,Sf),n.id=H_(n),n})}function F_(e){return xo(e)||ps(e)}function L_(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 j_(e){if(e==null)return vs;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Ou(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 B_(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||Ht,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:L_(e.inputs,t),outputs:j_(e.outputs),debugInfo:null}}function V_(e){e.features?.forEach(t=>t(e))}function Hp(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 H_(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 Em=new G("");var Pu=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=T(Em,{optional:!0})??[];injector=T(xt);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let o of this.appInits){let i=$r(this.injector,o);if(aa(i))n.push(i);else if(Ru(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=jn({token:e,factory:e.\u0275fac})}return e})();function $_(e,t,n,r,o,i,s,a){if(n.firstCreatePass){e.mergedAttrs=na(e.mergedAttrs,e.attrs);let u=e.tView=wu(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),qr(e,!1);let c=U_(n,t,e,r);Rs()&&Du(n,t,c,e),Qr(c,t);let l=QD(c,t,c,e);t[r+Me]=l,Hh(t,l),O_(l,e,t)}function Ks(e,t,n,r,o,i,s,a,c,l,u){let d=n+Me,p;if(t.firstCreatePass){if(p=sa(t,d,4,s||null,a||null),l!=null){let f=qt(t.consts,l);p.localNames=[];for(let y=0;y<f.length;y+=2)p.localNames.push(f[y],-1)}}else p=t.data[d];return $_(p,e,t,n,r,o,i,c),l!=null&&Cu(e,p,u),p}var U_=z_;function z_(e,t,n,r){return Os(!0),t[xe].createComment("")}var Fu=new G("");var Dm=new G("");function _m(){gc(()=>{let e="";throw new O(-600,e)})}var G_=10;var ca=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=T(gn);afterRenderManager=T(pu);zonelessEnabled=T(Fo);rootEffectScheduler=T(Ls);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Ct;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=T(mr);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(Vt(n=>!n))}constructor(){T(Jt,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:o=>{o&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=T(nt);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){return this.bootstrapImpl(n,r)}bootstrapImpl(n,r,o=xt.NULL){return this._injector.get(Ue).run(()=>{if(le(oe.BootstrapComponentStart),!this._injector.get(Pu).done){let E="";throw new O(405,E)}let a=xo(n),c=this._injector.get(Go),l=new Zs(a,c);this.componentTypes.push(n);let{hostElement:u,directives:d,bindings:p}=W_(r),f=u||l.selector,y=l.create(o,[],f,c.injector,d,p),D=y.location.nativeElement,v=y.injector.get(Fu,null);return v?.registerApplication(D),y.onDestroy(()=>{this.detachView(y.hostView),Vo(this.components,y),v?.unregisterApplication(D)}),this._loadComponent(y),le(oe.BootstrapComponentEnd,y),y})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){le(oe.ChangeDetectionStart),this.tracingSnapshot!==null?this.tracingSnapshot.run(ra.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw le(oe.ChangeDetectionEnd),new O(101,!1);let n=L(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,L(n),this.afterTick.next(),le(oe.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++<G_;){le(oe.ChangeDetectionSyncStart);try{this.synchronizeOnce()}finally{le(oe.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&&!Ao(o))continue;let i=r&&!this.zonelessEnabled?0:1;Jh(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})=>Ao(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;Vo(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(Dm,[]).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),()=>Vo(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new O(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=jn({token:e,factory:e.\u0275fac})}return e})();function W_(e){return e===void 0||typeof e=="string"||e instanceof Element?{hostElement:e}:e}function Vo(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function de(e,t,n,r){let o=ne(),i=pr();if(kt(o,i,t)){let s=Ye(),a=ks();RD(a,o,e,t,n,r)}return de}var Xl=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 Ol(e,t,n,r,o){return e===n&&Object.is(t,r)?1:Object.is(o(e,t),o(n,r))?-1:0}function q_(e,t,n,r){let o,i,s=0,a=e.length-1,c=void 0;if(Array.isArray(t)){L(r);let l=t.length-1;for(L(null);s<=a&&s<=l;){let u=e.at(s),d=t[s],p=Ol(s,u,s,d,n);if(p!==0){p<0&&e.updateValue(s,d),s++;continue}let f=e.at(a),y=t[l],D=Ol(a,f,l,y,n);if(D!==0){D<0&&e.updateValue(a,y),a--,l--;continue}let v=n(s,u),E=n(a,f),h=n(s,d);if(Object.is(h,E)){let x=n(l,y);Object.is(x,v)?(e.swap(s,a),e.updateValue(a,y),l--,a--):e.move(a,s),e.updateValue(s,d),s++;continue}if(o??=new Qs,i??=Up(e,s,a,n),Kl(e,o,s,h))e.updateValue(s,d),s++,a++;else if(i.has(h))o.set(v,e.detach(s)),a--;else{let x=e.create(s,t[s]);e.attach(s,x),s++,a++}}for(;s<=l;)$p(e,o,n,s,t[s]),s++}else if(t!=null){L(r);let l=t[Symbol.iterator]();L(null);let u=l.next();for(;!u.done&&s<=a;){let d=e.at(s),p=u.value,f=Ol(s,d,s,p,n);if(f!==0)f<0&&e.updateValue(s,p),s++,u=l.next();else{o??=new Qs,i??=Up(e,s,a,n);let y=n(s,p);if(Kl(e,o,s,y))e.updateValue(s,p),s++,a++,u=l.next();else if(!i.has(y))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;)$p(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 Kl(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function $p(e,t,n,r,o){if(Kl(e,t,r,n(r,o)))e.updateValue(r,o);else{let i=e.create(r,o);e.attach(r,i)}}function Up(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 ae(e,t,n,r,o,i,s,a){eo("NgControlFlow");let c=ne(),l=Ye(),u=qt(l.consts,i);return Ks(c,l,e,t,n,r,o,u,256,s,a),Lu}function Lu(e,t,n,r,o,i,s,a){return eo("NgControlFlow"),Y_(e,t,n,r,o,i,s,a),Lu}function Y_(e,t,n,r,o,i,s,a){let c=ne(),l=Ye(),u=qt(l.consts,i);Ks(c,l,e,t,n,r,o,u,512,s,a)}function ce(e,t){eo("NgControlFlow");let n=ne(),r=pr(),o=n[r]!==Ze?n[r]:-1,i=o!==-1?Js(n,Me+o):void 0,s=0;if(kt(n,r,e)){let a=L(null);try{if(i!==void 0&&om(i,s),e!==-1){let c=Me+e,l=Js(n,c),u=tu(n[j],c),d=sm(l,u,n),p=Tu(n,u,t,{dehydratedView:d});Nu(l,p,s,Su(u,d))}}finally{L(a)}}else if(i!==void 0){let a=rm(i,s);a!==void 0&&(a[Ce]=t)}}var Ql=class{lContainer;$implicit;$index;constructor(t,n,r){this.lContainer=t,this.$implicit=n,this.$index=r}get $count(){return this.lContainer.length-_e}};function yt(e,t){return t}var Jl=class{hasEmptyBlock;trackByFn;liveCollection;constructor(t,n,r){this.hasEmptyBlock=t,this.trackByFn=n,this.liveCollection=r}};function he(e,t,n,r,o,i,s,a,c,l,u,d,p){eo("NgControlFlow");let f=ne(),y=Ye(),D=c!==void 0,v=ne(),E=a?s.bind(v[at][Ce]):s,h=new Jl(D,E);v[Me+e]=h,Ks(f,y,e+1,t,n,r,o,qt(y.consts,i),256),D&&Ks(f,y,e+2,c,l,u,d,qt(y.consts,p),512)}var eu=class extends Xl{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-_e}at(t){return this.getLView(t)[Ce].$implicit}attach(t,n){let r=n[Ur];this.needsIndexUpdate||=t!==this.length,Nu(this.lContainer,n,t,Su(this.templateTNode,r)),Z_(this.lContainer,t)}detach(t){return this.needsIndexUpdate||=t!==this.length-1,X_(this.lContainer,t),K_(this.lContainer,t)}create(t,n){let r=a_(this.lContainer,this.templateTNode.tView.ssrId);return Tu(this.hostLView,this.templateTNode,new Ql(this.lContainer,n,t),{dehydratedView:r})}destroy(t){Eu(t[j],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 Q_(this.lContainer,t)}};function me(e){let t=L(null),n=Zt();try{let r=ne(),o=r[j],i=r[n],s=n+1,a=Js(r,s);if(i.liveCollection===void 0){let l=tu(o,s);i.liveCollection=new eu(a,r,l)}else i.liveCollection.reset();let c=i.liveCollection;if(q_(c,e,i.trackByFn,t),c.updateIndexes(),i.hasEmptyBlock){let l=pr(),u=c.length===0;if(kt(r,l,u)){let d=n+2,p=Js(r,d);if(u){let f=tu(o,d),y=sm(p,f,r),D=Tu(r,f,void 0,{dehydratedView:y});Nu(p,D,0,Su(f,y))}else o.firstUpdatePass&&r_(p),om(p,0)}}}finally{L(t)}}function Js(e,t){return e[t]}function Z_(e,t){if(e.length<=_e)return;let n=_e+t,r=e[n];r&&Ph(r)}function X_(e,t){if(e.length<=_e)return;let n=_e+t,r=e[n];r&&Rh(r)}function K_(e,t){return Au(e,t)}function Q_(e,t){return rm(e,t)}function tu(e,t){return ws(e,t)}function pe(e,t,n){let r=ne(),o=pr();if(kt(r,o,t)){let i=Ye(),s=ks();TD(s,r,e,t,r[xe],n)}return pe}function nu(e,t,n,r,o){xu(t,e,n,o?"class":"style",r)}function M(e,t,n,r){let o=ne(),i=o[j],s=e+Me,a=i.firstCreatePass?hm(s,o,2,t,kD,Zf(),n,r):i.data[s];if(Pn(a)){let c=o[Tt].tracingService;if(c&&c.componentCreate){let l=i.data[a.directiveStart+a.componentOffset];return c.componentCreate(lm(l),()=>(zp(e,t,o,a,r),M))}}return zp(e,t,o,a,r),M}function zp(e,t,n,r,o){if(Wh(r,n,e,t,wm),Ds(r)){let i=n[j];zh(i,n,r),_h(i,r,n)}o!=null&&Cu(n,r)}function N(){let e=Ye(),t=Yt(),n=qh(t);return e.firstCreatePass&&mm(e,n),yl(n)&&vl(),gl(),n.classesWithoutHost!=null&&cE(n)&&nu(e,n,ne(),n.classesWithoutHost,!0),n.stylesWithoutHost!=null&&lE(n)&&nu(e,n,ne(),n.stylesWithoutHost,!1),N}function Xe(e,t,n,r){return M(e,t,n,r),N(),Xe}function _(e,t,n,r){let o=ne(),i=o[j],s=e+Me,a=i.firstCreatePass?__(s,i,2,t,n,r):i.data[s];return Wh(a,o,e,t,wm),r!=null&&Cu(o,a),_}function C(){let e=Yt(),t=qh(e);return yl(t)&&vl(),gl(),C}function ve(e,t,n,r){return _(e,t,n,r),C(),ve}var wm=(e,t,n,r,o)=>(Os(!0),xh(t[xe],r,xl()));function ue(){return ne()}function re(e,t,n){let r=ne(),o=pr();if(kt(r,o,t)){let i=Ye(),s=ks();Gh(s,r,e,t,r[xe],n)}return re}var jo=void 0;function J_(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return t===1&&n===0?1:5}var ew=["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"]],jo,[["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"]],jo,[["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}",jo,jo,jo],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",J_],Pl=Object.create(null);function la(e){let t=tw(e),n=Gp(t);if(n)return n;let r=t.split("-")[0];if(n=Gp(r),n)return n;if(r==="en")return ew;throw new O(701,!1)}function Gp(e){if(!(e in Pl)){let t=or.ng&&or.ng.common&&or.ng.common.locales&&or.ng.common.locales[e];return t!==void 0&&(Pl[e]=t),t}return Pl[e]}var to={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 tw(e){return e.toLowerCase().replace(/_/g,"-")}var Zo="en-US";var nw=Zo;function bm(e){typeof e=="string"&&(nw=e.toLowerCase().replace(/_/g,"-"))}function be(e,t,n){let r=ne(),o=Ye(),i=Yt();return rw(o,r,r[xe],i,e,t,n),be}function Z(e,t,n){let r=ne(),o=Ye(),i=Yt();return(i.type&3||n)&&dm(i,o,r,n,r[xe],e,t,$s(i,r,t)),Z}function rw(e,t,n,r,o,i,s){let a=!0,c=null;if((r.type&3||s)&&(c??=$s(r,t,i),dm(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),Fp(r,t,p,f,o,c)}if(l&&l.length)for(let d of l)c??=$s(r,t,i),Fp(r,t,d,o,o,c)}}function S(e=1){return lp(e)}function Ke(e){let t=Jf();return bs(t,Me+e)}function js(e,t){return e<<17|t<<2}function yr(e){return e>>17&32767}function ow(e){return(e&2)==2}function iw(e,t){return e&131071|t<<17}function ru(e){return e|2}function Jr(e){return(e&131068)>>2}function Fl(e,t){return e&-131069|t<<2}function sw(e){return(e&1)===1}function ou(e){return e|1}function aw(e,t,n,r,o,i){let s=i?t.classBindings:t.styleBindings,a=yr(s),c=Jr(s);e[r]=n;let l=!1,u;if(Array.isArray(n)){let d=n;u=d[1],(u===null||Vr(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]=Fl(e[p+1],r)),e[a+1]=iw(e[a+1],r)}else e[r+1]=js(a,0),a!==0&&(e[a+1]=Fl(e[a+1],r)),a=r;else e[r+1]=js(c,0),a===0?a=r:e[c+1]=Fl(e[c+1],r),c=r;l&&(e[r+1]=ru(e[r+1])),Wp(e,u,r,!0),Wp(e,u,r,!1),cw(t,u,e,r,i),s=js(a,c),i?t.classBindings=s:t.styleBindings=s}function cw(e,t,n,r,o){let i=o?e.residualClasses:e.residualStyles;i!=null&&typeof t=="string"&&Vr(i,t)>=0&&(n[r+1]=ou(n[r+1]))}function Wp(e,t,n,r){let o=e[n+1],i=t===null,s=r?yr(o):Jr(o),a=!1;for(;s!==0&&(a===!1||i);){let c=e[s],l=e[s+1];lw(c,t)&&(a=!0,e[s+1]=r?ou(l):ru(l)),s=r?yr(l):Jr(l)}a&&(e[n+1]=r?ru(o):ou(o))}function lw(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?Vr(e,t)>=0:!1}var Nt={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function uw(e){return e.substring(Nt.key,Nt.keyEnd)}function dw(e){return fw(e),Cm(e,xm(e,0,Nt.textEnd))}function Cm(e,t){let n=Nt.textEnd;return n===t?-1:(t=Nt.keyEnd=pw(e,Nt.key=t,n),xm(e,t,n))}function fw(e){Nt.key=0,Nt.keyEnd=0,Nt.value=0,Nt.valueEnd=0,Nt.textEnd=e.length}function xm(e,t,n){for(;t<n&&e.charCodeAt(t)<=32;)t++;return t}function pw(e,t,n){for(;t<n&&e.charCodeAt(t)>32;)t++;return t}function Ne(e,t){return mw(e,t,null,!0),Ne}function Xo(e){gw(ww,hw,e,!0)}function hw(e,t){for(let n=dw(t);n>=0;n=Cm(t,n))gs(e,uw(t),!0)}function mw(e,t,n,r){let o=ne(),i=Ye(),s=Ss(2);if(i.firstUpdatePass&&Tm(i,e,s,r),t!==Ze&&kt(o,s,t)){let a=i.data[Zt()];Sm(i,a,o,o[xe],e,o[s+1]=Cw(t,n),r,s)}}function gw(e,t,n,r){let o=Ye(),i=Ss(2);o.firstUpdatePass&&Tm(o,null,i,r);let s=ne();if(n!==Ze&&kt(s,i,n)){let a=o.data[Zt()];if(Mm(a,r)&&!Im(o,i)){let c=r?a.classesWithoutHost:a.stylesWithoutHost;c!==null&&(n=ls(c,n||"")),nu(o,a,s,n,r)}else bw(o,a,s,s[xe],s[i+1],s[i+1]=_w(e,t,n),r,i)}}function Im(e,t){return t>=e.expandoStartIndex}function Tm(e,t,n,r){let o=e.data;if(o[n+1]===null){let i=o[Zt()],s=Im(e,n);Mm(i,r)&&t===null&&!s&&(t=!1),t=yw(o,i,t,r),aw(o,i,t,n,s,r)}}function yw(e,t,n,r){let o=ip(e),i=r?t.residualClasses:t.residualStyles;if(o===null)(r?t.classBindings:t.styleBindings)===0&&(n=Ll(null,e,t,n,r),n=qo(n,t.attrs,r),i=null);else{let s=t.directiveStylingLast;if(s===-1||e[s]!==o)if(n=Ll(o,e,t,n,r),i===null){let c=vw(e,t,r);c!==void 0&&Array.isArray(c)&&(c=Ll(null,e,t,c[1],r),c=qo(c,t.attrs,r),Ew(e,t,r,c))}else i=Dw(e,t,r)}return i!==void 0&&(r?t.residualClasses=i:t.residualStyles=i),n}function vw(e,t,n){let r=n?t.classBindings:t.styleBindings;if(Jr(r)!==0)return e[yr(r)]}function Ew(e,t,n,r){let o=n?t.classBindings:t.styleBindings;e[yr(o)]=r}function Dw(e,t,n){let r,o=t.directiveEnd;for(let i=1+t.directiveStylingLast;i<o;i++){let s=e[i].hostAttrs;r=qo(r,s,n)}return qo(r,t.attrs,n)}function Ll(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=qo(r,i.hostAttrs,o),i!==e);)a++;return e!==null&&(n.directiveStylingLast=a),r}function qo(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 _w(e,t,n){if(n==null||n==="")return Ht;let r=[],o=Uo(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 ww(e,t,n){let r=String(t);r!==""&&!r.includes(" ")&&gs(e,r,n)}function bw(e,t,n,r,o,i,s,a){o===Ze&&(o=Ht);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,y=null,D;u===d?(c+=2,l+=2,p!==f&&(y=d,D=f)):d===null||u!==null&&u<d?(c+=2,y=u):(l+=2,y=d,D=f),y!==null&&Sm(e,t,n,r,y,D,s,a),u=c<o.length?o[c]:null,d=l<i.length?i[l]:null}}function Sm(e,t,n,r,o,i,s,a){if(!(t.type&3))return;let c=e.data,l=c[a+1],u=sw(l)?qp(c,t,n,o,Jr(l),s):void 0;if(!ea(u)){ea(i)||ow(l)&&(i=qp(c,null,n,o,a,s));let d=fl(Zt(),n);ED(r,s,d,o,i)}}function qp(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===Ze&&(p=d?Ht: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 y=e[o+1];o=s?yr(y):Jr(y)}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 Cw(e,t){return e==null||e===""||(typeof t=="string"?e=Uo(e)+t:typeof e=="object"&&(e=cs(Uo(e)))),e}function Mm(e,t){return(e.flags&(t?8:16))!==0}function m(e,t=""){let n=ne(),r=Ye(),o=e+Me,i=r.firstCreatePass?sa(r,o,1,t,null):r.data[o],s=xw(r,n,i,t);n[o]=s,Rs()&&Du(r,n,s,i),qr(i,!1)}var xw=(e,t,n,r)=>(Os(!0),RE(t[xe],r));function Iw(e,t,n,r=""){return kt(e,pr(),n)?t+Br(n)+r:Ze}function Tw(e,t,n,r,o,i=""){let s=ep(),a=um(e,s,n,o);return Ss(2),a?t+Br(n)+r+Br(o)+i:Ze}function P(e){return ge("",e),P}function ge(e,t,n){let r=ne(),o=Iw(r,e,t,n);return o!==Ze&&Nm(r,Zt(),o),ge}function ot(e,t,n,r,o){let i=ne(),s=Tw(i,e,t,n,r,o);return s!==Ze&&Nm(i,Zt(),s),ot}function Nm(e,t,n){let r=fl(t,e);OE(e[xe],r,n)}function Ko(e,t){let n=Ts()+e,r=ne();return r[n]===Ze?ku(r,n,t()):c_(r,n)}function Am(e,t){let n=e[t];return n===Ze?void 0:n}function Sw(e,t,n,r,o,i){let s=t+n;return kt(e,s,o)?ku(e,s+1,i?r.call(i,o):r(o)):Am(e,s+1)}function Mw(e,t,n,r,o,i,s){let a=t+n;return um(e,a,o,i)?ku(e,a+2,s?r.call(s,o,i):r(o,i)):Am(e,a+2)}function lt(e,t){let n=Ye(),r,o=e+Me;n.firstCreatePass?(r=Nw(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=qe(Yo);try{let c=Us(!1),l=i();return Us(c),pl(n,ne(),o,l),l}finally{qe(a)}}function Nw(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function en(e,t,n){let r=e+Me,o=ne(),i=bs(o,r);return km(o,r)?Sw(o,Ts(),t,i.transform,n,i):i.transform(n)}function Qo(e,t,n,r){let o=e+Me,i=ne(),s=bs(i,o);return km(i,o)?Mw(i,Ts(),t,s.transform,n,r,s):s.transform(n,r)}function km(e,t){return e[j].data[t].pure}var Rm=(()=>{class e{applicationErrorHandler=T(gn);appRef=T(ca);taskService=T(mr);ngZone=T(Ue);zonelessEnabled=T(Fo);tracing=T(Jt,{optional:!0});zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new We;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(bo):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(T(Nl,{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?hp:Il;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(bo+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=jn({token:e,factory:e.\u0275fac})}return e})();function Om(){return[{provide:$t,useExisting:Rm},{provide:Ue,useClass:Co},{provide:Fo,useValue:!0}]}function Aw(){return typeof $localize<"u"&&$localize.locale||Zo}var Jo=new G("",{factory:()=>T(Jo,{optional:!0,skipSelf:!0})||Aw()});var ua=class{destroyed=!1;listeners=null;errorHandler=T(pt,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=T(ke);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(t){if(this.destroyed)throw new O(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=L(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&&kw(this.listeners)),L(n),this.isEmitting=!1}}};function kw(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function we(e,t){return Ri(e,t?.equal)}function Bn(e){return Xd(e)}var Pm=class e extends Error{_brand;constructor(t){super(t)}static IDLE=new e("IDLE");static LOADING=new e("LOADING")},Rw=e=>e;function ju(e,t){if(typeof e=="function"){let n=_c(e,Rw,t?.equal);return Fm(n,t?.debugName,t?.set)}else{let n=_c(e.source,e.computation,e.equal);return Fm(n,e.debugName,e.set)}}function Fm(e,t,n){let r=e[Oe],o=e;if(n!==void 0){let i=s=>wc(r,s);o.set=s=>n(s,i),o.update=s=>n(s(Bn(e)),i)}else o.set=i=>wc(r,i),o.update=i=>Zd(r,i);return o.asReadonly=Ps.bind(e),o}function jm(e,t){let n=Object.create(Zp);n.value=e,n.transformFn=t?.transform;function r(){if(ln(n),n.value===su){let o=null;throw new O(-950,o)}return n.value}return r[Oe]=n,r}function no(e){return new ua}function Lm(e,t){return jm(e,t)}function Xw(e){return jm(su,e)}var Qe=(Lm.required=Xw,Lm);var Kw=1e4;var G2=Kw-1e3;var Vu=new G(""),Qw=new G("");function ei(e){return!e.moduleRef}function Jw(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(Vu);s.add(i),t.onDestroy(()=>{o.unsubscribe(),s.delete(i)})}else{let i=()=>e.moduleRef.destroy(),s=e.platformInjector.get(Vu);s.add(i),e.moduleRef.onDestroy(()=>{Vo(e.allPlatformModules,e.moduleRef),o.unsubscribe(),s.delete(i)})}return tb(r,n,()=>{let i=t.get(mr),s=i.add(),a=t.get(Pu);return a.runInitializers(),a.donePromise.then(()=>{let c=t.get(Jo,Zo);if(bm(c||Zo),!t.get(Qw,!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 eb?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>{i.remove(s)})})})}var eb;function tb(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 da=null;function nb(e=[],t){return xt.create({name:t,providers:[{provide:To,useValue:"platform"},{provide:Vu,useValue:new Set([()=>da=null])},...e]})}function rb(e=[]){if(da)return da;let t=nb(e);return da=t,_m(),ob(t),t}function ob(e){let t=e.get(Fs,null);$r(e,()=>{t?.forEach(n=>n())})}function Bm(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:o}=e;le(oe.BootstrapApplicationStart);try{let i=o?.injector??rb(r),s=[Om(),vp,...n||[]],a=new Wo({providers:s,parent:i,debugName:"",runEnvironmentInitializers:!1});return Jw({r3Injector:a.injector,platformInjector:i,rootComponent:t})}catch(i){return Promise.reject(i)}finally{le(oe.BootstrapApplicationEnd)}}var Bu=Symbol("NOT_SET"),Vm=new Set,ib=Q(B({},Ar),{kind:"afterRenderEffectPhase",consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:Bu,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!==Bu&&!Mr(this))return this.signal;try{for(let o of this.cleanup??Vm)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{Mn(this,n)}return(this.value===Bu||!this.equal(this.value,r))&&(this.value=r,this.version++),this.signal}}),Hu=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 hu){let c=n[a];if(c===void 0)continue;let l=Object.create(ib);l.sequence=this,l.phase=a,l.userFn=c,l.dirty=!0,l.signal=()=>(ln(l),l.value),l.signal[Oe]=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??Vm)n()}finally{Nn(t)}}};function Hm(e,t){let n=t?.injector??T(xt),r=n.get($t),o=n.get(pu),i=n.get(Jt,null,{optional:!0});o.impl??=n.get(Ah);let s=e;typeof s=="function"&&(s={mixedReadWrite:e});let a=n.get(Po,null,{optional:!0}),c=new Hu(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 $m=null;function Vn(){return $m}function Uu(e){$m??=e}var ri=class{},fa=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(r){return new(r||e)};static \u0275prov=se({token:e,factory:()=>T(Um),providedIn:"platform"})}return e})();var Um=(()=>{class e extends fa{_location;_history;_doc=T(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=se({token:e,factory:()=>new e,providedIn:"platform"})}return e})();var _n=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 ha=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()}},ma=class{encodeKey(t){return zm(t)}encodeValue(t){return zm(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function ab(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 cb=/%(\d[a-f0-9])/gi,lb={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function zm(e){return encodeURIComponent(e).replace(cb,(t,n)=>lb[n]??t)}function pa(e){return`${e}`}var Dn=class e{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new ma,t.fromString){if(t.fromObject)throw new O(2805,!1);this.map=ab(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(pa):[pa(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(pa(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(pa(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 ub(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Gm(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer}function Wm(e){return typeof Blob<"u"&&e instanceof Blob}function qm(e){return typeof FormData<"u"&&e instanceof FormData}function db(e){return typeof URLSearchParams<"u"&&e instanceof URLSearchParams}var zu="Content-Type",Ym="Accept",Km="text/plain",Qm="application/json",fb=`${Qm}, ${Km}, */*`,ro=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(ub(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 O(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 _n,this.context??=new ha,!this.params)this.params=new Dn,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"||Gm(this.body)||Wm(this.body)||qm(this.body)||db(this.body)?this.body:this.body instanceof Dn?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||qm(this.body)?null:Wm(this.body)?this.body.type||null:Gm(this.body)?null:typeof this.body=="string"?Km:this.body instanceof Dn?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Qm: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,y=t.transferCache??this.transferCache,D=t.timeout??this.timeout,v=t.body!==void 0?t.body:this.body,E=t.withCredentials??this.withCredentials,h=t.reportProgress??this.reportProgress,x=t.reportUploadProgress??this.reportUploadProgress,w=t.reportDownloadProgress??this.reportDownloadProgress,A=t.headers||this.headers,F=t.params||this.params,z=t.context??this.context;return t.setHeaders!==void 0&&(A=Object.keys(t.setHeaders).reduce((W,ee)=>W.set(ee,t.setHeaders[ee]),A)),t.setParams&&(F=Object.keys(t.setParams).reduce((W,ee)=>W.set(ee,t.setParams[ee]),F)),new e(n,r,v,{params:F,headers:A,context:z,reportProgress:h,reportUploadProgress:x,reportDownloadProgress:w,responseType:o,withCredentials:E,transferCache:y,keepalive:i,cache:a,priority:s,timeout:D,mode:c,redirect:l,credentials:u,referrer:d,integrity:p,referrerPolicy:f})}},Er=(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})(Er||{}),oo=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(t,n=200,r="OK"){this.headers=t.headers||new _n,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}},ga=class e extends oo{constructor(t={}){super(t)}type=Er.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 oo{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=Er.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})}},En=class extends oo{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}},pb=200;var hb=/^\)\]\}',?\n/,dj=1024*1024,Jm=new G("",{factory:()=>null}),ya=(()=>{class e{fetchImpl=T(Wu,{optional:!0})?.fetch??((...n)=>globalThis.fetch(...n));ngZone=T(Ue);destroyRef=T(ke);maxResponseSize=T(Jm);handle(n){return new De(r=>{let o=new AbortController,i=!1,s={next:c=>{c.type===Er.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(qu,c=>s.error(new En({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 v=this.ngZone.runOutsideAngular(()=>this.fetchImpl(n.urlWithParams,B({signal:r},i)));mb(v),o.next({type:Er.Sent}),s=await v}catch(v){o.error(new En({error:v,status:v.status??0,statusText:v.statusText,url:n.urlWithParams,headers:v.headers}));return}let a=new _n(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 ga({headers:a,status:u,statusText:c,url:l})),s.body){let v=s.headers.get(zu)??"",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(),Zm(this.maxResponseSize));let x=[],w=s.body.getReader(),A=0,F,z,W=typeof Zone<"u"&&Zone.current,ee=!1;if(await this.ngZone.runOutsideAngular(async()=>{for(;;){if(this.destroyRef.destroyed){await w.cancel(),ee=!0;break}let{done:Ee,value:Fe}=await w.read();if(Ee)break;if(x.push(Fe),A+=Fe.length,this.maxResponseSize!==null&&A>this.maxResponseSize&&(await w.cancel(),Zm(this.maxResponseSize)),p){z=n.responseType==="text"?(z??"")+(F??=Xm(v)).decode(Fe,{stream:!0}):void 0;let Le=()=>o.next({type:Er.DownloadProgress,total:Number.isFinite(h)?h:void 0,loaded:A,partialText:z});W?W.run(Le):Le()}}}),ee){o.complete();return}let ie=this.concatChunks(x,A);try{d=this.parseBody(n,ie,v,u)}catch(Ee){o.error(new En({error:Ee,headers:new _n(s.headers),status:s.status,statusText:s.statusText,url:s.url||n.urlWithParams}));return}}u===0&&(u=d?pb:0);let f=u>=200&&u<300,y=s.redirected,D=s.type;f?(o.next(new oi({body:d,headers:a,status:u,statusText:c,url:l,redirected:y,responseType:D})),o.complete()):o.error(new En({error:d,headers:a,status:u,statusText:c,url:l,redirected:y,responseType:D}))}parseBody(n,r,o,i){switch(n.responseType){case"json":let s=new TextDecoder().decode(r).replace(hb,"");if(s==="")return null;try{return JSON.parse(s)}catch(a){if(i<200||i>=300)return s;throw a}case"text":return Xm(o).decode(r);case"blob":return new Blob([r],{type:o});case"arraybuffer":return r.buffer}}createRequestInit(n){if(n.reportUploadProgress)throw new O(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(Ym)||(r[Ym]=fb),!n.headers.has(zu)){let i=n.detectContentTypeHeader();i!==null&&(r[zu]=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=jn({token:e,factory:e.\u0275fac})}return e})(),Wu=class{};function qu(){}function mb(e){e.then(qu,qu)}function Zm(e){throw new O(-2825,!1)}var gb=/charset=\s*["']?([^;"'\s]+)["']?/i;function Xm(e){let t=e.match(gb);if(t!==null)try{return new TextDecoder(t[1])}catch{}return new TextDecoder}var yb=new G("",{factory:()=>!0}),vb="XSRF-TOKEN",Eb=new G("",{factory:()=>vb}),Db="X-XSRF-TOKEN",_b=new G("",{factory:()=>Db}),wb=(()=>{class e{cookieName=T(Eb);doc=T(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=jn({token:e,factory:e.\u0275fac})}return e})(),eg=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=se({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=J(wb),o},providedIn:"root"})}return e})();function tg(e,t){if(!T(yb)||e.method==="GET"||e.method==="HEAD")return t(e);try{let o=T(fa).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=T(eg).getToken(),r=T(_b);return n!=null&&!e.headers.has(r)&&(e=e.clone({headers:e.headers.set(r,n)})),t(e)}function bb(e,t){return t(e)}function Cb(e,t,n){return(r,o)=>$r(n,()=>t(r,i=>e(i,o)))}var ng=new G("",{factory:()=>[tg]}),rg=new G(""),og=new G("",{factory:()=>!0});var Yu=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=se({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=J(ya),o},providedIn:"root"})}return e})();var va=(()=>{class e{backend;injector;chain=null;pendingTasks=T(Lo);contributeToStability=T(og);constructor(n,r){this.backend=n,this.injector=r}handle(n){if(this.chain===null){let o=this.injector.get(Ea,null,{skipSelf:!0}),i=o!==null&&this.backend===o,s=this.injector.get(rg,[],i?{self:!0}:void 0),a=Array.from(new Set([...this.injector.get(ng),...s]));this.chain=a.reduceRight((c,l)=>Cb(c,l,this.injector),bb)}let r=this.chain;if(this.contributeToStability){let o=this.pendingTasks.add();return Bn(()=>r(n,i=>this.backend.handle(i))).pipe(Oc(o))}else return Bn(()=>r(n,o=>this.backend.handle(o)))}static \u0275fac=function(r){return new(r||e)(J(Yu),J(nt))};static \u0275prov=se({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Ea=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=se({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=J(va),o},providedIn:"root"})}return e})();function Gu(e,t){return B({body:t},e)}var Da=(()=>{class e{handler;constructor(n){this.handler=n}request(n,r,o={}){let i;if(n instanceof ro)i=n;else{let c;o.headers instanceof _n?c=o.headers:c=new _n(o.headers);let l;o.params&&(o.params instanceof Dn?l=o.params:l=new Dn({fromObject:o.params})),i=new ro(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=Nc(i).pipe(Rc(c=>this.handler.handle(c)));if(n instanceof ro||o.observe==="events")return s;let a=s.pipe(kc(c=>c instanceof oi));switch(o.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return a.pipe(Vt(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new O(2806,!1);return c.body}));case"blob":return a.pipe(Vt(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new O(2807,!1);return c.body}));case"text":return a.pipe(Vt(c=>{if(c.body!==null&&typeof c.body!="string")throw new O(2808,!1);return c.body}));default:return a.pipe(Vt(c=>c.body))}case"response":return a;default:throw new O(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 Dn().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,Gu(o,r))}post(n,r,o={}){return this.request("POST",n,Gu(o,r))}put(n,r,o={}){return this.request("PUT",n,Gu(o,r))}static \u0275fac=function(r){return new(r||e)(J(Ea))};static \u0275prov=se({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Zu(...e){let t=[Da,ya,va,{provide:Ea,useExisting:va},{provide:Yu,useFactory:()=>T(ya)},{provide:ng,useValue:tg,multi:!0}];for(let n of e)t.push(...n.\u0275providers);return ir(t)}var Qu=(function(e){return e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency",e[e.Scientific=3]="Scientific",e})(Qu||{});var Rt={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 io(e,t){let n=la(e),r=n[to.NumberSymbols][t];if(typeof r>"u"){if(t===Rt.CurrencyDecimal)return n[to.NumberSymbols][Rt.Decimal];if(t===Rt.CurrencyGroup)return n[to.NumberSymbols][Rt.Group]}return r}function sg(e,t){return la(e)[to.NumberFormats][t]}var xb=/^(\d+)?\.((\d+)(-(\d+))?)?$/,ig=22,_a=".",ii="0",Ib=";",Tb=",",Xu="#";function Sb(e,t,n,r,o,i,s=!1){let a="",c=!1;if(!isFinite(e))a=io(n,Number.isNaN(e)?Rt.NaN:Rt.Infinity);else{let l=Ab(e);s&&(l=Nb(l));let u=t.minInt,d=t.minFrac,p=t.maxFrac;if(i){let h=i.match(xb);if(h===null)throw new O(2306,!1);let x=h[1],w=h[3],A=h[5];x!=null&&(u=Ku(x)),w!=null&&(d=Ku(w)),A!=null?p=Ku(A):w!=null&&d>p&&(p=d);let F=100;if(u>F||d>F||p>F)throw new O(2306,!1)}kb(l,d,p);let f=l.digits,y=l.integerLen,D=l.exponent,v=[];for(c=f.every(h=>!h);y<u;y++)f.unshift(0);for(;y<0;y++)f.unshift(0);y>0?v=f.splice(y,f.length):(v=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(io(n,r)),v.length&&(a+=io(n,o)+v.join("")),D&&(a+=io(n,Rt.Exponential)+"+"+D)}return e<0&&!c?a=t.negPre+a+t.negSuf:a=t.posPre+a+t.posSuf,a}function ag(e,t,n){let r=sg(t,Qu.Decimal),o=Mb(r,io(t,Rt.MinusSign));return Sb(e,o,t,Rt.Group,Rt.Decimal,n)}function Mb(e,t="-"){let n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},r=e.split(Ib),o=r[0],i=r[1],s=o.indexOf(_a)!==-1?o.split(_a):[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(Xu));for(let u=0;u<c.length;u++){let d=c.charAt(u);d===ii?n.minFrac=n.maxFrac=u+1:d===Xu?n.maxFrac=u+1:n.posSuf+=d}let l=a.split(Tb);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(Xu);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 Nb(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 Ab(e){let t=Math.abs(e)+"",n=0,r,o,i,s,a;for((o=t.indexOf(_a))>-1&&(t=t.replace(_a,"")),(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>ig&&(r=r.splice(0,ig-1),n=o-1,o=1),{digits:r,exponent:n,integerLen:o}}function kb(e,t,n){if(t>n)throw new O(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,y){return p=p+d,y[f]=p<10?p:p-10,c&&(y[f]===0&&f>=l?y.pop():c=!1),p>=10?1:0},0);u&&(r.unshift(u),e.integerLen++)}function Ku(e){let t=parseInt(e);if(isNaN(t))throw new O(2305,!1);return t}function Rb(e,t){return new O(2100,!1)}var Ju=(()=>{class e{_locale;constructor(n){this._locale=n}transform(n,r,o){if(!Ob(n))return null;o||=this._locale;try{let i=Pb(n);return ag(i,o,r)}catch(i){throw Rb(e,i.message)}}static \u0275fac=function(r){return new(r||e)(Yo(Jo,16))};static \u0275pipe=Ou({name:"number",type:e,pure:!0})}return e})();function Ob(e){return!(e==null||e===""||e!==e)}function Pb(e){if(typeof e=="string"&&!isNaN(Number(e)-parseFloat(e)))return Number(e);if(typeof e!="number")throw new O(2309,!1);return e}var cg="browser";var si=class{_doc;constructor(t){this._doc=t}manager},wa=(()=>{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=se({token:e,factory:e.\u0275fac})}return e})(),xa=new G(""),rd=(()=>{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 wa));this._plugins=o.slice().reverse();let i=n.find(s=>s instanceof wa);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 O(-5101,!1);return this._eventNameToPlugin.set(n,r),r}static \u0275fac=function(r){return new(r||e)(J(xa),J(Ue))};static \u0275prov=se({token:e,factory:e.\u0275fac})}return e})(),ed="ng-app-id";function lg(e){for(let t of e)t.remove()}function ug(e,t){let n=t.createElement("style");return n.textContent=e,n}function jb(e,t,n,r){let o=e.head?.querySelectorAll(`style[${ed}="${t}"],link[${ed}="${t}"]`);if(!o||o.length===0)return!1;for(let i of o)i.removeAttribute(ed),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 nd(e,t){let n=t.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n}var od=(()=>{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,jb(n,r,this.inline,this.external)&&this.hosts.add(n.head)}addStyles(n,r){for(let o of n)this.addUsage(o,this.inline,ug);r?.forEach(o=>this.addUsage(o,this.external,nd))}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&&(lg(o.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])lg(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,ug(r,this.doc)));for(let[r,{elements:o}]of this.external)o.push(this.addElement(n,nd(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(ko),J(Oo,8),J(Ro))};static \u0275prov=se({token:e,factory:e.\u0275fac})}return e})(),td={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"},id=/%COMP%/g;var fg="%COMP%",Bb=`_nghost-${fg}`,Vb=`_ngcontent-${fg}`,Hb=!0,$b=new G("",{factory:()=>Hb}),Ub=new G("");function zb(e){return Vb.replace(id,e)}function Gb(e){return Bb.replace(id,e)}function pg(e,t){return t.map(n=>n.replace(id,e))}var sd=(()=>{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 Ca?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 At.Emulated:i=new Ca(c,l,r,this.appId,u,s,a,d,this.cssVarNamespace);break;case At.ShadowDom:return new ba(c,n,r,s,a,this.nonce,d,this.cssVarNamespace,l);case At.ExperimentalIsolatedShadowDom:return new ba(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(rd),J(vr),J(ko),J($b),J(Ve),J(Ue),J(Oo),J(Jt,8),J(Ub,8))};static \u0275prov=se({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(td[n]||n,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,n){(dg(t)?t.content:t).appendChild(n)}insertBefore(t,n,r){if(t){let o=dg(t)?t.content:t;if(r!=null&&r.parentNode!==o)throw new O(-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 O(-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=td[o];i?t.setAttributeNS(i,n,r):t.setAttribute(n,r)}else t.setAttribute(n,r)}removeAttribute(t,n,r){if(r){let o=td[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 O(-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 dg(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var ba=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=pg(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=nd(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?pg(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&&Ln.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Ca=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=zb(u),this.hostAttr=Gb(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 Ia=class e extends ri{supportsDOMEvents=!0;static makeCurrent(){Uu(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=Wb();return n==null?null:qb(n)}resetBaseElement(){li=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return ni(document.cookie,t)}},li=null;function Wb(){return li=li||document.head.querySelector("base"),li?li.getAttribute("href"):null}function qb(e){return new URL(e,document.baseURI).pathname}var hg=["alt","control","meta","shift"],Yb={"\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"},Zb={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},mg=(()=>{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."),hg.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=Yb[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"),hg.forEach(s=>{if(s!==o){let a=Zb[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=se({token:e,factory:e.\u0275fac})}return e})();async function ad(e,t,n){let r=B({rootComponent:e},Xb(t,n));return Bm(r)}function Xb(e,t){return{platformRef:t?.platformRef,appProviders:[...tC,...e?.providers??[]],platformProviders:eC}}function Kb(){Ia.makeCurrent()}function Qb(){return new pt}function Jb(){return cu(document),document}var eC=[{provide:Ro,useValue:cg},{provide:Fs,useValue:Kb,multi:!0},{provide:Ve,useFactory:Jb}];var tC=[{provide:To,useValue:"root"},{provide:pt,useFactory:Qb},{provide:xa,useClass:wa,multi:!0},{provide:xa,useClass:mg,multi:!0},sd,{provide:vr,useClass:od},{provide:od,useExisting:vr},rd,{provide:gr,useExisting:sd},[]];var wn={cursor:"Cursor",claude:"Claude Code",codex:"Codex",copilot:"GitHub Copilot"},so=["cursor","claude","codex","copilot"],gg={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."]},Ta=e=>"paths"in e?e.paths:"aliases"in e?e.aliases:[e.path],ui=e=>"description"in e?e.description:"",Sa=(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 cd(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 ao=class e{assetScope=Qe.required();static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ie({type:e,selectors:[["","appScope",""]],hostVars:2,hostBindings:function(n,r){n&2&&Xo("badge "+r.assetScope())},inputs:{assetScope:[1,"assetScope"]},decls:2,vars:3,template:function(n,r){n&1&&(ve(0,"i"),m(1)),n&2&&(Xo("dot "+r.assetScope()),g(),P(r.assetScope()==="user"?"User":"Project"))},encapsulation:2})},co=class e{client=Qe.required();active=Qe.required();hint=Qe("");icons=gg;text(){return`${wn[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()),de("aria-label",r.text()),Xo("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&&ve(0,"img",0),n&2&&re("src",r.icons[r.client()],vn)},encapsulation:2})};var nC=(e,t)=>t.id;function rC(e,t){if(e&1&&(M(0,"th",1),m(1),N()),e&2){let n=t.$implicit;g(),P(n)}}function oC(e,t){if(e&1&&(M(0,"td"),m(1),N()),e&2){let n=S().$implicit,r=S();g(),P(r.conditions(n))}}function iC(e,t){if(e&1&&(M(0,"td")(1,"span",8),m(2),N()()),e&2){let n=S().$implicit;g(2),P(n.mode)}}function sC(e,t){if(e&1&&(M(0,"td")(1,"span",9),m(2),N()(),M(3,"td"),m(4),N()),e&2){let n=S().$implicit;g(),Ne("neutral",n.status==="Disabled")("warn",n.status!=="Disabled"),g(),ge("\u25CB ",n.status),g(2),P(n.transport)}}function aC(e,t){if(e&1&&(M(0,"td"),m(1),N(),M(2,"td",10),m(3),N()),e&2){let n=S().$implicit;g(),P(n.kind),g(2),P(n.lines.toLocaleString())}}function cC(e,t){if(e&1&&Xe(0,"span",7),e&2){let n=t.$implicit,r=S().$implicit,o=S();pe("client",n)("active",r.clients.includes(n))("hint",o.invocation(r,n))}}function lC(e,t){if(e&1){let n=ue();M(0,"tr")(1,"td",2)(2,"button",3),be("click",function(){let o=V(n).$implicit,i=S();return H(i.selected.emit(o))}),m(3),N(),M(4,"p",4),m(5),N()(),ae(6,oC,2,1,"td"),ae(7,iC,3,1,"td"),ae(8,sC,5,6),ae(9,aC,4,2),M(10,"td"),Xe(11,"span",5),N(),M(12,"td")(13,"div",6),he(14,cC,1,3,"span",7,yt),N()()()}if(e&2){let n=t.$implicit,r=S();g(2),de("data-detail",n.id),g(),ge(" ",n.name," "),g(),pe("title","path"in n?n.path:n.paths.join(`
|
|
6
|
-
`)),g(),ge(" ",r.description(n)||r.paths(n)[0]," "),g(),ce("globs"in n?6:-1),g(),ce("mode"in n?7:-1),g(),ce("status"in n?8:-1),g(),ce("kind"in n?9:-1),g(2),pe("assetScope",n.scope),g(3),me(r.clients)}}var Ma=class e{rows=Qe.required();tab=Qe.required();selected=no();paths=Ta;description=ui;conditions=vg;invocation=Sa;clients=so;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),m(1),N(),M(2,"table")(3,"thead")(4,"tr"),he(5,rC,2,1,"th",1,yt),N()(),M(7,"tbody"),he(8,lC,16,9,"tr",null,nC),N()()),n&2&&(g(),P(r.help[r.tab()]),g(4),me(r.headers[r.tab()]),g(3),me(r.rows()))},dependencies:[ao,co],encapsulation:2})};var rn=class e{http=T(Da);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 Ac(this.http.request(t,n,{body:r,headers:{Authorization:`Bearer ${this.token}`}}))}catch(o){if(o instanceof En){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=se({token:e,factory:e.\u0275fac,providedIn:"root"})};var vt=class e{api=T(rn);data=$(null);tab=$("context");assetTab=we(()=>{let t=this.tab();return t==="optimizer"||t==="checklist"?"context":t});scope=$("all");client=$("all");search=$("");view=$("graph");skillsView=$("list");whiteboard=we(()=>this.tab()==="skills"&&this.skillsView()==="board");loading=$(!1);error=$("");selection=$(null);theme=$(localStorage.getItem("boyscout-theme")==="dark"?"dark":"light");rows=we(()=>{let t=this.data(),n=this.tab();if(n==="optimizer"||n==="checklist")return[];let r=t?n==="context"?t.nodes:t[n]:[];return cd(r,this.scope(),this.client(),this.search())});nodes=we(()=>cd(this.data()?.nodes??[],this.scope(),this.client(),this.search()));summary=we(()=>{if(this.error())return"Session unavailable";if(!this.data())return"Reading local assets";if(this.tab()==="checklist")return"Local installation checks";if(this.tab()==="optimizer")return"Static local estimates \xB7 One selected agent";let t=this.whiteboard()?this.data()?.skills??[]: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()}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.client.set("all"),this.search.set(""),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=se({token:e,factory:e.\u0275fac,providedIn:"root"})};var uC=(e,t)=>t.id;function dC(e,t){if(e&1&&(M(0,"p",6),m(1),N()),e&2){let n=t.$implicit;g(),P(n)}}function fC(e,t){if(e&1&&he(0,dC,2,1,"p",6,yt),e&2){let n=S(),r=S();me(r.paths(n))}}function pC(e,t){if(e&1&&(M(0,"p",6),m(1),N()),e&2){let n=t.$implicit;g(),P(n)}}function hC(e,t){if(e&1&&(M(0,"p"),m(1),N(),M(2,"h3"),m(3),N(),he(4,pC,2,1,"p",6,yt)),e&2){let n=S(),r=S();g(),P(r.description(n)),g(2),ge("Source ",r.paths(n).length>1?"paths":"path"),g(),me(r.paths(n))}}function mC(e,t){if(e&1&&(M(0,"div",5),Xe(1,"span",7),m(2),N()),e&2){let n=t.$implicit,r=S(),o=S();g(),pe("client",n)("active",r.clients.includes(n)),g(),ot("",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 gC(e,t){e&1&&(M(0,"p"),m(1," Includes a legacy .codex/skills discovery path. Client behavior can depend on its installed version. "),N())}function yC(e,t){if(e&1&&(M(0,"h3"),m(1,"Declared conditions"),N(),M(2,"p"),m(3),N(),M(4,"p"),m(5," File discovery does not confirm whether this rule loaded in an agent session. "),N()),e&2){let n=S(),r=S();g(3),P(r.ruleConditions(n))}}function vC(e,t){if(e&1&&(M(0,"h3"),m(1,"Connection status"),N(),M(2,"p"),m(3),N(),M(4,"p"),m(5),N(),M(6,"p"),m(7," Commands, arguments, server URLs, headers, and credentials are intentionally omitted. "),N()),e&2){let n=S();g(3),ot(" ",n.status,". ",n.status==="Disabled"?"Disabled in this file.":"Check the client\u2019s MCP panel to confirm its live connection."," "),g(2),P(n.origin)}}function EC(e,t){if(e&1&&(M(0,"option",20),m(1),N()),e&2){let n=t.$implicit;pe("value",n.id),g(),P(n.path)}}function DC(e,t){if(e&1){let n=ue();M(0,"label",9),m(1,"Source file"),M(2,"select",19,1),be("change",function(){V(n);let o=Ke(3),i=S(4);return H(i.source(o.value))}),he(4,EC,2,2,"option",20,uC),N()()}if(e&2){let n=S(4);g(2),pe("value",n.targetId())("disabled",n.mode()!=="preview"),g(2),me(n.targets())}}function _C(e,t){if(e&1){let n=ue();ae(0,DC,6,2,"label",9),M(1,"button",10),be("click",function(){V(n);let o=S(3);return H(o.edit())}),m(2," Edit file "),N(),M(3,"button",11),be("click",function(){V(n);let o=S(3);return H(o.confirmDelete())}),m(4," Delete file "),N(),M(5,"div",12)(6,"p"),m(7),N(),M(8,"button",13),be("click",function(){V(n);let o=S(3);return H(o.remove())}),m(9," Delete permanently"),N(),M(10,"button",13),be("click",function(){V(n);let o=S(3);return H(o.cancel())}),m(11," Cancel "),N()(),M(12,"form",14),be("submit",function(o){V(n);let i=S(3);return H(i.save(o))}),M(13,"textarea",15,0),be("input",function(){V(n);let o=Ke(14),i=S(3);return H(i.draft.set(o.value))}),N(),M(15,"div",16)(16,"button",17),m(17,"Save"),N(),M(18,"button",13),be("click",function(){V(n);let o=S(3);return H(o.cancel())}),m(19," Cancel "),N()()(),M(20,"p",18),m(21),N()}if(e&2){let n=S(2),r=S();ce(r.targets().length>1?0:-1),g(),pe("disabled",!r.file())("hidden",r.mode()!=="preview"),g(2),pe("disabled",!r.file())("hidden",r.mode()!=="preview"||!r.target()?.deletable),g(2),pe("hidden",r.mode()!=="delete"),g(2),ge("Delete ",r.target()?.path," permanently?"),g(),pe("disabled",r.busy()),g(2),pe("disabled",r.busy()),g(2),pe("hidden",r.mode()!=="edit"),g(),pe("value",r.draft()),de("aria-label","Edit "+n.name),g(3),pe("disabled",r.busy()),g(2),pe("disabled",r.busy()),g(3),P(r.status())}}function wC(e,t){if(e&1&&(M(0,"h3"),m(1,"File preview"),N(),M(2,"pre",8),m(3),N(),ae(4,_C,22,15)),e&2){let n=S(2);g(2),pe("hidden",n.mode()==="edit"),g(),P(n.preview()),g(),ce(n.targets().length?4:-1)}}function bC(e,t){if(e&1&&(Xe(0,"span",4),M(1,"h2"),m(2),N(),ae(3,fC,2,0)(4,hC,6,2),M(5,"h3"),m(6,"Client discovery"),N(),he(7,mC,3,4,"div",5,yt),ae(9,gC,2,0,"p"),ae(10,yC,6,1),ae(11,vC,8,3)(12,wC,5,3)),e&2){let n=t,r=S();pe("assetScope",n.scope),g(2),P(n.name),g(),ce(r.state.selection()?.tab==="context"?3:4),g(4),me(r.clients),g(2),ce("legacy"in n&&n.legacy&&r.state.selection()?.tab==="skills"?9:-1),g(),ce(r.state.selection()?.tab==="rules"?10:-1),g(),ce("status"in n?11:12)}}var Na=class e{state=T(vt);api=T(rn);element=T(yn);paths=Ta;clients=so;labels=wn;invocation=Sa;row=we(()=>this.state.selection()?.row??null);targets=we(()=>{let t=this.row();return t&&"editTargets"in t?t.editTargets:[]});targetId=$("");target=we(()=>this.targets().find(t=>t.id===this.targetId())??this.targets()[0]);preview=$("Loading\u2026");file=$(null);mode=$("preview");draft=$("");status=$("");busy=$(!1);sequence=0;lastFocus=null;focusTimer;constructor(){Xt(()=>{let t=this.state.selection();Bn(()=>this.show(t))}),T(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),be("click",function(){return r.close()}),m(1,` \xD7
|
|
7
|
-
`),N(),M(2,"div",3),ae(3,bC,13,6),N()),n&2){let o;g(3),ce((o=r.row())?3:-1,o)}},dependencies:[ao,co],encapsulation:2})};var Aa=class e{state=T(vt);query=$("");timeout;constructor(){Xt(()=>{this.state.tab(),clearTimeout(this.timeout),this.query.set("")}),T(ke).onDestroy(()=>clearTimeout(this.timeout))}search(t){this.query.set(t),clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.state.search.set(t),130)}client(t){this.state.client.set(so.find(n=>n===t)??"all")}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ie({type:e,selectors:[["div","appFilters",""]],decls:28,vars:12,consts:[["clientFilter",""],["searchInput",""],["role","group","aria-label","Asset scope",1,"scope-tabs"],["data-scope","all",3,"click"],["data-scope","project",3,"click"],[1,"dot","project"],["data-scope","user",3,"click"],[1,"dot","user"],[1,"filters"],["id","client-filter","aria-label","Filter by client",3,"change","value"],["value","all"],["value","cursor"],["value","claude"],["value","codex"],["value","copilot"],[1,"search"],["id","search","aria-label","Search assets",3,"input","value","placeholder"]],template:function(n,r){if(n&1){let o=ue();_(0,"div",2)(1,"button",3),Z("click",function(){return r.state.scope.set("all")}),m(2," All assets "),C(),_(3,"button",4),Z("click",function(){return r.state.scope.set("project")}),ve(4,"i",5),m(5,"Project (shared with your team) "),C(),_(6,"button",6),Z("click",function(){return r.state.scope.set("user")}),ve(7,"i",7),m(8,"On Your Machine (not shared with your team) "),C()(),_(9,"div",8)(10,"select",9,0),Z("change",function(){V(o);let s=Ke(11);return H(r.client(s.value))}),_(12,"option",10),m(13,"All clients"),C(),_(14,"option",11),m(15,"Cursor"),C(),_(16,"option",12),m(17,"Claude Code"),C(),_(18,"option",13),m(19,"Codex"),C(),_(20,"option",14),m(21,"GitHub Copilot"),C()(),_(22,"label",15),m(23,"\u2315"),_(24,"input",16,1),Z("input",function(){V(o);let s=Ke(25);return H(r.search(s.value))}),C(),_(26,"kbd"),m(27,"/"),C()()()}n&2&&(g(),Ne("selected",r.state.scope()==="all"),de("aria-pressed",r.state.scope()==="all"),g(2),Ne("selected",r.state.scope()==="project"),de("aria-pressed",r.state.scope()==="project"),g(3),Ne("selected",r.state.scope()==="user"),de("aria-pressed",r.state.scope()==="user"),g(4),re("value",r.state.client()),g(14),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 CC={value:()=>{}};function Dg(){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 ka(n)}function ka(e){this._=e}function xC(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}})}ka.prototype=Dg.prototype={constructor:ka,on:function(e,t){var n=this._,r=xC(e+"",n),o,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((o=(e=r[i]).type)&&(o=IC(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]=Eg(n[o],e.name,t);else if(t==null)for(o in n)n[o]=Eg(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 ka(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 IC(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function Eg(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=CC,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var bn=Dg;var Ra="http://www.w3.org/1999/xhtml",ld={svg:"http://www.w3.org/2000/svg",xhtml:Ra,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Cn(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),ld.hasOwnProperty(t)?{space:ld[t],local:e}:e}function TC(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Ra&&t.documentElement.namespaceURI===Ra?t.createElement(e):t.createElementNS(n,e)}}function SC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Oa(e){var t=Cn(e);return(t.local?SC:TC)(t)}function MC(){}function Dr(e){return e==null?MC:function(){return this.querySelector(e)}}function _g(e){typeof e!="function"&&(e=Dr(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 Te(r,this._parents)}function ud(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function NC(){return[]}function di(e){return e==null?NC:function(){return this.querySelectorAll(e)}}function AC(e){return function(){return ud(e.apply(this,arguments))}}function wg(e){typeof e=="function"?e=AC(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 Te(r,o)}function fi(e){return function(){return this.matches(e)}}function Pa(e){return function(t){return t.matches(e)}}var kC=Array.prototype.find;function RC(e){return function(){return kC.call(this.children,e)}}function OC(){return this.firstElementChild}function bg(e){return this.select(e==null?OC:RC(typeof e=="function"?e:Pa(e)))}var PC=Array.prototype.filter;function FC(){return Array.from(this.children)}function LC(e){return function(){return PC.call(this.children,e)}}function Cg(e){return this.selectAll(e==null?FC:LC(typeof e=="function"?e:Pa(e)))}function xg(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 Te(r,this._parents)}function Fa(e){return new Array(e.length)}function Ig(){return new Te(this._enter||this._groups.map(Fa),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 Tg(e){return function(){return e}}function jC(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 BC(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 VC(e){return e.__data__}function Sg(e,t){if(!arguments.length)return Array.from(this,VC);var n=t?BC:jC,r=this._parents,o=this._groups;typeof e!="function"&&(e=Tg(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=HC(e.call(u,u&&u.__data__,l,r)),y=f.length,D=a[l]=new Array(y),v=s[l]=new Array(y),E=c[l]=new Array(p);n(u,d,D,v,E,f,t);for(var h=0,x=0,w,A;h<y;++h)if(w=D[h]){for(h>=x&&(x=h+1);!(A=v[x])&&++x<y;);w._next=A||null}}return s=new Te(s,r),s._enter=a,s._exit=c,s}function HC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Mg(){return new Te(this._exit||this._groups.map(Fa),this._parents)}function Ng(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 Ag(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,y=0;y<d;++y)(f=l[y]||u[y])&&(p[y]=f);for(;c<o;++c)a[c]=n[c];return new Te(a,this._parents)}function kg(){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=$C);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 Te(o,this._parents).order()}function $C(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Og(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Pg(){return Array.from(this)}function Fg(){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 Lg(){let e=0;for(let t of this)++e;return e}function jg(){return!this.node()}function Bg(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 UC(e){return function(){this.removeAttribute(e)}}function zC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function GC(e,t){return function(){this.setAttribute(e,t)}}function WC(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function qC(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function YC(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 Vg(e,t){var n=Cn(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?zC:UC:typeof t=="function"?n.local?YC:qC:n.local?WC:GC)(n,t))}function La(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ZC(e){return function(){this.style.removeProperty(e)}}function XC(e,t,n){return function(){this.style.setProperty(e,t,n)}}function KC(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Hg(e,t,n){return arguments.length>1?this.each((t==null?ZC:typeof t=="function"?KC:XC)(e,t,n??"")):Hn(this.node(),e)}function Hn(e,t){return e.style.getPropertyValue(t)||La(e).getComputedStyle(e,null).getPropertyValue(t)}function QC(e){return function(){delete this[e]}}function JC(e,t){return function(){this[e]=t}}function ex(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function $g(e,t){return arguments.length>1?this.each((t==null?QC:typeof t=="function"?ex:JC)(e,t)):this.node()[e]}function Ug(e){return e.trim().split(/^|\s+/)}function dd(e){return e.classList||new zg(e)}function zg(e){this._node=e,this._names=Ug(e.getAttribute("class")||"")}zg.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 Gg(e,t){for(var n=dd(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function Wg(e,t){for(var n=dd(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function tx(e){return function(){Gg(this,e)}}function nx(e){return function(){Wg(this,e)}}function rx(e,t){return function(){(t.apply(this,arguments)?Gg:Wg)(this,e)}}function qg(e,t){var n=Ug(e+"");if(arguments.length<2){for(var r=dd(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?rx:t?tx:nx)(n,t))}function ox(){this.textContent=""}function ix(e){return function(){this.textContent=e}}function sx(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Yg(e){return arguments.length?this.each(e==null?ox:(typeof e=="function"?sx:ix)(e)):this.node().textContent}function ax(){this.innerHTML=""}function cx(e){return function(){this.innerHTML=e}}function lx(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Zg(e){return arguments.length?this.each(e==null?ax:(typeof e=="function"?lx:cx)(e)):this.node().innerHTML}function ux(){this.nextSibling&&this.parentNode.appendChild(this)}function Xg(){return this.each(ux)}function dx(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Kg(){return this.each(dx)}function Qg(e){var t=typeof e=="function"?e:Oa(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function fx(){return null}function Jg(e,t){var n=typeof e=="function"?e:Oa(e),r=t==null?fx:typeof t=="function"?t:Dr(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function px(){var e=this.parentNode;e&&e.removeChild(this)}function ey(){return this.each(px)}function hx(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function mx(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ty(e){return this.select(e?mx:hx)}function ny(e){return arguments.length?this.property("__data__",e):this.node().__data__}function gx(e){return function(t){e.call(this,t,this.__data__)}}function yx(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 vx(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 Ex(e,t,n){return function(){var r=this.__on,o,i=gx(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 ry(e,t,n){var r=yx(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?Ex:vx,o=0;o<i;++o)this.each(a(r[o],t,n));return this}function oy(e,t,n){var r=La(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 Dx(e,t){return function(){return oy(this,e,t)}}function _x(e,t){return function(){return oy(this,e,t.apply(this,arguments))}}function iy(e,t){return this.each((typeof t=="function"?_x:Dx)(e,t))}function*sy(){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 fd=[null];function Te(e,t){this._groups=e,this._parents=t}function ay(){return new Te([[document.documentElement]],fd)}function wx(){return this}Te.prototype=ay.prototype={constructor:Te,select:_g,selectAll:wg,selectChild:bg,selectChildren:Cg,filter:xg,data:Sg,enter:Ig,exit:Mg,join:Ng,merge:Ag,selection:wx,order:kg,sort:Rg,call:Og,nodes:Pg,node:Fg,size:Lg,empty:jg,each:Bg,attr:Vg,style:Hg,property:$g,classed:qg,text:Yg,html:Zg,raise:Xg,lower:Kg,append:Qg,insert:Jg,remove:ey,clone:ty,datum:ny,on:ry,dispatch:iy,[Symbol.iterator]:sy};var xn=ay;function Je(e){return typeof e=="string"?new Te([[document.querySelector(e)]],[document.documentElement]):new Te([[e]],fd)}function cy(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Et(e,t){if(e=cy(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 ly={passive:!1},_r={capture:!0,passive:!1};function ja(e){e.stopImmediatePropagation()}function $n(e){e.preventDefault(),e.stopImmediatePropagation()}function hi(e){var t=e.document.documentElement,n=Je(e).on("dragstart.drag",$n,_r);"onselectstart"in t?n.on("selectstart.drag",$n,_r):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function mi(e,t){var n=e.document.documentElement,r=Je(e).on("dragstart.drag",null);t&&(r.on("click.drag",$n,_r),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 bx(e){return!e.ctrlKey&&!e.button}function Cx(){return this.parentNode}function xx(e,t){return t??{x:e.x,y:e.y}}function Ix(){return navigator.maxTouchPoints||"ontouchstart"in this}function pd(){var e=bx,t=Cx,n=xx,r=Ix,o={},i=bn("start","drag","end"),s=0,a,c,l,u,d=0;function p(w){w.on("mousedown.drag",f).filter(r).on("touchstart.drag",v).on("touchmove.drag",E,ly).on("touchend.drag touchcancel.drag",h).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(w,A){if(!(u||!e.call(this,w,A))){var F=x(this,t.call(this,w,A),w,A,"mouse");F&&(Je(w.view).on("mousemove.drag",y,_r).on("mouseup.drag",D,_r),hi(w.view),ja(w),l=!1,a=w.clientX,c=w.clientY,F("start",w))}}function y(w){if($n(w),!l){var A=w.clientX-a,F=w.clientY-c;l=A*A+F*F>d}o.mouse("drag",w)}function D(w){Je(w.view).on("mousemove.drag mouseup.drag",null),mi(w.view,l),$n(w),o.mouse("end",w)}function v(w,A){if(e.call(this,w,A)){var F=w.changedTouches,z=t.call(this,w,A),W=F.length,ee,ie;for(ee=0;ee<W;++ee)(ie=x(this,z,w,A,F[ee].identifier,F[ee]))&&(ja(w),ie("start",w,F[ee]))}}function E(w){var A=w.changedTouches,F=A.length,z,W;for(z=0;z<F;++z)(W=o[A[z].identifier])&&($n(w),W("drag",w,A[z]))}function h(w){var A=w.changedTouches,F=A.length,z,W;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),z=0;z<F;++z)(W=o[A[z].identifier])&&(ja(w),W("end",w,A[z]))}function x(w,A,F,z,W,ee){var ie=i.copy(),Ee=Et(ee||F,A),Fe,Le,b;if((b=n.call(w,new yi("beforestart",{sourceEvent:F,target:p,identifier:W,active:s,x:Ee[0],y:Ee[1],dx:0,dy:0,dispatch:ie}),z))!=null)return Fe=b.x-Ee[0]||0,Le=b.y-Ee[1]||0,function k(I,R,q){var X=Ee,K;switch(I){case"start":o[W]=k,K=s++;break;case"end":delete o[W],--s;case"drag":Ee=Et(q||R,A),K=s;break}ie.call(I,w,new yi(I,{sourceEvent:R,subject:b,target:p,identifier:W,active:K,x:Ee[0]+Fe,y:Ee[1]+Le,dx:Ee[0]-X[0],dy:Ee[1]-X[1],dispatch:ie}),z)}}return p.filter=function(w){return arguments.length?(e=typeof w=="function"?w:gi(!!w),p):e},p.container=function(w){return arguments.length?(t=typeof w=="function"?w:gi(w),p):t},p.subject=function(w){return arguments.length?(n=typeof w=="function"?w:gi(w),p):n},p.touchable=function(w){return arguments.length?(r=typeof w=="function"?w:gi(!!w),p):r},p.on=function(){var w=i.on.apply(i,arguments);return w===i?p:w},p.clickDistance=function(w){return arguments.length?(d=(w=+w)*w,p):Math.sqrt(d)},p}function Ba(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function hd(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Di(){}var vi=.7,$a=1/vi,lo="\\s*([+-]?\\d+)\\s*",Ei="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",on="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Tx=/^#([0-9a-f]{3,8})$/,Sx=new RegExp(`^rgb\\(${lo},${lo},${lo}\\)$`),Mx=new RegExp(`^rgb\\(${on},${on},${on}\\)$`),Nx=new RegExp(`^rgba\\(${lo},${lo},${lo},${Ei}\\)$`),Ax=new RegExp(`^rgba\\(${on},${on},${on},${Ei}\\)$`),kx=new RegExp(`^hsl\\(${Ei},${on},${on}\\)$`),Rx=new RegExp(`^hsla\\(${Ei},${on},${on},${Ei}\\)$`),uy={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};Ba(Di,Un,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:dy,formatHex:dy,formatHex8:Ox,formatHsl:Px,formatRgb:fy,toString:fy});function dy(){return this.rgb().formatHex()}function Ox(){return this.rgb().formatHex8()}function Px(){return vy(this).formatHsl()}function fy(){return this.rgb().formatRgb()}function Un(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Tx.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?py(t):n===3?new it(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Va(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Va(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=Sx.exec(e))?new it(t[1],t[2],t[3],1):(t=Mx.exec(e))?new it(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Nx.exec(e))?Va(t[1],t[2],t[3],t[4]):(t=Ax.exec(e))?Va(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=kx.exec(e))?gy(t[1],t[2]/100,t[3]/100,1):(t=Rx.exec(e))?gy(t[1],t[2]/100,t[3]/100,t[4]):uy.hasOwnProperty(e)?py(uy[e]):e==="transparent"?new it(NaN,NaN,NaN,0):null}function py(e){return new it(e>>16&255,e>>8&255,e&255,1)}function Va(e,t,n,r){return r<=0&&(e=t=n=NaN),new it(e,t,n,r)}function Fx(e){return e instanceof Di||(e=Un(e)),e?(e=e.rgb(),new it(e.r,e.g,e.b,e.opacity)):new it}function uo(e,t,n,r){return arguments.length===1?Fx(e):new it(e,t,n,r??1)}function it(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Ba(it,uo,hd(Di,{brighter(e){return e=e==null?$a:Math.pow($a,e),new it(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?vi:Math.pow(vi,e),new it(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new it(br(this.r),br(this.g),br(this.b),Ua(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:hy,formatHex:hy,formatHex8:Lx,formatRgb:my,toString:my}));function hy(){return`#${wr(this.r)}${wr(this.g)}${wr(this.b)}`}function Lx(){return`#${wr(this.r)}${wr(this.g)}${wr(this.b)}${wr((isNaN(this.opacity)?1:this.opacity)*255)}`}function my(){let e=Ua(this.opacity);return`${e===1?"rgb(":"rgba("}${br(this.r)}, ${br(this.g)}, ${br(this.b)}${e===1?")":`, ${e})`}`}function Ua(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function br(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function wr(e){return e=br(e),(e<16?"0":"")+e.toString(16)}function gy(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ot(e,t,n,r)}function vy(e){if(e instanceof Ot)return new Ot(e.h,e.s,e.l,e.opacity);if(e instanceof Di||(e=Un(e)),!e)return new Ot;if(e instanceof Ot)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 Ot(s,a,c,e.opacity)}function Ey(e,t,n,r){return arguments.length===1?vy(e):new Ot(e,t,n,r??1)}function Ot(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ba(Ot,Ey,hd(Di,{brighter(e){return e=e==null?$a:Math.pow($a,e),new Ot(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?vi:Math.pow(vi,e),new Ot(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 it(md(e>=240?e-240:e+120,o,r),md(e,o,r),md(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Ot(yy(this.h),Ha(this.s),Ha(this.l),Ua(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=Ua(this.opacity);return`${e===1?"hsl(":"hsla("}${yy(this.h)}, ${Ha(this.s)*100}%, ${Ha(this.l)*100}%${e===1?")":`, ${e})`}`}}));function yy(e){return e=(e||0)%360,e<0?e+360:e}function Ha(e){return Math.max(0,Math.min(1,e||0))}function md(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 gd(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 Dy(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 gd((n-r/t)*t,s,o,i,a)}}function _y(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 gd((n-r/t)*t,o,i,s,a)}}var yd=e=>()=>e;function jx(e,t){return function(n){return e+n*t}}function Bx(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 wy(e){return(e=+e)==1?za:function(t,n){return n-t?Bx(t,n,e):yd(isNaN(t)?n:t)}}function za(e,t){var n=t-e;return n?jx(e,n):yd(isNaN(e)?t:e)}var Ga=(function e(t){var n=wy(t);function r(o,i){var s=n((o=uo(o)).r,(i=uo(i)).r),a=n(o.g,i.g),c=n(o.b,i.b),l=za(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 by(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=uo(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 Vx=by(Dy),Hx=by(_y);function Dt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Ed=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,vd=new RegExp(Ed.source,"g");function $x(e){return function(){return e}}function Ux(e){return function(t){return e(t)+""}}function Dd(e,t){var n=Ed.lastIndex=vd.lastIndex=0,r,o,i,s=-1,a=[],c=[];for(e=e+"",t=t+"";(r=Ed.exec(e))&&(o=vd.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:Dt(r,o)})),n=vd.lastIndex;return n<t.length&&(i=t.slice(n),a[s]?a[s]+=i:a[++s]=i),a.length<2?c[0]?Ux(c[0].x):$x(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 Cy=180/Math.PI,Wa={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function _d(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)*Cy,skewX:Math.atan(c)*Cy,scaleX:s,scaleY:a}}var qa;function xy(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Wa:_d(t.a,t.b,t.c,t.d,t.e,t.f)}function Iy(e){return e==null?Wa:(qa||(qa=document.createElementNS("http://www.w3.org/2000/svg","g")),qa.setAttribute("transform",e),(e=qa.transform.baseVal.consolidate())?(e=e.matrix,_d(e.a,e.b,e.c,e.d,e.e,e.f)):Wa)}function Ty(e,t,n,r){function o(l){return l.length?l.pop()+" ":""}function i(l,u,d,p,f,y){if(l!==d||u!==p){var D=f.push("translate(",null,t,null,n);y.push({i:D-4,x:Dt(l,d)},{i:D-2,x:Dt(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:Dt(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:Dt(l,u)}):u&&d.push(o(d)+"skewX("+u+r)}function c(l,u,d,p,f,y){if(l!==d||u!==p){var D=f.push(o(f)+"scale(",null,",",null,")");y.push({i:D-4,x:Dt(l,d)},{i:D-2,x:Dt(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 y=-1,D=p.length,v;++y<D;)d[(v=p[y]).i]=v.x(f);return d.join("")}}}var wd=Ty(xy,"px, ","px)","deg)"),bd=Ty(Iy,", ",")",")");var zx=1e-12;function Sy(e){return((e=Math.exp(e))+1/e)/2}function Gx(e){return((e=Math.exp(e))-1/e)/2}function Wx(e){return((e=Math.exp(2*e))-1)/(e+1)}var Cd=(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,y=d-c,D=f*f+y*y,v,E;if(D<zx)E=Math.log(p/l)/t,v=function(z){return[a+z*f,c+z*y,l*Math.exp(t*z*E)]};else{var h=Math.sqrt(D),x=(p*p-l*l+r*D)/(2*l*n*h),w=(p*p-l*l-r*D)/(2*p*n*h),A=Math.log(Math.sqrt(x*x+1)-x),F=Math.log(Math.sqrt(w*w+1)-w);E=(F-A)/t,v=function(z){var W=z*E,ee=Sy(A),ie=l/(n*h)*(ee*Wx(t*W+A)-Gx(A));return[a+ie*f,c+ie*y,l*ee/Sy(t*W+A)]}}return v.duration=E*1e3*t/Math.SQRT2,v}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 fo=0,wi=0,_i=0,Ny=1e3,Ya,bi,Za=0,Cr=0,Xa=0,Ci=typeof performance=="object"&&performance.now?performance:Date,Ay=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ii(){return Cr||(Ay(qx),Cr=Ci.now()+Xa)}function qx(){Cr=0}function xi(){this._call=this._time=this._next=null}xi.prototype=po.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:Ya=this,bi=this),this._call=e,this._time=n,xd()},stop:function(){this._call&&(this._call=null,this._time=1/0,xd())}};function po(e,t,n){var r=new xi;return r.restart(e,t,n),r}function ky(){Ii(),++fo;for(var e=Ya,t;e;)(t=Cr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--fo}function My(){Cr=(Za=Ci.now())+Xa,fo=wi=0;try{ky()}finally{fo=0,Zx(),Cr=0}}function Yx(){var e=Ci.now(),t=e-Za;t>Ny&&(Xa-=t,Za=e)}function Zx(){for(var e,t=Ya,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:Ya=n);bi=e,xd(r)}function xd(e){if(!fo){wi&&(wi=clearTimeout(wi));var t=e-Cr;t>24?(e<1/0&&(wi=setTimeout(My,e-Ci.now()-Xa)),_i&&(_i=clearInterval(_i))):(_i||(Za=Ci.now(),_i=setInterval(Yx,Ny)),fo=1,Ay(My))}}function Ka(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 Xx=bn("start","end","cancel","interrupt"),Kx=[],Py=0,Ry=1,Ja=2,Qa=3,Oy=4,ec=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;Qx(e,n,{name:t,index:r,group:o,on:Xx,tween:Kx,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Py})}function Si(e,t){var n=Re(e,t);if(n.state>Py)throw new Error("too late; already scheduled");return n}function $e(e,t){var n=Re(e,t);if(n.state>Qa)throw new Error("too late; already running");return n}function Re(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Qx(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=po(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===Qa)return Ka(s);f.state===Oy?(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(Ka(function(){n.state===Qa&&(n.state=Oy,n.timer.restart(a,n.delay,n.time),a(l))}),n.state=Ja,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Ja){for(n.state=Qa,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=ec,1),d=-1,p=o.length;++d<p;)o[d].call(e,u);n.state===ec&&(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>Ja&&r.state<ec,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 Fy(e){return this.each(function(){Gn(this,e)})}function Jx(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 eI(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 Ly(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Re(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?Jx:eI)(n,e,t))}function ho(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 Re(o,r).value[t]}}function tc(e,t){var n;return(typeof t=="number"?Dt:t instanceof Un?Ga:(n=Un(t))?(t=n,Ga):Dd)(e,t)}function tI(e){return function(){this.removeAttribute(e)}}function nI(e){return function(){this.removeAttributeNS(e.space,e.local)}}function rI(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 oI(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 iI(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 sI(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 jy(e,t){var n=Cn(e),r=n==="transform"?bd:tc;return this.attrTween(e,typeof t=="function"?(n.local?sI:iI)(n,r,ho(this,"attr."+e,t)):t==null?(n.local?nI:tI)(n):(n.local?oI:rI)(n,r,t))}function aI(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function cI(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function lI(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&cI(e,i)),n}return o._value=t,o}function uI(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&aI(e,i)),n}return o._value=t,o}function By(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=Cn(e);return this.tween(n,(r.local?lI:uI)(r,t))}function dI(e,t){return function(){Si(this,e).delay=+t.apply(this,arguments)}}function fI(e,t){return t=+t,function(){Si(this,e).delay=t}}function Vy(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?dI:fI)(t,e)):Re(this.node(),t).delay}function pI(e,t){return function(){$e(this,e).duration=+t.apply(this,arguments)}}function hI(e,t){return t=+t,function(){$e(this,e).duration=t}}function Hy(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?pI:hI)(t,e)):Re(this.node(),t).duration}function mI(e,t){if(typeof t!="function")throw new Error;return function(){$e(this,e).ease=t}}function $y(e){var t=this._id;return arguments.length?this.each(mI(t,e)):Re(this.node(),t).ease}function gI(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;$e(this,e).ease=n}}function Uy(e){if(typeof e!="function")throw new Error;return this.each(gI(this._id,e))}function zy(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 et(r,this._parents,this._name,this._id)}function Gy(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 et(s,this._parents,this._name,this._id)}function yI(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 vI(e,t,n){var r,o,i=yI(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 Wy(e,t){var n=this._id;return arguments.length<2?Re(this.node(),n).on.on(e):this.each(vI(n,e,t))}function EI(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function qy(){return this.on("end.remove",EI(this._id))}function Yy(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Dr(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,Re(u,n)));return new et(i,this._parents,t,n)}function Zy(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,y=Re(u,n),D=0,v=p.length;D<v;++D)(f=p[D])&&zn(f,t,n,D,p,y);i.push(p),s.push(u)}return new et(i,s,t,n)}var DI=xn.prototype.constructor;function Xy(){return new DI(this._groups,this._parents)}function _I(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 Ky(e){return function(){this.style.removeProperty(e)}}function wI(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 bI(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 CI(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=Ky(t)):void 0;(l!==n||o!==u)&&(r=(n=l).copy()).on(s,o=u),c.on=r}}function Qy(e,t,n){var r=(e+="")=="transform"?wd:tc;return t==null?this.styleTween(e,_I(e,r)).on("end.style."+e,Ky(e)):typeof t=="function"?this.styleTween(e,bI(e,r,ho(this,"style."+e,t))).each(CI(this._id,e)):this.styleTween(e,wI(e,r,t),n).on("end.style."+e,null)}function xI(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function II(e,t,n){var r,o;function i(){var s=t.apply(this,arguments);return s!==o&&(r=(o=s)&&xI(e,s,n)),r}return i._value=t,i}function Jy(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,II(e,t,n??""))}function TI(e){return function(){this.textContent=e}}function SI(e){return function(){var t=e(this);this.textContent=t??""}}function ev(e){return this.tween("text",typeof e=="function"?SI(ho(this,"text",e)):TI(e==null?"":e+""))}function MI(e){return function(t){this.textContent=e.call(this,t)}}function NI(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&MI(o)),t}return r._value=e,r}function tv(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,NI(e))}function nv(){for(var e=this._name,t=this._id,n=nc(),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=Re(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 et(r,this._parents,e,n)}function rv(){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 AI=0;function et(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function ov(e){return xn().transition(e)}function nc(){return++AI}var In=xn.prototype;et.prototype=ov.prototype={constructor:et,select:Yy,selectAll:Zy,selectChild:In.selectChild,selectChildren:In.selectChildren,filter:zy,merge:Gy,selection:Xy,transition:nv,call:In.call,nodes:In.nodes,node:In.node,size:In.size,empty:In.empty,each:In.each,on:Wy,attr:jy,attrTween:By,style:Qy,styleTween:Jy,text:ev,textTween:tv,remove:qy,tween:Ly,delay:Vy,duration:Hy,ease:$y,easeVarying:Uy,end:rv,[Symbol.iterator]:In[Symbol.iterator]};function rc(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var kI={time:null,delay:0,duration:250,ease:rc};function RI(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 iv(e){var t,n;e instanceof et?(t=e._id,e=e._name):(t=nc(),(n=kI).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||RI(c,t));return new et(r,this._parents,e,t)}xn.prototype.interrupt=Fy;xn.prototype.transition=iv;var{abs:k4,max:R4,min:O4}=Math;function sv(e){return[+e[0],+e[1]]}function OI(e){return[sv(e[0]),sv(e[1])]}var P4={name:"x",handles:["w","e"].map(Id),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]]}},F4={name:"y",handles:["n","s"].map(Id),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]]}},L4={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Id),input:function(e){return e==null?null:OI(e)},output:function(e){return e}};function Id(e){return{type:e}}function av(e){let t=+this._x.call(null,e),n=+this._y.call(null,e);return cv(this.cover(t,n),t,n,e)}function cv(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,y,D,v,E,h;if(!i)return e._root=s,e;for(;i.length;)if((D=t>=(d=(a+l)/2))?a=d:l=d,(v=n>=(p=(c+u)/2))?c=p:u=p,o=i,!(i=i[E=v<<1|D]))return o[E]=s,e;if(f=+e._x.call(null,i.data),y=+e._y.call(null,i.data),t===f&&n===y)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,(v=n>=(p=(c+u)/2))?c=p:u=p;while((E=v<<1|D)===(h=(y>=p)<<1|f>=d));return o[h]=i,o[E]=s,e}function lv(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)cv(this,s[n],a[n],e[n]);return this}function uv(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 dv(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function fv(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 pv(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,y,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);y=p.pop();)if(!(!(f=y.node)||(s=y.x0)>u||(a=y.y0)>d||(c=y.x1)<o||(l=y.y1)<i))if(f.length){var v=(s+c)/2,E=(a+l)/2;p.push(new Pe(f[3],v,E,c,l),new Pe(f[2],s,E,v,l),new Pe(f[1],v,a,c,E),new Pe(f[0],s,a,v,E)),(D=(t>=E)<<1|e>=v)&&(y=p[p.length-1],p[p.length-1]=p[p.length-1-D],p[p.length-1-D]=y)}else{var h=e-+this._x.call(null,f.data),x=t-+this._y.call(null,f.data),w=h*h+x*x;if(w<n){var A=Math.sqrt(n=w);o=e-A,i=t-A,u=e+A,d=t+A,r=f.data}}return r}function hv(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,y,D,v,E;if(!n)return this;if(n.length)for(;;){if((y=u>=(p=(s+c)/2))?s=p:c=p,(D=d>=(f=(a+l)/2))?a=f:l=f,t=n,!(n=n[v=D<<1|y]))return this;if(!n.length)break;(t[v+1&3]||t[v+2&3]||t[v+3&3])&&(r=t,E=v)}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[v]=i:delete t[v],(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 mv(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function gv(){return this._root}function yv(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function vv(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 Ev(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 Dv(e){return e[0]}function _v(e){return arguments.length?(this._x=e,this):this._x}function wv(e){return e[1]}function bv(e){return arguments.length?(this._y=e,this):this._y}function xr(e,t,n){var r=new Td(t??Dv,n??wv,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function Td(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 Cv(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var tt=xr.prototype=Td.prototype;tt.copy=function(){var e=new Td(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=Cv(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]=Cv(r));return e};tt.add=av;tt.addAll=lv;tt.cover=uv;tt.data=dv;tt.extent=fv;tt.find=pv;tt.remove=hv;tt.removeAll=mv;tt.root=gv;tt.size=yv;tt.visit=vv;tt.visitAfter=Ev;tt.x=_v;tt.y=bv;function Ae(e){return function(){return e}}function Pt(e){return(e()-.5)*1e-6}function PI(e){return e.x+e.vx}function FI(e){return e.y+e.vy}function Sd(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,y,D,v,E=0;E<i;++E)for(d=xr(t,PI,FI).visitAfter(a),l=0;l<u;++l)p=t[l],D=n[p.index],v=D*D,f=p.x+p.vx,y=p.y+p.vy,d.visit(h);function h(x,w,A,F,z){var W=x.data,ee=x.r,ie=D+ee;if(W){if(W.index>p.index){var Ee=f-W.x-W.vx,Fe=y-W.y-W.vy,Le=Ee*Ee+Fe*Fe;Le<ie*ie&&(Ee===0&&(Ee=Pt(r),Le+=Ee*Ee),Fe===0&&(Fe=Pt(r),Le+=Fe*Fe),Le=(ie-(Le=Math.sqrt(Le)))/Le*o,p.vx+=(Ee*=Le)*(ie=(ee*=ee)/(v+ee)),p.vy+=(Fe*=Le)*ie,W.vx-=Ee*(ie=1-ie),W.vy-=Fe*ie)}return}return w>f+ie||F<f-ie||A>y+ie||z<y-ie}}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 LI(e){return e.index}function xv(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function Md(e){var t=LI,n=d,r,o=Ae(30),i,s,a,c,l,u=1;e==null&&(e=[]);function d(v){return 1/Math.min(a[v.source.index],a[v.target.index])}function p(v){for(var E=0,h=e.length;E<u;++E)for(var x=0,w,A,F,z,W,ee,ie;x<h;++x)w=e[x],A=w.source,F=w.target,z=F.x+F.vx-A.x-A.vx||Pt(l),W=F.y+F.vy-A.y-A.vy||Pt(l),ee=Math.sqrt(z*z+W*W),ee=(ee-i[x])/ee*v*r[x],z*=ee,W*=ee,F.vx-=z*(ie=c[x]),F.vy-=W*ie,A.vx+=z*(ie=1-ie),A.vy+=W*ie}function f(){if(s){var v,E=s.length,h=e.length,x=new Map(s.map((A,F)=>[t(A,F,s),A])),w;for(v=0,a=new Array(E);v<h;++v)w=e[v],w.index=v,typeof w.source!="object"&&(w.source=xv(x,w.source)),typeof w.target!="object"&&(w.target=xv(x,w.target)),a[w.source.index]=(a[w.source.index]||0)+1,a[w.target.index]=(a[w.target.index]||0)+1;for(v=0,c=new Array(h);v<h;++v)w=e[v],c[v]=a[w.source.index]/(a[w.source.index]+a[w.target.index]);r=new Array(h),y(),i=new Array(h),D()}}function y(){if(s)for(var v=0,E=e.length;v<E;++v)r[v]=+n(e[v],v,e)}function D(){if(s)for(var v=0,E=e.length;v<E;++v)i[v]=+o(e[v],v,e)}return p.initialize=function(v,E){s=v,l=E,f()},p.links=function(v){return arguments.length?(e=v,f(),p):e},p.id=function(v){return arguments.length?(t=v,p):t},p.iterations=function(v){return arguments.length?(u=+v,p):u},p.strength=function(v){return arguments.length?(n=typeof v=="function"?v:Ae(+v),y(),p):n},p.distance=function(v){return arguments.length?(o=typeof v=="function"?v:Ae(+v),D(),p):o},p}function Iv(){let e=1;return()=>(e=(1664525*e+1013904223)%4294967296)/4294967296}function Tv(e){return e.x}function Sv(e){return e.y}var jI=10,BI=Math.PI*(3-Math.sqrt(5));function Nd(e){var t,n=1,r=.001,o=1-Math.pow(r,1/300),i=0,s=.6,a=new Map,c=po(d),l=bn("tick","end"),u=Iv();e==null&&(e=[]);function d(){p(),l.call("tick",t),n<r&&(c.stop(),l.call("end",t))}function p(D){var v,E=e.length,h;D===void 0&&(D=1);for(var x=0;x<D;++x)for(n+=(i-n)*o,a.forEach(function(w){w(n)}),v=0;v<E;++v)h=e[v],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,v=e.length,E;D<v;++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=jI*Math.sqrt(.5+D),x=D*BI;E.x=h*Math.cos(x),E.y=h*Math.sin(x)}(isNaN(E.vx)||isNaN(E.vy))&&(E.vx=E.vy=0)}}function y(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(y),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(y),t):u},force:function(D,v){return arguments.length>1?(v==null?a.delete(D):a.set(D,y(v)),t):a.get(D)},find:function(D,v,E){var h=0,x=e.length,w,A,F,z,W;for(E==null?E=1/0:E*=E,h=0;h<x;++h)z=e[h],w=D-z.x,A=v-z.y,F=w*w+A*A,F<E&&(W=z,E=F);return W},on:function(D,v){return arguments.length>1?(l.on(D,v),t):l.on(D)}}}function Ad(){var e,t,n,r,o=Ae(-30),i,s=1,a=1/0,c=.81;function l(f){var y,D=e.length,v=xr(e,Tv,Sv).visitAfter(d);for(r=f,y=0;y<D;++y)t=e[y],v.visit(p)}function u(){if(e){var f,y=e.length,D;for(i=new Array(y),f=0;f<y;++f)D=e[f],i[D.index]=+o(D,f,e)}}function d(f){var y=0,D,v,E=0,h,x,w;if(f.length){for(h=x=w=0;w<4;++w)(D=f[w])&&(v=Math.abs(D.value))&&(y+=D.value,E+=v,h+=v*D.x,x+=v*D.y);f.x=h/E,f.y=x/E}else{D=f,D.x=D.data.x,D.y=D.data.y;do y+=i[D.data.index];while(D=D.next)}f.value=y}function p(f,y,D,v){if(!f.value)return!0;var E=f.x-t.x,h=f.y-t.y,x=v-y,w=E*E+h*h;if(x*x/c<w)return w<a&&(E===0&&(E=Pt(n),w+=E*E),h===0&&(h=Pt(n),w+=h*h),w<s&&(w=Math.sqrt(s*w)),t.vx+=E*f.value*r/w,t.vy+=h*f.value*r/w),!0;if(f.length||w>=a)return;(f.data!==t||f.next)&&(E===0&&(E=Pt(n),w+=E*E),h===0&&(h=Pt(n),w+=h*h),w<s&&(w=Math.sqrt(s*w)));do f.data!==t&&(x=i[f.data.index]*r/w,t.vx+=E*x,t.vy+=h*x);while(f=f.next)}return l.initialize=function(f,y){e=f,n=y,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 kd(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 Od(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 Ft(e,t,n){this.k=e,this.x=t,this.y=n}Ft.prototype={constructor:Ft,scale:function(e){return e===1?this:new Ft(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ft(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 Ir=new Ft(1,0,0);Pd.prototype=Ft.prototype;function Pd(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Ir;return e.__zoom}function oc(e){e.stopImmediatePropagation()}function mo(e){e.preventDefault(),e.stopImmediatePropagation()}function VI(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function HI(){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 Mv(){return this.__zoom||Ir}function $I(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function UI(){return navigator.maxTouchPoints||"ontouchstart"in this}function zI(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 Fd(){var e=VI,t=HI,n=zI,r=$I,o=UI,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,c=Cd,l=bn("start","zoom","end"),u,d,p,f=500,y=150,D=0,v=10;function E(b){b.property("__zoom",Mv).on("wheel.zoom",W,{passive:!1}).on("mousedown.zoom",ee).on("dblclick.zoom",ie).filter(o).on("touchstart.zoom",Ee).on("touchmove.zoom",Fe).on("touchend.zoom touchcancel.zoom",Le).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}E.transform=function(b,k,I,R){var q=b.selection?b.selection():b;q.property("__zoom",Mv),b!==q?A(b,k,I,R):q.interrupt().each(function(){F(this,arguments).event(R).start().zoom(null,typeof k=="function"?k.apply(this,arguments):k).end()})},E.scaleBy=function(b,k,I,R){E.scaleTo(b,function(){var q=this.__zoom.k,X=typeof k=="function"?k.apply(this,arguments):k;return q*X},I,R)},E.scaleTo=function(b,k,I,R){E.transform(b,function(){var q=t.apply(this,arguments),X=this.__zoom,K=I==null?w(q):typeof I=="function"?I.apply(this,arguments):I,ye=X.invert(K),Se=typeof k=="function"?k.apply(this,arguments):k;return n(x(h(X,Se),K,ye),q,s)},I,R)},E.translateBy=function(b,k,I,R){E.transform(b,function(){return n(this.__zoom.translate(typeof k=="function"?k.apply(this,arguments):k,typeof I=="function"?I.apply(this,arguments):I),t.apply(this,arguments),s)},null,R)},E.translateTo=function(b,k,I,R,q){E.transform(b,function(){var X=t.apply(this,arguments),K=this.__zoom,ye=R==null?w(X):typeof R=="function"?R.apply(this,arguments):R;return n(Ir.translate(ye[0],ye[1]).scale(K.k).translate(typeof k=="function"?-k.apply(this,arguments):-k,typeof I=="function"?-I.apply(this,arguments):-I),X,s)},R,q)};function h(b,k){return k=Math.max(i[0],Math.min(i[1],k)),k===b.k?b:new Ft(k,b.x,b.y)}function x(b,k,I){var R=k[0]-I[0]*b.k,q=k[1]-I[1]*b.k;return R===b.x&&q===b.y?b:new Ft(b.k,R,q)}function w(b){return[(+b[0][0]+ +b[1][0])/2,(+b[0][1]+ +b[1][1])/2]}function A(b,k,I,R){b.on("start.zoom",function(){F(this,arguments).event(R).start()}).on("interrupt.zoom end.zoom",function(){F(this,arguments).event(R).end()}).tween("zoom",function(){var q=this,X=arguments,K=F(q,X).event(R),ye=t.apply(q,X),Se=I==null?w(ye):typeof I=="function"?I.apply(q,X):I,Lt=Math.max(ye[1][0]-ye[0][0],ye[1][1]-ye[0][1]),je=q.__zoom,_t=typeof k=="function"?k.apply(q,X):k,an=c(je.invert(Se).concat(Lt/je.k),_t.invert(Se).concat(Lt/_t.k));return function(wt){if(wt===1)wt=_t;else{var cn=an(wt),fc=Lt/cn[2];wt=new Ft(fc,Se[0]-cn[0]*fc,Se[1]-cn[1]*fc)}K.zoom(null,wt)}})}function F(b,k,I){return!I&&b.__zooming||new z(b,k)}function z(b,k){this.that=b,this.args=k,this.active=0,this.sourceEvent=null,this.extent=t.apply(b,k),this.taps=0}z.prototype={event:function(b){return b&&(this.sourceEvent=b),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(b,k){return this.mouse&&b!=="mouse"&&(this.mouse[1]=k.invert(this.mouse[0])),this.touch0&&b!=="touch"&&(this.touch0[1]=k.invert(this.touch0[0])),this.touch1&&b!=="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(b){var k=Je(this.that).datum();l.call(b,this.that,new Od(b,{sourceEvent:this.sourceEvent,target:E,type:b,transform:this.that.__zoom,dispatch:l}),k)}};function W(b,...k){if(!e.apply(this,arguments))return;var I=F(this,k).event(b),R=this.__zoom,q=Math.max(i[0],Math.min(i[1],R.k*Math.pow(2,r.apply(this,arguments)))),X=Et(b);if(I.wheel)(I.mouse[0][0]!==X[0]||I.mouse[0][1]!==X[1])&&(I.mouse[1]=R.invert(I.mouse[0]=X)),clearTimeout(I.wheel);else{if(R.k===q)return;I.mouse=[X,R.invert(X)],Gn(this),I.start()}mo(b),I.wheel=setTimeout(K,y),I.zoom("mouse",n(x(h(R,q),I.mouse[0],I.mouse[1]),I.extent,s));function K(){I.wheel=null,I.end()}}function ee(b,...k){if(p||!e.apply(this,arguments))return;var I=b.currentTarget,R=F(this,k,!0).event(b),q=Je(b.view).on("mousemove.zoom",Se,!0).on("mouseup.zoom",Lt,!0),X=Et(b,I),K=b.clientX,ye=b.clientY;hi(b.view),oc(b),R.mouse=[X,this.__zoom.invert(X)],Gn(this),R.start();function Se(je){if(mo(je),!R.moved){var _t=je.clientX-K,an=je.clientY-ye;R.moved=_t*_t+an*an>D}R.event(je).zoom("mouse",n(x(R.that.__zoom,R.mouse[0]=Et(je,I),R.mouse[1]),R.extent,s))}function Lt(je){q.on("mousemove.zoom mouseup.zoom",null),mi(je.view,R.moved),mo(je),R.event(je).end()}}function ie(b,...k){if(e.apply(this,arguments)){var I=this.__zoom,R=Et(b.changedTouches?b.changedTouches[0]:b,this),q=I.invert(R),X=I.k*(b.shiftKey?.5:2),K=n(x(h(I,X),R,q),t.apply(this,k),s);mo(b),a>0?Je(this).transition().duration(a).call(A,K,R,b):Je(this).call(E.transform,K,R,b)}}function Ee(b,...k){if(e.apply(this,arguments)){var I=b.touches,R=I.length,q=F(this,k,b.changedTouches.length===R).event(b),X,K,ye,Se;for(oc(b),K=0;K<R;++K)ye=I[K],Se=Et(ye,this),Se=[Se,this.__zoom.invert(Se),ye.identifier],q.touch0?!q.touch1&&q.touch0[2]!==Se[2]&&(q.touch1=Se,q.taps=0):(q.touch0=Se,X=!0,q.taps=1+!!u);u&&(u=clearTimeout(u)),X&&(q.taps<2&&(d=Se[0],u=setTimeout(function(){u=null},f)),Gn(this),q.start())}}function Fe(b,...k){if(this.__zooming){var I=F(this,k).event(b),R=b.changedTouches,q=R.length,X,K,ye,Se;for(mo(b),X=0;X<q;++X)K=R[X],ye=Et(K,this),I.touch0&&I.touch0[2]===K.identifier?I.touch0[0]=ye:I.touch1&&I.touch1[2]===K.identifier&&(I.touch1[0]=ye);if(K=I.that.__zoom,I.touch1){var Lt=I.touch0[0],je=I.touch0[1],_t=I.touch1[0],an=I.touch1[1],wt=(wt=_t[0]-Lt[0])*wt+(wt=_t[1]-Lt[1])*wt,cn=(cn=an[0]-je[0])*cn+(cn=an[1]-je[1])*cn;K=h(K,Math.sqrt(wt/cn)),ye=[(Lt[0]+_t[0])/2,(Lt[1]+_t[1])/2],Se=[(je[0]+an[0])/2,(je[1]+an[1])/2]}else if(I.touch0)ye=I.touch0[0],Se=I.touch0[1];else return;I.zoom("touch",n(x(K,ye,Se),I.extent,s))}}function Le(b,...k){if(this.__zooming){var I=F(this,k).event(b),R=b.changedTouches,q=R.length,X,K;for(oc(b),p&&clearTimeout(p),p=setTimeout(function(){p=null},f),X=0;X<q;++X)K=R[X],I.touch0&&I.touch0[2]===K.identifier?delete I.touch0:I.touch1&&I.touch1[2]===K.identifier&&delete I.touch1;if(I.touch1&&!I.touch0&&(I.touch0=I.touch1,delete I.touch1),I.touch0)I.touch0[1]=this.__zoom.invert(I.touch0[0]);else if(I.end(),I.taps===2&&(K=Et(K,this),Math.hypot(d[0]-K[0],d[1]-K[1])<v)){var ye=Je(this).on("dblclick.zoom");ye&&ye.apply(this,arguments)}}}return E.wheelDelta=function(b){return arguments.length?(r=typeof b=="function"?b:Mi(+b),E):r},E.filter=function(b){return arguments.length?(e=typeof b=="function"?b:Mi(!!b),E):e},E.touchable=function(b){return arguments.length?(o=typeof b=="function"?b:Mi(!!b),E):o},E.extent=function(b){return arguments.length?(t=typeof b=="function"?b:Mi([[+b[0][0],+b[0][1]],[+b[1][0],+b[1][1]]]),E):t},E.scaleExtent=function(b){return arguments.length?(i[0]=+b[0],i[1]=+b[1],E):[i[0],i[1]]},E.translateExtent=function(b){return arguments.length?(s[0][0]=+b[0][0],s[1][0]=+b[1][0],s[0][1]=+b[0][1],s[1][1]=+b[1][1],E):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},E.constrain=function(b){return arguments.length?(n=b,E):n},E.duration=function(b){return arguments.length?(a=+b,E):a},E.interpolate=function(b){return arguments.length?(c=b,E):c},E.on=function(){var b=l.on.apply(l,arguments);return b===l?E:b},E.clickDistance=function(b){return arguments.length?(D=(b=+b)*b,E):Math.sqrt(D)},E.tapDistance=function(b){return arguments.length?(v=+b,E):v},E}function go(e){if(typeof e=="string")throw new Error("Graph link has not been initialized");return e}function Nv(e,t,n,r){let o=e.clientWidth,i=e.clientHeight,s=t.find(h=>h.scope==="project"&&h.aliases.some(x=>/^AGENTS(?:\.override)?\.md$/i.test(x)))||t.find(h=>h.scope==="project"&&h.kind==="instruction"),a=t.map((h,x)=>Q(B({},h),{radius:h.id===s?.id?30:h.kind==="instruction"?18:h.kind==="rule"?11:8,x:o/2+Math.cos(x*2.39996)*90,y:i/2+Math.sin(x*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=Je(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(x=>wn[x]).join(", ")||"no client entry point"}`).on("click",(h,x)=>r(x)).on("keydown",(h,x)=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),r(x))});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(x=>wn[x]).join(", ")||"No client entry point"}`);let y=Fd().scaleExtent([.06,4]).on("zoom",h=>d.attr("transform",h.transform));u.call(y).on("dblclick.zoom",null);function D(){let h=d.node()?.getBBox();if(!h)return;let x=Math.min(1.4,(o-100)/Math.max(h.width,1),(i-105)/Math.max(h.height,1));u.call(y.transform,Ir.translate(o/2-(h.x+h.width/2)*x,i/2-(h.y+h.height/2)*x).scale(x))}let v=Nd(a).force("link",Md(l).id(h=>h.id).distance(h=>go(h.source).id===s?.id||go(h.target).id===s?.id?140:95).strength(.35)).force("charge",Ad().strength(-150)).force("collide",Sd().radius(h=>h.radius+35)).force("x",kd(h=>h.scope==="user"?o*.77:o*.43).strength(.035)).force("y",Rd(i/2).strength(.055)).stop();if(s){let h=a.find(x=>x.id===s.id);h&&(h.fx=o*.45),h&&(h.fy=i/2)}let E=()=>{p.attr("x1",h=>go(h.source).x??0).attr("y1",h=>go(h.source).y??0).attr("x2",h=>go(h.target).x??0).attr("y2",h=>go(h.target).y??0),f.attr("transform",h=>`translate(${h.x},${h.y})`)};return v.tick(Math.min(180,a.length>700?60:180)),E(),D(),v.on("tick",E),f.call(pd().on("start",(h,x)=>{h.active||v.alphaTarget(.2).restart(),x.fx=x.x,x.fy=x.y}).on("drag",(h,x)=>{x.fx=h.x,x.fy=h.y}).on("end",(h,x)=>{h.active||v.alphaTarget(0),x.fx=null,x.fy=null})),{fit:D,zoomIn:()=>{u.call(y.scaleBy,1.3)},zoomOut:()=>{u.call(y.scaleBy,1/1.3)},destroy:()=>{v.stop(),v.on("tick",null),f.on(".drag",null).on("click",null).on("keydown",null),u.on(".zoom",null),u.remove()}}}var ic=class e{nodes=Qe.required();edges=Qe.required();selected=no();element=T(yn);size=$(0);handle;constructor(){Hm(r=>{this.size();let o=Nv(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),T(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&&(_(0,"div",0)(1,"span"),ve(2,"i",1),m(3,"Project context"),C(),_(4,"span"),ve(5,"i",2),m(6,"User context"),C(),_(7,"span"),ve(8,"i",3),m(9,"Reference"),C(),_(10,"span"),ve(11,"i",4),m(12,"Folder scope"),C()(),_(13,"div",5)(14,"button",6),Z("click",function(){return r.handle?.zoomIn()}),m(15,"+"),C(),_(16,"button",7),Z("click",function(){return r.handle?.zoomOut()}),m(17," \u2212"),C(),_(18,"button",8),Z("click",function(){return r.handle?.fit()}),m(19,"Fit"),C()(),_(20,"div",9),m(21,"Scroll to zoom \xB7 Drag to explore \xB7 Click a file"),C())},encapsulation:2})};var GI=(e,t)=>t.id,WI=(e,t)=>t.label;function qI(e,t){e&1&&(_(0,"p",2),m(1,"Checking installation\u2026"),C())}function YI(e,t){if(e&1){let n=ue();_(0,"p",4),m(1),C(),_(2,"button",5),Z("click",function(){V(n);let o=S();return H(o.checkAgain())}),m(3," Check again "),C()}if(e&2){let n=S();g(),P(n.checkError()),g(),re("disabled",n.checking())}}function ZI(e,t){if(e&1&&(_(0,"p"),m(1),C(),_(2,"code"),m(3),C()),e&2){let n=t.$implicit;g(),P(n.label),g(2),P(n.command)}}function XI(e,t){if(e&1){let n=ue();_(0,"details")(1,"summary"),m(2,"Installation instructions"),C(),he(3,ZI,4,2,null,null,WI),_(5,"p")(6,"a",7),m(7,"Official installation guide"),C()()(),_(8,"button",5),Z("click",function(){V(n);let o=S(2);return H(o.checkAgain())}),m(9," Check again "),C()}if(e&2){let n=S().$implicit,r=S();g(3),me(n.instructions),g(3),re("href",n.guide,vn),g(2),re("disabled",r.checking())}}function KI(e,t){if(e&1&&(_(0,"article",3)(1,"label"),ve(2,"input",6),m(3),C(),_(4,"p"),m(5),C(),ae(6,XI,10,2),C()),e&2){let n=t.$implicit;g(2),re("checked",n.detected),g(),ge(" ",n.label),g(2),P(n.detail),g(),ce(n.detected?-1:6)}}var sc=class e{api=T(rn);checks=$([]);checking=$(!1);checkError=$("");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&&(_(0,"section",0)(1,"h2",1),m(2,"Optimization checklist"),C(),_(3,"p"),m(4," Installation checks are detected locally. RTK does not reduce these static file estimates. "),C(),ae(5,qI,2,0,"p",2),ae(6,YI,4,2),he(7,KI,7,4,"article",3,GI),C()),n&2&&(g(5),ce(r.checking()?5:-1),g(),ce(r.checkError()?6:-1),g(),me(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 QI=()=>[],Av=(e,t)=>t.id;function JI(e,t){if(e&1&&(_(0,"option",6),m(1),C()),e&2){let n=t.$implicit,r=S();re("value",n),g(),P(r.labels[n])}}function eT(e,t){if(e&1&&(_(0,"option",6),m(1),C()),e&2){let n=t.$implicit;re("value",n.id),g(),P(n.name)}}function tT(e,t){e&1&&(_(0,"p",9),m(1,"Estimating context\u2026"),C())}function nT(e,t){if(e&1&&(_(0,"p",10),m(1),C()),e&2){let n=S();g(),P(n.error())}}function rT(e,t){e&1&&(_(0,"p",11),m(1," User context is excluded because this server was started with user discovery disabled. "),C())}function oT(e,t){if(e&1&&(_(0,"tr")(1,"th",32)(2,"strong"),m(3),C(),_(4,"small"),m(5),C(),_(6,"small"),m(7),C()(),_(8,"td"),m(9,"Startup"),C(),_(10,"td"),m(11),lt(12,"number"),C(),_(13,"td"),m(14),lt(15,"number"),C(),_(16,"td"),m(17),lt(18,"number"),C()()),e&2){let n=t.$implicit;g(3),P(n.name),g(2),P(n.path),g(2),ot("",n.scope," \xB7 ",n.kind),g(4),P(en(12,7,n.tokens)),g(3),P(en(15,9,n.words)),g(3),ge("$",Qo(18,11,n.inputCost,"1.6-6"))}}function iT(e,t){if(e&1&&(_(0,"tr")(1,"td",33),m(2),C()()),e&2){let n=S(),r=S();g(2),ge(" No startup context discovered for ",r.labels[n.client],". ")}}function sT(e,t){if(e&1&&(ae(0,rT,2,0,"p",11),_(1,"div",12)(2,"div",13),gt(),_(3,"svg",14)(4,"title",15),m(5," Context iceberg: startup above water, on-demand below. "),C(),ve(6,"path",16)(7,"path",17)(8,"path",18)(9,"path",19)(10,"path",20),C()(),hr(),_(11,"div",21)(12,"article",22)(13,"span",23),m(14,"Above water"),C(),_(15,"h2"),m(16,"Estimated startup context"),C(),_(17,"p"),m(18,"Applicable instructions and skill catalog entries."),C(),_(19,"strong",24),m(20),lt(21,"number"),_(22,"span"),m(23,"estimated tokens"),C()(),_(24,"p"),m(25),lt(26,"number"),lt(27,"number"),C(),_(28,"strong",25),m(29),lt(30,"number"),_(31,"span"),m(32,"one-load input cost"),C()()(),_(33,"article",26)(34,"span",23),m(35,"Below water"),C(),_(36,"h2"),m(37,"On-demand context"),C(),_(38,"p"),m(39,"Linked documents, skill bodies and scoped instructions."),C(),_(40,"strong",24),m(41),lt(42,"number"),_(43,"span"),m(44,"estimated tokens"),C()(),_(45,"p"),m(46),lt(47,"number"),lt(48,"number"),C(),_(49,"strong",25),m(50),lt(51,"number"),_(52,"span"),m(53,"hypothetical one-load input cost"),C()()()()(),_(54,"details",27)(55,"summary"),m(56,"Estimation method and pricing"),C(),_(57,"p"),m(58),C(),_(59,"p"),m(60," References count as text in their containing file. Their targets are counted separately on demand. Skill catalog estimates use names and descriptions; body estimates exclude frontmatter. Client-generated prompts and remote content are excluded. "),C(),_(61,"p"),m(62),_(63,"a",28),m(64,"Official pricing"),C(),m(65),C()(),_(66,"h2",29),m(67,"Context breakdown"),C(),_(68,"div",30)(69,"table")(70,"caption"),m(71," Startup context only. Largest estimates first. "),C(),_(72,"thead")(73,"tr")(74,"th",31),m(75,"File or skill"),C(),_(76,"th",31),m(77,"Context"),C(),_(78,"th",31),m(79,"Tokens \u2248"),C(),_(80,"th",31),m(81,"Words"),C(),_(82,"th",31),m(83,"Input cost (USD)"),C()()(),_(84,"tbody"),he(85,oT,19,14,"tr",null,Av,!1,iT,3,1,"tr"),C()()()),e&2){let n=t,r=S();ce(n.includeUser?-1:0),g(20),ge("",en(21,15,n.startup.tokens)," "),g(5),ot(" ",en(26,17,n.startup.words)," words \xB7 ",en(27,19,n.startup.bytes)," bytes "),g(4),ge("$",Qo(30,21,n.startup.inputCost,"1.6-6")," "),g(12),ge("",en(42,24,n.onDemand.tokens)," "),g(5),ot(" ",en(47,26,n.onDemand.words)," words \xB7 ",en(48,28,n.onDemand.bytes)," bytes "),g(4),ge("$",Qo(51,30,n.onDemand.inputCost,"1.6-6")," "),g(8),P(n.method),g(4),ot(" ",n.model.name,": $",n.model.inputPerMillion," / million input tokens. "),g(),re("href",n.model.source,vn),g(2),ge(", verified ",n.model.verifiedAt,". Presets are maintained by the application and do not assert availability in every client. "),g(20),me(r.startupEntries())}}var ac=class e{api=T(rn);state=T(vt);clients=["codex","claude","cursor","copilot"];labels=wn;client=$("codex");model=$("gpt-5.3-codex");estimate=$(null);startupEntries=we(()=>(this.estimate()?.entries??[]).filter(t=>t.portion==="startup"));loading=$(!1);error=$("");constructor(){Xt(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)})})}selectClient(t){let n=this.clients.find(r=>r===t);n&&this.client.set(n)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ie({type:e,selectors:[["app-token-optimizer"]],decls:17,vars:4,consts:[["agentSelect",""],["modelSelect",""],["aria-label","Token Optimizer",1,"optimizer"],[1,"optimizer-controls"],["for","optimizer-agent"],["id","optimizer-agent",3,"change","value"],[3,"value"],["for","optimizer-model"],["id","optimizer-model",3,"change","value"],["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"],[1,"portion","on-demand"],[1,"method"],["target","_blank","rel","noreferrer",3,"href"],[1,"section-title"],[1,"breakdown"],["scope","col"],["scope","row"],["colspan","5"]],template:function(n,r){if(n&1){let o=ue();_(0,"section",2)(1,"div",3)(2,"label",4),m(3,"Agent "),_(4,"select",5,0),Z("change",function(){V(o);let s=Ke(5);return H(r.selectClient(s.value))}),he(6,JI,2,2,"option",6,yt),C()(),_(8,"label",7),m(9,"Model for price estimate "),_(10,"select",8,1),Z("change",function(){V(o);let s=Ke(11);return H(r.model.set(s.value))}),he(12,eT,2,2,"option",6,Av),C()()(),ae(14,tT,2,0,"p",9)(15,nT,2,1,"p",10)(16,sT,88,33),C()}if(n&2){let o;g(4),re("value",r.client()),g(2),me(r.clients),g(4),re("value",r.model()),g(2),me(r.estimate()?.models??Ko(3,QI)),g(2),ce(r.loading()?14:r.error()?15:(o=r.estimate())?16:-1,o)}},dependencies:[Ju],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}.method[_ngcontent-%COMP%]{color:var(--%NS%muted);max-width:900px}.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}summary[_ngcontent-%COMP%]{cursor:pointer;font-size:13px;padding:8px 0}.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 aT=(e,t)=>t.id;function cT(e,t){if(e&1){let n=ue();_(0,"img",15),Z("error",function(){let o=V(n),i=S();return H(i.failedAvatar.set(o))}),C()}e&2&&re("src",t,vn)}function lT(e,t){e&1&&ve(0,"img",2)}function uT(e,t){if(e&1){let n=ue();_(0,"button",16),Z("click",function(){let o=V(n).$implicit,i=S();return H(i.state.selectTab(o.id))}),_(1,"span",17),m(2),C(),m(3),_(4,"span",18),m(5),C()()}if(e&2){let n=t.$implicit,r=S();Ne("active",r.state.tab()===n.id),de("data-tab",n.id)("aria-current",r.state.tab()===n.id?"page":"false"),g(2),P(n.icon),g(),P(n.label),g(),re("hidden",n.id==="optimizer"||n.id==="checklist")("id","count-"+n.id),g(),P(r.count(n.id))}}var cc=class e{state=T(vt);failedAvatar=$(void 0);avatar=we(()=>{let t=this.state.data()?.agent?.avatar;return t!==this.failedAvatar()?t:void 0});tabs=[{id:"context",label:"Context",icon:"\u2318"},{id:"rules",label:"Rules",icon:"\u25A4"},{id:"skills",label:"Skills",icon:"\u2727"},{id:"mcp",label:"MCP servers",icon:"\u2387"},{id:"optimizer",label:"Token Optimizer",icon:"\u2248"},{id:"checklist",label:"Optimization checklist",icon:"\u2637"}];count(t){if(t==="optimizer"||t==="checklist")return 0;let n=this.state.data();return n?(t==="context"?n.nodes:n[t]).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:25,vars:11,consts:[["href","#",1,"brand"],["alt","","width","198","height","198",1,"agent-avatar",3,"src"],["src","/favicon.svg","alt","","width","198","height","198"],[1,"brand-text"],[1,"agent-name",3,"title"],[1,"brand-sub"],[1,"workspace"],[1,"eyebrow"],["id","project-name"],["id","project-path",1,"mono",3,"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"],["alt","","width","198","height","198",1,"agent-avatar",3,"error","src"],[1,"nav-item",3,"click"],["aria-hidden","true",1,"nav-icon"],[1,"count",3,"hidden","id"]],template:function(n,r){if(n&1&&(_(0,"a",0),ae(1,cT,1,1,"img",1)(2,lT,1,0,"img",2),_(3,"span",3)(4,"span",4),m(5),C(),_(6,"span",5),m(7,"Agent Visualizer"),C()()(),_(8,"div",6)(9,"span",7),m(10,"Workspace"),C(),_(11,"strong",8),m(12),C(),_(13,"span",9),m(14),C()(),_(15,"nav",10),he(16,uT,6,9,"button",11,aT),C(),_(18,"div",12)(19,"button",13),Z("click",function(){return r.refresh()}),m(20," \u21BB "),_(21,"span"),m(22,"Rescan"),C()(),_(23,"button",14),Z("click",function(){return r.state.toggleTheme()}),m(24),C()()),n&2){let o;g(),ce((o=r.avatar())?1:2,o),g(3),re("title",r.state.data()?.agent?.name??"boyscout"),g(),P(r.state.data()?.agent?.name??"boyscout"),g(7),P(r.state.data()?.project?.name??"Loading workspace"),g(),re("title",r.state.data()?.project?.path??""),g(),P(r.state.data()?.project?.path),g(2),me(r.tabs),g(3),re("disabled",r.state.loading()),g(4),re("title",r.state.theme()==="dark"?"Light mode":"Dark mode"),de("aria-label",r.state.theme()==="dark"?"Switch to light mode":"Switch to dark mode")("aria-pressed",r.state.theme()==="dark"),g(),ge(" ",r.state.theme()==="dark"?"\u2600":"\u263E"," ")}},encapsulation:2})};var sn={width:220,height:82},dT=()=>({version:1,nodes:[],arrows:[],titles:[]}),Ld=e=>`pek:skill-board:v1:${e}`,lc=e=>e!==null&&typeof e=="object"&&!Array.isArray(e)?e:{},Tr=e=>typeof e=="string",kv=e=>typeof e.x=="number"&&Number.isFinite(e.x)&&typeof e.y=="number"&&Number.isFinite(e.y);function Rv(e){let t=localStorage.getItem(Ld(e));if(!t)return dT();let n=lc(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=lc(s);if(!Tr(a.key)||!Array.isArray(a.files)||!a.files.every(Tr)||!kv(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=lc(s);if(!Tr(a.id)||!Tr(a.source)||!Tr(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=lc(s);if(!Tr(a.id)||!Tr(a.text)||!kv(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 Ov(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 fT=(e,t)=>t.source+":"+t.target,Pv=(e,t)=>t.id,jd=(e,t)=>t.key;function pT(e,t){if(e&1&&(_(0,"option",30),m(1),C()),e&2){let n=t.$implicit;re("value",n.key),g(),ot(" ",n.skill.name," (",n.skill.scope,") ")}}function hT(e,t){if(e&1&&(_(0,"option",30),m(1),C()),e&2){let n=t.$implicit;re("value",n.key),g(),ot(" ",n.skill.name," (",n.skill.scope,") ")}}function mT(e,t){if(e&1){let n=ue();_(0,"label"),m(1,"From "),_(2,"select",29,1),Z("change",function(){V(n);let o=Ke(3),i=S();return H(i.reconnect("source",o.value))}),he(4,pT,2,3,"option",30,jd),C()(),_(6,"label"),m(7,"To "),_(8,"select",31,2),Z("change",function(){V(n);let o=Ke(9),i=S();return H(i.reconnect("target",o.value))}),he(10,hT,2,3,"option",30,jd),C()(),_(12,"button",6),Z("click",function(){V(n);let o=S();return H(o.remove())}),m(13,"Delete arrow"),C()}if(e&2){let n=t,r=S();g(2),re("value",n.source),g(2),me(r.cards()),g(4),re("value",n.target),g(2),me(r.cards())}}function gT(e,t){if(e&1){let n=ue();_(0,"input",32,3),Z("input",function(){V(n);let o=Ke(1),i=S();return H(i.editTitle(o.value))}),C(),_(2,"button",6),Z("click",function(){V(n);let o=S();return H(o.remove())}),m(3,"Delete title"),C()}e&2&&re("value",t.text)}function yT(e,t){if(e&1){let n=ue();_(0,"strong"),m(1),C(),_(2,"button",6),Z("click",function(){let o=V(n),i=S();return H(i.selected.emit(o))}),m(3,"Open skill"),C()}e&2&&(g(),P(t.name))}function vT(e,t){e&1&&(_(0,"span"),m(1,"All skills stay visible, including those outside your workflow."),C())}function ET(e,t){if(e&1&&(gt(),_(0,"path",20)(1,"title"),m(2,"Explicit reference from SKILL.md (read only)"),C()()),e&2){let n=t.$implicit,r=S();de("d",r.path(n))}}function DT(e,t){if(e&1){let n=ue();gt(),_(0,"g",33),Z("click",function(){let o=V(n).$implicit,i=S();return H(i.choose("arrow",o.id))})("keydown",function(o){let i=V(n).$implicit,s=S();return H(s.key(o,"arrow",i.id))}),ve(1,"path",34)(2,"path",35),C()}if(e&2){let n=t.$implicit,r=t.$index,o=S();Ne("chosen",o.arrow()?.id===n.id),de("aria-label","Your arrow "+(r+1)),g(),de("d",o.path(n)),g(),de("d",o.path(n))}}function _T(e,t){if(e&1){let n=ue();gt(),_(0,"g",36),Z("pointerdown",function(o){let i=V(n).$implicit,s=S();return H(s.start(o,"skill",i.key))})("click",function(){let o=V(n).$implicit,i=S();return H(i.choose("skill",o.key))})("keydown",function(o){let i=V(n).$implicit,s=S();return H(s.key(o,"skill",i.key))}),_(1,"title"),m(2),C(),ve(3,"rect",37),_(4,"foreignObject",38),hr(),_(5,"div",39),m(6),C()(),gt(),_(7,"text",40),m(8),C()()}if(e&2){let n=t.$implicit,r=S();Ne("user",n.skill.scope==="user")("chosen",r.selection()?.kind==="skill"&&r.selection()?.id===n.key)("connection-source",r.source()===n.key),de("data-skill",n.skill.name)("aria-label","Skill "+n.skill.name)("transform","translate("+n.x+" "+n.y+")"),g(2),ot("",n.skill.name,": ",n.skill.description),g(4),ge(" ",n.skill.name," "),g(2),ge(" ",n.skill.scope==="project"?"Project skill":"On your machine"," ")}}function wT(e,t){if(e&1){let n=ue();gt(),_(0,"g",41),Z("pointerdown",function(o){let i=V(n).$implicit,s=S();return H(s.start(o,"title",i.id))})("click",function(){let o=V(n).$implicit,i=S();return H(i.choose("title",o.id))})("keydown",function(o){let i=V(n).$implicit,s=S();return H(s.key(o,"title",i.id))}),_(1,"text",42),m(2),C()()}if(e&2){let n=t.$implicit,r=S();Ne("chosen",r.title()?.id===n.id),de("aria-label","Title "+n.text)("transform","translate("+n.x+" "+n.y+")"),g(2),P(n.text||"Untitled")}}function bT(e,t){if(e&1){let n=ue();gt(),_(0,"circle",44),Z("pointerdown",function(o){let i=V(n).$implicit,s=S(),a=S();return H(a.startEndpoint(o,s,i))}),_(1,"title"),m(2,"Drag to another skill, or use the From and To menus"),C()()}if(e&2){let n=t.$implicit,r=S(),o=S();de("cx",o.endpoint(r,n).x)("cy",o.endpoint(r,n).y)}}function CT(e,t){if(e&1&&he(0,bT,3,2,":svg:circle",43,yt),e&2){let n=S();me(n.ends)}}function xT(e,t){e&1&&(_(0,"p",27),m(1," Add a SKILL.md in an agent skills folder, then Rescan. "),C())}var uc=class e{ends=["source","target"];project=Qe.required();skills=Qe.required();edges=Qe.required();selected=no();element=T(yn);storageError=$("");state=ju({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:Ov(t.skills,r),restoreError:o}}});board=we(()=>this.state().data);selection=$(null);connecting=$(!1);source=$(null);titleText=$("");pan=$({x:0,y:0});scale=$(1);pointer=$(null);transform=we(()=>`translate(${this.pan().x} ${this.pan().y}) scale(${this.scale()})`);gesture;cards=we(()=>this.board().nodes.flatMap(t=>{let n=this.skills().find(r=>r.editTargets.some(o=>t.files.includes(o.id)));return n?[Q(B({},t),{skill:n})]:[]}));automatic=we(()=>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}]:[]}));arrow=we(()=>this.board().arrows.find(t=>this.selection()?.kind==="arrow"&&t.id===this.selection()?.id));title=we(()=>this.board().titles.find(t=>this.selection()?.kind==="title"&&t.id===this.selection()?.id));skill=we(()=>this.cards().find(t=>this.selection()?.kind==="skill"&&t.key===this.selection()?.id)?.skill);hint=we(()=>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(){Xt(()=>{let t=this.state();if(!t.restoreError)try{localStorage.setItem(Ld(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.")}})}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")}client(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.client(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.client(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){let n=this.svg(),r=Math.max(.05,Math.min(3,this.scale()*t)),o=r/this.scale(),i={x:(n?.clientWidth??800)/2,y:(n?.clientHeight??500)/2};this.pan.update(s=>({x:i.x-(i.x-s.x)*o,y:i.y-(i.y-s.y)*o})),this.scale.set(r)}wheel(t){t.preventDefault(),this.zoom(t.deltaY>0?.9:1.1)}fit(){let t=[...this.board().nodes,...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"]],inputs:{project:[1,"project"],skills:[1,"skills"],edges:[1,"edges"]},outputs:{selected:"selected"},decls:49,vars:11,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"],[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();_(0,"div",4)(1,"div",5)(2,"button",6),Z("click",function(){return r.toggleConnect()}),m(3," Add arrow "),C(),_(4,"input",7,0),Z("input",function(){V(o);let s=Ke(5);return H(r.titleText.set(s.value))})("keydown.enter",function(){return r.addTitle()}),C(),_(6,"button",8),Z("click",function(){return r.addTitle()}),m(7," Add title "),C()(),_(8,"div",9)(9,"span"),ve(10,"i",10),m(11,"From SKILL.md (read only)"),C(),_(12,"span"),ve(13,"i",11),m(14,"Your arrows"),C()()(),_(15,"div",12),ae(16,mT,14,2)(17,gT,4,1)(18,yT,4,1)(19,vT,2,0,"span"),_(20,"span",13),m(21),C()(),_(22,"div",14),gt(),_(23,"svg",15),Z("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()}),_(24,"defs")(25,"marker",16),ve(26,"path",17),C(),_(27,"marker",18),ve(28,"path",19),C()(),_(29,"g"),he(30,ET,3,1,":svg:path",20,fT),he(32,DT,3,5,":svg:g",21,Pv),he(34,_T,9,13,":svg:g",22,jd),he(36,wT,3,5,":svg:g",23,Pv),ae(38,CT,2,0),C()(),hr(),_(39,"div",24)(40,"button",25),Z("click",function(){return r.zoom(1.2)}),m(41," + "),C(),_(42,"button",26),Z("click",function(){return r.zoom(1/1.2)}),m(43," \u2212 "),C(),_(44,"button",6),Z("click",function(){return r.fit()}),m(45,"Fit skills"),C()(),ae(46,xT,2,0,"p",27),C(),_(47,"p",28),m(48),C()}if(n&2){let o,i;g(2),Ne("active",r.connecting()),de("aria-pressed",r.connecting()),g(2),re("value",r.titleText()),g(2),re("disabled",!r.titleText().trim()),g(10),ce((o=r.arrow())?16:(o=r.title())?17:(o=r.skill())?18:19,o),g(5),P(r.state().restoreError||r.storageError()||"Saved locally for this project"),g(8),de("transform",r.transform()),g(),me(r.automatic()),g(2),me(r.board().arrows),g(2),me(r.cards()),g(2),me(r.board().titles),g(2),ce((i=r.arrow())?38:-1,i),g(8),ce(r.cards().length?-1:46),g(2),P(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}}']})};var IT=()=>[];function TT(e,t){if(e&1){let n=ue();M(0,"div",10)(1,"button",20),be("click",function(){V(n);let o=S();return H(o.state.skillsView.set("list"))}),m(2," Table "),N(),M(3,"button",21),be("click",function(){V(n);let o=S();return H(o.state.skillsView.set("board"))}),m(4," Whiteboard "),N()()}if(e&2){let n=S();g(),Ne("selected",n.state.skillsView()==="list"),de("aria-pressed",n.state.skillsView()==="list"),g(2),Ne("selected",n.state.skillsView()==="board"),de("aria-pressed",n.state.skillsView()==="board")}}function ST(e,t){e&1&&Xe(0,"div",11)}function MT(e,t){e&1&&Xe(0,"app-token-optimizer")}function NT(e,t){e&1&&Xe(0,"app-optimization-checklist")}function AT(e,t){if(e&1){let n=ue();M(0,"app-skill-board",22),be("selected",function(o){V(n);let i=S();return H(i.select(o))}),N()}if(e&2){let n=t;pe("project",n.project.path)("skills",n.skills)("edges",n.skillEdges)}}function kT(e,t){if(e&1){let n=ue();M(0,"section",23),be("selected",function(o){V(n);let i=S();return H(i.select(o))}),N()}if(e&2){let n=S();pe("nodes",n.state.nodes())("edges",n.state.data()?.edges??Ko(2,IT))}}function RT(e,t){if(e&1&&(M(0,"div",24)(1,"span",27),m(2,"\u2301"),N(),M(3,"strong"),m(4,"Couldn\u2019t load this workspace"),N(),M(5,"p"),m(6),N()()),e&2){let n=S(2);g(6),P(n.state.error())}}function OT(e,t){e&1&&(M(0,"div",25),m(1,"Mapping your agent\u2019s world\u2026"),N())}function PT(e,t){if(e&1&&(M(0,"div",24)(1,"span",27),m(2,"\u2733"),N(),M(3,"strong"),m(4),N(),M(5,"p"),m(6),N()()),e&2){let n=S(2);g(4),P(n.state.search()||n.state.scope()!=="all"||n.state.client()!=="all"?"No matching assets":"A blank canvas, for now"),g(2),P(n.empty())}}function FT(e,t){if(e&1){let n=ue();M(0,"div",28),be("selected",function(o){V(n);let i=S(2);return H(i.select(o))}),N()}if(e&2){let n=S(2);pe("rows",n.state.rows())("tab",n.state.assetTab())}}function LT(e,t){if(e&1&&(M(0,"section",15),ae(1,RT,7,1,"div",24)(2,OT,2,0,"div",25)(3,PT,7,2,"div",24)(4,FT,1,2,"div",26),N()),e&2){let n=S();de("aria-label",n.state.tab()==="context"?"Context graph":n.state.tab()==="mcp"?"MCP servers list":n.state.tab()==="rules"?"Rules list":"Skills list"),g(),ce(n.state.error()?1:n.state.data()?n.state.rows().length?4:3:2)}}var dc=class e{state=T(vt);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())}updated(){let t=this.state.data();return t?"Scanned "+new Date(t.scannedAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):""}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&&be("keydown",function(i){return r.key(i)},uu)},decls:30,vars:15,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","edges"],["appGraph","","id","canvas","aria-label","Context graph",1,"graph-canvas",3,"nodes","edges"],["id","canvas"],[1,"main-footer"],["id","summary","aria-live","polite"],["id","updated"],["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","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"]],template:function(n,r){if(n&1&&(M(0,"div",0),Xe(1,"aside",1),M(2,"main")(3,"section",2),Xe(4,"img",3),M(5,"div",4)(6,"h1",5),m(7),N(),M(8,"p",6),m(9),N()(),M(10,"div",7)(11,"button",8),be("click",function(){return r.state.view.set("graph")}),m(12," \u2318 Graph"),N(),M(13,"button",9),be("click",function(){return r.state.view.set("list")}),m(14," \u2637 Files "),N()(),ae(15,TT,5,6,"div",10),N(),ae(16,ST,1,0,"div",11),M(17,"div",12),m(18),N(),ae(19,MT,1,0,"app-token-optimizer")(20,NT,1,0,"app-optimization-checklist")(21,AT,1,3,"app-skill-board",13)(22,kT,1,3,"section",14)(23,LT,5,2,"section",15),M(24,"footer",16)(25,"span",17),m(26),N(),M(27,"span",18),m(28),N()()(),Xe(29,"aside",19),N()),n&2){let o;g(7),P(r.titles[r.state.tab()][0]),g(2),P(r.titles[r.state.tab()][1]),g(),pe("hidden",r.state.tab()!=="context"),g(),Ne("selected",r.state.view()==="graph"),g(2),Ne("selected",r.state.view()==="list"),g(2),ce(r.state.tab()==="skills"?15:-1),g(),ce(r.state.tab()!=="optimizer"&&r.state.tab()!=="checklist"&&!r.state.whiteboard()?16:-1),g(),pe("hidden",!r.state.data()?.warnings?.length),g(),ge(" ",r.state.data()?.warnings?.join(" ")," "),g(),ce(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),g(7),P(r.state.summary()),g(2),P(r.updated()),g(),pe("hidden",!r.state.selection())}},dependencies:[cc,Aa,Ma,Na,ic,ac,sc,uc],encapsulation:2})};ad(dc,{providers:[Ml(),Zu()]}).catch(console.error);
|