UNPKG

@veltdev/sdk

Version:

Velt is an SDK to add collaborative features to your product within minutes. Example: Comments like Figma, Frame.io, Google docs or sheets, Recording like Loom, Huddles like Slack and much more.

4 lines 1.49 MB
var Vz=Object.create;var nE=Object.defineProperty,Bz=Object.defineProperties,Gz=Object.getOwnPropertyDescriptor,$z=Object.getOwnPropertyDescriptors,jz=Object.getOwnPropertyNames,tE=Object.getOwnPropertySymbols,_P=Object.getPrototypeOf,CS=Object.prototype.hasOwnProperty,TP=Object.prototype.propertyIsEnumerable,Hz=Reflect.get;var EP=(r,e,n)=>e in r?nE(r,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[e]=n,x=(r,e)=>{for(var n in e||={})CS.call(e,n)&&EP(r,n,e[n]);if(tE)for(var n of tE(e))TP.call(e,n)&&EP(r,n,e[n]);return r},ue=(r,e)=>Bz(r,$z(e));var NS=(r,e)=>{var n={};for(var t in r)CS.call(r,t)&&e.indexOf(t)<0&&(n[t]=r[t]);if(r!=null&&tE)for(var t of tE(r))e.indexOf(t)<0&&TP.call(r,t)&&(n[t]=r[t]);return n};var tae=(r,e)=>()=>{try{return e||r((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},nae=(r,e)=>{for(var n in e)nE(r,n,{get:e[n],enumerable:!0})},Wz=(r,e,n,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of jz(e))!CS.call(r,i)&&i!==n&&nE(r,i,{get:()=>e[i],enumerable:!(t=Gz(e,i))||t.enumerable});return r};var rae=(r,e,n)=>(n=r!=null?Vz(_P(r)):{},Wz(e||!r||!r.__esModule?nE(n,"default",{value:r,enumerable:!0}):n,r));var Ac=(r,e,n)=>Hz(_P(r),n,e);var I=(r,e,n)=>new Promise((t,i)=>{var o=c=>{try{a(n.next(c))}catch(l){i(l)}},s=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?t(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(r,e)).next())});function Se(r){return typeof r=="function"}function OS(r){return Se(r?.lift)}function ve(r){return e=>{if(OS(e))return e.lift(function(n){try{return r(n,this)}catch(t){this.error(t)}});throw new TypeError("Unable to lift unknown Observable type")}}function Ys(r){let n=r(t=>{Error.call(t),t.stack=new Error().stack});return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var rE=Ys(r=>function(n){r(this),this.message=n?`${n.length} errors occurred during unsubscription: ${n.map((t,i)=>`${i+1}) ${t.toString()}`).join(` `)}`:"",this.name="UnsubscriptionError",this.errors=n});function Rc(r,e){if(r){let n=r.indexOf(e);0<=n&&r.splice(n,1)}}var mt=class r{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;let{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(let o of n)o.remove(this);else n.remove(this);let{initialTeardown:t}=this;if(Se(t))try{t()}catch(o){e=o instanceof rE?o.errors:[o]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let o of i)try{IP(o)}catch(s){e=e??[],s instanceof rE?e=[...e,...s.errors]:e.push(s)}}if(e)throw new rE(e)}}add(e){var n;if(e&&e!==this)if(this.closed)IP(e);else{if(e instanceof r){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}}_hasParent(e){let{_parentage:n}=this;return n===e||Array.isArray(n)&&n.includes(e)}_addParent(e){let{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e}_removeParent(e){let{_parentage:n}=this;n===e?this._parentage=null:Array.isArray(n)&&Rc(n,e)}remove(e){let{_finalizers:n}=this;n&&Rc(n,e),e instanceof r&&e._removeParent(this)}};mt.EMPTY=(()=>{let r=new mt;return r.closed=!0,r})();var bS=mt.EMPTY;function iE(r){return r instanceof mt||r&&"closed"in r&&Se(r.remove)&&Se(r.add)&&Se(r.unsubscribe)}function IP(r){Se(r)?r():r.unsubscribe()}var Si={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Cu={setTimeout(r,e,...n){let{delegate:t}=Cu;return t?.setTimeout?t.setTimeout(r,e,...n):setTimeout(r,e,...n)},clearTimeout(r){let{delegate:e}=Cu;return(e?.clearTimeout||clearTimeout)(r)},delegate:void 0};function oE(r){Cu.setTimeout(()=>{let{onUnhandledError:e}=Si;if(e)e(r);else throw r})}function Ai(){}var vP=wS("C",void 0,void 0);function yP(r){return wS("E",void 0,r)}function SP(r){return wS("N",r,void 0)}function wS(r,e,n){return{kind:r,value:e,error:n}}var Dc=null;function Nu(r){if(Si.useDeprecatedSynchronousErrorHandling){let e=!Dc;if(e&&(Dc={errorThrown:!1,error:null}),r(),e){let{errorThrown:n,error:t}=Dc;if(Dc=null,n)throw t}}else r()}function AP(r){Si.useDeprecatedSynchronousErrorHandling&&Dc&&(Dc.errorThrown=!0,Dc.error=r)}var Cc=class extends mt{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,iE(e)&&e.add(this)):this.destination=Kz}static create(e,n,t){return new Ri(e,n,t)}next(e){this.isStopped?MS(SP(e),this):this._next(e)}error(e){this.isStopped?MS(yP(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?MS(vP,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},zz=Function.prototype.bind;function LS(r,e){return zz.call(r,e)}var PS=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:n}=this;if(n.next)try{n.next(e)}catch(t){sE(t)}}error(e){let{partialObserver:n}=this;if(n.error)try{n.error(e)}catch(t){sE(t)}else sE(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(n){sE(n)}}},Ri=class extends Cc{constructor(e,n,t){super();let i;if(Se(e)||!e)i={next:e??void 0,error:n??void 0,complete:t??void 0};else{let o;this&&Si.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=()=>this.unsubscribe(),i={next:e.next&&LS(e.next,o),error:e.error&&LS(e.error,o),complete:e.complete&&LS(e.complete,o)}):i=e}this.destination=new PS(i)}};function sE(r){Si.useDeprecatedSynchronousErrorHandling?AP(r):oE(r)}function qz(r){throw r}function MS(r,e){let{onStoppedNotification:n}=Si;n&&Cu.setTimeout(()=>n(r,e))}var Kz={closed:!0,next:Ai,error:qz,complete:Ai};function Te(r,e,n,t,i){return new xS(r,e,n,t,i)}var xS=class extends Cc{constructor(e,n,t,i,o,s){super(e),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=n?function(a){try{n(a)}catch(c){e.error(c)}}:super._next,this._error=i?function(a){try{i(a)}catch(c){e.error(c)}finally{this.unsubscribe()}}:super._error,this._complete=t?function(){try{t()}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:n}=this;super.unsubscribe(),!n&&((e=this.onFinalize)===null||e===void 0||e.call(this))}}};function Rt(r,e){return ve((n,t)=>{let i=0;n.subscribe(Te(t,o=>r.call(e,o,i++)&&t.next(o)))})}var Ou=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Di(r){return r}function RP(r){return r.length===0?Di:r.length===1?r[0]:function(n){return r.reduce((t,i)=>i(t),n)}}var pe=(()=>{class r{constructor(n){n&&(this._subscribe=n)}lift(n){let t=new r;return t.source=this,t.operator=n,t}subscribe(n,t,i){let o=Qz(n)?n:new Ri(n,t,i);return Nu(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(n){try{return this._subscribe(n)}catch(t){n.error(t)}}forEach(n,t){return t=DP(t),new t((i,o)=>{let s=new Ri({next:a=>{try{n(a)}catch(c){o(c),s.unsubscribe()}},error:o,complete:i});this.subscribe(s)})}_subscribe(n){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(n)}[Ou](){return this}pipe(...n){return RP(n)(this)}toPromise(n){return n=DP(n),new n((t,i)=>{let o;this.subscribe(s=>o=s,s=>i(s),()=>t(o))})}}return r.create=e=>new r(e),r})();function DP(r){var e;return(e=r??Si.Promise)!==null&&e!==void 0?e:Promise}function Yz(r){return r&&Se(r.next)&&Se(r.error)&&Se(r.complete)}function Qz(r){return r&&r instanceof Cc||Yz(r)&&iE(r)}var Nc=new pe(r=>r.complete());function Dt(r){return r<=0?()=>Nc:ve((e,n)=>{let t=0;e.subscribe(Te(n,i=>{++t<=r&&(n.next(i),r<=t&&n.complete())}))})}function FS(r,e){var n={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.indexOf(t)<0&&(n[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)e.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(n[t[i]]=r[t[i]]);return n}function NP(r,e,n,t){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{l(t.next(u))}catch(d){s(d)}}function c(u){try{l(t.throw(u))}catch(d){s(d)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((t=t.apply(r,e||[])).next())})}function CP(r){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&r[e],t=0;if(n)return n.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&t>=r.length&&(r=void 0),{value:r&&r[t++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Oc(r){return this instanceof Oc?(this.v=r,this):new Oc(r)}function OP(r,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n.apply(r,e||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(g){return function(p){return Promise.resolve(p).then(g,d)}}function a(g,p){t[g]&&(i[g]=function(_){return new Promise(function(T,D){o.push([g,_,T,D])>1||c(g,_)})},p&&(i[g]=p(i[g])))}function c(g,p){try{l(t[g](p))}catch(_){f(o[0][3],_)}}function l(g){g.value instanceof Oc?Promise.resolve(g.value.v).then(u,d):f(o[0][2],g)}function u(g){c("next",g)}function d(g){c("throw",g)}function f(g,p){g(p),o.shift(),o.length&&c(o[0][0],o[0][1])}}function bP(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],n;return e?e.call(r):(r=typeof CP=="function"?CP(r):r[Symbol.iterator](),n={},t("next"),t("throw"),t("return"),n[Symbol.asyncIterator]=function(){return this},n);function t(o){n[o]=r[o]&&function(s){return new Promise(function(a,c){s=r[o](s),i(a,c,s.done,s.value)})}}function i(o,s,a,c){Promise.resolve(c).then(function(l){o({value:l,done:a})},s)}}var bu=r=>r&&typeof r.length=="number"&&typeof r!="function";function aE(r){return Se(r?.then)}function cE(r){return Se(r[Ou])}function lE(r){return Symbol.asyncIterator&&Se(r?.[Symbol.asyncIterator])}function uE(r){return new TypeError(`You provided ${r!==null&&typeof r=="object"?"an invalid object":`'${r}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function Xz(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var dE=Xz();function hE(r){return Se(r?.[dE])}function fE(r){return OP(this,arguments,function*(){let n=r.getReader();try{for(;;){let{value:t,done:i}=yield Oc(n.read());if(i)return yield Oc(void 0);yield yield Oc(t)}}finally{n.releaseLock()}})}function gE(r){return Se(r?.getReader)}function Le(r){if(r instanceof pe)return r;if(r!=null){if(cE(r))return Jz(r);if(bu(r))return Zz(r);if(aE(r))return e6(r);if(lE(r))return wP(r);if(hE(r))return t6(r);if(gE(r))return n6(r)}throw uE(r)}function Jz(r){return new pe(e=>{let n=r[Ou]();if(Se(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Zz(r){return new pe(e=>{for(let n=0;n<r.length&&!e.closed;n++)e.next(r[n]);e.complete()})}function e6(r){return new pe(e=>{r.then(n=>{e.closed||(e.next(n),e.complete())},n=>e.error(n)).then(null,oE)})}function t6(r){return new pe(e=>{for(let n of r)if(e.next(n),e.closed)return;e.complete()})}function wP(r){return new pe(e=>{r6(r,e).catch(n=>e.error(n))})}function n6(r){return wP(fE(r))}function r6(r,e){var n,t,i,o;return NP(this,void 0,void 0,function*(){try{for(n=bP(r);t=yield n.next(),!t.done;){let s=t.value;if(e.next(s),e.closed)return}}catch(s){i={error:s}}finally{try{t&&!t.done&&(o=n.return)&&(yield o.call(n))}finally{if(i)throw i.error}}e.complete()})}function LP(r){return ve((e,n)=>{let t=!1,i=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,t){t=!1;let l=i;i=null,n.next(l)}s&&n.complete()},c=()=>{o=null,s&&n.complete()};e.subscribe(Te(n,l=>{t=!0,i=l,o||Le(r(l)).subscribe(o=Te(n,a,c))},()=>{s=!0,(!t||!o||o.closed)&&n.complete()}))})}var mE=class extends mt{constructor(e,n){super()}schedule(e,n=0){return this}};var Rf={setInterval(r,e,...n){let{delegate:t}=Rf;return t?.setInterval?t.setInterval(r,e,...n):setInterval(r,e,...n)},clearInterval(r){let{delegate:e}=Rf;return(e?.clearInterval||clearInterval)(r)},delegate:void 0};var ao=class extends mE{constructor(e,n){super(e,n),this.scheduler=e,this.work=n,this.pending=!1}schedule(e,n=0){var t;if(this.closed)return this;this.state=e;let i=this.id,o=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(o,i,n)),this.pending=!0,this.delay=n,this.id=(t=this.id)!==null&&t!==void 0?t:this.requestAsyncId(o,this.id,n),this}requestAsyncId(e,n,t=0){return Rf.setInterval(e.flush.bind(e,this),t)}recycleAsyncId(e,n,t=0){if(t!=null&&this.delay===t&&this.pending===!1)return n;n!=null&&Rf.clearInterval(n)}execute(e,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let t=this._execute(e,n);if(t)return t;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,n){let t=!1,i;try{this.work(e)}catch(o){t=!0,i=o||new Error("Scheduled action threw falsy error")}if(t)return this.unsubscribe(),i}unsubscribe(){if(!this.closed){let{id:e,scheduler:n}=this,{actions:t}=n;this.work=this.state=this.scheduler=null,this.pending=!1,Rc(t,this),e!=null&&(this.id=this.recycleAsyncId(n,e,null)),this.delay=null,super.unsubscribe()}}};var bc={now(){return(bc.delegate||Date).now()},delegate:void 0};var wu=class r{constructor(e,n=r.now){this.schedulerActionCtor=e,this.now=n}schedule(e,n=0,t){return new this.schedulerActionCtor(this,e).schedule(t,n)}};wu.now=bc.now;var co=class extends wu{constructor(e,n=wu.now){super(e,n),this.actions=[],this._active=!1}flush(e){let{actions:n}=this;if(this._active){n.push(e);return}let t;this._active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=n.shift());if(this._active=!1,t){for(;e=n.shift();)e.unsubscribe();throw t}}};var $n=new co(ao),kS=$n;function pE(r){return r&&Se(r.schedule)}function EE(r){return r instanceof Date&&!isNaN(r)}function Ci(r=0,e,n=kS){let t=-1;return e!=null&&(pE(e)?n=e:t=e),new pe(i=>{let o=EE(r)?+r-n.now():r;o<0&&(o=0);let s=0;return n.schedule(function(){i.closed||(i.next(s++),0<=t?this.schedule(void 0,t):i.complete())},o)})}function i6(r,e=$n){return LP(()=>Ci(r,e))}function US(r){return r[r.length-1]}function _E(r){return Se(US(r))?r.pop():void 0}function lo(r){return pE(US(r))?r.pop():void 0}function MP(r,e){return typeof US(r)=="number"?r.pop():e}function jn(r,e,n,t=0,i=!1){let o=e.schedule(function(){n(),i?r.add(this.schedule(null,t)):this.unsubscribe()},t);if(r.add(o),!i)return o}function as(r){return ve((e,n)=>{let t=null,i=!1,o;t=e.subscribe(Te(n,void 0,void 0,s=>{o=Le(r(s,as(r)(e))),t?(t.unsubscribe(),t=null,o.subscribe(n)):i=!0})),i&&(t.unsubscribe(),t=null,o.subscribe(n))})}var{isArray:o6}=Array,{getPrototypeOf:s6,prototype:a6,keys:c6}=Object;function TE(r){if(r.length===1){let e=r[0];if(o6(e))return{args:e,keys:null};if(l6(e)){let n=c6(e);return{args:n.map(t=>e[t]),keys:n}}}return{args:r,keys:null}}function l6(r){return r&&typeof r=="object"&&s6(r)===a6}function Qs(r,e=0){return ve((n,t)=>{n.subscribe(Te(t,i=>jn(t,r,()=>t.next(i),e),()=>jn(t,r,()=>t.complete(),e),i=>jn(t,r,()=>t.error(i),e)))})}function Xs(r,e=0){return ve((n,t)=>{t.add(r.schedule(()=>n.subscribe(t),e))})}function PP(r,e){return Le(r).pipe(Xs(e),Qs(e))}function xP(r,e){return Le(r).pipe(Xs(e),Qs(e))}function FP(r,e){return new pe(n=>{let t=0;return e.schedule(function(){t===r.length?n.complete():(n.next(r[t++]),n.closed||this.schedule())})})}function kP(r,e){return new pe(n=>{let t;return jn(n,e,()=>{t=r[dE](),jn(n,e,()=>{let i,o;try{({value:i,done:o}=t.next())}catch(s){n.error(s);return}o?n.complete():n.next(i)},0,!0)}),()=>Se(t?.return)&&t.return()})}function IE(r,e){if(!r)throw new Error("Iterable cannot be null");return new pe(n=>{jn(n,e,()=>{let t=r[Symbol.asyncIterator]();jn(n,e,()=>{t.next().then(i=>{i.done?n.complete():n.next(i.value)})},0,!0)})})}function UP(r,e){return IE(fE(r),e)}function VP(r,e){if(r!=null){if(cE(r))return PP(r,e);if(bu(r))return FP(r,e);if(aE(r))return xP(r,e);if(lE(r))return IE(r,e);if(hE(r))return kP(r,e);if(gE(r))return UP(r,e)}throw uE(r)}function Mr(r,e){return e?VP(r,e):Le(r)}function ge(r,e){return ve((n,t)=>{let i=0;n.subscribe(Te(t,o=>{t.next(r.call(e,o,i++))}))})}var{isArray:u6}=Array;function d6(r,e){return u6(e)?r(...e):r(e)}function Lu(r){return ge(e=>d6(r,e))}function vE(r,e){return r.reduce((n,t,i)=>(n[t]=e[i],n),{})}function ti(...r){let e=lo(r),n=_E(r),{args:t,keys:i}=TE(r);if(t.length===0)return Mr([],e);let o=new pe(h6(t,e,i?s=>vE(i,s):Di));return n?o.pipe(Lu(n)):o}function h6(r,e,n=Di){return t=>{BP(e,()=>{let{length:i}=r,o=new Array(i),s=i,a=i;for(let c=0;c<i;c++)BP(e,()=>{let l=Mr(r[c],e),u=!1;l.subscribe(Te(t,d=>{o[c]=d,u||(u=!0,a--),a||t.next(n(o.slice()))},()=>{--s||t.complete()}))},t)},t)}}function BP(r,e,n){r?jn(n,r,e):e()}function GP(r,e,n,t,i,o,s,a){let c=[],l=0,u=0,d=!1,f=()=>{d&&!c.length&&!l&&e.complete()},g=_=>l<t?p(_):c.push(_),p=_=>{o&&e.next(_),l++;let T=!1;Le(n(_,u++)).subscribe(Te(e,D=>{i?.(D),o?g(D):e.next(D)},()=>{T=!0},void 0,()=>{if(T)try{for(l--;c.length&&l<t;){let D=c.shift();s?jn(e,s,()=>p(D)):p(D)}f()}catch(D){e.error(D)}}))};return r.subscribe(Te(e,g,()=>{d=!0,f()})),()=>{a?.()}}function uo(r,e,n=1/0){return Se(e)?uo((t,i)=>ge((o,s)=>e(t,o,i,s))(Le(r(t,i))),n):(typeof e=="number"&&(n=e),ve((t,i)=>GP(t,i,r,n)))}function $P(r,e,n,t,i){return(o,s)=>{let a=n,c=e,l=0;o.subscribe(Te(s,u=>{let d=l++;c=a?r(c,u,d):(a=!0,u),t&&s.next(c)},i&&(()=>{a&&s.next(c),s.complete()})))}}function yE(r=1/0){return uo(Di,r)}function jP(){return yE(1)}function VS(r,e){return Se(e)?uo(r,e,1):uo(r,1)}var HP=Ys(r=>function(){r(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var Ct=(()=>{class r extends pe{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){let t=new SE(this,this);return t.operator=n,t}_throwIfClosed(){if(this.closed)throw new HP}next(n){Nu(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let t of this.currentObservers)t.next(n)}})}error(n){Nu(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;let{observers:t}=this;for(;t.length;)t.shift().error(n)}})}complete(){Nu(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:n}=this;for(;n.length;)n.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0}_trySubscribe(n){return this._throwIfClosed(),super._trySubscribe(n)}_subscribe(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)}_innerSubscribe(n){let{hasError:t,isStopped:i,observers:o}=this;return t||i?bS:(this.currentObservers=null,o.push(n),new mt(()=>{this.currentObservers=null,Rc(o,n)}))}_checkFinalizedStatuses(n){let{hasError:t,thrownError:i,isStopped:o}=this;t?n.error(i):o&&n.complete()}asObservable(){let n=new pe;return n.source=this,n}}return r.create=(e,n)=>new SE(e,n),r})(),SE=class extends Ct{constructor(e,n){super(),this.destination=e,this.source=n}next(e){var n,t;(t=(n=this.destination)===null||n===void 0?void 0:n.next)===null||t===void 0||t.call(n,e)}error(e){var n,t;(t=(n=this.destination)===null||n===void 0?void 0:n.error)===null||t===void 0||t.call(n,e)}complete(){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||n===void 0||n.call(e)}_subscribe(e){var n,t;return(t=(n=this.source)===null||n===void 0?void 0:n.subscribe(e))!==null&&t!==void 0?t:bS}};function BS(r){return ve((e,n)=>{let t=!1,i=null,o=null,s=()=>{if(o?.unsubscribe(),o=null,t){t=!1;let a=i;i=null,n.next(a)}};e.subscribe(Te(n,a=>{o?.unsubscribe(),t=!0,i=a,o=Te(n,s,Ai),Le(r(a)).subscribe(o)},()=>{s(),n.complete()},void 0,()=>{i=o=null}))})}function Mu(r,e=$n){return ve((n,t)=>{let i=null,o=null,s=null,a=()=>{if(i){i.unsubscribe(),i=null;let l=o;o=null,t.next(l)}};function c(){let l=s+r,u=e.now();if(u<l){i=this.schedule(void 0,l-u),t.add(i);return}a()}n.subscribe(Te(t,l=>{o=l,s=e.now(),i||(i=e.schedule(c,r),t.add(i))},()=>{a(),t.complete()},void 0,()=>{o=i=null}))})}function Js(...r){return jP()(Mr(r,lo(r)))}function WP(){return ve((r,e)=>{r.subscribe(Te(e,Ai))})}function zP(r){return ge(()=>r)}function GS(r,e){return e?n=>Js(e.pipe(Dt(1),WP()),n.pipe(GS(r))):uo((n,t)=>Le(r(n,t)).pipe(Dt(1),zP(n)))}function $S(r,e=$n){let n=Ci(r,e);return GS(()=>n)}function de(...r){let e=lo(r);return Mr(r,e)}function rt(r,e=Di){return r=r??f6,ve((n,t)=>{let i,o=!0;n.subscribe(Te(t,s=>{let a=e(s);(o||!r(i,a))&&(o=!1,i=a,t.next(s))}))})}function f6(r,e){return r===e}var qP=Ys(r=>function(){r(this),this.name="EmptyError",this.message="no elements in sequence"});function wc(r){return ve((e,n)=>{try{e.subscribe(n)}finally{n.add(r)}})}function KP(){return ve((r,e)=>{let n=null;r._refCount++;let t=Te(e,void 0,void 0,void 0,()=>{if(!r||r._refCount<=0||0<--r._refCount){n=null;return}let i=r._connection,o=n;n=null,i&&(!o||i===o)&&i.unsubscribe(),e.unsubscribe()});r.subscribe(t),t.closed||(n=r.connect())})}var jS=class extends pe{constructor(e,n){super(),this.source=e,this.subjectFactory=n,this._subject=null,this._refCount=0,this._connection=null,OS(e)&&(this.lift=e.lift)}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){let e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:e}=this;this._subject=this._connection=null,e?.unsubscribe()}connect(){let e=this._connection;if(!e){e=this._connection=new mt;let n=this.getSubject();e.add(this.source.subscribe(Te(n,void 0,()=>{this._teardown(),n.complete()},t=>{this._teardown(),n.error(t)},()=>this._teardown()))),e.closed&&(this._connection=null,e=mt.EMPTY)}return e}refCount(){return KP()(this)}};function Pu(){return ve((r,e)=>{let n,t=!1;r.subscribe(Te(e,i=>{let o=n;n=i,t&&e.next([o,i]),t=!0}))})}var Y=class extends Ct{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let n=super._subscribe(e);return!n.closed&&e.next(this._value),n}getValue(){let{hasError:e,thrownError:n,_value:t}=this;if(e)throw n;return this._throwIfClosed(),t}next(e){super.next(this._value=e)}};var Lc=class extends Ct{constructor(e=1/0,n=1/0,t=bc){super(),this._bufferSize=e,this._windowTime=n,this._timestampProvider=t,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=n===1/0,this._bufferSize=Math.max(1,e),this._windowTime=Math.max(1,n)}next(e){let{isStopped:n,_buffer:t,_infiniteTimeWindow:i,_timestampProvider:o,_windowTime:s}=this;n||(t.push(e),!i&&t.push(o.now()+s)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();let n=this._innerSubscribe(e),{_infiniteTimeWindow:t,_buffer:i}=this,o=i.slice();for(let s=0;s<o.length&&!e.closed;s+=t?1:2)e.next(o[s]);return this._checkFinalizedStatuses(e),n}_trimBuffer(){let{_bufferSize:e,_timestampProvider:n,_buffer:t,_infiniteTimeWindow:i}=this,o=(i?1:2)*e;if(e<1/0&&o<t.length&&t.splice(0,t.length-o),!i){let s=n.now(),a=0;for(let c=1;c<t.length&&t[c]<=s;c+=2)a=c;a&&t.splice(0,a+1)}}};function g6(r=0,e=$n){return r<0&&(r=0),Ci(r,r,e)}function AE(r,e){return ve($P(r,e,arguments.length>=2,!0))}function WS(r={}){let{connector:e=()=>new Ct,resetOnError:n=!0,resetOnComplete:t=!0,resetOnRefCountZero:i=!0}=r;return o=>{let s,a,c,l=0,u=!1,d=!1,f=()=>{a?.unsubscribe(),a=void 0},g=()=>{f(),s=c=void 0,u=d=!1},p=()=>{let _=s;g(),_?.unsubscribe()};return ve((_,T)=>{l++,!d&&!u&&f();let D=c=c??e();T.add(()=>{l--,l===0&&!d&&!u&&(a=HS(p,i))}),D.subscribe(T),!s&&l>0&&(s=new Ri({next:w=>D.next(w),error:w=>{d=!0,f(),a=HS(g,n,w),D.error(w)},complete:()=>{u=!0,f(),a=HS(g,t),D.complete()}}),Le(_).subscribe(s))})(o)}}function HS(r,e,...n){if(e===!0){r();return}if(e===!1)return;let t=new Ri({next:()=>{t.unsubscribe(),r()}});return Le(e(...n)).subscribe(t)}function m6(r,e,n){let t,i=!1;return r&&typeof r=="object"?{bufferSize:t=1/0,windowTime:e=1/0,refCount:i=!1,scheduler:n}=r:t=r??1/0,WS({connector:()=>new Lc(t,e,n),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function zS(r){return Rt((e,n)=>r<=n)}function p6(r){return ve((e,n)=>{let t=!1,i=Te(n,()=>{i?.unsubscribe(),t=!0},Ai);Le(r).subscribe(i),e.subscribe(Te(n,o=>t&&n.next(o)))})}function xu(...r){let e=lo(r);return ve((n,t)=>{(e?Js(r,n,e):Js(r,n)).subscribe(t)})}function pt(r,e){return ve((n,t)=>{let i=null,o=0,s=!1,a=()=>s&&!i&&t.complete();n.subscribe(Te(t,c=>{i?.unsubscribe();let l=0,u=o++;Le(r(c,u)).subscribe(i=Te(t,d=>t.next(e?e(c,d,u,l++):d),()=>{i=null,a()}))},()=>{s=!0,a()}))})}function Zs(r){return ve((e,n)=>{Le(r).subscribe(Te(n,()=>n.complete(),Ai)),!n.closed&&e.subscribe(n)})}function E6(r,e=!1){return ve((n,t)=>{let i=0;n.subscribe(Te(t,o=>{let s=r(o,i++);(s||e)&&t.next(o),!s&&t.complete()}))})}function ea(r,e,n){let t=Se(r)||e||n?{next:r,error:e,complete:n}:r;return t?ve((i,o)=>{var s;(s=t.subscribe)===null||s===void 0||s.call(t);let a=!0;i.subscribe(Te(o,c=>{var l;(l=t.next)===null||l===void 0||l.call(t,c),o.next(c)},()=>{var c;a=!1,(c=t.complete)===null||c===void 0||c.call(t),o.complete()},c=>{var l;a=!1,(l=t.error)===null||l===void 0||l.call(t,c),o.error(c)},()=>{var c,l;a&&((c=t.unsubscribe)===null||c===void 0||c.call(t)),(l=t.finalize)===null||l===void 0||l.call(t)}))}):Di}function YP(r,e){return ve((n,t)=>{let{leading:i=!0,trailing:o=!1}=e??{},s=!1,a=null,c=null,l=!1,u=()=>{c?.unsubscribe(),c=null,o&&(g(),l&&t.complete())},d=()=>{c=null,l&&t.complete()},f=p=>c=Le(r(p)).subscribe(Te(t,u,d)),g=()=>{if(s){s=!1;let p=a;a=null,t.next(p),!l&&f(p)}};n.subscribe(Te(t,p=>{s=!0,a=p,!(c&&!c.closed)&&(i?g():f(p))},()=>{l=!0,!(o&&s&&c&&!c.closed)&&t.complete()}))})}function _6(r,e=$n,n){let t=Ci(r,e);return YP(()=>t,n)}var T6=Ys(r=>function(n=null){r(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=n});function I6(r,e){let{first:n,each:t,with:i=v6,scheduler:o=e??$n,meta:s=null}=EE(r)?{first:r}:typeof r=="number"?{each:r}:r;if(n==null&&t==null)throw new TypeError("No timeout provided.");return ve((a,c)=>{let l,u,d=null,f=0,g=p=>{u=jn(c,o,()=>{try{l.unsubscribe(),Le(i({meta:s,lastValue:d,seen:f})).subscribe(c)}catch(_){c.error(_)}},p)};l=a.subscribe(Te(c,p=>{u?.unsubscribe(),f++,c.next(d=p),t>0&&g(t)},void 0,void 0,()=>{u?.closed||u?.unsubscribe(),d=null})),!f&&g(n!=null?typeof n=="number"?n:+n-o.now():t)})}function v6(r){throw new T6(r)}function y6(r=bc){return ge(e=>({value:e,timestamp:r.now()}))}var qS;function RE(){return qS}function ho(r){let e=qS;return qS=r,e}var QP=Symbol("NotFound");function Fu(r){return r===QP||r?.name==="\u0275NotFound"}var Hn=null,DE=!1,KS=1,S6=null,Tn=Symbol("SIGNAL");function Ae(r){let e=Hn;return Hn=r,e}function bE(){return Hn}var Mc={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 ku(r){if(DE)throw new Error("");if(Hn===null)return;Hn.consumerOnSignalRead(r);let e=Hn.producersTail;if(e!==void 0&&e.producer===r)return;let n,t=Hn.recomputing;if(t&&(n=e!==void 0?e.nextProducer:Hn.producers,n!==void 0&&n.producer===r)){Hn.producersTail=n,n.lastReadVersion=r.version;return}let i=r.consumersTail;if(i!==void 0&&i.consumer===Hn&&(!t||R6(i,Hn)))return;let o=Bu(Hn),s={producer:r,consumer:Hn,nextProducer:n,prevConsumer:i,lastReadVersion:r.version,nextConsumer:void 0};Hn.producersTail=s,e!==void 0?e.nextProducer=s:Hn.producers=s,o&&e0(r,s)}function XP(){KS++}function wE(r){if(!(Bu(r)&&!r.dirty)&&!(!r.dirty&&r.lastCleanEpoch===KS)){if(!r.producerMustRecompute(r)&&!Vu(r)){OE(r);return}r.producerRecomputeValue(r),OE(r)}}function YS(r){if(r.consumers===void 0)return;let e=DE;DE=!0;try{for(let n=r.consumers;n!==void 0;n=n.nextConsumer){let t=n.consumer;t.dirty||A6(t)}}finally{DE=e}}function QS(){return Hn?.consumerAllowSignalWrites!==!1}function A6(r){r.dirty=!0,YS(r),r.consumerMarkedDirty?.(r)}function OE(r){r.dirty=!1,r.lastCleanEpoch=KS}function Pc(r){return r&&JP(r),Ae(r)}function JP(r){r.producersTail=void 0,r.recomputing=!0}function Uu(r,e){Ae(e),r&&ZP(r)}function ZP(r){r.recomputing=!1;let e=r.producersTail,n=e!==void 0?e.nextProducer:r.producers;if(n!==void 0){if(Bu(r))do n=XS(n);while(n!==void 0);e!==void 0?e.nextProducer=void 0:r.producers=void 0}}function Vu(r){for(let e=r.producers;e!==void 0;e=e.nextProducer){let n=e.producer,t=e.lastReadVersion;if(t!==n.version||(wE(n),t!==n.version))return!0}return!1}function xc(r){if(Bu(r)){let e=r.producers;for(;e!==void 0;)e=XS(e)}r.producers=void 0,r.producersTail=void 0,r.consumers=void 0,r.consumersTail=void 0}function e0(r,e){let n=r.consumersTail,t=Bu(r);if(n!==void 0?(e.nextConsumer=n.nextConsumer,n.nextConsumer=e):(e.nextConsumer=void 0,r.consumers=e),e.prevConsumer=n,r.consumersTail=e,!t)for(let i=r.producers;i!==void 0;i=i.nextProducer)e0(i.producer,i)}function XS(r){let e=r.producer,n=r.nextProducer,t=r.nextConsumer,i=r.prevConsumer;if(r.nextConsumer=void 0,r.prevConsumer=void 0,t!==void 0?t.prevConsumer=i:e.consumersTail=i,i!==void 0)i.nextConsumer=t;else if(e.consumers=t,!Bu(e)){let o=e.producers;for(;o!==void 0;)o=XS(o)}return n}function Bu(r){return r.consumerIsAlwaysLive||r.consumers!==void 0}function LE(r){S6?.(r)}function R6(r,e){let n=e.producersTail;if(n!==void 0){let t=e.producers;do{if(t===r)return!0;if(t===n)break;t=t.nextProducer}while(t!==void 0)}return!1}function ME(r,e){return Object.is(r,e)}function Cf(r,e){let n=Object.create(D6);n.computation=r,e!==void 0&&(n.equal=e);let t=()=>{if(wE(n),ku(n),n.value===Df)throw n.error;return n.value};return t[Tn]=n,LE(n),t}var CE=Symbol("UNSET"),NE=Symbol("COMPUTING"),Df=Symbol("ERRORED"),D6=ue(x({},Mc),{value:CE,dirty:!0,error:null,equal:ME,kind:"computed",producerMustRecompute(r){return r.value===CE||r.value===NE},producerRecomputeValue(r){if(r.value===NE)throw new Error("");let e=r.value;r.value=NE;let n=Pc(r),t,i=!1;try{t=r.computation(),Ae(null),i=e!==CE&&e!==Df&&t!==Df&&r.equal(e,t)}catch(o){t=Df,r.error=o}finally{Uu(r,n)}if(i){r.value=e;return}r.value=t,r.version++}});function C6(){throw new Error}var t0=C6;function n0(r){t0(r)}function JS(r){t0=r}var N6=null;function ZS(r,e){let n=Object.create(PE);n.value=r,e!==void 0&&(n.equal=e);let t=()=>r0(n);return t[Tn]=n,LE(n),[t,s=>Gu(n,s),s=>eA(n,s)]}function r0(r){return ku(r),r.value}function Gu(r,e){QS()||n0(r),r.equal(r.value,e)||(r.value=e,O6(r))}function eA(r,e){QS()||n0(r),Gu(r,e(r.value))}var PE=ue(x({},Mc),{equal:ME,value:void 0,kind:"signal"});function O6(r){r.version++,XP(),YS(r),N6?.(r)}var $u={schedule(r){let e=requestAnimationFrame,n=cancelAnimationFrame,{delegate:t}=$u;t&&(e=t.requestAnimationFrame,n=t.cancelAnimationFrame);let i=e(o=>{n=void 0,r(o)});return new mt(()=>n?.(i))},requestAnimationFrame(...r){let{delegate:e}=$u;return(e?.requestAnimationFrame||requestAnimationFrame)(...r)},cancelAnimationFrame(...r){let{delegate:e}=$u;return(e?.cancelAnimationFrame||cancelAnimationFrame)(...r)},delegate:void 0};var b6=1,tA,nA={};function i0(r){return r in nA?(delete nA[r],!0):!1}var o0={setImmediate(r){let e=b6++;return nA[e]=!0,tA||(tA=Promise.resolve()),tA.then(()=>i0(e)&&r()),e},clearImmediate(r){i0(r)}};var{setImmediate:w6,clearImmediate:L6}=o0,Nf={setImmediate(...r){let{delegate:e}=Nf;return(e?.setImmediate||w6)(...r)},clearImmediate(r){let{delegate:e}=Nf;return(e?.clearImmediate||L6)(r)},delegate:void 0};var xE=class extends ao{constructor(e,n){super(e,n),this.scheduler=e,this.work=n}requestAsyncId(e,n,t=0){return t!==null&&t>0?super.requestAsyncId(e,n,t):(e.actions.push(this),e._scheduled||(e._scheduled=Nf.setImmediate(e.flush.bind(e,void 0))))}recycleAsyncId(e,n,t=0){var i;if(t!=null?t>0:this.delay>0)return super.recycleAsyncId(e,n,t);let{actions:o}=e;n!=null&&((i=o[o.length-1])===null||i===void 0?void 0:i.id)!==n&&(Nf.clearImmediate(n),e._scheduled===n&&(e._scheduled=void 0))}};var FE=class extends co{flush(e){this._active=!0;let n=this._scheduled;this._scheduled=void 0;let{actions:t}=this,i;e=e||t.shift();do if(i=e.execute(e.state,e.delay))break;while((e=t[0])&&e.id===n&&t.shift());if(this._active=!1,i){for(;(e=t[0])&&e.id===n&&t.shift();)e.unsubscribe();throw i}}};var M6=new FE(xE);var kE=class extends ao{constructor(e,n){super(e,n),this.scheduler=e,this.work=n}schedule(e,n=0){return n>0?super.schedule(e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)}execute(e,n){return n>0||this.closed?super.execute(e,n):this._execute(e,n)}requestAsyncId(e,n,t=0){return t!=null&&t>0||t==null&&this.delay>0?super.requestAsyncId(e,n,t):(e.flush(this),0)}};var UE=class extends co{};var rA=new UE(kE);var VE=class extends ao{constructor(e,n){super(e,n),this.scheduler=e,this.work=n}requestAsyncId(e,n,t=0){return t!==null&&t>0?super.requestAsyncId(e,n,t):(e.actions.push(this),e._scheduled||(e._scheduled=$u.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,n,t=0){var i;if(t!=null?t>0:this.delay>0)return super.recycleAsyncId(e,n,t);let{actions:o}=e;n!=null&&n===e._scheduled&&((i=o[o.length-1])===null||i===void 0?void 0:i.id)!==n&&($u.cancelAnimationFrame(n),e._scheduled=void 0)}};var BE=class extends co{flush(e){this._active=!0;let n;e?n=e.id:(n=this._scheduled,this._scheduled=void 0);let{actions:t}=this,i;e=e||t.shift();do if(i=e.execute(e.state,e.delay))break;while((e=t[0])&&e.id===n&&t.shift());if(this._active=!1,i){for(;(e=t[0])&&e.id===n&&t.shift();)e.unsubscribe();throw i}}};var P6=new BE(VE);function x6(r){return!!r&&(r instanceof pe||Se(r.lift)&&Se(r.subscribe))}function F6(r,e){let n=typeof e=="object";return new Promise((t,i)=>{let o=new Ri({next:s=>{t(s),o.unsubscribe()},error:i,complete:()=>{n?t(e.defaultValue):i(new qP)}});r.subscribe(o)})}function iA(r){return new pe(e=>{Le(r()).subscribe(e)})}function k6(...r){let e=_E(r),{args:n,keys:t}=TE(r),i=new pe(o=>{let{length:s}=n;if(!s){o.complete();return}let a=new Array(s),c=s,l=s;for(let u=0;u<s;u++){let d=!1;Le(n[u]).subscribe(Te(o,f=>{d||(d=!0,l--),a[u]=f},()=>c--,void 0,()=>{(!c||!d)&&(l||o.next(t?vE(t,a):a),o.complete())}))}});return e?i.pipe(Lu(e)):i}var U6=["addListener","removeListener"],V6=["addEventListener","removeEventListener"],B6=["on","off"];function fo(r,e,n,t){if(Se(n)&&(t=n,n=void 0),t)return fo(r,e,n).pipe(Lu(t));let[i,o]=j6(r)?V6.map(s=>a=>r[s](e,a,n)):G6(r)?U6.map(s0(r,e)):$6(r)?B6.map(s0(r,e)):[];if(!i&&bu(r))return uo(s=>fo(s,e,n))(Le(r));if(!i)throw new TypeError("Invalid event target");return new pe(s=>{let a=(...c)=>s.next(1<c.length?c:c[0]);return i(a),()=>o(a)})}function s0(r,e){return n=>t=>r[n](e,t)}function G6(r){return Se(r.addListener)&&Se(r.removeListener)}function $6(r){return Se(r.on)&&Se(r.off)}function j6(r){return Se(r.addEventListener)&&Se(r.removeEventListener)}function H6(r,e,n){return iA(()=>r()?e:n)}function ju(...r){let e=lo(r),n=MP(r,1/0),t=r;return t.length?t.length===1?Le(t[0]):yE(n)(Mr(t,e)):Nc}function a0(r){let e=Ae(null);try{return r()}finally{Ae(e)}}var c0=ue(x({},Mc),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:"effect"});function l0(r){if(r.dirty=!1,r.version>0&&!Vu(r))return;r.version++;let e=Pc(r);try{r.cleanup(),r.fn()}finally{Uu(r,e)}}var kc=class{full;major;minor;patch;constructor(e){this.full=e;let n=e.split(".");this.major=n[0],this.minor=n[1],this.patch=n.slice(2).join(".")}},pA=new kc("20.3.25");var HE="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",oe=class extends Error{code;constructor(e,n){super(ra(e,n)),this.code=e}};function W6(r){return`NG0${Math.abs(r)}`}function ra(r,e){return`${W6(r)}${e?": "+e:""}`}var Kt=globalThis;function Qe(r){for(let e in r)if(r[e]===Qe)return e;throw Error("")}function h0(r,e){for(let n in e)e.hasOwnProperty(n)&&!r.hasOwnProperty(n)&&(r[n]=e[n])}function ls(r){if(typeof r=="string")return r;if(Array.isArray(r))return`[${r.map(ls).join(", ")}]`;if(r==null)return""+r;let e=r.overriddenName||r.name;if(e)return`${e}`;let n=r.toString();if(n==null)return""+n;let t=n.indexOf(` `);return t>=0?n.slice(0,t):n}function WE(r,e){return r?e?`${r} ${e}`:r:e||""}var z6=Qe({__forward_ref__:Qe});function zE(r){return r.__forward_ref__=zE,r.toString=function(){return ls(this())},r}function sn(r){return EA(r)?r():r}function EA(r){return typeof r=="function"&&r.hasOwnProperty(z6)&&r.__forward_ref__===zE}function K(r){return{token:r.token,providedIn:r.providedIn||null,factory:r.factory,value:void 0}}function us(r){return{providers:r.providers||[],imports:r.imports||[]}}function qE(r){return q6(r,KE)}function q6(r,e){return r.hasOwnProperty(e)&&r[e]||null}function K6(r){let e=r?.[KE]??null;return e||null}function sA(r){return r&&r.hasOwnProperty($E)?r[$E]:null}var KE=Qe({\u0275prov:Qe}),$E=Qe({\u0275inj:Qe}),ee=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(e,n){this._desc=e,this.\u0275prov=void 0,typeof n=="number"?this.__NG_ELEMENT_ID__=n:n!==void 0&&(this.\u0275prov=K({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function _A(r){return r&&!!r.\u0275providers}var TA=Qe({\u0275cmp:Qe}),IA=Qe({\u0275dir:Qe}),vA=Qe({\u0275pipe:Qe}),yA=Qe({\u0275mod:Qe}),bf=Qe({\u0275fac:Qe}),Gc=Qe({__NG_ELEMENT_ID__:Qe}),u0=Qe({__NG_ENV_ID__:Qe});function xr(r){return typeof r=="string"?r:r==null?"":String(r)}function f0(r){return typeof r=="function"?r.name||r.toString():typeof r=="object"&&r!=null&&typeof r.type=="function"?r.type.name||r.type.toString():xr(r)}var g0=Qe({ngErrorCode:Qe}),Y6=Qe({ngErrorMessage:Qe}),Q6=Qe({ngTokenPath:Qe});function SA(r,e){return m0("",-200,e)}function YE(r,e){throw new oe(-201,!1)}function m0(r,e,n){let t=new oe(e,r);return t[g0]=e,t[Y6]=r,n&&(t[Q6]=n),t}function X6(r){return r[g0]}var aA;function p0(){return aA}function rr(r){let e=aA;return aA=r,e}function AA(r,e,n){let t=qE(r);if(t&&t.providedIn=="root")return t.value===void 0?t.value=t.factory():t.value;if(n&8)return null;if(e!==void 0)return e;YE(r,"Injector")}var J6={},Fc=J6,cA="__NG_DI_FLAG__",lA=class{injector;constructor(e){this.injector=e}retrieve(e,n){let t=Uc(n)||0;try{return this.injector.get(e,t&8?null:Fc,t)}catch(i){if(Fu(i))return i;throw i}}};function Z6(r,e=0){let n=RE();if(n===void 0)throw new oe(-203,!1);if(n===null)return AA(r,void 0,e);{let t=e4(e),i=n.retrieve(r,t);if(Fu(i)){if(t.optional)return null;throw i}return i}}function C(r,e=0){return(p0()||Z6)(sn(r),e)}function J(r,e){return C(r,Uc(e))}function Uc(r){return typeof r>"u"||typeof r=="number"?r:0|(r.optional&&8)|(r.host&&1)|(r.self&&2)|(r.skipSelf&&4)}function e4(r){return{optional:!!(r&8),host:!!(r&1),self:!!(r&2),skipSelf:!!(r&4)}}function uA(r){let e=[];for(let n=0;n<r.length;n++){let t=sn(r[n]);if(Array.isArray(t)){if(t.length===0)throw new oe(900,!1);let i,o=0;for(let s=0;s<t.length;s++){let a=t[s],c=t4(a);typeof c=="number"?c===-1?i=a.token:o|=c:i=a}e.push(C(i,o))}else e.push(C(t))}return e}function RA(r,e){return r[cA]=e,r.prototype[cA]=e,r}function t4(r){return r[cA]}function ta(r,e){let n=r.hasOwnProperty(bf);return n?r[bf]:null}function E0(r,e,n){if(r.length!==e.length)return!1;for(let t=0;t<r.length;t++){let i=r[t],o=e[t];if(n&&(i=n(i),o=n(o)),o!==i)return!1}return!0}function _0(r){return r.flat(Number.POSITIVE_INFINITY)}function QE(r,e){r.forEach(n=>Array.isArray(n)?QE(n,e):e(n))}function DA(r,e,n){e>=r.length?r.push(n):r.splice(e,0,n)}function Mf(r,e){return e>=r.length-1?r.pop():r.splice(e,1)[0]}function T0(r,e){let n=[];for(let t=0;t<r;t++)n.push(e);return n}function I0(r,e,n,t){let i=r.length;if(i==e)r.push(n,t);else if(i===1)r.push(t,r[0]),r[0]=n;else{for(i--,r.push(r[i-1],r[i]);i>e;){let o=i-2;r[i]=r[o],i--}r[e]=n,r[e+1]=t}}function Pf(r,e,n){let t=Wu(r,e);return t>=0?r[t|1]=n:(t=~t,I0(r,t,e,n)),t}function XE(r,e){let n=Wu(r,e);if(n>=0)return r[n|1]}function Wu(r,e){return n4(r,e,1)}function n4(r,e,n){let t=0,i=r.length>>n;for(;i!==t;){let o=t+(i-t>>1),s=r[o<<n];if(e===s)return o<<n;s>e?i=o:t=o+1}return~(i<<n)}var Ni={},Wn=[],ia=new ee(""),CA=new ee("",-1),NA=new ee(""),wf=class{get(e,n=Fc){if(n===Fc){let i=m0("",-201);throw i.name="\u0275NotFound",i}return n}};function v0(r){return r[yA]||null}function oa(r){return r[TA]||null}function JE(r){return r[IA]||null}function OA(r){return r[vA]||null}function pr(r){return{\u0275providers:r}}function y0(...r){return{\u0275providers:bA(!0,r),\u0275fromNgModule:!0}}function bA(r,...e){let n=[],t=new Set,i,o=s=>{n.push(s)};return QE(e,s=>{let a=s;jE(a,o,[],t)&&(i||=[],i.push(a))}),i!==void 0&&S0(i,o),n}function S0(r,e){for(let n=0;n<r.length;n++){let{ngModule:t,providers:i}=r[n];wA(i,o=>{e(o,t)})}}function jE(r,e,n,t){if(r=sn(r),!r)return!1;let i=null,o=sA(r),s=!o&&oa(r);if(!o&&!s){let c=r.ngModule;if(o=sA(c),o)i=c;else return!1}else{if(s&&!s.standalone)return!1;i=r}let a=t.has(i);if(s){if(a)return!1;if(t.add(i),s.dependencies){let c=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let l of c)jE(l,e,n,t)}}else if(o){if(o.imports!=null&&!a){t.add(i);let l;QE(o.imports,u=>{jE(u,e,n,t)&&(l||=[],l.push(u))}),l!==void 0&&S0(l,e)}if(!a){let l=ta(i)||(()=>new i);e({provide:i,useFactory:l,deps:Wn},i),e({provide:NA,useValue:i,multi:!0},i),e({provide:ia,useValue:()=>C(i),multi:!0},i)}let c=o.providers;if(c!=null&&!a){let l=r;wA(c,u=>{e(u,l)})}}else return!1;return i!==r&&r.providers!==void 0}function wA(r,e){for(let n of r)_A(n)&&(n=n.\u0275providers),Array.isArray(n)?wA(n,e):e(n)}var r4=Qe({provide:String,useValue:Qe});function A0(r){return r!==null&&typeof r=="object"&&r4 in r}function i4(r){return!!(r&&r.useExisting)}function o4(r){return!!(r&&r.useFactory)}function Vc(r){return typeof r=="function"}function R0(r){return!!r.useClass}var xf=new ee(""),GE={},d0={},oA;function zu(){return oA===void 0&&(oA=new wf),oA}var zn=class{},Bc=class extends zn{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,n,t,i){super(),this.parent=n,this.source=t,this.scopes=i,hA(e,s=>this.processProvider(s)),this.records.set(CA,Hu(void 0,this)),i.has("environment")&&this.records.set(zn,Hu(void 0,this));let o=this.records.get(xf);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(NA,Wn,{self:!0}))}retrieve(e,n){let t=Uc(n)||0;try{return this.get(e,Fc,t)}catch(i){if(Fu(i))return i;throw i}}destroy(){Of(this),this._destroyed=!0;let e=Ae(null);try{for(let t of this._ngOnDestroyHooks)t.ngOnDestroy();let n=this._onDestroyHooks;this._onDestroyHooks=[];for(let t of n)t()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),Ae(e)}}onDestroy(e){return Of(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Of(this);let n=ho(this),t=rr(void 0),i;try{return e()}finally{ho(n),rr(t)}}get(e,n=Fc,t){if(Of(this),e.hasOwnProperty(u0))return e[u0](this);let i=Uc(t),o,s=ho(this),a=rr(void 0);try{if(!(i&4)){let l=this.records.get(e);if(l===void 0){let u=u4(e)&&qE(e);u&&this.injectableDefInScope(u)?l=Hu(dA(e),GE):l=null,this.records.set(e,l)}if(l!=null)return this.hydrate(e,l,i)}let c=i&2?zu():this.parent;return n=i&8&&n===Fc?null:n,c.get(e,n)}catch(c){let l=X6(c);throw l===-200||l===-201?new oe(l,null):c}finally{rr(a),ho(s)}}resolveInjectorInitializers(){let e=Ae(null),n=ho(this),t=rr(void 0),i;try{let o=this.get(ia,Wn,{self:!0});for(let s of o)s()}finally{ho(n),rr(t),Ae(e)}}toString(){let e=[],n=this.records;for(let t of n.keys())e.push(ls(t));return`R3Injector[${e.join(", ")}]`}processProvider(e){e=sn(e);let n=Vc(e)?e:sn(e&&e.provide),t=a4(e);if(!Vc(e)&&e.multi===!0){let i=this.records.get(n);i||(i=Hu(void 0,GE,!0),i.factory=()=>uA(i.multi),this.records.set(n,i)),n=e,i.multi.push(e)}this.records.set(n,t)}hydrate(e,n,t){let i=Ae(null);try{if(n.value===d0)throw SA(ls(e));return n.value===GE&&(n.value=d0,n.value=n.factory(void 0,t)),typeof n.value=="object"&&n.value&&l4(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}finally{Ae(i)}}injectableDefInScope(e){if(!e.providedIn)return!1;let n=sn(e.providedIn);return typeof n=="string"?n==="any"||this.scopes.has(n):this.injectorDefTypes.has(n)}removeOnDestroy(e){let n=this._onDestroyHooks.indexOf(e);n!==-1&&this._onDestroyHooks.splice(n,1)}};function dA(r){let e=qE(r),n=e!==null?e.factory:ta(r);if(n!==null)return n;if(r instanceof ee)throw new oe(204,!1);if(r instanceof Function)return s4(r);throw new oe(204,!1)}function s4(r){if(r.length>0)throw new oe(204,!1);let n=K6(r);return n!==null?()=>n.factory(r):()=>new r}function a4(r){if(A0(r))return Hu(void 0,r.useValue);{let e=LA(r);return Hu(e,GE)}}function LA(r,e,n){let t;if(Vc(r)){let i=sn(r);return ta(i)||dA(i)}else if(A0(r))t=()=>sn(r.useValue);else if(o4(r))t=()=>r.useFactory(...uA(r.deps||[]));else if(i4(r))t=(i,o)=>C(sn(r.useExisting),o!==void 0&&o&8?8:void 0);else{let i=sn(r&&(r.useClass||r.provide));if(c4(r))t=()=>new i(...uA(r.deps));else return ta(i)||dA(i)}return t}function Of(r){if(r.destroyed)throw new oe(205,!1)}function Hu(r,e,n=!1){return{factory:r,value:e,multi:n?[]:void 0}}function c4(r){return!!r.deps}function l4(r){return r!==null&&typeof r=="object"&&typeof r.ngOnDestroy=="function"}function u4(r){return typeof r=="function"||typeof r=="object"&&r.ngMetadataName==="InjectionToken"}function hA(r,e){for(let n of r)Array.isArray(n)?hA(n,e):n&&_A(n)?hA(n.\u0275providers,e):e(n)}function go(r,e){let n;r instanceof Bc?(Of(r),n=r):n=new lA(r);let t,i=ho(n),o=rr(void 0);try{return e()}finally{ho(i),rr(o)}}function MA(){return p0()!==void 0||RE()!=null}var Oi=0,Ie=1,Re=2,an=3,ri=4,ir=5,$c=6,qu=7,Bt=8,ds=9,mo=10,Xe=11,Ku=12,PA=13,jc=14,qn=15,sa=16,Hc=17,po=18,Ff=19,xA=20,cs=21,ZE=22,hs=23,Fr=24,Wc=25,zc=26,Je=27,D0=1,FA=6,aa=7,kf=8,qc=9,Gt=10;function Eo(r){return Array.isArray(r)&&typeof r[D0]=="object"}function bi(r){return Array.isArray(r)&&r[D0]===!0}function kA(r){return(r.flags&4)!==0}function fs(r){return r.componentOffset>-1}function Yu(r){return(r.flags&1)===1}function wi(r){return!!r.template}function Qu(r){return(r[Re]&512)!==0}function Kc(r){return(r[Re]&256)===256}var UA="svg",C0="math";function ii(r){for(;Array.isArray(r);)r=r[Oi];return r}function VA(r,e){return ii(e[r])}function oi(r,e){return ii(e[r.index])}function Uf(r,e){return r.data[e]}function Yc(r,e){return r[e]}function Vf(r,e,n,t){n>=r.data.length&&(r.data[n]=null,r.blueprint[n]=null),e[n]=t}function si(r,e){let n=e[r];return Eo(n)?n:n[Oi]}function N0(r){return(r[Re]&4)===4}function e_(r){return(r[Re]&128)===128}function O0(r){return bi(r[an])}function kr(r,e){return e==null?null:r[e]}function BA(r){r[Hc]=0}function t_(r){r[Re]&1024||(r[Re]|=1024,e_(r)&&ca(r))}function b0(r,e){for(;r>0;)e=e[jc],r--;return e}function Xu(r){return!!(r[Re]&9216||r[Fr]?.dirty)}function n_(r){r[mo].changeDetectionScheduler?.notify(8),r[Re]&64&&(r[Re]|=1024),Xu(r)&&ca(r)}function ca(r){r[mo].changeDetectionScheduler?.notify(0);let e=na(r);for(;e!==null&&!(e[Re]&8192||(e[Re]|=8192,!e_(e)));)e=na(e)}function GA(r,e){if(Kc(r))throw new oe(911,!1);r[cs]===null&&(r[cs]=[]),r[cs].push(e)}function w0(r,e){if(r[cs]===null)return;let n=r[cs].indexOf(e);n!==-1&&r[cs].splice(n,1)}function na(r){let e=r[an];return bi(e)?e[an]:e}function $A(r){return r[qu]??=[]}function jA(r){return r.cleanup??=[]}function L0(r,e,n,t){let i=$A(e);i.push(n),r.firstCreatePass&&jA(r).push(t,i.length-1)}var Oe={lFrame:H0(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var fA=!1;function M0(){return Oe.lFrame.elementDepthCount}function P0(){Oe.lFrame.elementDepthCount++}function HA(){Oe.lFrame.elementDepthCount--}function r_(){return Oe.bindingsEnabled}function WA(){return Oe.skipHydrationRootTNode!==null}function zA(r){return Oe.skipHydrationRootTNode===r}function qA(){Oe.skipHydrationRootTNode=null}function ce(){return Oe.lFrame.lView}function Ze(){return Oe.lFrame.tView}function x0(r){return Oe.lFrame.contextLView=r,r[Bt]}function F0(r){return Oe.lFrame.contextLView=null,r}function cn(){let r=KA();for(;r!==null&&r.type===64;)r=r.parent;return r}function KA(){return Oe.lFrame.currentTNode}function k0(){let r=Oe.lFrame,e=r.currentTNode;return r.isParent?e:e.parent}function Qc(r,e){let n=Oe.lFrame;n.currentTNode=r,n.isParent=e}function YA(){return Oe.lFrame.isParent}function QA(){Oe.lFrame.isParent=!1}function XA(){return Oe.lFrame.contextLView}function JA(){return fA}function Ju(r){let e=fA;return fA=r,e}function or(){let r=Oe.lFrame,e=r.bindingRootIndex;return e===-1&&(e=r.bindingRootIndex=r.tView.bindingStartIndex),e}function ZA(){return Oe.lFrame.bindingIndex}function U0(r){return Oe.lFrame.bindingIndex=r}function _o(){return Oe.lFrame.bindingIndex++}function Bf(r){let e=Oe.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+r,n}function V0(){return Oe.lFrame.inI18n}function B0(r,e){let n=Oe.lFrame;n.bindingIndex=n.bindingRootIndex=r,i_(e)}function G0(){return Oe.lFrame.currentDirectiveIndex}function i_(r){Oe.lFrame.currentDirectiveIndex=r}function $0(r){let e=Oe.lFrame.currentDirectiveIndex;return e===-1?null:r[e]}function o_(){return Oe.lFrame.currentQueryIndex}function Gf(r){Oe.lFrame.currentQueryIndex=r}function d4(r){let e=r[Ie];return e.type===2?e.declTNode:e.type===1?r[ir]:null}function eR(r,e,n){if(n&4){let i=e,o=r;for(;i=i.parent,i===null&&!(n&1);)if(i=d4(o),i===null||(o=o[jc],i.type&10))break;if(i===null)return!1;e=i,r=o}let t=Oe.lFrame=j0();return t.currentTNode=e,t.lView=