@pixeasy/customizer 0.0.3-beta.0 → 0.0.4-beta.0
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.
|
@@ -2,7 +2,7 @@ var b3=Object.defineProperty,S3=Object.defineProperties;var C3=Object.getOwnProp
|
|
|
2
2
|
${t.map((i,r)=>`${r+1}) ${i.toString()}`).join(`
|
|
3
3
|
`)}`:"",this.name="UnsubscriptionError",this.errors=t});function Hh(n,e){if(n){let t=n.indexOf(e);0<=t&&n.splice(t,1)}}var Ai=class n{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:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(let o of t)o.remove(this);else t.remove(this);let{initialTeardown:i}=this;if(Et(i))try{i()}catch(o){e=o instanceof Am?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{aD(o)}catch(s){e=e??[],s instanceof Am?e=[...e,...s.errors]:e.push(s)}}if(e)throw new Am(e)}}add(e){var t;if(e&&e!==this)if(this.closed)aD(e);else{if(e instanceof n){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}}_hasParent(e){let{_parentage:t}=this;return t===e||Array.isArray(t)&&t.includes(e)}_addParent(e){let{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e}_removeParent(e){let{_parentage:t}=this;t===e?this._parentage=null:Array.isArray(t)&&Hh(t,e)}remove(e){let{_finalizers:t}=this;t&&Hh(t,e),e instanceof n&&e._removeParent(this)}};Ai.EMPTY=(()=>{let n=new Ai;return n.closed=!0,n})();var mb=Ai.EMPTY;function Im(n){return n instanceof Ai||n&&"closed"in n&&Et(n.remove)&&Et(n.add)&&Et(n.unsubscribe)}function aD(n){Et(n)?n():n.unsubscribe()}var co={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Au={setTimeout(n,e,...t){let{delegate:i}=Au;return i?.setTimeout?i.setTimeout(n,e,...t):setTimeout(n,e,...t)},clearTimeout(n){let{delegate:e}=Au;return(e?.clearTimeout||clearTimeout)(n)},delegate:void 0};function Pm(n){Au.setTimeout(()=>{let{onUnhandledError:e}=co;if(e)e(n);else throw n})}function gb(){}var lD=vb("C",void 0,void 0);function cD(n){return vb("E",void 0,n)}function uD(n){return vb("N",n,void 0)}function vb(n,e,t){return{kind:n,value:e,error:t}}var jl=null;function Iu(n){if(co.useDeprecatedSynchronousErrorHandling){let e=!jl;if(e&&(jl={errorThrown:!1,error:null}),n(),e){let{errorThrown:t,error:i}=jl;if(jl=null,t)throw i}}else n()}function dD(n){co.useDeprecatedSynchronousErrorHandling&&jl&&(jl.errorThrown=!0,jl.error=n)}var Wl=class extends Ai{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Im(e)&&e.add(this)):this.destination=F3}static create(e,t,i){return new wa(e,t,i)}next(e){this.isStopped?_b(uD(e),this):this._next(e)}error(e){this.isStopped?_b(cD(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?_b(lD,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()}}},O3=Function.prototype.bind;function yb(n,e){return O3.call(n,e)}var xb=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(i){Om(i)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(i){Om(i)}else Om(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){Om(t)}}},wa=class extends Wl{constructor(e,t,i){super();let r;if(Et(e)||!e)r={next:e??void 0,error:t??void 0,complete:i??void 0};else{let o;this&&co.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&yb(e.next,o),error:e.error&&yb(e.error,o),complete:e.complete&&yb(e.complete,o)}):r=e}this.destination=new xb(r)}};function Om(n){co.useDeprecatedSynchronousErrorHandling?dD(n):Pm(n)}function R3(n){throw n}function _b(n,e){let{onStoppedNotification:t}=co;t&&Au.setTimeout(()=>t(n,e))}var F3={closed:!0,next:gb,error:R3,complete:gb};var Pu=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Rm(n){return n}function hD(n){return n.length===0?Rm:n.length===1?n[0]:function(t){return n.reduce((i,r)=>r(i),t)}}var bn=(()=>{class n{constructor(t){t&&(this._subscribe=t)}lift(t){let i=new n;return i.source=this,i.operator=t,i}subscribe(t,i,r){let o=k3(t)?t:new wa(t,i,r);return Iu(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(t){try{return this._subscribe(t)}catch(i){t.error(i)}}forEach(t,i){return i=fD(i),new i((r,o)=>{let s=new wa({next:a=>{try{t(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:r});this.subscribe(s)})}_subscribe(t){var i;return(i=this.source)===null||i===void 0?void 0:i.subscribe(t)}[Pu](){return this}pipe(...t){return hD(t)(this)}toPromise(t){return t=fD(t),new t((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return n.create=e=>new n(e),n})();function fD(n){var e;return(e=n??co.Promise)!==null&&e!==void 0?e:Promise}function N3(n){return n&&Et(n.next)&&Et(n.error)&&Et(n.complete)}function k3(n){return n&&n instanceof Wl||N3(n)&&Im(n)}function L3(n){return Et(n?.lift)}function ti(n){return e=>{if(L3(e))return e.lift(function(t){try{return n(t,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function ni(n,e,t,i,r){return new bb(n,e,t,i,r)}var bb=class extends Wl{constructor(e,t,i,r,o,s){super(e),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=t?function(a){try{t(a)}catch(l){e.error(l)}}:super._next,this._error=r?function(a){try{r(a)}catch(l){e.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:t}=this;super.unsubscribe(),!t&&((e=this.onFinalize)===null||e===void 0||e.call(this))}}};var pD=Du(n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var uo=(()=>{class n extends bn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){let i=new Fm(this,this);return i.operator=t,i}_throwIfClosed(){if(this.closed)throw new pD}next(t){Iu(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let i of this.currentObservers)i.next(t)}})}error(t){Iu(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;let{observers:i}=this;for(;i.length;)i.shift().error(t)}})}complete(){Iu(()=>{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:i,isStopped:r,observers:o}=this;return i||r?mb:(this.currentObservers=null,o.push(t),new Ai(()=>{this.currentObservers=null,Hh(o,t)}))}_checkFinalizedStatuses(t){let{hasError:i,thrownError:r,isStopped:o}=this;i?t.error(r):o&&t.complete()}asObservable(){let t=new bn;return t.source=this,t}}return n.create=(e,t)=>new Fm(e,t),n})(),Fm=class extends uo{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,i;(i=(t=this.destination)===null||t===void 0?void 0:t.next)===null||i===void 0||i.call(t,e)}error(e){var t,i;(i=(t=this.destination)===null||t===void 0?void 0:t.error)===null||i===void 0||i.call(t,e)}complete(){var e,t;(t=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||t===void 0||t.call(e)}_subscribe(e){var t,i;return(i=(t=this.source)===null||t===void 0?void 0:t.subscribe(e))!==null&&i!==void 0?i:mb}};var Gh=class extends uo{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let t=super._subscribe(e);return!t.closed&&e.next(this._value),t}getValue(){let{hasError:e,thrownError:t,_value:i}=this;if(e)throw t;return this._throwIfClosed(),i}next(e){super.next(this._value=e)}};function mD(n){return n&&Et(n.schedule)}function gD(n){return n[n.length-1]}function vD(n){return Et(gD(n))?n.pop():void 0}function yD(n){return mD(gD(n))?n.pop():void 0}function xD(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(u){try{c(i.next(u))}catch(d){s(d)}}function l(u){try{c(i.throw(u))}catch(d){s(d)}}function c(u){u.done?o(u.value):r(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})}function _D(n){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&n[e],i=0;if(t)return t.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&i>=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function $l(n){return this instanceof $l?(this.v=n,this):new $l(n)}function bD(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=t.apply(n,e||[]),r,o=[];return r=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),r[Symbol.asyncIterator]=function(){return this},r;function s(f){return function(p){return Promise.resolve(p).then(f,d)}}function a(f,p){i[f]&&(r[f]=function(v){return new Promise(function(g,m){o.push([f,v,g,m])>1||l(f,v)})},p&&(r[f]=p(r[f])))}function l(f,p){try{c(i[f](p))}catch(v){h(o[0][3],v)}}function c(f){f.value instanceof $l?Promise.resolve(f.value.v).then(u,d):h(o[0][2],f)}function u(f){l("next",f)}function d(f){l("throw",f)}function h(f,p){f(p),o.shift(),o.length&&l(o[0][0],o[0][1])}}function SD(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof _D=="function"?_D(n):n[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(o){t[o]=n[o]&&function(s){return new Promise(function(a,l){s=n[o](s),r(a,l,s.done,s.value)})}}function r(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}}var Nm=n=>n&&typeof n.length=="number"&&typeof n!="function";function km(n){return Et(n?.then)}function Lm(n){return Et(n[Pu])}function Um(n){return Symbol.asyncIterator&&Et(n?.[Symbol.asyncIterator])}function Bm(n){return new TypeError(`You provided ${n!==null&&typeof n=="object"?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function U3(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Vm=U3();function zm(n){return Et(n?.[Vm])}function Hm(n){return bD(this,arguments,function*(){let t=n.getReader();try{for(;;){let{value:i,done:r}=yield $l(t.read());if(r)return yield $l(void 0);yield yield $l(i)}}finally{t.releaseLock()}})}function Gm(n){return Et(n?.getReader)}function yi(n){if(n instanceof bn)return n;if(n!=null){if(Lm(n))return B3(n);if(Nm(n))return V3(n);if(km(n))return z3(n);if(Um(n))return CD(n);if(zm(n))return H3(n);if(Gm(n))return G3(n)}throw Bm(n)}function B3(n){return new bn(e=>{let t=n[Pu]();if(Et(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function V3(n){return new bn(e=>{for(let t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}function z3(n){return new bn(e=>{n.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,Pm)})}function H3(n){return new bn(e=>{for(let t of n)if(e.next(t),e.closed)return;e.complete()})}function CD(n){return new bn(e=>{j3(n,e).catch(t=>e.error(t))})}function G3(n){return CD(Hm(n))}function j3(n,e){var t,i,r,o;return xD(this,void 0,void 0,function*(){try{for(t=SD(n);i=yield t.next(),!i.done;){let s=i.value;if(e.next(s),e.closed)return}}catch(s){r={error:s}}finally{try{i&&!i.done&&(o=t.return)&&(yield o.call(t))}finally{if(r)throw r.error}}e.complete()})}function zr(n,e,t,i=0,r=!1){let o=e.schedule(function(){t(),r?n.add(this.schedule(null,i)):this.unsubscribe()},i);if(n.add(o),!r)return o}function jm(n,e=0){return ti((t,i)=>{t.subscribe(ni(i,r=>zr(i,n,()=>i.next(r),e),()=>zr(i,n,()=>i.complete(),e),r=>zr(i,n,()=>i.error(r),e)))})}function Wm(n,e=0){return ti((t,i)=>{i.add(n.schedule(()=>t.subscribe(i),e))})}function wD(n,e){return yi(n).pipe(Wm(e),jm(e))}function ED(n,e){return yi(n).pipe(Wm(e),jm(e))}function MD(n,e){return new bn(t=>{let i=0;return e.schedule(function(){i===n.length?t.complete():(t.next(n[i++]),t.closed||this.schedule())})})}function TD(n,e){return new bn(t=>{let i;return zr(t,e,()=>{i=n[Vm](),zr(t,e,()=>{let r,o;try{({value:r,done:o}=i.next())}catch(s){t.error(s);return}o?t.complete():t.next(r)},0,!0)}),()=>Et(i?.return)&&i.return()})}function $m(n,e){if(!n)throw new Error("Iterable cannot be null");return new bn(t=>{zr(t,e,()=>{let i=n[Symbol.asyncIterator]();zr(t,e,()=>{i.next().then(r=>{r.done?t.complete():t.next(r.value)})},0,!0)})})}function DD(n,e){return $m(Hm(n),e)}function AD(n,e){if(n!=null){if(Lm(n))return wD(n,e);if(Nm(n))return MD(n,e);if(km(n))return ED(n,e);if(Um(n))return $m(n,e);if(zm(n))return TD(n,e);if(Gm(n))return DD(n,e)}throw Bm(n)}function jh(n,e){return e?AD(n,e):yi(n)}function $o(...n){let e=yD(n);return jh(n,e)}function Ea(n,e){let t=Et(n)?n:()=>n,i=r=>r.error(t());return new bn(e?r=>e.schedule(i,0,r):i)}var ID=Du(n=>function(){n(this),this.name="EmptyError",this.message="no elements in sequence"});function Ou(n,e){let t=typeof e=="object";return new Promise((i,r)=>{let o=new wa({next:s=>{i(s),o.unsubscribe()},error:r,complete:()=>{t?i(e.defaultValue):r(new ID)}});n.subscribe(o)})}function Xi(n,e){return ti((t,i)=>{let r=0;t.subscribe(ni(i,o=>{i.next(n.call(e,o,r++))}))})}var{isArray:W3}=Array;function $3(n,e){return W3(e)?n(...e):n(e)}function PD(n){return Xi(e=>$3(n,e))}var{isArray:X3}=Array,{getPrototypeOf:Y3,prototype:q3,keys:Z3}=Object;function OD(n){if(n.length===1){let e=n[0];if(X3(e))return{args:e,keys:null};if(K3(e)){let t=Z3(e);return{args:t.map(i=>e[i]),keys:t}}}return{args:n,keys:null}}function K3(n){return n&&typeof n=="object"&&Y3(n)===q3}function RD(n,e){return n.reduce((t,i,r)=>(t[i]=e[r],t),{})}function FD(n,e,t,i,r,o,s,a){let l=[],c=0,u=0,d=!1,h=()=>{d&&!l.length&&!c&&e.complete()},f=v=>c<i?p(v):l.push(v),p=v=>{o&&e.next(v),c++;let g=!1;yi(t(v,u++)).subscribe(ni(e,m=>{r?.(m),o?f(m):e.next(m)},()=>{g=!0},void 0,()=>{if(g)try{for(c--;l.length&&c<i;){let m=l.shift();s?zr(e,s,()=>p(m)):p(m)}h()}catch(m){e.error(m)}}))};return n.subscribe(ni(e,f,()=>{d=!0,h()})),()=>{a?.()}}function Xm(n,e,t=1/0){return Et(e)?Xm((i,r)=>Xi((o,s)=>e(i,o,r,s))(yi(n(i,r))),t):(typeof e=="number"&&(t=e),ti((i,r)=>FD(i,r,n,t)))}function Sb(...n){let e=vD(n),{args:t,keys:i}=OD(n),r=new bn(o=>{let{length:s}=t;if(!s){o.complete();return}let a=new Array(s),l=s,c=s;for(let u=0;u<s;u++){let d=!1;yi(t[u]).subscribe(ni(o,h=>{d||(d=!0,c--),a[u]=h},()=>l--,void 0,()=>{(!l||!d)&&(c||o.next(i?RD(i,a):a),o.complete())}))}});return e?r.pipe(PD(e)):r}function Cb(n,e){return ti((t,i)=>{let r=0;t.subscribe(ni(i,o=>n.call(e,o,r++)&&i.next(o)))})}function Xl(n){return ti((e,t)=>{let i=null,r=!1,o;i=e.subscribe(ni(t,void 0,void 0,s=>{o=yi(n(s,Xl(n)(e))),i?(i.unsubscribe(),i=null,o.subscribe(t)):r=!0})),r&&(i.unsubscribe(),i=null,o.subscribe(t))})}function wb(n,e){return Et(e)?Xm(n,e,1):Xm(n,1)}function Wh(n){return ti((e,t)=>{try{e.subscribe(t)}finally{t.add(n)}})}function Eb(n,e){return ti((t,i)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&i.complete();t.subscribe(ni(i,l=>{r?.unsubscribe();let c=0,u=o++;yi(n(l,u)).subscribe(r=ni(i,d=>i.next(e?e(l,d,u,c++):d),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function Mb(n,e,t){let i=Et(n)||e||t?{next:n,error:e,complete:t}:n;return i?ti((r,o)=>{var s;(s=i.subscribe)===null||s===void 0||s.call(i);let a=!0;r.subscribe(ni(o,l=>{var c;(c=i.next)===null||c===void 0||c.call(i,l),o.next(l)},()=>{var l;a=!1,(l=i.complete)===null||l===void 0||l.call(i),o.complete()},l=>{var c;a=!1,(c=i.error)===null||c===void 0||c.call(i,l),o.error(l)},()=>{var l,c;a&&((l=i.unsubscribe)===null||l===void 0||l.call(i)),(c=i.finalize)===null||c===void 0||c.call(i)}))}):Rm}var Tb;function Ym(){return Tb}function Xo(n){let e=Tb;return Tb=n,e}var ND=Symbol("NotFound");function Ru(n){return n===ND||n?.name==="\u0275NotFound"}function kD(n){let e=it(null);try{return n()}finally{it(e)}}var tg="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",ze=class extends Error{code;constructor(e,t){super(ks(e,t)),this.code=e}};function J3(n){return`NG0${Math.abs(n)}`}function ks(n,e){return`${J3(n)}${e?": "+e:""}`}var qo=globalThis;function an(n){for(let e in n)if(n[e]===an)return e;throw Error("")}function zD(n,e){for(let t in e)e.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&(n[t]=e[t])}function ng(n){if(typeof n=="string")return n;if(Array.isArray(n))return`[${n.map(ng).join(", ")}]`;if(n==null)return""+n;let e=n.overriddenName||n.name;if(e)return`${e}`;let t=n.toString();if(t==null)return""+t;let i=t.indexOf(`
|
|
4
4
|
`);return i>=0?t.slice(0,i):t}function ig(n,e){return n?e?`${n} ${e}`:n:e||""}var Q3=an({__forward_ref__:an});function Pi(n){return n.__forward_ref__=Pi,n}function di(n){return Vb(n)?n():n}function Vb(n){return typeof n=="function"&&n.hasOwnProperty(Q3)&&n.__forward_ref__===Pi}function ge(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function Zo(n){return{providers:n.providers||[],imports:n.imports||[]}}function rg(n){return eV(n,og)}function eV(n,e){return n.hasOwnProperty(e)&&n[e]||null}function tV(n){let e=n?.[og]??null;return e||null}function Ab(n){return n&&n.hasOwnProperty(Zm)?n[Zm]:null}var og=an({\u0275prov:an}),Zm=an({\u0275inj:an}),Ve=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(e,t){this._desc=e,this.\u0275prov=void 0,typeof t=="number"?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.\u0275prov=ge({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function zb(n){return n&&!!n.\u0275providers}var Hb=an({\u0275cmp:an}),Gb=an({\u0275dir:an}),jb=an({\u0275pipe:an});var Xh=an({\u0275fac:an}),Jl=an({__NG_ELEMENT_ID__:an}),LD=an({__NG_ENV_ID__:an});function Ls(n){return $b(n,"@Component"),n[Hb]||null}function sg(n){return $b(n,"@Directive"),n[Gb]||null}function Wb(n){return $b(n,"@Pipe"),n[jb]||null}function $b(n,e){if(n==null)throw new ze(-919,!1)}function Jh(n){return typeof n=="string"?n:n==null?"":String(n)}var HD=an({ngErrorCode:an}),nV=an({ngErrorMessage:an}),iV=an({ngTokenPath:an});function Xb(n,e){return GD("",-200,e)}function ag(n,e){throw new ze(-201,!1)}function GD(n,e,t){let i=new ze(e,n);return i[HD]=e,i[nV]=n,t&&(i[iV]=t),i}function rV(n){return n[HD]}var Ib;function jD(){return Ib}function Ii(n){let e=Ib;return Ib=n,e}function Yb(n,e,t){let i=rg(n);if(i&&i.providedIn=="root")return i.value===void 0?i.value=i.factory():i.value;if(t&8)return null;if(e!==void 0)return e;ag(n,"")}var oV={},Yl=oV,sV="__NG_DI_FLAG__",Pb=class{injector;constructor(e){this.injector=e}retrieve(e,t){let i=ql(t)||0;try{return this.injector.get(e,i&8?null:Yl,i)}catch(r){if(Ru(r))return r;throw r}}};function aV(n,e=0){let t=Ym();if(t===void 0)throw new ze(-203,!1);if(t===null)return Yb(n,void 0,e);{let i=lV(e),r=t.retrieve(n,i);if(Ru(r)){if(i.optional)return null;throw r}return r}}function We(n,e=0){return(jD()||aV)(di(n),e)}function Z(n,e){return We(n,ql(e))}function ql(n){return typeof n>"u"||typeof n=="number"?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function lV(n){return{optional:!!(n&8),host:!!(n&1),self:!!(n&2),skipSelf:!!(n&4)}}function Ob(n){let e=[];for(let t=0;t<n.length;t++){let i=di(n[t]);if(Array.isArray(i)){if(i.length===0)throw new ze(900,!1);let r,o=0;for(let s=0;s<i.length;s++){let a=i[s],l=cV(a);typeof l=="number"?l===-1?r=a.token:o|=l:r=a}e.push(We(r,o))}else e.push(We(i))}return e}function cV(n){return n[sV]}function Ma(n,e){let t=n.hasOwnProperty(Xh);return t?n[Xh]:null}function WD(n,e,t){if(n.length!==e.length)return!1;for(let i=0;i<n.length;i++){let r=n[i],o=e[i];if(t&&(r=t(r),o=t(o)),o!==r)return!1}return!0}function $D(n){return n.flat(Number.POSITIVE_INFINITY)}function lg(n,e){n.forEach(t=>Array.isArray(t)?lg(t,e):e(t))}function qb(n,e,t){e>=n.length?n.push(t):n.splice(e,0,t)}function Qh(n,e){return e>=n.length-1?n.pop():n.splice(e,1)[0]}function XD(n,e){let t=[];for(let i=0;i<n;i++)t.push(e);return t}function YD(n,e,t,i){let r=n.length;if(r==e)n.push(t,i);else if(r===1)n.push(i,n[0]),n[0]=t;else{for(r--,n.push(n[r-1],n[r]);r>e;){let o=r-2;n[r]=n[o],r--}n[e]=t,n[e+1]=i}}function cg(n,e,t){let i=Nu(n,e);return i>=0?n[i|1]=t:(i=~i,YD(n,i,e,t)),i}function ug(n,e){let t=Nu(n,e);if(t>=0)return n[t|1]}function Nu(n,e){return uV(n,e,1)}function uV(n,e,t){let i=0,r=n.length>>t;for(;r!==i;){let o=i+(r-i>>1),s=n[o<<t];if(e===s)return o<<t;s>e?r=o:i=o+1}return~(r<<t)}var Aa={},_i=[],Us=new Ve(""),ef=new Ve("",-1),Zb=new Ve(""),Yh=class{get(e,t=Yl){if(t===Yl){let r=GD("",-201);throw r.name="\u0275NotFound",r}return t}};function Bs(n){return{\u0275providers:n}}function qD(n){return Bs([{provide:Us,multi:!0,useValue:n}])}function ZD(...n){return{\u0275providers:dg(!0,n),\u0275fromNgModule:!0}}function dg(n,...e){let t=[],i=new Set,r,o=s=>{t.push(s)};return lg(e,s=>{let a=s;Km(a,o,[],i)&&(r||=[],r.push(a))}),r!==void 0&&KD(r,o),t}function KD(n,e){for(let t=0;t<n.length;t++){let{ngModule:i,providers:r}=n[t];Kb(r,o=>{e(o,i)})}}function Km(n,e,t,i){if(n=di(n),!n)return!1;let r=null,o=Ab(n),s=!o&&Ls(n);if(!o&&!s){let l=n.ngModule;if(o=Ab(l),o)r=l;else return!1}else{if(s&&!s.standalone)return!1;r=n}let a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){let l=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let c of l)Km(c,e,t,i)}}else if(o){if(o.imports!=null&&!a){i.add(r);let c;lg(o.imports,u=>{Km(u,e,t,i)&&(c||=[],c.push(u))}),c!==void 0&&KD(c,e)}if(!a){let c=Ma(r)||(()=>new r);e({provide:r,useFactory:c,deps:_i},r),e({provide:Zb,useValue:r,multi:!0},r),e({provide:Us,useValue:()=>We(r),multi:!0},r)}let l=o.providers;if(l!=null&&!a){let c=n;Kb(l,u=>{e(u,c)})}}else return!1;return r!==n&&n.providers!==void 0}function Kb(n,e){for(let t of n)zb(t)&&(t=t.\u0275providers),Array.isArray(t)?Kb(t,e):e(t)}var dV=an({provide:String,useValue:an});function JD(n){return n!==null&&typeof n=="object"&&dV in n}function hV(n){return!!(n&&n.useExisting)}function fV(n){return!!(n&&n.useFactory)}function Zl(n){return typeof n=="function"}function QD(n){return!!n.useClass}var tf=new Ve(""),qm={},UD={},Db;function ku(){return Db===void 0&&(Db=new Yh),Db}var xi=class{},Kl=class extends xi{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,i,r){super(),this.parent=t,this.source=i,this.scopes=r,Fb(e,s=>this.processProvider(s)),this.records.set(ef,Fu(void 0,this)),r.has("environment")&&this.records.set(xi,Fu(void 0,this));let o=this.records.get(tf);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(Zb,_i,{self:!0}))}retrieve(e,t){let i=ql(t)||0;try{return this.get(e,Yl,i)}catch(r){if(Ru(r))return r;throw r}}destroy(){$h(this),this._destroyed=!0;let e=it(null);try{for(let i of this._ngOnDestroyHooks)i.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let i of t)i()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),it(e)}}onDestroy(e){return $h(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){$h(this);let t=Xo(this),i=Ii(void 0),r;try{return e()}finally{Xo(t),Ii(i)}}get(e,t=Yl,i){if($h(this),e.hasOwnProperty(LD))return e[LD](this);let r=ql(i),o,s=Xo(this),a=Ii(void 0);try{if(!(r&4)){let c=this.records.get(e);if(c===void 0){let u=yV(e)&&rg(e);u&&this.injectableDefInScope(u)?c=Fu(Rb(e),qm):c=null,this.records.set(e,c)}if(c!=null)return this.hydrate(e,c,r)}let l=r&2?ku():this.parent;return t=r&8&&t===Yl?null:t,l.get(e,t)}catch(l){let c=rV(l);throw c===-200||c===-201?new ze(c,null):l}finally{Ii(a),Xo(s)}}resolveInjectorInitializers(){let e=it(null),t=Xo(this),i=Ii(void 0),r;try{let o=this.get(Us,_i,{self:!0});for(let s of o)s()}finally{Xo(t),Ii(i),it(e)}}toString(){return"R3Injector[...]"}processProvider(e){e=di(e);let t=Zl(e)?e:di(e&&e.provide),i=mV(e);if(!Zl(e)&&e.multi===!0){let r=this.records.get(t);r||(r=Fu(void 0,qm,!0),r.factory=()=>Ob(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,i)}hydrate(e,t,i){let r=it(null);try{if(t.value===UD)throw Xb("");return t.value===qm&&(t.value=UD,t.value=t.factory(void 0,i)),typeof t.value=="object"&&t.value&&vV(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{it(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=di(e.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function Rb(n){let e=rg(n),t=e!==null?e.factory:Ma(n);if(t!==null)return t;if(n instanceof Ve)throw new ze(-204,!1);if(n instanceof Function)return pV(n);throw new ze(-204,!1)}function pV(n){if(n.length>0)throw new ze(-204,!1);let t=tV(n);return t!==null?()=>t.factory(n):()=>new n}function mV(n){if(JD(n))return Fu(void 0,n.useValue);{let e=Jb(n);return Fu(e,qm)}}function Jb(n,e,t){let i;if(Zl(n)){let r=di(n);return Ma(r)||Rb(r)}else if(JD(n))i=()=>di(n.useValue);else if(fV(n))i=()=>n.useFactory(...Ob(n.deps||[]));else if(hV(n))i=(r,o)=>We(di(n.useExisting),o!==void 0&&o&8?8:void 0);else{let r=di(n&&(n.useClass||n.provide));if(gV(n))i=()=>new r(...Ob(n.deps));else return Ma(r)||Rb(r)}return i}function $h(n){if(n.destroyed)throw new ze(-205,!1)}function Fu(n,e,t=!1){return{factory:n,value:e,multi:t?[]:void 0}}function gV(n){return!!n.deps}function vV(n){return n!==null&&typeof n=="object"&&typeof n.ngOnDestroy=="function"}function yV(n){return typeof n=="function"||typeof n=="object"&&n.ngMetadataName==="InjectionToken"}function Fb(n,e){for(let t of n)Array.isArray(t)?Fb(t,e):t&&zb(t)?Fb(t.\u0275providers,e):e(t)}function Lu(n,e){let t;n instanceof Kl?($h(n),t=n):t=new Pb(n);let i,r=Xo(t),o=Ii(void 0);try{return e()}finally{Xo(r),Ii(o)}}function eA(){return jD()!==void 0||Ym()!=null}var Oi=0,He=1,vt=2,Nn=3,Gr=4,Ri=5,Fi=6,Uu=7,An=8,hr=9,Ko=10,Gt=11,Bu=12,Qb=13,Ql=14,ii=15,Ia=16,ec=17,Jo=18,Qo=19,eS=20,Ns=21,hg=22,Ta=23,fr=24,tc=25,es=26,zt=27,tA=1,ho=6,ts=7,nf=8,nc=9,Cn=10;function pr(n){return Array.isArray(n)&&typeof n[tA]=="object"}function qi(n){return Array.isArray(n)&&n[tA]===!0}function tS(n){return(n.flags&4)!==0}function ns(n){return n.componentOffset>-1}function Vu(n){return(n.flags&1)===1}function is(n){return!!n.template}function ic(n){return(n[vt]&512)!==0}function Pa(n){return(n[vt]&256)===256}var nA="svg",iA="math";function mr(n){for(;Array.isArray(n);)n=n[Oi];return n}function nS(n,e){return mr(e[n])}function jr(n,e){return mr(e[n.index])}function rc(n,e){return n.data[e]}function fg(n,e){return n[e]}function iS(n,e,t,i){t>=n.data.length&&(n.data[t]=null,n.blueprint[t]=null),e[t]=i}function gr(n,e){let t=e[n];return pr(t)?t:t[Oi]}function pg(n){return(n[vt]&128)===128}function rA(n){return qi(n[Nn])}function Wr(n,e){return e==null?null:n[e]}function rS(n){n[ec]=0}function oS(n){n[vt]&1024||(n[vt]|=1024,pg(n)&&oc(n))}function oA(n,e){for(;n>0;)e=e[Ql],n--;return e}function rf(n){return!!(n[vt]&9216||n[fr]?.dirty)}function mg(n){n[Ko].changeDetectionScheduler?.notify(8),n[vt]&64&&(n[vt]|=1024),rf(n)&&oc(n)}function oc(n){n[Ko].changeDetectionScheduler?.notify(0);let e=Da(n);for(;e!==null&&!(e[vt]&8192||(e[vt]|=8192,!pg(e)));)e=Da(e)}function sS(n,e){if(Pa(n))throw new ze(911,!1);n[Ns]===null&&(n[Ns]=[]),n[Ns].push(e)}function sA(n,e){if(n[Ns]===null)return;let t=n[Ns].indexOf(e);t!==-1&&n[Ns].splice(t,1)}function Da(n){let e=n[Nn];return qi(e)?e[Nn]:e}function aS(n){return n[Uu]??=[]}function lS(n){return n.cleanup??=[]}function aA(n,e,t,i){let r=aS(e);r.push(t),n.firstCreatePass&&lS(n).push(i,r.length-1)}var Mt={lFrame:xA(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var Nb=!1;function lA(){return Mt.lFrame.elementDepthCount}function cA(){Mt.lFrame.elementDepthCount++}function cS(){Mt.lFrame.elementDepthCount--}function gg(){return Mt.bindingsEnabled}function vg(){return Mt.skipHydrationRootTNode!==null}function uS(n){return Mt.skipHydrationRootTNode===n}function uA(n){Mt.skipHydrationRootTNode=n}function dS(){Mt.skipHydrationRootTNode=null}function ct(){return Mt.lFrame.lView}function En(){return Mt.lFrame.tView}function K(n){return Mt.lFrame.contextLView=n,n[An]}function J(n){return Mt.lFrame.contextLView=null,n}function hi(){let n=hS();for(;n!==null&&n.type===64;)n=n.parent;return n}function hS(){return Mt.lFrame.currentTNode}function dA(){let n=Mt.lFrame,e=n.currentTNode;return n.isParent?e:e.parent}function zu(n,e){let t=Mt.lFrame;t.currentTNode=n,t.isParent=e}function fS(){return Mt.lFrame.isParent}function pS(){Mt.lFrame.isParent=!1}function hA(){return Mt.lFrame.contextLView}function mS(){return Nb}function qh(n){let e=Nb;return Nb=n,e}function of(){let n=Mt.lFrame,e=n.bindingRootIndex;return e===-1&&(e=n.bindingRootIndex=n.tView.bindingStartIndex),e}function fA(n){return Mt.lFrame.bindingIndex=n}function Vs(){return Mt.lFrame.bindingIndex++}function gS(n){let e=Mt.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+n,t}function pA(){return Mt.lFrame.inI18n}function mA(n,e){let t=Mt.lFrame;t.bindingIndex=t.bindingRootIndex=n,yg(e)}function gA(){return Mt.lFrame.currentDirectiveIndex}function yg(n){Mt.lFrame.currentDirectiveIndex=n}function vA(n){let e=Mt.lFrame.currentDirectiveIndex;return e===-1?null:n[e]}function yA(){return Mt.lFrame.currentQueryIndex}function _g(n){Mt.lFrame.currentQueryIndex=n}function _V(n){let e=n[He];return e.type===2?e.declTNode:e.type===1?n[Ri]:null}function vS(n,e,t){if(t&4){let r=e,o=n;for(;r=r.parent,r===null&&!(t&1);)if(r=_V(o),r===null||(o=o[Ql],r.type&10))break;if(r===null)return!1;e=r,n=o}let i=Mt.lFrame=_A();return i.currentTNode=e,i.lView=n,!0}function xg(n){let e=_A(),t=n[He];Mt.lFrame=e,e.currentTNode=t.firstChild,e.lView=n,e.tView=t,e.contextLView=n,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function _A(){let n=Mt.lFrame,e=n===null?null:n.child;return e===null?xA(n):e}function xA(n){let e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return n!==null&&(n.child=e),e}function bA(){let n=Mt.lFrame;return Mt.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}var yS=bA;function bg(){let n=bA();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function SA(n){return(Mt.lFrame.contextLView=oA(n,Mt.lFrame.contextLView))[An]}function zs(){return Mt.lFrame.selectedIndex}function Oa(n){Mt.lFrame.selectedIndex=n}function sf(){let n=Mt.lFrame;return rc(n.tView,n.selectedIndex)}function _S(){return Mt.lFrame.currentNamespace}var CA=!0;function Sg(){return CA}function Hs(n){CA=n}function kb(n,e=null,t=null,i){let r=wA(n,e,t,i);return r.resolveInjectorInitializers(),r}function wA(n,e=null,t=null,i,r=new Set){let o=[t||_i,ZD(n)],s;return new Kl(o,e||ku(),s||null,r)}var bi=class n{static THROW_IF_NOT_FOUND=Yl;static NULL=new Yh;static create(e,t){if(Array.isArray(e))return kb({name:""},t,e,"");{let i=e.name??"";return kb({name:i},e.parent,e.providers,i)}}static \u0275prov=ge({token:n,providedIn:"any",factory:()=>We(ef)});static __NG_ELEMENT_ID__=-1},wn=new Ve(""),Zi=(()=>{class n{static __NG_ELEMENT_ID__=xV;static __NG_ENV_ID__=t=>t}return n})(),Jm=class extends Zi{_lView;constructor(e){super(),this._lView=e}get destroyed(){return Pa(this._lView)}onDestroy(e){let t=this._lView;return sS(t,e),()=>sA(t,e)}};function xV(){return new Jm(ct())}var EA=!1,MA=new Ve(""),Ra=(()=>{class n{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Gh(!1);debugTaskTracker=Z(MA,{optional:!0});get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new bn(t=>{t.next(!1),t.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let t=this.taskId++;return this.pendingTasks.add(t),this.debugTaskTracker?.add(t),t}has(t){return this.pendingTasks.has(t)}remove(t){this.pendingTasks.delete(t),this.debugTaskTracker?.remove(t),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=ge({token:n,providedIn:"root",factory:()=>new n})}return n})(),Lb=class extends uo{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,eA()&&(this.destroyRef=Z(Zi,{optional:!0})??void 0,this.pendingTasks=Z(Ra,{optional:!0})??void 0)}emit(e){let t=it(null);try{super.next(e)}finally{it(t)}}subscribe(e,t,i){let r=e,o=t||(()=>null),s=i;if(e&&typeof e=="object"){let l=e;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=this.wrapInTimeout(o),r&&(r=this.wrapInTimeout(r)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:r,error:o,complete:s});return e instanceof Ai&&e.add(a),a}wrapInTimeout(e){return t=>{let i=this.pendingTasks?.add();setTimeout(()=>{try{e(t)}finally{i!==void 0&&this.pendingTasks?.remove(i)}})}}},dr=Lb;function Qm(...n){}function xS(n){let e,t;function i(){n=Qm;try{t!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(t),e!==void 0&&clearTimeout(e)}catch{}}return e=setTimeout(()=>{n(),i()}),typeof requestAnimationFrame=="function"&&(t=requestAnimationFrame(()=>{n(),i()})),()=>i()}function TA(n){return queueMicrotask(()=>n()),()=>{n=Qm}}var bS="isAngularZone",Zh=bS+"_ID",bV=0,Yi=class n{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new dr(!1);onMicrotaskEmpty=new dr(!1);onStable=new dr(!1);onError=new dr(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:i=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=EA}=e;if(typeof Zone>"u")throw new ze(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)),t&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!r&&i,s.shouldCoalesceRunChangeDetection=r,s.callbackScheduled=!1,s.scheduleInRootZone=o,wV(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(bS)===!0}static assertInAngularZone(){if(!n.isInAngularZone())throw new ze(909,!1)}static assertNotInAngularZone(){if(n.isInAngularZone())throw new ze(909,!1)}run(e,t,i){return this._inner.run(e,t,i)}runTask(e,t,i,r){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,e,SV,Qm,Qm);try{return o.runTask(s,t,i)}finally{o.cancelTask(s)}}runGuarded(e,t,i){return this._inner.runGuarded(e,t,i)}runOutsideAngular(e){return this._outer.run(e)}},SV={};function SS(n){if(n._nesting==0&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function CV(n){if(n.isCheckStableRunning||n.callbackScheduled)return;n.callbackScheduled=!0;function e(){xS(()=>{n.callbackScheduled=!1,Ub(n),n.isCheckStableRunning=!0,SS(n),n.isCheckStableRunning=!1})}n.scheduleInRootZone?Zone.root.run(()=>{e()}):n._outer.run(()=>{e()}),Ub(n)}function wV(n){let e=()=>{CV(n)},t=bV++;n._inner=n._inner.fork({name:"angular",properties:{[bS]:!0,[Zh]:t,[Zh+t]:!0},onInvokeTask:(i,r,o,s,a,l)=>{if(EV(l))return i.invokeTask(o,s,a,l);try{return BD(n),i.invokeTask(o,s,a,l)}finally{(n.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||n.shouldCoalesceRunChangeDetection)&&e(),VD(n)}},onInvoke:(i,r,o,s,a,l,c)=>{try{return BD(n),i.invoke(o,s,a,l,c)}finally{n.shouldCoalesceRunChangeDetection&&!n.callbackScheduled&&!MV(l)&&e(),VD(n)}},onHasTask:(i,r,o,s)=>{i.hasTask(o,s),r===o&&(s.change=="microTask"?(n._hasPendingMicrotasks=s.microTask,Ub(n),SS(n)):s.change=="macroTask"&&(n.hasPendingMacrotasks=s.macroTask))},onHandleError:(i,r,o,s)=>(i.handleError(o,s),n.runOutsideAngular(()=>n.onError.emit(s)),!1)})}function Ub(n){n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&n.callbackScheduled===!0?n.hasPendingMicrotasks=!0:n.hasPendingMicrotasks=!1}function BD(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function VD(n){n._nesting--,SS(n)}var Kh=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new dr;onMicrotaskEmpty=new dr;onStable=new dr;onError=new dr;run(e,t,i){return e.apply(t,i)}runGuarded(e,t,i){return e.apply(t,i)}runOutsideAngular(e){return e()}runTask(e,t,i,r){return e.apply(t,i)}};function EV(n){return DA(n,"__ignore_ng_zone__")}function MV(n){return DA(n,"__scheduler_tick__")}function DA(n,e){return!Array.isArray(n)||n.length!==1?!1:n[0]?.data?.[e]===!0}var Hr=class{_console=console;handleError(e){this._console.error("ERROR",e)}},Gs=new Ve("",{factory:()=>{let n=Z(Yi),e=Z(xi),t;return i=>{n.runOutsideAngular(()=>{e.destroyed&&!t?setTimeout(()=>{throw i}):(t??=e.get(Hr),t.handleError(i))})}}}),AA={provide:Us,useValue:()=>{let n=Z(Hr,{optional:!0})},multi:!0},TV=new Ve("",{factory:()=>{let n=Z(wn).defaultView;if(!n)return;let e=Z(Gs),t=o=>{e(o.reason),o.preventDefault()},i=o=>{o.error?e(o.error):e(new Error(o.message,{cause:o})),o.preventDefault()},r=()=>{n.addEventListener("unhandledrejection",t),n.addEventListener("error",i)};typeof Zone<"u"?Zone.root.run(r):r(),Z(Zi).onDestroy(()=>{n.removeEventListener("error",i),n.removeEventListener("unhandledrejection",t)})}});function CS(){return Bs([qD(()=>{Z(TV)})])}function k(n,e){let[t,i,r]=db(n,e?.equal),o=t,s=o[Zn];return o.set=i,o.update=r,o.asReadonly=Cg.bind(o),o}function Cg(){let n=this[Zn];if(n.readonlyFn===void 0){let e=()=>this();e[Zn]=n,n.readonlyFn=e}return n.readonlyFn}var af=(()=>{class n{view;node;constructor(t,i){this.view=t,this.node=i}static __NG_ELEMENT_ID__=DV}return n})();function DV(){return new af(ct(),hi())}var Yo=class{},lf=new Ve("",{factory:()=>!0});var wS=new Ve(""),Hu=(()=>{class n{internalPendingTasks=Z(Ra);scheduler=Z(Yo);errorHandler=Z(Gs);add(){let t=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(t)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(t))}}run(t){let i=this.add();t().catch(this.errorHandler).finally(i)}static \u0275prov=ge({token:n,providedIn:"root",factory:()=>new n})}return n})(),wg=(()=>{class n{static \u0275prov=ge({token:n,providedIn:"root",factory:()=>new Bb})}return n})(),Bb=class{dirtyEffectCount=0;queues=new Map;add(e){this.enqueue(e),this.schedule(e)}schedule(e){e.dirty&&this.dirtyEffectCount++}remove(e){let t=e.zone,i=this.queues.get(t);i.has(e)&&(i.delete(e),e.dirty&&this.dirtyEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let i=this.queues.get(t);i.has(e)||i.add(e)}flush(){for(;this.dirtyEffectCount>0;){let e=!1;for(let[t,i]of this.queues)t===null?e||=this.flushQueue(i):e||=t.run(()=>this.flushQueue(i));e||(this.dirtyEffectCount=0)}}flushQueue(e){let t=!1;for(let i of e)i.dirty&&(this.dirtyEffectCount--,t=!0,i.run());return t}},eg=class{[Zn];constructor(e){this[Zn]=e}destroy(){this[Zn].destroy()}};function fn(n,e){let t=e?.injector??Z(bi),i=e?.manualCleanup!==!0?t.get(Zi):null,r,o=t.get(af,null,{optional:!0}),s=t.get(Yo);return o!==null?(r=PV(o.view,s,n),i instanceof Jm&&i._lView===o.view&&(i=null)):r=OV(n,t.get(wg),s),r.injector=t,i!==null&&(r.onDestroyFns=[i.onDestroy(()=>r.destroy())]),new eg(r)}var IA=ue(R({},fb),{cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let n=qh(!1);try{pb(this)}finally{qh(n)}},cleanup(){if(!this.cleanupFns?.length)return;let n=it(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],it(n)}}}),AV=ue(R({},IA),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(Hl(this),this.onDestroyFns!==null)for(let n of this.onDestroyFns)n();this.cleanup(),this.scheduler.remove(this)}}),IV=ue(R({},IA),{consumerMarkedDirty(){this.view[vt]|=8192,oc(this.view),this.notifier.notify(13)},destroy(){if(Hl(this),this.onDestroyFns!==null)for(let n of this.onDestroyFns)n();this.cleanup(),this.view[Ta]?.delete(this)}});function PV(n,e,t){let i=Object.create(IV);return i.view=n,i.zone=typeof Zone<"u"?Zone.current:null,i.notifier=e,i.fn=PA(i,t),n[Ta]??=new Set,n[Ta].add(i),i.consumerMarkedDirty(i),i}function OV(n,e,t){let i=Object.create(AV);return i.fn=PA(i,n),i.scheduler=e,i.notifier=t,i.zone=typeof Zone<"u"?Zone.current:null,i.scheduler.add(i),i.notifier.notify(12),i}function PA(n,e){return()=>{e(t=>(n.cleanupFns??=[]).push(t))}}var Eg={JSACTION:"jsaction"};function bf(n){return{toString:n}.toString()}function HV(n){return typeof n=="function"}function _I(n,e,t,i){e!==null?e.applyValueToInputSignal(e,i):n[t]=i}var kg=class{previousValue;currentValue;firstChange;constructor(e,t,i){this.previousValue=e,this.currentValue=t,this.firstChange=i}isFirstChange(){return this.firstChange}},Ju=(()=>{let n=()=>xI;return n.ngInherit=!0,n})();function xI(n){return n.type.prototype.ngOnChanges&&(n.setInput=jV),GV}function GV(){let n=SI(this),e=n?.current;if(e){let t=n.previous;if(t===Aa)n.previous=e;else for(let i in e)t[i]=e[i];n.current=null,this.ngOnChanges(e)}}function jV(n,e,t,i,r){let o=this.declaredInputs[i],s=SI(n)||WV(n,{previous:Aa,current:null}),a=s.current||(s.current={}),l=s.previous,c=l[o];a[o]=new kg(c&&c.currentValue,t,l===Aa),_I(n,e,r,t)}var bI="__ngSimpleChanges__";function SI(n){return n[bI]||null}function WV(n,e){return n[bI]=e}var OA=[];var Kt=function(n,e=null,t){for(let i=0;i<OA.length;i++){let r=OA[i];r(n,e,t)}},Ut=(function(n){return n[n.TemplateCreateStart=0]="TemplateCreateStart",n[n.TemplateCreateEnd=1]="TemplateCreateEnd",n[n.TemplateUpdateStart=2]="TemplateUpdateStart",n[n.TemplateUpdateEnd=3]="TemplateUpdateEnd",n[n.LifecycleHookStart=4]="LifecycleHookStart",n[n.LifecycleHookEnd=5]="LifecycleHookEnd",n[n.OutputStart=6]="OutputStart",n[n.OutputEnd=7]="OutputEnd",n[n.BootstrapApplicationStart=8]="BootstrapApplicationStart",n[n.BootstrapApplicationEnd=9]="BootstrapApplicationEnd",n[n.BootstrapComponentStart=10]="BootstrapComponentStart",n[n.BootstrapComponentEnd=11]="BootstrapComponentEnd",n[n.ChangeDetectionStart=12]="ChangeDetectionStart",n[n.ChangeDetectionEnd=13]="ChangeDetectionEnd",n[n.ChangeDetectionSyncStart=14]="ChangeDetectionSyncStart",n[n.ChangeDetectionSyncEnd=15]="ChangeDetectionSyncEnd",n[n.AfterRenderHooksStart=16]="AfterRenderHooksStart",n[n.AfterRenderHooksEnd=17]="AfterRenderHooksEnd",n[n.ComponentStart=18]="ComponentStart",n[n.ComponentEnd=19]="ComponentEnd",n[n.DeferBlockStateStart=20]="DeferBlockStateStart",n[n.DeferBlockStateEnd=21]="DeferBlockStateEnd",n[n.DynamicComponentStart=22]="DynamicComponentStart",n[n.DynamicComponentEnd=23]="DynamicComponentEnd",n[n.HostBindingsUpdateStart=24]="HostBindingsUpdateStart",n[n.HostBindingsUpdateEnd=25]="HostBindingsUpdateEnd",n})(Ut||{});function $V(n,e,t){let{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=e.type.prototype;if(i){let s=xI(e);(t.preOrderHooks??=[]).push(n,s),(t.preOrderCheckHooks??=[]).push(n,s)}r&&(t.preOrderHooks??=[]).push(0-n,r),o&&((t.preOrderHooks??=[]).push(n,o),(t.preOrderCheckHooks??=[]).push(n,o))}function CI(n,e){for(let t=e.directiveStart,i=e.directiveEnd;t<i;t++){let o=n.data[t].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:l,ngAfterViewChecked:c,ngOnDestroy:u}=o;s&&(n.contentHooks??=[]).push(-t,s),a&&((n.contentHooks??=[]).push(t,a),(n.contentCheckHooks??=[]).push(t,a)),l&&(n.viewHooks??=[]).push(-t,l),c&&((n.viewHooks??=[]).push(t,c),(n.viewCheckHooks??=[]).push(t,c)),u!=null&&(n.destroyHooks??=[]).push(t,u)}}function Ag(n,e,t){wI(n,e,3,t)}function Ig(n,e,t,i){(n[vt]&3)===t&&wI(n,e,t,i)}function ES(n,e){let t=n[vt];(t&3)===e&&(t&=16383,t+=1,n[vt]=t)}function wI(n,e,t,i){let r=i!==void 0?n[ec]&65535:0,o=i??-1,s=e.length-1,a=0;for(let l=r;l<s;l++)if(typeof e[l+1]=="number"){if(a=e[l],i!=null&&a>=i)break}else e[l]<0&&(n[ec]+=65536),(a<o||o==-1)&&(XV(n,t,e,l),n[ec]=(n[ec]&4294901760)+l+2),l++}function RA(n,e){Kt(Ut.LifecycleHookStart,n,e);let t=it(null);try{e.call(n)}finally{it(t),Kt(Ut.LifecycleHookEnd,n,e)}}function XV(n,e,t,i){let r=t[i]<0,o=t[i+1],s=r?-t[i]:t[i],a=n[s];r?n[vt]>>14<n[ec]>>16&&(n[vt]&3)===e&&(n[vt]+=16384,RA(a,o)):RA(a,o)}var ju=-1,lc=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,i,r){this.factory=e,this.name=r,this.canSeeViewProviders=t,this.injectImpl=i}};function YV(n){return(n.flags&8)!==0}function qV(n){return(n.flags&16)!==0}function ZV(n,e,t){let i=0;for(;i<t.length;){let r=t[i];if(typeof r=="number"){if(r!==0)break;i++;let o=t[i++],s=t[i++],a=t[i++];n.setAttribute(e,s,a,o)}else{let o=r,s=t[++i];JV(o)?n.setProperty(e,o,s):n.setAttribute(e,o,s),i++}}return i}function KV(n){return n===3||n===4||n===6}function JV(n){return n.charCodeAt(0)===64}function Xu(n,e){if(!(e===null||e.length===0))if(n===null||n.length===0)n=e.slice();else{let t=-1;for(let i=0;i<e.length;i++){let r=e[i];typeof r=="number"?t=r:t===0||(t===-1||t===2?FA(n,t,r,null,e[++i]):FA(n,t,r,null,null))}}return n}function FA(n,e,t,i,r){let o=0,s=n.length;if(e===-1)s=-1;else for(;o<n.length;){let a=n[o++];if(typeof a=="number"){if(a===e){s=-1;break}else if(a>e){s=o-1;break}}}for(;o<n.length;){let a=n[o];if(typeof a=="number")break;if(a===t){r!==null&&(n[o+1]=r);return}o++,r!==null&&o++}s!==-1&&(n.splice(s,0,e),o=s+1),n.splice(o++,0,t),r!==null&&n.splice(o++,0,r)}function EI(n){return n!==ju}function Lg(n){return n&32767}function QV(n){return n>>16}function Ug(n,e){let t=QV(n),i=e;for(;t>0;)i=i[Ql],t--;return i}var BS=!0;function Bg(n){let e=BS;return BS=n,e}var ez=256,MI=ez-1,TI=5,tz=0,rs={};function nz(n,e,t){let i;typeof t=="string"?i=t.charCodeAt(0)||0:t.hasOwnProperty(Jl)&&(i=t[Jl]),i==null&&(i=t[Jl]=tz++);let r=i&MI,o=1<<r;e.data[n+(r>>TI)]|=o}function Vg(n,e){let t=DI(n,e);if(t!==-1)return t;let i=e[He];i.firstCreatePass&&(n.injectorIndex=e.length,MS(i.data,n),MS(e,null),MS(i.blueprint,null));let r=wC(n,e),o=n.injectorIndex;if(EI(r)){let s=Lg(r),a=Ug(r,e),l=a[He].data;for(let c=0;c<8;c++)e[o+c]=a[s+c]|l[s+c]}return e[o+8]=r,o}function MS(n,e){n.push(0,0,0,0,0,0,0,0,e)}function DI(n,e){return n.injectorIndex===-1||n.parent&&n.parent.injectorIndex===n.injectorIndex||e[n.injectorIndex+8]===null?-1:n.injectorIndex}function wC(n,e){if(n.parent&&n.parent.injectorIndex!==-1)return n.parent.injectorIndex;let t=0,i=null,r=e;for(;r!==null;){if(i=RI(r),i===null)return ju;if(t++,r=r[Ql],i.injectorIndex!==-1)return i.injectorIndex|t<<16}return ju}function VS(n,e,t){nz(n,e,t)}function AI(n,e,t){if(t&8||n!==void 0)return n;ag(e,"NodeInjector")}function II(n,e,t,i){if(t&8&&i===void 0&&(i=null),(t&3)===0){let r=n[hr],o=Ii(void 0);try{return r?r.get(e,i,t&8):Yb(e,i,t&8)}finally{Ii(o)}}return AI(i,e,t)}function PI(n,e,t,i=0,r){if(n!==null){if(e[vt]&2048&&!(i&2)){let s=sz(n,e,t,i,rs);if(s!==rs)return s}let o=OI(n,e,t,i,rs);if(o!==rs)return o}return II(e,t,i,r)}function OI(n,e,t,i,r){let o=rz(t);if(typeof o=="function"){if(!vS(e,n,i))return i&1?AI(r,t,i):II(e,t,i,r);try{let s;if(s=o(i),s==null&&!(i&8))ag(t);else return s}finally{yS()}}else if(typeof o=="number"){let s=null,a=DI(n,e),l=ju,c=i&1?e[ii][Ri]:null;for((a===-1||i&4)&&(l=a===-1?wC(n,e):e[a+8],l===ju||!kA(i,!1)?a=-1:(s=e[He],a=Lg(l),e=Ug(l,e)));a!==-1;){let u=e[He];if(NA(o,a,u.data)){let d=iz(a,e,t,s,i,c);if(d!==rs)return d}l=e[a+8],l!==ju&&kA(i,e[He].data[a+8]===c)&&NA(o,a,e)?(s=u,a=Lg(l),e=Ug(l,e)):a=-1}}return r}function iz(n,e,t,i,r,o){let s=e[He],a=s.data[n+8],l=i==null?ns(a)&&BS:i!=s&&(a.type&3)!==0,c=r&1&&o===a,u=Pg(a,s,t,l,c);return u!==null?hf(e,s,u,a,r):rs}function Pg(n,e,t,i,r){let o=n.providerIndexes,s=e.data,a=o&1048575,l=n.directiveStart,c=n.directiveEnd,u=o>>20,d=i?a:a+u,h=r?a+u:c;for(let f=d;f<h;f++){let p=s[f];if(f<l&&t===p||f>=l&&p.type===t)return f}if(r){let f=s[l];if(f&&is(f)&&f.type===t)return l}return null}function hf(n,e,t,i,r){let o=n[t],s=e.data;if(o instanceof lc){let a=o;if(a.resolving)throw Xb("");let l=Bg(a.canSeeViewProviders);a.resolving=!0;let c=s[t].type||s[t],u,d=a.injectImpl?Ii(a.injectImpl):null,h=vS(n,i,0);try{o=n[t]=a.factory(void 0,r,s,n,i),e.firstCreatePass&&t>=i.directiveStart&&$V(t,s[t],e)}finally{d!==null&&Ii(d),Bg(l),a.resolving=!1,yS()}}return o}function rz(n){if(typeof n=="string")return n.charCodeAt(0)||0;let e=n.hasOwnProperty(Jl)?n[Jl]:void 0;return typeof e=="number"?e>=0?e&MI:oz:e}function NA(n,e,t){let i=1<<n;return!!(t[e+(n>>TI)]&i)}function kA(n,e){return!(n&2)&&!(n&1&&e)}var ac=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,i){return PI(this._tNode,this._lView,e,ql(i),t)}};function oz(){return new ac(hi(),ct())}function Ws(n){return bf(()=>{let e=n.prototype.constructor,t=e[Xh]||zS(e),i=Object.prototype,r=Object.getPrototypeOf(n.prototype).constructor;for(;r&&r!==i;){let o=r[Xh]||zS(r);if(o&&o!==t)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function zS(n){return Vb(n)?()=>{let e=zS(di(n));return e&&e()}:Ma(n)}function sz(n,e,t,i,r){let o=n,s=e;for(;o!==null&&s!==null&&s[vt]&2048&&!ic(s);){let a=OI(o,s,t,i|2,rs);if(a!==rs)return a;let l=o.parent;if(!l){let c=s[eS];if(c){let u=c.get(t,rs,i&-5);if(u!==rs)return u}l=RI(s),s=s[Ql]}o=l}return r}function RI(n){let e=n[He],t=e.type;return t===2?e.declTNode:t===1?n[Ri]:null}function az(){return Qu(hi(),ct())}function Qu(n,e){return new $r(jr(n,e))}var $r=(()=>{class n{nativeElement;constructor(t){this.nativeElement=t}static __NG_ELEMENT_ID__=az}return n})();function lz(n){return n instanceof $r?n.nativeElement:n}function cz(){return this._results[Symbol.iterator]()}var zg=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new uo}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let i=$D(e);(this._changesDetected=!WD(this._results,i,t))&&(this._results=i,this.length=i.length,this.last=i[this.length-1],this.first=i[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=cz},FI="ngSkipHydration",uz="ngskiphydration";function NI(n){let e=n.mergedAttrs;if(e===null)return!1;for(let t=0;t<e.length;t+=2){let i=e[t];if(typeof i=="number")return!1;if(typeof i=="string"&&i.toLowerCase()===uz)return!0}return!1}function kI(n){return n.hasAttribute(FI)}function Hg(n){return(n.flags&128)===128}function LI(n){if(Hg(n))return!0;let e=n.parent;for(;e;){if(Hg(n)||NI(e))return!0;e=e.parent}return!1}var EC=(function(n){return n[n.OnPush=0]="OnPush",n[n.Eager=1]="Eager",n[n.Default=1]="Default",n})(EC||{}),UI=new Map,dz=0;function hz(){return dz++}function fz(n){UI.set(n[Qo],n)}function HS(n){UI.delete(n[Qo])}var LA="__ngContext__";function Yu(n,e){pr(e)?(n[LA]=e[Qo],fz(e)):n[LA]=e}function BI(n){return zI(n[Bu])}function VI(n){return zI(n[Gr])}function zI(n){for(;n!==null&&!qi(n);)n=n[Gr];return n}var GS;function MC(n){GS=n}function HI(){if(GS!==void 0)return GS;if(typeof document<"u")return document;throw new ze(210,!1)}var ss=new Ve("",{factory:()=>pz}),pz="ng";var Kg=new Ve(""),Sf=new Ve("",{providedIn:"platform",factory:()=>"unknown"});var Jg=new Ve("",{factory:()=>Z(wn).body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var ed=(()=>{class n{static \u0275prov=ge({token:n,providedIn:"root",factory:()=>{let t=new n;return t.store=mz(Z(wn),Z(ss)),t}});store={};onSerializeCallbacks={};get(t,i){return this.store[t]!==void 0?this.store[t]:i}set(t,i){this.store[t]=i}remove(t){delete this.store[t]}hasKey(t){return this.store.hasOwnProperty(t)}get isEmpty(){return Object.keys(this.store).length===0}onSerialize(t,i){this.onSerializeCallbacks[t]=i}toJson(){for(let t in this.onSerializeCallbacks)if(this.onSerializeCallbacks.hasOwnProperty(t))try{this.store[t]=this.onSerializeCallbacks[t]()}catch(i){console.warn("Exception in onSerialize callback: ",i)}return JSON.stringify(this.store).replace(/</g,"\\u003C")}}return n})();function mz(n,e){let t=n.getElementById(e+"-state");if(t?.textContent)try{return JSON.parse(t.textContent)}catch(i){console.warn("Exception while restoring TransferState for app "+e,i)}return{}}var GI="h",jI="b",gz="f",vz="n",WI="e",$I="t",Qg="c",TC="x",ff="r",XI="i",YI="n",DC="d";var qI="di",ZI="s",KI="p";var Cf=new Ve(""),JI=!1,AC=new Ve("",{factory:()=>JI});var IC=new Ve(""),QI=!1,eP=new Ve("",{factory:()=>[]}),tP=new Ve(""),PC=new Ve("",{factory:()=>new Map});var wf="ngb";var nP=(n,e,t)=>{let i=n,r=i.__jsaction_fns??new Map,o=r.get(e)??[];o.push(t),r.set(e,o),i.__jsaction_fns=r},iP=(n,e)=>{let t=n,i=t.getAttribute(wf)??"",r=e.get(i)??new Set;r.has(t)||r.add(t),e.set(i,r)};var rP=n=>{n.removeAttribute(Eg.JSACTION),n.removeAttribute(wf),n.__jsaction_fns=void 0},oP=new Ve("",{factory:()=>({})});function OC(n,e){let t=e?.__jsaction_fns?.get(n.type);if(!(!t||!e?.isConnected))for(let i of t)i(n)}var jS=new Map;function sP(n,e){return jS.set(n,e),()=>jS.delete(n)}var UA=!1,aP=(n,e,t,i)=>{};function yz(n,e,t,i){aP(n,e,t,i)}function lP(){UA||(aP=(n,e,t,i)=>{let r=n[hr].get(ss);jS.get(r)?.(e,t,i)},UA=!0)}var ev=new Ve("");function Ef(n){return(n.flags&32)===32}var _z="__nghData__",RC=_z,xz="__nghDeferData__",cP=xz;var Og="ngh",uP="nghm",dP=()=>null;function bz(n,e,t=!1){let i=n.getAttribute(Og);if(i==null)return null;let[r,o]=i.split("|");if(i=t?o:r,!i)return null;let s=o?`|${o}`:"",a=t?r:s,l={};if(i!==""){let u=e.get(ed,null,{optional:!0});u!==null&&(l=u.get(RC,[])[Number(i)])}let c={data:l,firstChild:n.firstChild??null};return t&&(c.firstChild=n,tv(c,0,n.nextSibling)),a?n.setAttribute(Og,a):n.removeAttribute(Og),c}function hP(){dP=bz}function fP(n,e,t=!1){return dP(n,e,t)}function pP(n){let e=n._lView;return e[He].type===2?null:(ic(e)&&(e=e[zt]),e)}function Sz(n){return n.textContent?.replace(/\s/gm,"")}function Cz(n){let e=HI(),t=e.createNodeIterator(n,NodeFilter.SHOW_COMMENT,{acceptNode(o){let s=Sz(o);return s==="ngetn"||s==="ngtns"?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),i,r=[];for(;i=t.nextNode();)r.push(i);for(let o of r)o.textContent==="ngetn"?o.replaceWith(e.createTextNode("")):o.remove()}function tv(n,e,t){n.segmentHeads??={},n.segmentHeads[e]=t}function WS(n,e){return n.segmentHeads?.[e]??null}function mP(n){return n.get(tP,!1,{optional:!0})}function wz(n,e){let t=n.data,i=t[WI]?.[e]??null;return i===null&&t[Qg]?.[e]&&(i=FC(n,e)),i}function gP(n,e){return n.data[Qg]?.[e]??null}function FC(n,e){let t=gP(n,e)??[],i=0;for(let r of t)i+=r[ff]*(r[TC]??1);return i}function Ez(n){if(typeof n.disconnectedNodes>"u"){let e=n.data[DC];n.disconnectedNodes=e?new Set(e):null}return n.disconnectedNodes}function vP(n,e){if(typeof n.disconnectedNodes>"u"){let t=n.data[DC];n.disconnectedNodes=t?new Set(t):null}return!!Ez(n)?.has(e)}function nv(n,e){let t=n[Fi];return t!==null&&!vg()&&!Ef(e)&&!vP(t,e.index-zt)}function Mz(n,e){let t=e.get(ev),r=e.get(ed).get(cP,{}),o=!1,s=n,a=null,l=[];for(;!o&&s;){o=t.has(s);let c=t.hydrating.get(s);if(a===null&&c!=null){a=c.promise;break}l.unshift(s),s=r[s][KI]}return{parentBlockPromise:a,hydrationQueue:l}}function TS(n){return!!n&&n.nodeType===Node.COMMENT_NODE&&n.textContent?.trim()===uP}function BA(n){for(;n&&n.nodeType===Node.TEXT_NODE;)n=n.previousSibling;return n}function yP(n){for(let i of n.body.childNodes)if(TS(i))return;let e=BA(n.body.previousSibling);if(TS(e))return;let t=BA(n.head.lastChild);if(!TS(t))throw new ze(-507,!1)}function _P(n,e){let t=n.contentQueries;if(t!==null){let i=it(null);try{for(let r=0;r<t.length;r+=2){let o=t[r],s=t[r+1];if(s!==-1){let a=n.data[s];_g(o),a.contentQueries(2,e[s],s)}}}finally{it(i)}}}function $S(n,e,t){_g(0);let i=it(null);try{e(n,t)}finally{it(i)}}function NC(n,e,t){if(tS(e)){let i=it(null);try{let r=e.directiveStart,o=e.directiveEnd;for(let s=r;s<o;s++){let a=n.data[s];if(a.contentQueries){let l=t[s];a.contentQueries(1,l,s)}}}finally{it(i)}}}var mo=(function(n){return n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",n[n.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom",n})(mo||{});var Mg;function Tz(){if(Mg===void 0&&(Mg=null,qo.trustedTypes))try{Mg=qo.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return Mg}function iv(n){return Tz()?.createHTML(n)||n}var js=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${tg})`}},XS=class extends js{getTypeName(){return"HTML"}},YS=class extends js{getTypeName(){return"Style"}},qS=class extends js{getTypeName(){return"Script"}},ZS=class extends js{getTypeName(){return"URL"}},KS=class extends js{getTypeName(){return"ResourceURL"}};function as(n){return n instanceof js?n.changingThisBreaksApplicationSecurity:n}function ka(n,e){let t=xP(n);if(t!=null&&t!==e){if(t==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${t} (see ${tg})`)}return t===e}function xP(n){return n instanceof js&&n.getTypeName()||null}function kC(n){return new XS(n)}function LC(n){return new YS(n)}function UC(n){return new qS(n)}function BC(n){return new ZS(n)}function VC(n){return new KS(n)}function Dz(n){let e=new QS(n);return Az()?new JS(e):e}var JS=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(iv(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},QS=class{defaultDoc;inertDocument;constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=iv(e),t}};function Az(){try{return!!new window.DOMParser().parseFromString(iv(""),"text/html")}catch{return!1}}var Iz=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Mf(n){return n=String(n),n.match(Iz)?n:"unsafe:"+n}function $s(n){let e={};for(let t of n.split(","))e[t]=!0;return e}function Tf(...n){let e={};for(let t of n)for(let i in t)t.hasOwnProperty(i)&&(e[i]=!0);return e}var bP=$s("area,br,col,hr,img,wbr"),SP=$s("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),CP=$s("rp,rt"),Pz=Tf(CP,SP),Oz=Tf(SP,$s("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Rz=Tf(CP,$s("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),VA=Tf(bP,Oz,Rz,Pz),wP=$s("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Fz=$s("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Nz=$s("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),kz=Tf(wP,Fz,Nz),Lz=$s("script,style,template"),eC=class{sanitizedSomething=!1;buf=[];sanitizeChildren(e){let t=e.firstChild,i=!0,r=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?i=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,i&&t.firstChild){r.push(t),t=Vz(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let o=Bz(t);if(o){t=o;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=zA(e).toLowerCase();if(!VA.hasOwnProperty(t))return this.sanitizedSomething=!0,!Lz.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let i=e.attributes;for(let r=0;r<i.length;r++){let o=i.item(r),s=o.name,a=s.toLowerCase();if(!kz.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=o.value;wP[a]&&(l=Mf(l)),this.buf.push(" ",s,'="',HA(l),'"')}return this.buf.push(">"),!0}endElement(e){let t=zA(e).toLowerCase();VA.hasOwnProperty(t)&&!bP.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(HA(e))}};function Uz(n,e){return(n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function Bz(n){let e=n.nextSibling;if(e&&n!==e.previousSibling)throw EP(e);return e}function Vz(n){let e=n.firstChild;if(e&&Uz(n,e))throw EP(e);return e}function zA(n){let e=n.nodeName;return typeof e=="string"?e:"FORM"}function EP(n){return new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`)}var zz=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Hz=/([^\#-~ |!])/g;function HA(n){return n.replace(/&/g,"&").replace(zz,function(e){let t=e.charCodeAt(0),i=e.charCodeAt(1);return"&#"+((t-55296)*1024+(i-56320)+65536)+";"}).replace(Hz,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}var Tg;function zC(n,e){let t=null;try{Tg=Tg||Dz(n);let i=e?String(e):"";t=Tg.getInertBodyElement(i);let r=5,o=i;do{if(r===0)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=t.innerHTML,t=Tg.getInertBodyElement(i)}while(i!==o);let a=new eC().sanitizeChildren(GA(t)||t);return iv(a)}finally{if(t){let i=GA(t)||t;for(;i.firstChild;)i.firstChild.remove()}}}function GA(n){return"content"in n&&Gz(n)?n.content:null}function Gz(n){return n.nodeType===Node.ELEMENT_NODE&&n.nodeName==="TEMPLATE"}var jz=/^>|^->|<!--|-->|--!>|<!-$/g,Wz=/(<|>)/g,$z="\u200B$1\u200B";function Xz(n){return n.replace(jz,e=>e.replace(Wz,$z))}function MP(n,e){return n.createText(e)}function Yz(n,e,t){n.setValue(e,t)}function TP(n,e){return n.createComment(Xz(e))}function HC(n,e,t){return n.createElement(e,t)}function Gg(n,e,t,i,r){n.insertBefore(e,t,i,r)}function DP(n,e,t){n.appendChild(e,t)}function jA(n,e,t,i,r){i!==null?Gg(n,e,t,i,r):DP(n,e,t)}function GC(n,e,t,i){n.removeChild(null,e,t,i)}function AP(n){n.textContent=""}function qz(n,e,t){n.setAttribute(e,"style",t)}function Zz(n,e,t){t===""?n.removeAttribute(e,"class"):n.setAttribute(e,"class",t)}function IP(n,e,t){let{mergedAttrs:i,classes:r,styles:o}=t;i!==null&&ZV(n,e,i),r!==null&&Zz(n,e,r),o!==null&&qz(n,e,o)}var ls=(function(n){return n[n.NONE=0]="NONE",n[n.HTML=1]="HTML",n[n.STYLE=2]="STYLE",n[n.SCRIPT=3]="SCRIPT",n[n.URL=4]="URL",n[n.RESOURCE_URL=5]="RESOURCE_URL",n})(ls||{});function Ji(n){let e=Kz();return e?e.sanitize(ls.URL,n)||"":ka(n,"URL")?as(n):Mf(Jh(n))}function Kz(){let n=ct();return n&&n[Ko].sanitizer}function PP(n){return n.ownerDocument.body}function Jz(n,e,t){let i=n.length;for(;;){let r=n.indexOf(e,t);if(r===-1)return r;if(r===0||n.charCodeAt(r-1)<=32){let o=e.length;if(r+o===i||n.charCodeAt(r+o)<=32)return r}t=r+1}}var OP="ng-template";function Qz(n,e,t,i){let r=0;if(i){for(;r<e.length&&typeof e[r]=="string";r+=2)if(e[r]==="class"&&Jz(e[r+1].toLowerCase(),t,0)!==-1)return!0}else if(jC(n))return!1;if(r=e.indexOf(1,r),r>-1){let o;for(;++r<e.length&&typeof(o=e[r])=="string";)if(o.toLowerCase()===t)return!0}return!1}function jC(n){return n.type===4&&n.value!==OP}function e4(n,e,t){let i=n.type===4&&!t?OP:n.value;return e===i}function t4(n,e,t){let i=4,r=n.attrs,o=r!==null?r4(r):0,s=!1;for(let a=0;a<e.length;a++){let l=e[a];if(typeof l=="number"){if(!s&&!fo(i)&&!fo(l))return!1;if(s&&fo(l))continue;s=!1,i=l|i&1;continue}if(!s)if(i&4){if(i=2|i&1,l!==""&&!e4(n,l,t)||l===""&&e.length===1){if(fo(i))return!1;s=!0}}else if(i&8){if(r===null||!Qz(n,r,l,t)){if(fo(i))return!1;s=!0}}else{let c=e[++a],u=n4(l,r,jC(n),t);if(u===-1){if(fo(i))return!1;s=!0;continue}if(c!==""){let d;if(u>o?d="":d=r[u+1].toLowerCase(),i&2&&c!==d){if(fo(i))return!1;s=!0}}}}return fo(i)||s}function fo(n){return(n&1)===0}function n4(n,e,t,i){if(e===null)return-1;let r=0;if(i||!t){let o=!1;for(;r<e.length;){let s=e[r];if(s===n)return r;if(s===3||s===6)o=!0;else if(s===1||s===2){let a=e[++r];for(;typeof a=="string";)a=e[++r];continue}else{if(s===4)break;if(s===0){r+=4;continue}}r+=o?1:2}return-1}else return o4(e,n)}function RP(n,e,t=!1){for(let i=0;i<e.length;i++)if(t4(n,e[i],t))return!0;return!1}function i4(n){let e=n.attrs;if(e!=null){let t=e.indexOf(5);if((t&1)===0)return e[t+1]}return null}function r4(n){for(let e=0;e<n.length;e++){let t=n[e];if(KV(t))return e}return n.length}function o4(n,e){let t=n.indexOf(4);if(t>-1)for(t++;t<n.length;){let i=n[t];if(typeof i=="number")return-1;if(i===e)return t;t++}return-1}function s4(n,e){e:for(let t=0;t<e.length;t++){let i=e[t];if(n.length===i.length){for(let r=0;r<n.length;r++)if(n[r]!==i[r])continue e;return!0}}return!1}function WA(n,e){return n?":not("+e.trim()+")":e}function a4(n){let e=n[0],t=1,i=2,r="",o=!1;for(;t<n.length;){let s=n[t];if(typeof s=="string")if(i&2){let a=n[++t];r+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else i&8?r+="."+s:i&4&&(r+=" "+s);else r!==""&&!fo(s)&&(e+=WA(o,r),r=""),i=s,o=o||!fo(i);t++}return r!==""&&(e+=WA(o,r)),e}function l4(n){return n.map(a4).join(",")}function c4(n){let e=[],t=[],i=1,r=2;for(;i<n.length;){let o=n[i];if(typeof o=="string")r===2?o!==""&&e.push(o,n[++i]):r===8&&t.push(o);else{if(!fo(r))break;r=o}i++}return t.length&&e.push(1,...t),e}var Qi={};function WC(n,e,t,i,r,o,s,a,l,c,u){let d=zt+i,h=d+r,f=u4(d,h),p=typeof c=="function"?c():c;return f[He]={type:n,blueprint:f,template:t,queries:null,viewQuery:a,declTNode:e,data:f.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:h,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof o=="function"?o():o,pipeRegistry:typeof s=="function"?s():s,firstChild:null,schemas:l,consts:p,incompleteFirstPass:!1,ssrId:u}}function u4(n,e){let t=[];for(let i=0;i<e;i++)t.push(i<n?null:Qi);return t}function d4(n){let e=n.tView;return e===null||e.incompleteFirstPass?n.tView=WC(1,null,n.template,n.decls,n.vars,n.directiveDefs,n.pipeDefs,n.viewQuery,n.schemas,n.consts,n.id):e}function $C(n,e,t,i,r,o,s,a,l,c,u){let d=e.blueprint.slice();return d[Oi]=r,d[vt]=i|4|128|8|64|1024,(c!==null||n&&n[vt]&2048)&&(d[vt]|=2048),rS(d),d[Nn]=d[Ql]=n,d[An]=t,d[Ko]=s||n&&n[Ko],d[Gt]=a||n&&n[Gt],d[hr]=l||n&&n[hr]||null,d[Ri]=o,d[Qo]=hz(),d[Fi]=u,d[eS]=c,d[ii]=e.type==2?n[ii]:d,d}function h4(n,e,t){let i=jr(e,n),r=d4(t),o=n[Ko].rendererFactory,s=XC(n,$C(n,r,null,FP(t),i,e,null,o.createRenderer(i,t),null,null,null));return n[e.index]=s}function FP(n){let e=16;return n.signals?e=4096:n.onPush&&(e=64),e}function NP(n,e,t,i){if(t===0)return-1;let r=e.length;for(let o=0;o<t;o++)e.push(i),n.blueprint.push(i),n.data.push(null);return r}function XC(n,e){return n[Bu]?n[Qb][Gr]=e:n[Bu]=e,n[Qb]=e,e}function F(n=1){kP(En(),ct(),zs()+n,!1)}function kP(n,e,t,i){if(!i)if((e[vt]&3)===3){let o=n.preOrderCheckHooks;o!==null&&Ag(e,o,t)}else{let o=n.preOrderHooks;o!==null&&Ig(e,o,0,t)}Oa(t)}var rv=(function(n){return n[n.None=0]="None",n[n.SignalBased=1]="SignalBased",n[n.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",n})(rv||{});function tC(n,e,t,i){let r=it(null);try{let[o,s,a]=n.inputs[t],l=null;(s&rv.SignalBased)!==0&&(l=e[o][Zn]),l!==null&&l.transformFn!==void 0?i=l.transformFn(i):a!==null&&(i=a.call(e,i)),n.setInput!==null?n.setInput(e,l,i,t,o):_I(e,l,o,i)}finally{it(r)}}var os=(function(n){return n[n.Important=1]="Important",n[n.DashCase=2]="DashCase",n})(os||{}),f4;function YC(n,e){return f4(n,e)}var wce=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";var nC=new WeakMap;function p4(n,e){let t=nC.get(n);if(!t||t.length===0)return;let i=e.parentNode,r=e.previousSibling;for(let o=t.length-1;o>=0;o--){let s=t[o],a=s.parentNode;(r&&s===r||a&&i&&a!==i)&&(t.splice(o,1),s.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}})),s.parentNode?.removeChild(s))}}function m4(n,e){let t=nC.get(n);t?t.includes(e)||t.push(e):nC.set(n,[e])}var Fa=new Set,ov=(function(n){return n[n.CHANGE_DETECTION=0]="CHANGE_DETECTION",n[n.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",n})(ov||{}),Xs=new Ve(""),$A=new Set;function go(n){$A.has(n)||($A.add(n),performance?.mark?.("mark_feature_usage",{detail:{feature:n}}))}var qC=(()=>{class n{impl=null;execute(){this.impl?.execute()}static \u0275prov=ge({token:n,providedIn:"root",factory:()=>new n})}return n})(),LP=[0,1,2,3],UP=(()=>{class n{ngZone=Z(Yi);scheduler=Z(Yo);errorHandler=Z(Hr,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){Z(Xs,{optional:!0})}execute(){let t=this.sequences.size>0;t&&Kt(Ut.AfterRenderHooksStart),this.executing=!0;for(let i of LP)for(let r of this.sequences)if(!(r.erroredOrDestroyed||!r.hooks[i]))try{r.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let o=r.hooks[i];return o(r.pipelinedValue)},r.snapshot))}catch(o){r.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}this.executing=!1;for(let i of this.sequences)i.afterRun(),i.once&&(this.sequences.delete(i),i.destroy());for(let i of this.deferredRegistrations)this.sequences.add(i);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),t&&Kt(Ut.AfterRenderHooksEnd)}register(t){let{view:i}=t;i!==void 0?((i[tc]??=[]).push(t),oc(i),i[vt]|=8192):this.executing?this.deferredRegistrations.add(t):this.addSequence(t)}addSequence(t){this.sequences.add(t),this.scheduler.notify(7)}unregister(t){this.executing&&this.sequences.has(t)?(t.erroredOrDestroyed=!0,t.pipelinedValue=void 0,t.once=!0):(this.sequences.delete(t),this.deferredRegistrations.delete(t))}maybeTrace(t,i){return i?i.run(ov.AFTER_NEXT_RENDER,t):t()}static \u0275prov=ge({token:n,providedIn:"root",factory:()=>new n})}return n})(),jg=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,i,r,o,s=null){this.impl=e,this.hooks=t,this.view=i,this.once=r,this.snapshot=s,this.unregisterOnDestroy=o?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[tc];e&&(this.view[tc]=e.filter(t=>t!==this))}};function sv(n,e){let t=e?.injector??Z(bi);return go("NgAfterNextRender"),v4(n,t,e,!0)}function g4(n){return n instanceof Function?[void 0,void 0,n,void 0]:[n.earlyRead,n.write,n.mixedReadWrite,n.read]}function v4(n,e,t,i){let r=e.get(qC);r.impl??=e.get(UP);let o=e.get(Xs,null,{optional:!0}),s=t?.manualCleanup!==!0?e.get(Zi):null,a=e.get(af,null,{optional:!0}),l=new jg(r.impl,g4(n),a?.view,i,s,o?.snapshot(null));return r.impl.register(l),l}var BP=new Ve("",{factory:()=>{let n=Z(xi),e=new Set;return n.onDestroy(()=>e.clear()),{queue:e,isScheduled:!1,scheduler:null,injector:n}}});function VP(n,e,t){let i=n.get(BP);if(Array.isArray(e))for(let r of e)i.queue.add(r),t?.detachedLeaveAnimationFns?.push(r);else i.queue.add(e),t?.detachedLeaveAnimationFns?.push(e);i.scheduler&&i.scheduler(n)}function y4(n,e){let t=n.get(BP);if(e.detachedLeaveAnimationFns){for(let i of e.detachedLeaveAnimationFns)t.queue.delete(i);e.detachedLeaveAnimationFns=void 0}}function _4(n,e){for(let[t,i]of e)VP(n,i.animateFns)}function XA(n,e,t,i){let r=n?.[es]?.enter;e!==null&&r&&r.has(t.index)&&_4(i,r)}function YA(n,e,t,i){try{t.get(ef)}catch{return i(!1)}let r=n?.[es],o=x4(n,e,r);if(o.size===0){let s=!1;if(n){let a=[];av(n,e,a),s=a.length>0}if(!s)return i(!1)}n&&Fa.add(n[Qo]),VP(t,()=>b4(n,e,r||void 0,o,i),r||void 0)}function x4(n,e,t){let i=new Map,r=t?.leave;if(r&&r.has(e.index)&&i.set(e.index,r.get(e.index)),n&&r)for(let[o,s]of r){if(i.has(o))continue;let l=n[He].data[o].parent;for(;l;){if(l===e){i.set(o,s);break}l=l.parent}}return i}function b4(n,e,t,i,r){let o=[];if(t&&t.leave)for(let[s]of i){if(!t.leave.has(s))continue;let a=t.leave.get(s);for(let l of a.animateFns){let{promise:c}=l();o.push(c)}t.detachedLeaveAnimationFns=void 0}if(n&&av(n,e,o),o.length>0){let s=t||n?.[es];if(s){let a=s.running;a&&o.push(a),s.running=Promise.allSettled(o),S4(n,s.running,r)}else Promise.allSettled(o).then(()=>{n&&Fa.delete(n[Qo]),r(!0)})}else n&&Fa.delete(n[Qo]),r(!1)}function av(n,e,t){if(ns(e)){let r=gr(e.index,n);qA(r,t)}else if(e.type&12){let r=n[e.index];if(qi(r))for(let o=Cn;o<r.length;o++){let s=r[o];qA(s,t)}}let i=e.child;for(;i;)av(n,i,t),i=i.next}function qA(n,e){let t=n[es];if(t&&t.leave)for(let r of t.leave.values())for(let o of r.animateFns){let{promise:s}=o();e.push(s)}let i=n[He].firstChild;for(;i;)av(n,i,e),i=i.next}function S4(n,e,t){e.then(()=>{n[es]?.running===e&&(n[es].running=void 0,Fa.delete(n[Qo])),t(!0)})}function Gu(n,e,t,i,r,o,s,a){if(r!=null){let l,c=!1;qi(r)?l=r:pr(r)&&(c=!0,r=r[Oi]);let u=mr(r);n===0&&i!==null?(XA(a,i,o,t),s==null?DP(e,i,u):Gg(e,i,u,s||null,!0)):n===1&&i!==null?(XA(a,i,o,t),Gg(e,i,u,s||null,!0),p4(o,u)):n===2?(a?.[es]?.leave?.has(o.index)&&m4(o,u),YA(a,o,t,d=>{GC(e,u,c,d)})):n===3&&YA(a,o,t,()=>{e.destroyNode(u)}),l!=null&&O4(e,n,t,l,o,i,s)}}function C4(n,e){zP(n,e),e[Oi]=null,e[Ri]=null}function w4(n,e,t,i,r,o){i[Oi]=r,i[Ri]=e,cv(n,i,t,1,r,o)}function zP(n,e){e[Ko].changeDetectionScheduler?.notify(9),cv(n,e,e[Gt],2,null,null)}function E4(n){let e=n[Bu];if(!e)return DS(n[He],n);for(;e;){let t=null;if(pr(e))t=e[Bu];else{let i=e[Cn];i&&(t=i)}if(!t){for(;e&&!e[Gr]&&e!==n;)pr(e)&&DS(e[He],e),e=e[Nn];e===null&&(e=n),pr(e)&&DS(e[He],e),t=e&&e[Gr]}e=t}}function ZC(n,e){let t=n[nc],i=t.indexOf(e);t.splice(i,1)}function lv(n,e){if(Pa(e))return;let t=e[Gt];t.destroyNode&&cv(n,e,t,3,null,null),E4(e)}function DS(n,e){if(Pa(e))return;let t=it(null);try{e[vt]&=-129,e[vt]|=256,e[fr]&&Hl(e[fr]),T4(n,e),M4(n,e),e[He].type===1&&e[Gt].destroy();let i=e[Ia];if(i!==null&&qi(e[Nn])){i!==e[Nn]&&ZC(i,e);let r=e[Jo];r!==null&&r.detachView(n)}HS(e)}finally{it(t)}}function M4(n,e){let t=n.cleanup,i=e[Uu];if(t!==null)for(let s=0;s<t.length-1;s+=2)if(typeof t[s]=="string"){let a=t[s+3];a>=0?i[a]():i[-a].unsubscribe(),s+=2}else{let a=i[t[s+1]];t[s].call(a)}i!==null&&(e[Uu]=null);let r=e[Ns];if(r!==null){e[Ns]=null;for(let s=0;s<r.length;s++){let a=r[s];a()}}let o=e[Ta];if(o!==null){e[Ta]=null;for(let s of o)s.destroy()}}function T4(n,e){let t;if(n!=null&&(t=n.destroyHooks)!=null)for(let i=0;i<t.length;i+=2){let r=e[t[i]];if(!(r instanceof lc)){let o=t[i+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){let a=r[o[s]],l=o[s+1];Kt(Ut.LifecycleHookStart,a,l);try{l.call(a)}finally{Kt(Ut.LifecycleHookEnd,a,l)}}else{Kt(Ut.LifecycleHookStart,r,o);try{o.call(r)}finally{Kt(Ut.LifecycleHookEnd,r,o)}}}}}function HP(n,e,t){return D4(n,e.parent,t)}function D4(n,e,t){let i=e;for(;i!==null&&i.type&168;)e=i,i=e.parent;if(i===null)return t[Oi];if(ns(i)){let{encapsulation:r}=n.data[i.directiveStart+i.componentOffset];if(r===mo.None||r===mo.Emulated)return null}return jr(i,t)}function GP(n,e,t){return I4(n,e,t)}function A4(n,e,t){return n.type&40?jr(n,t):null}var I4=A4,ZA;function KC(n,e,t,i){let r=HP(n,i,e),o=e[Gt],s=i.parent||e[Ri],a=GP(s,i,e);if(r!=null)if(Array.isArray(t))for(let l=0;l<t.length;l++)jA(o,r,t[l],a,!1);else jA(o,r,t,a,!1);ZA!==void 0&&ZA(o,i,e,t,r)}function uf(n,e){if(e!==null){let t=e.type;if(t&3)return jr(e,n);if(t&4)return iC(-1,n[e.index]);if(t&8){let i=e.child;if(i!==null)return uf(n,i);{let r=n[e.index];return qi(r)?iC(-1,r):mr(r)}}else{if(t&128)return uf(n,e.next);if(t&32)return YC(e,n)()||mr(n[e.index]);{let i=jP(n,e);if(i!==null){if(Array.isArray(i))return i[0];let r=Da(n[ii]);return uf(r,i)}else return uf(n,e.next)}}}return null}function jP(n,e){if(e!==null){let i=n[ii][Ri],r=e.projection;return i.projection[r]}return null}function iC(n,e){let t=Cn+n+1;if(t<e.length){let i=e[t],r=i[He].firstChild;if(r!==null)return uf(i,r)}return e[ts]}function JC(n,e,t,i,r,o,s){for(;t!=null;){let a=i[hr];if(t.type===128){t=t.next;continue}let l=i[t.index],c=t.type;if(s&&e===0&&(l&&Yu(mr(l),i),t.flags|=2),!Ef(t))if(c&8)JC(n,e,t.child,i,r,o,!1),Gu(e,n,a,r,l,t,o,i);else if(c&32){let u=YC(t,i),d;for(;d=u();)Gu(e,n,a,r,d,t,o,i);Gu(e,n,a,r,l,t,o,i)}else c&16?WP(n,e,i,t,r,o):Gu(e,n,a,r,l,t,o,i);t=s?t.projectionNext:t.next}}function cv(n,e,t,i,r,o){JC(t,i,n.firstChild,e,r,o,!1)}function P4(n,e,t){let i=e[Gt],r=HP(n,t,e),o=t.parent||e[Ri],s=GP(o,t,e);WP(i,0,e,t,r,s)}function WP(n,e,t,i,r,o){let s=t[ii],l=s[Ri].projection[i.projection];if(Array.isArray(l))for(let c=0;c<l.length;c++){let u=l[c];Gu(e,n,t[hr],r,u,i,o,t)}else{let c=l,u=s[Nn];Hg(i)&&(c.flags|=128),JC(n,e,c,u,r,o,!0)}}function O4(n,e,t,i,r,o,s){let a=i[ts],l=mr(i);a!==l&&Gu(e,n,t,o,a,r,s);for(let c=Cn;c<i.length;c++){let u=i[c];cv(u[He],u,n,e,o,a)}}function R4(n,e,t,i,r){if(e)r?n.addClass(t,i):n.removeClass(t,i);else{let o=i.indexOf("-")===-1?void 0:os.DashCase;r==null?n.removeStyle(t,i,o):(typeof r=="string"&&r.endsWith("!important")&&(r=r.slice(0,-10),o|=os.Important),n.setStyle(t,i,r,o))}}function $P(n,e,t,i,r){let o=zs(),s=i&2;try{Oa(-1),s&&e.length>zt&&kP(n,e,zt,!1);let a=s?Ut.TemplateUpdateStart:Ut.TemplateCreateStart;Kt(a,r,t),t(i,r)}finally{Oa(o);let a=s?Ut.TemplateUpdateEnd:Ut.TemplateCreateEnd;Kt(a,r,t)}}function uv(n,e,t){B4(n,e,t),(t.flags&64)===64&&V4(n,e,t)}function Df(n,e,t=jr){let i=e.localNames;if(i!==null){let r=e.index+1;for(let o=0;o<i.length;o+=2){let s=i[o+1],a=s===-1?t(e,n):n[s];n[r++]=a}}}function F4(n,e,t,i){let o=i.get(AC,JI)||t===mo.ShadowDom||t===mo.ExperimentalIsolatedShadowDom,s=n.selectRootElement(e,o);return N4(s),s}function N4(n){XP(n)}var XP=()=>null;function k4(n){kI(n)?AP(n):Cz(n)}function YP(){XP=k4}function L4(n){return n==="class"?"className":n==="for"?"htmlFor":n==="formaction"?"formAction":n==="innerHtml"?"innerHTML":n==="readonly"?"readOnly":n==="tabindex"?"tabIndex":n}function qP(n,e,t,i,r,o){let s=e[He];if(iw(n,s,e,t,i)){ns(n)&&U4(e,n.index);return}n.type&3&&(t=L4(t)),ZP(n,e,t,i,r,o)}function ZP(n,e,t,i,r,o){if(n.type&3){let s=jr(n,e);i=o!=null?o(i,n.value||"",t):i,r.setProperty(s,t,i)}else n.type&12}function U4(n,e){let t=gr(e,n);t[vt]&16||(t[vt]|=64)}function B4(n,e,t){let i=t.directiveStart,r=t.directiveEnd;ns(t)&&h4(e,t,n.data[i+t.componentOffset]),n.firstCreatePass||Vg(t,e);let o=t.initialInputs;for(let s=i;s<r;s++){let a=n.data[s],l=hf(e,n,s,t);if(Yu(l,e),o!==null&&j4(e,s-i,l,a,t,o),is(a)){let c=gr(t.index,e);c[An]=hf(e,n,s,t)}}}function V4(n,e,t){let i=t.directiveStart,r=t.directiveEnd,o=t.index,s=gA();try{Oa(o);for(let a=i;a<r;a++){let l=n.data[a],c=e[a];yg(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&z4(l,c)}}finally{Oa(-1),yg(s)}}function z4(n,e){n.hostBindings!==null&&n.hostBindings(1,e)}function QC(n,e){let t=n.directiveRegistry,i=null;if(t)for(let r=0;r<t.length;r++){let o=t[r];RP(e,o.selectors,!1)&&(i??=[],is(o)?i.unshift(o):i.push(o))}return i}function H4(n,e,t,i,r,o){let s=jr(n,e);G4(e[Gt],s,o,n.value,t,i,r)}function G4(n,e,t,i,r,o,s){if(o==null)n.removeAttribute(e,r,t);else{let a=s==null?Jh(o):s(o,i||"",r);n.setAttribute(e,r,a,t)}}function j4(n,e,t,i,r,o){let s=o[e];if(s!==null)for(let a=0;a<s.length;a+=2){let l=s[a],c=s[a+1];tC(i,t,l,c)}}function ew(n,e,t,i,r){let o=zt+t,s=e[He],a=r(s,e,n,i,t);e[o]=a,zu(n,!0);let l=n.type===2;return l?(IP(e[Gt],a,n),(lA()===0||Vu(n))&&Yu(a,e),cA()):Yu(a,e),Sg()&&(!l||!Ef(n))&&KC(s,e,a,n),n}function tw(n){let e=n;return fS()?pS():(e=e.parent,zu(e,!1)),e}function nw(n,e){let t=n[hr];if(!t)return;let i;try{i=t.get(Gs,null)}catch{i=null}i?.(e)}function iw(n,e,t,i,r){let o=n.inputs?.[i],s=n.hostDirectiveInputs?.[i],a=!1;if(s)for(let l=0;l<s.length;l+=2){let c=s[l],u=s[l+1],d=e.data[c];tC(d,t[c],u,r),a=!0}if(o)for(let l of o){let c=t[l],u=e.data[l];tC(u,c,i,r),a=!0}return a}function W4(n,e){let t=gr(e,n),i=t[He];$4(i,t);let r=t[Oi];r!==null&&t[Fi]===null&&(t[Fi]=fP(r,t[hr])),Kt(Ut.ComponentStart);try{rw(i,t,t[An])}finally{Kt(Ut.ComponentEnd,t[An])}}function $4(n,e){for(let t=e.length;t<n.blueprint.length;t++)e.push(n.blueprint[t])}function rw(n,e,t){xg(e);try{let i=n.viewQuery;i!==null&&$S(1,i,t);let r=n.template;r!==null&&$P(n,e,r,1,t),n.firstCreatePass&&(n.firstCreatePass=!1),e[Jo]?.finishViewCreation(n),n.staticContentQueries&&_P(n,e),n.staticViewQueries&&$S(2,n.viewQuery,t);let o=n.components;o!==null&&X4(e,o)}catch(i){throw n.firstCreatePass&&(n.incompleteFirstPass=!0,n.firstCreatePass=!1),i}finally{e[vt]&=-5,bg()}}function X4(n,e){for(let t=0;t<e.length;t++)W4(n,e[t])}function td(n,e,t,i){let r=it(null);try{let o=e.tView,a=n[vt]&4096?4096:16,l=$C(n,o,t,a,null,e,null,null,i?.injector??null,i?.embeddedViewInjector??null,i?.dehydratedView??null),c=n[e.index];l[Ia]=c;let u=n[Jo];return u!==null&&(l[Jo]=u.createEmbeddedView(o)),rw(o,l,t),l}finally{it(r)}}function cc(n,e){return!e||e.firstChild===null||Hg(n)}function pf(n,e,t,i,r=!1){for(;t!==null;){if(t.type===128){t=r?t.projectionNext:t.next;continue}let o=e[t.index];o!==null&&i.push(mr(o)),qi(o)&&KP(o,i);let s=t.type;if(s&8)pf(n,e,t.child,i);else if(s&32){let a=YC(t,e),l;for(;l=a();)i.push(l)}else if(s&16){let a=jP(e,t);if(Array.isArray(a))i.push(...a);else{let l=Da(e[ii]);pf(l[He],l,a,i,!0)}}t=r?t.projectionNext:t.next}return i}function KP(n,e){for(let t=Cn;t<n.length;t++){let i=n[t],r=i[He].firstChild;r!==null&&pf(i[He],i,r,e)}n[ts]!==n[Oi]&&e.push(n[ts])}function JP(n){if(n[tc]!==null){for(let e of n[tc])e.impl.addSequence(e);n[tc].length=0}}var QP=[];function Y4(n){return n[fr]??q4(n)}function q4(n){let e=QP.pop()??Object.create(K4);return e.lView=n,e}function Z4(n){n.lView[fr]!==n&&(n.lView=null,QP.push(n))}var K4=ue(R({},Bl),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:n=>{oc(n.lView)},consumerOnSignalRead(){this.lView[fr]=this}});function J4(n){let e=n[fr]??Object.create(Q4);return e.lView=n,e}var Q4=ue(R({},Bl),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:n=>{let e=Da(n.lView);for(;e&&!eO(e[He]);)e=Da(e);e&&oS(e)},consumerOnSignalRead(){this.lView[fr]=this}});function eO(n){return n.type!==2}function tO(n){if(n[Ta]===null)return;let e=!0;for(;e;){let t=!1;for(let i of n[Ta])i.dirty&&(t=!0,i.zone===null||Zone.current===i.zone?i.run():i.zone.run(()=>i.run()));e=t&&!!(n[vt]&8192)}}var eH=100;function nO(n,e=0){let i=n[Ko].rendererFactory,r=!1;r||i.begin?.();try{tH(n,e)}finally{r||i.end?.()}}function tH(n,e){let t=mS();try{qh(!0),rC(n,e);let i=0;for(;rf(n);){if(i===eH)throw new ze(103,!1);i++,rC(n,1)}}finally{qh(t)}}function nH(n,e,t,i){if(Pa(e))return;let r=e[vt],o=!1,s=!1;xg(e);let a=!0,l=null,c=null;o||(eO(n)?(c=Y4(e),l=zl(c)):wm()===null?(a=!1,c=J4(e),l=zl(c)):e[fr]&&(Hl(e[fr]),e[fr]=null));try{rS(e),fA(n.bindingStartIndex),t!==null&&$P(n,e,t,2,i);let u=(r&3)===3;if(!o)if(u){let f=n.preOrderCheckHooks;f!==null&&Ag(e,f,null)}else{let f=n.preOrderHooks;f!==null&&Ig(e,f,0,null),ES(e,0)}if(s||iH(e),tO(e),iO(e,0),n.contentQueries!==null&&_P(n,e),!o)if(u){let f=n.contentCheckHooks;f!==null&&Ag(e,f)}else{let f=n.contentHooks;f!==null&&Ig(e,f,1),ES(e,1)}oH(n,e);let d=n.components;d!==null&&oO(e,d,0);let h=n.viewQuery;if(h!==null&&$S(2,h,i),!o)if(u){let f=n.viewCheckHooks;f!==null&&Ag(e,f)}else{let f=n.viewHooks;f!==null&&Ig(e,f,2),ES(e,2)}if(n.firstUpdatePass===!0&&(n.firstUpdatePass=!1),e[hg]){for(let f of e[hg])f();e[hg]=null}o||(JP(e),e[vt]&=-73)}catch(u){throw o||oc(e),u}finally{c!==null&&(Mu(c,l),a&&Z4(c)),bg()}}function iO(n,e){for(let t=BI(n);t!==null;t=VI(t))for(let i=Cn;i<t.length;i++){let r=t[i];rO(r,e)}}function iH(n){for(let e=BI(n);e!==null;e=VI(e)){if(!(e[vt]&2))continue;let t=e[nc];for(let i=0;i<t.length;i++){let r=t[i];oS(r)}}}function rH(n,e,t){Kt(Ut.ComponentStart);let i=gr(e,n);try{rO(i,t)}finally{Kt(Ut.ComponentEnd,i[An])}}function rO(n,e){pg(n)&&rC(n,e)}function rC(n,e){let i=n[He],r=n[vt],o=n[fr],s=!!(e===0&&r&16);if(s||=!!(r&64&&e===0),s||=!!(r&1024),s||=!!(o?.dirty&&Vh(o)),s||=!1,o&&(o.dirty=!1),n[vt]&=-9217,s)nH(i,n,i.template,n[An]);else if(r&8192){let a=it(null);try{tO(n),iO(n,1);let l=i.components;l!==null&&oO(n,l,1),JP(n)}finally{it(a)}}}function oO(n,e,t){for(let i=0;i<e.length;i++)rH(n,e[i],t)}function oH(n,e){let t=n.hostBindingOpCodes;if(t!==null)try{for(let i=0;i<t.length;i++){let r=t[i];if(r<0)Oa(~r);else{let o=r,s=t[++i],a=t[++i];mA(s,o);let l=e[o];Kt(Ut.HostBindingsUpdateStart,l);try{a(2,l)}finally{Kt(Ut.HostBindingsUpdateEnd,l)}}}}finally{Oa(-1)}}function dv(n,e){let t=mS()?64:1088;for(n[Ko].changeDetectionScheduler?.notify(e);n;){n[vt]|=t;let i=Da(n);if(ic(n)&&!i)return n;n=i}return null}function sO(n,e,t,i){return[n,!0,0,e,null,i,null,t,null,null]}function aO(n,e){let t=Cn+e;if(t<n.length)return n[t]}function nd(n,e,t,i=!0){let r=e[He];if(sH(r,e,n,t),i){let s=iC(t,n),a=e[Gt],l=a.parentNode(n[ts]);l!==null&&w4(r,n[Ri],a,e,l,s)}let o=e[Fi];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function ow(n,e){let t=mf(n,e);return t!==void 0&&lv(t[He],t),t}function mf(n,e){if(n.length<=Cn)return;let t=Cn+e,i=n[t];if(i){let r=i[Ia];r!==null&&r!==n&&ZC(r,i),e>0&&(n[t-1][Gr]=i[Gr]);let o=Qh(n,Cn+e);C4(i[He],i);let s=o[Jo];s!==null&&s.detachView(o[He]),i[Nn]=null,i[Gr]=null,i[vt]&=-129}return i}function sH(n,e,t,i){let r=Cn+i,o=t.length;i>0&&(t[r-1][Gr]=e),i<o-Cn?(e[Gr]=t[r],qb(t,Cn+i,e)):(t.push(e),e[Gr]=null),e[Nn]=t;let s=e[Ia];s!==null&&t!==s&&lO(s,e);let a=e[Jo];a!==null&&a.insertView(n),mg(e),e[vt]|=128}function lO(n,e){let t=n[nc],i=e[Nn];if(pr(i))n[vt]|=2;else{let r=i[Nn][ii];e[ii]!==r&&(n[vt]|=2)}t===null?n[nc]=[e]:t.push(e)}var Na=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let e=this._lView,t=e[He];return pf(t,e,t.firstChild,[])}constructor(e,t){this._lView=e,this._cdRefInjectingView=t}get context(){return this._lView[An]}set context(e){this._lView[An]=e}get destroyed(){return Pa(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Nn];if(qi(e)){let t=e[nf],i=t?t.indexOf(this):-1;i>-1&&(mf(e,i),Qh(t,i))}this._attachedToViewContainer=!1}lv(this._lView[He],this._lView)}onDestroy(e){sS(this._lView,e)}markForCheck(){dv(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[vt]&=-129}reattach(){mg(this._lView),this._lView[vt]|=128}detectChanges(){this._lView[vt]|=1024,nO(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new ze(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=ic(this._lView),t=this._lView[Ia];t!==null&&!e&&ZC(t,this._lView),zP(this._lView[He],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new ze(902,!1);this._appRef=e;let t=ic(this._lView),i=this._lView[Ia];i!==null&&!t&&lO(i,this._lView),mg(this._lView)}};var qu=(()=>{class n{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=aH;constructor(t,i,r){this._declarationLView=t,this._declarationTContainer=i,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,i){return this.createEmbeddedViewImpl(t,i)}createEmbeddedViewImpl(t,i,r){let o=td(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:i,dehydratedView:r});return new Na(o)}}return n})();function aH(){return hv(hi(),ct())}function hv(n,e){return n.type&4?new qu(e,n,Qu(n,e)):null}function id(n,e,t,i,r){let o=n.data[e];if(o===null)o=lH(n,e,t,i,r),pA()&&(o.flags|=32);else if(o.type&64){o.type=t,o.value=i,o.attrs=r;let s=dA();o.injectorIndex=s===null?-1:s.injectorIndex}return zu(o,!0),o}function lH(n,e,t,i,r){let o=hS(),s=fS(),a=s?o:o&&o.parent,l=n.data[e]=uH(n,a,t,e,i,r);return cH(n,l,o,s),l}function cH(n,e,t,i){n.firstChild===null&&(n.firstChild=e),t!==null&&(i?t.child==null&&e.parent!==null&&(t.child=e):t.next===null&&(t.next=e,e.prev=t))}function uH(n,e,t,i,r,o){let s=e?e.injectorIndex:-1,a=0;return vg()&&(a|=128),{type:t,index:i,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,controlDirectiveIndex:-1,customControlIndex:-1,propertyBindings:null,flags:a,providerIndexes:0,value:r,attrs:o,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var dH=new RegExp(`^(\\d+)*(${jI}|${GI})*(.*)`);function hH(n){let e=n.match(dH),[t,i,r,o]=e,s=i?parseInt(i,10):r,a=[];for(let[l,c,u]of o.matchAll(/(f|n)(\d*)/g)){let d=parseInt(u,10)||1;a.push(c,d)}return[s,...a]}function fH(n){return!n.prev&&n.parent?.type===8}function AS(n){return n.index-zt}function pH(n,e){let t=n.i18nNodes;if(t)return t.get(e)}function fv(n,e,t,i){let r=AS(i),o=pH(n,r);if(o===void 0){let s=n.data[YI];if(s?.[r])o=gH(s[r],t);else if(e.firstChild===i)o=n.firstChild;else{let a=i.prev===null,l=i.prev??i.parent;if(fH(i)){let c=AS(i.parent);o=WS(n,c)}else{let c=jr(l,t);if(a)o=c.firstChild;else{let u=AS(l),d=WS(n,u);if(l.type===2&&d){let f=FC(n,u)+1;o=pv(f,d)}else o=c.nextSibling}}}}return o}function pv(n,e){let t=e;for(let i=0;i<n;i++)t=t.nextSibling;return t}function mH(n,e){let t=n;for(let i=0;i<e.length;i+=2){let r=e[i],o=e[i+1];for(let s=0;s<o;s++)switch(r){case gz:t=t.firstChild;break;case vz:t=t.nextSibling;break}}return t}function gH(n,e){let[t,...i]=hH(n),r;if(t===GI)r=e[ii][Oi];else if(t===jI)r=PP(e[ii][Oi]);else{let o=Number(t);r=mr(e[o+zt])}return mH(r,i)}var vH=!1;function cO(n){vH=n}function yH(n){let e=n[Fi];if(e){let{i18nNodes:t,dehydratedIcuData:i}=e;if(t&&i){let r=n[Gt];for(let o of i.values())_H(r,t,o)}e.i18nNodes=void 0,e.dehydratedIcuData=void 0}}function _H(n,e,t){for(let i of t.node.cases[t.case]){let r=e.get(i.index-zt);r&&GC(n,r,!1)}}function mv(n){let e=n[ho]??[],i=n[Nn][Gt],r=[];for(let o of e)o.data[qI]!==void 0?r.push(o):uO(o,i);n[ho]=r}function xH(n){let{lContainer:e}=n,t=e[ho];if(t===null)return;let r=e[Nn][Gt];for(let o of t)uO(o,r)}function uO(n,e){let t=0,i=n.firstChild;if(i){let r=n.data[ff];for(;t<r;){let o=i.nextSibling;GC(e,i,!1),i=o,t++}}}function gv(n){mv(n);let e=n[Oi];pr(e)&&Wg(e);for(let t=Cn;t<n.length;t++)Wg(n[t])}function Wg(n){yH(n);let e=n[He];for(let t=zt;t<e.bindingStartIndex;t++)if(qi(n[t])){let i=n[t];gv(i)}else pr(n[t])&&Wg(n[t])}function sw(n){let e=n._views;for(let t of e){let i=pP(t);i!==null&&i[Oi]!==null&&(pr(i)?Wg(i):gv(i))}}function bH(n,e,t,i){n!==null&&(t.cleanup(e),gv(n.lContainer),sw(i))}function SH(n,e){let t=[];for(let i of e)for(let r=0;r<(i[TC]??1);r++){let o={data:i,firstChild:null};i[ff]>0&&(o.firstChild=n,n=pv(i[ff],n)),t.push(o)}return[n,t]}var dO=()=>null,hO=()=>null;function fO(){dO=CH,hO=wH}function CH(n,e){return mO(n,e)?n[ho].shift():(mv(n),null)}function gf(n,e){return dO(n,e)}function wH(n,e,t){if(e.tView.ssrId===null)return null;let i=gf(n,e.tView.ssrId);return t[He].firstUpdatePass&&i===null&&EH(t,e),i}function pO(n,e,t){return hO(n,e,t)}function EH(n,e){let t=e;for(;t;){if(KA(n,t))return;if((t.flags&256)===256)break;t=t.prev}for(t=e.next;t&&(t.flags&512)===512;){if(KA(n,t))return;t=t.next}}function mO(n,e){let t=n[ho];return!e||t===null||t.length===0?!1:t[0].data[XI]===e}function KA(n,e){let t=e.tView?.ssrId;if(t==null)return!1;let i=n[e.index];return qi(i)&&mO(i,t)?(mv(i),!0):!1}var gO=class{},vv=class{},oC=class{resolveComponentFactory(e){throw new ze(917,!1)}},yv=class{static NULL=new oC},uc=class{},La=(()=>{class n{destroyNode=null;static __NG_ELEMENT_ID__=()=>MH()}return n})();function MH(){let n=ct(),e=hi(),t=gr(e.index,n);return(pr(t)?t:n)[Gt]}var vO=(()=>{class n{static \u0275prov=ge({token:n,providedIn:"root",factory:()=>null})}return n})();var Rg={},Wu=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,i){let r=this.injector.get(e,Rg,i);return r!==Rg||t===Rg?r:this.parentInjector.get(e,t,i)}};function $g(n,e,t){let i=t?n.styles:null,r=t?n.classes:null,o=0;if(e!==null)for(let s=0;s<e.length;s++){let a=e[s];if(typeof a=="number")o=a;else if(o==1)r=ig(r,a);else if(o==2){let l=a,c=e[++s];i=ig(i,l+": "+c+";")}}t?n.styles=i:n.stylesWithoutHost=i,t?n.classes=r:n.classesWithoutHost=r}function Bt(n,e=0){let t=ct();if(t===null)return We(n,e);let i=hi();return PI(i,t,di(n),e)}function yO(n,e,t,i,r){let o=i===null?null:{"":-1},s=r(n,t);if(s!==null){let a=s,l=null,c=null;for(let u of s)if(u.resolveHostDirectives!==null){[a,l,c]=u.resolveHostDirectives(s);break}AH(n,e,t,a,o,l,c)}o!==null&&i!==null&&TH(t,i,o)}function TH(n,e,t){let i=n.localNames=[];for(let r=0;r<e.length;r+=2){let o=t[e[r+1]];if(o==null)throw new ze(-301,!1);i.push(e[r],o)}}function DH(n,e,t){e.componentOffset=t,(n.components??=[]).push(e.index)}function AH(n,e,t,i,r,o,s){let a=i.length,l=null;for(let h=0;h<a;h++){let f=i[h];l===null&&is(f)&&(l=f,DH(n,t,h)),VS(Vg(t,e),n,f.type)}NH(t,n.data.length,a),l?.viewProvidersResolver&&l.viewProvidersResolver(l);for(let h=0;h<a;h++){let f=i[h];f.providersResolver&&f.providersResolver(f)}let c=!1,u=!1,d=NP(n,e,a,null);a>0&&(t.directiveToIndex=new Map);for(let h=0;h<a;h++){let f=i[h];if(t.mergedAttrs=Xu(t.mergedAttrs,f.hostAttrs),PH(n,t,e,d,f),FH(d,f,r),s!==null&&s.has(f)){let[v,g]=s.get(f);t.directiveToIndex.set(f.type,[d,v+t.directiveStart,g+t.directiveStart])}else(o===null||!o.has(f))&&t.directiveToIndex.set(f.type,d);f.contentQueries!==null&&(t.flags|=4),(f.hostBindings!==null||f.hostAttrs!==null||f.hostVars!==0)&&(t.flags|=64);let p=f.type.prototype;!c&&(p.ngOnChanges||p.ngOnInit||p.ngDoCheck)&&((n.preOrderHooks??=[]).push(t.index),c=!0),!u&&(p.ngOnChanges||p.ngDoCheck)&&((n.preOrderCheckHooks??=[]).push(t.index),u=!0),d++}IH(n,t,o)}function IH(n,e,t){for(let i=e.directiveStart;i<e.directiveEnd;i++){let r=n.data[i];if(t===null||!t.has(r))JA(0,e,r,i),JA(1,e,r,i),eI(e,i,!1);else{let o=t.get(r);QA(0,e,o,i),QA(1,e,o,i),eI(e,i,!0)}}}function JA(n,e,t,i){let r=n===0?t.inputs:t.outputs;for(let o in r)if(r.hasOwnProperty(o)){let s;n===0?s=e.inputs??={}:s=e.outputs??={},s[o]??=[],s[o].push(i),_O(e,o)}}function QA(n,e,t,i){let r=n===0?t.inputs:t.outputs;for(let o in r)if(r.hasOwnProperty(o)){let s=r[o],a;n===0?a=e.hostDirectiveInputs??={}:a=e.hostDirectiveOutputs??={},a[s]??=[],a[s].push(i,o),_O(e,s)}}function _O(n,e){e==="class"?n.flags|=8:e==="style"&&(n.flags|=16)}function eI(n,e,t){let{attrs:i,inputs:r,hostDirectiveInputs:o}=n;if(i===null||!t&&r===null||t&&o===null||jC(n)){n.initialInputs??=[],n.initialInputs.push(null);return}let s=null,a=0;for(;a<i.length;){let l=i[a];if(l===0){a+=4;continue}else if(l===5){a+=2;continue}else if(typeof l=="number")break;if(!t&&r.hasOwnProperty(l)){let c=r[l];for(let u of c)if(u===e){s??=[],s.push(l,i[a+1]);break}}else if(t&&o.hasOwnProperty(l)){let c=o[l];for(let u=0;u<c.length;u+=2)if(c[u]===e){s??=[],s.push(c[u+1],i[a+1]);break}}a+=2}n.initialInputs??=[],n.initialInputs.push(s)}function PH(n,e,t,i,r){n.data[i]=r;let o=r.factory||(r.factory=Ma(r.type,!0)),s=new lc(o,is(r),Bt,null);n.blueprint[i]=s,t[i]=s,OH(n,e,i,NP(n,t,r.hostVars,Qi),r)}function OH(n,e,t,i,r){let o=r.hostBindings;if(o){let s=n.hostBindingOpCodes;s===null&&(s=n.hostBindingOpCodes=[]);let a=~e.index;RH(s)!=a&&s.push(a),s.push(t,i,o)}}function RH(n){let e=n.length;for(;e>0;){let t=n[--e];if(typeof t=="number"&&t<0)return t}return 0}function FH(n,e,t){if(t){if(e.exportAs)for(let i=0;i<e.exportAs.length;i++)t[e.exportAs[i]]=n;is(e)&&(t[""]=n)}}function NH(n,e,t){n.flags|=1,n.directiveStart=e,n.directiveEnd=e+t,n.providerIndexes=e}function aw(n,e,t,i,r,o,s,a){let l=e[He],c=l.consts,u=Wr(c,s),d=id(l,n,t,i,u);return o&&yO(l,e,d,Wr(c,a),r),d.mergedAttrs=Xu(d.mergedAttrs,d.attrs),d.attrs!==null&&$g(d,d.attrs,!1),d.mergedAttrs!==null&&$g(d,d.mergedAttrs,!0),l.queries!==null&&l.queries.elementStart(l,d),d}function lw(n,e){CI(n,e),tS(e)&&n.queries.elementEnd(e)}function kH(n,e,t,i,r,o){let s=e.consts,a=Wr(s,r),l=id(e,n,t,i,a);if(l.mergedAttrs=Xu(l.mergedAttrs,l.attrs),o!=null){let c=Wr(s,o);l.localNames=[];for(let u=0;u<c.length;u+=2)l.localNames.push(c[u],-1)}return l.attrs!==null&&$g(l,l.attrs,!1),l.mergedAttrs!==null&&$g(l,l.mergedAttrs,!0),e.queries!==null&&e.queries.elementStart(e,l),l}function _v(n,e,t){return n[e]=t}function LH(n,e){return n[e]}function Ki(n,e,t){if(t===Qi)return!1;let i=n[e];return Object.is(i,t)?!1:(n[e]=t,!0)}function xO(n,e,t,i){let r=Ki(n,e,t);return Ki(n,e+1,i)||r}function UH(n,e,t,i,r){let o=xO(n,e,t,i);return Ki(n,e+2,r)||o}function Fg(n,e,t){return function i(r){let o=ns(n)?gr(n.index,e):e;dv(o,5);let s=e[An],a=tI(e,s,t,r),l=i.__ngNextListenerFn__;for(;l;)a=tI(e,s,l,r)&&a,l=l.__ngNextListenerFn__;return a}}function tI(n,e,t,i){let r=it(null);try{return Kt(Ut.OutputStart,e,t),t(i)!==!1}catch(o){return nw(n,o),!1}finally{Kt(Ut.OutputEnd,e,t),it(r)}}function bO(n,e,t,i,r,o,s,a){let l=Vu(n),c=!1,u=null;if(!i&&l&&(u=VH(e,t,o,n.index)),u!==null){let d=u.__ngLastListenerFn__||u;d.__ngNextListenerFn__=s,u.__ngLastListenerFn__=s,c=!0}else{let d=jr(n,t),h=i?i(d):d;yz(t,h,o,a);let f=r.listen(h,o,a);if(!BH(o)){let p=i?v=>i(mr(v[n.index])):n.index;SO(p,e,t,o,a,f,!1)}}return c}function BH(n){return n.startsWith("animation")||n.startsWith("transition")}function VH(n,e,t,i){let r=n.cleanup;if(r!=null)for(let o=0;o<r.length-1;o+=2){let s=r[o];if(s===t&&r[o+1]===i){let a=e[Uu],l=r[o+2];return a&&a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function SO(n,e,t,i,r,o,s){let a=e.firstCreatePass?lS(e):null,l=aS(t),c=l.length;l.push(r,o),a&&a.push(i,n,c,(c+1)*(s?-1:1))}function nI(n,e,t,i,r,o){let s=e[t],a=e[He],c=a.data[t].outputs[i],d=s[c].subscribe(o);SO(n.index,a,e,r,o,d,!0)}var sC=Symbol("BINDING");var aC=class extends yv{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=Ls(e);return new Zu(t,this.ngModule)}};function zH(n){return Object.keys(n).map(e=>{let[t,i,r]=n[e],o={propName:t,templateName:e,isSignal:(i&rv.SignalBased)!==0};return r&&(o.transform=r),o})}function HH(n){return Object.keys(n).map(e=>({propName:n[e],templateName:e}))}function GH(n,e,t){let i=e instanceof xi?e:e?.injector;return i&&n.getStandaloneInjector!==null&&(i=n.getStandaloneInjector(i)||i),i?new Wu(t,i):t}function jH(n){let e=n.get(uc,null);if(e===null)throw new ze(407,!1);let t=n.get(vO,null),i=n.get(Yo,null);return{rendererFactory:e,sanitizer:t,changeDetectionScheduler:i,ngReflect:!1}}function WH(n,e){let t=CO(n);return HC(e,t,t==="svg"?nA:t==="math"?iA:null)}function CO(n){return(n.selectors[0][0]||"div").toLowerCase()}var Zu=class extends vv{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=zH(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=HH(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=l4(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,i,r,o,s){Kt(Ut.DynamicComponentStart);let a=it(null);try{let l=this.componentDef,c=$H(i,l,s,o),u=GH(l,r||this.ngModule,e),d=jH(u),h=d.rendererFactory.createRenderer(null,l),f=i?F4(h,i,l.encapsulation,u):WH(l,h),p=s?.some(iI)||o?.some(m=>typeof m!="function"&&m.bindings.some(iI)),v=$C(null,c,null,512|FP(l),null,null,d,h,u,null,fP(f,u,!0));v[zt]=f,xg(v);let g=null;try{let m=aw(zt,v,2,"#host",()=>c.directiveRegistry,!0,0);IP(h,f,m),Yu(f,v),uv(c,v,m),NC(c,m,v),lw(c,m),t!==void 0&&YH(m,this.ngContentSelectors,t),g=gr(m.index,v),v[An]=g[An],rw(c,v,null)}catch(m){throw g!==null&&HS(g),HS(v),m}finally{Kt(Ut.DynamicComponentEnd),bg()}return new Xg(this.componentType,v,!!p)}finally{it(a)}}};function $H(n,e,t,i){let r=n?["ng-version","21.2.0"]:c4(e.selectors[0]),o=null,s=null,a=0;if(t)for(let u of t)a+=u[sC].requiredVars,u.create&&(u.targetIdx=0,(o??=[]).push(u)),u.update&&(u.targetIdx=0,(s??=[]).push(u));if(i)for(let u=0;u<i.length;u++){let d=i[u];if(typeof d!="function")for(let h of d.bindings){a+=h[sC].requiredVars;let f=u+1;h.create&&(h.targetIdx=f,(o??=[]).push(h)),h.update&&(h.targetIdx=f,(s??=[]).push(h))}}let l=[e];if(i)for(let u of i){let d=typeof u=="function"?u:u.type,h=sg(d);l.push(h)}return WC(0,null,XH(o,s),1,a,l,null,null,null,[r],null)}function XH(n,e){return!n&&!e?null:t=>{if(t&1&&n)for(let i of n)i.create();if(t&2&&e)for(let i of e)i.update()}}function iI(n){let e=n[sC].kind;return e==="input"||e==="twoWay"}var Xg=class extends gO{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,i){super(),this._rootLView=t,this._hasInputBindings=i,this._tNode=rc(t[He],zt),this.location=Qu(this._tNode,t),this.instance=gr(this._tNode.index,t)[An],this.hostView=this.changeDetectorRef=new Na(t,void 0),this.componentType=e}setInput(e,t){this._hasInputBindings;let i=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView,o=iw(i,r[He],r,e,t);this.previousInputValues.set(e,t);let s=gr(i.index,r);dv(s,1)}get injector(){return new ac(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function YH(n,e,t){let i=n.projection=[];for(let r=0;r<e.length;r++){let o=t[r];i.push(o!=null&&o.length?Array.from(o):null)}}var rd=(()=>{class n{static __NG_ELEMENT_ID__=qH}return n})();function qH(){let n=hi();return EO(n,ct())}var ZH=rd,wO=class extends ZH{_lContainer;_hostTNode;_hostLView;constructor(e,t,i){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=i}get element(){return Qu(this._hostTNode,this._hostLView)}get injector(){return new ac(this._hostTNode,this._hostLView)}get parentInjector(){let e=wC(this._hostTNode,this._hostLView);if(EI(e)){let t=Ug(e,this._hostLView),i=Lg(e),r=t[He].data[i+8];return new ac(r,t)}else return new ac(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=rI(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-Cn}createEmbeddedView(e,t,i){let r,o;typeof i=="number"?r=i:i!=null&&(r=i.index,o=i.injector);let s=gf(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(t||{},o,s);return this.insertImpl(a,r,cc(this._hostTNode,s)),a}createComponent(e,t,i,r,o,s,a){let l=e&&!HV(e),c;if(l)c=t;else{let g=t||{};c=g.index,i=g.injector,r=g.projectableNodes,o=g.environmentInjector||g.ngModuleRef,s=g.directives,a=g.bindings}let u=l?e:new Zu(Ls(e)),d=i||this.parentInjector;if(!o&&u.ngModule==null){let m=(l?d:this.parentInjector).get(xi,null);m&&(o=m)}let h=Ls(u.componentType??{}),f=gf(this._lContainer,h?.id??null),p=f?.firstChild??null,v=u.create(d,r,p,o,s,a);return this.insertImpl(v.hostView,c,cc(this._hostTNode,f)),v}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,i){let r=e._lView;if(rA(r)){let a=this.indexOf(e);if(a!==-1)this.detach(a);else{let l=r[Nn],c=new wO(l,l[Ri],l[Nn]);c.detach(c.indexOf(e))}}let o=this._adjustIndex(t),s=this._lContainer;return nd(s,r,o,i),e.attachToViewContainerRef(),qb(IS(s),o,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=rI(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),i=mf(this._lContainer,t);i&&(Qh(IS(this._lContainer),t),lv(i[He],i))}detach(e){let t=this._adjustIndex(e,-1),i=mf(this._lContainer,t);return i&&Qh(IS(this._lContainer),t)!=null?new Na(i):null}_adjustIndex(e,t=0){return e??this.length+t}};function rI(n){return n[nf]}function IS(n){return n[nf]||(n[nf]=[])}function EO(n,e){let t,i=e[n.index];return qi(i)?t=i:(t=sO(i,e,null,n),e[n.index]=t,XC(e,t)),MO(t,e,n,i),new wO(t,n,e)}function KH(n,e){let t=n[Gt],i=t.createComment(""),r=jr(e,n),o=t.parentNode(r);return Gg(t,o,i,t.nextSibling(r),!1),i}var MO=TO,cw=()=>!1;function JH(n,e,t){return cw(n,e,t)}function TO(n,e,t,i){if(n[ts])return;let r;t.type&8?r=mr(i):r=KH(e,t),n[ts]=r}function QH(n,e,t){if(n[ts]&&n[ho])return!0;let i=t[Fi],r=e.index-zt;if(!i||LI(e)||vP(i,r))return!1;let s=WS(i,r),a=i.data[Qg]?.[r],[l,c]=SH(s,a);return n[ts]=l,n[ho]=c,!0}function eG(n,e,t,i){cw(n,t,e)||TO(n,e,t,i)}function DO(){MO=eG,cw=QH}var lC=class n{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new n(this.queryList)}setDirty(){this.queryList.setDirty()}},cC=class n{queries;constructor(e=[]){this.queries=e}createEmbeddedView(e){let t=e.queries;if(t!==null){let i=e.contentQueries!==null?e.contentQueries[0]:t.length,r=[];for(let o=0;o<i;o++){let s=t.getByIndex(o),a=this.queries[s.indexInDeclarationView];r.push(a.clone())}return new n(r)}return null}insertView(e){this.dirtyQueriesWithMatches(e)}detachView(e){this.dirtyQueriesWithMatches(e)}finishViewCreation(e){this.dirtyQueriesWithMatches(e)}dirtyQueriesWithMatches(e){for(let t=0;t<this.queries.length;t++)PO(e,t).matches!==null&&this.queries[t].setDirty()}},uC=class{flags;read;predicate;constructor(e,t,i=null){this.flags=t,this.read=i,typeof e=="string"?this.predicate=aG(e):this.predicate=e}},dC=class n{queries;constructor(e=[]){this.queries=e}elementStart(e,t){for(let i=0;i<this.queries.length;i++)this.queries[i].elementStart(e,t)}elementEnd(e){for(let t=0;t<this.queries.length;t++)this.queries[t].elementEnd(e)}embeddedTView(e){let t=null;for(let i=0;i<this.length;i++){let r=t!==null?t.length:0,o=this.getByIndex(i).embeddedTView(e,r);o&&(o.indexInDeclarationView=i,t!==null?t.push(o):t=[o])}return t!==null?new n(t):null}template(e,t){for(let i=0;i<this.queries.length;i++)this.queries[i].template(e,t)}getByIndex(e){return this.queries[e]}get length(){return this.queries.length}track(e){this.queries.push(e)}},hC=class n{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(e,t=-1){this.metadata=e,this._declarationNodeIndex=t}elementStart(e,t){this.isApplyingToNode(t)&&this.matchTNode(e,t)}elementEnd(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}template(e,t){this.elementStart(e,t)}embeddedTView(e,t){return this.isApplyingToNode(e)?(this.crossesNgTemplate=!0,this.addMatch(-e.index,t),new n(this.metadata)):null}isApplyingToNode(e){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let t=this._declarationNodeIndex,i=e.parent;for(;i!==null&&i.type&8&&i.index!==t;)i=i.parent;return t===(i!==null?i.index:-1)}return this._appliesToNextNode}matchTNode(e,t){let i=this.metadata.predicate;if(Array.isArray(i))for(let r=0;r<i.length;r++){let o=i[r];this.matchTNodeWithReadOption(e,t,tG(t,o)),this.matchTNodeWithReadOption(e,t,Pg(t,e,o,!1,!1))}else i===qu?t.type&4&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,Pg(t,e,i,!1,!1))}matchTNodeWithReadOption(e,t,i){if(i!==null){let r=this.metadata.read;if(r!==null)if(r===$r||r===rd||r===qu&&t.type&4)this.addMatch(t.index,-2);else{let o=Pg(t,e,r,!1,!1);o!==null&&this.addMatch(t.index,o)}else this.addMatch(t.index,i)}}addMatch(e,t){this.matches===null?this.matches=[e,t]:this.matches.push(e,t)}};function tG(n,e){let t=n.localNames;if(t!==null){for(let i=0;i<t.length;i+=2)if(t[i]===e)return t[i+1]}return null}function nG(n,e){return n.type&11?Qu(n,e):n.type&4?hv(n,e):null}function iG(n,e,t,i){return t===-1?nG(e,n):t===-2?rG(n,e,i):hf(n,n[He],t,e)}function rG(n,e,t){if(t===$r)return Qu(e,n);if(t===qu)return hv(e,n);if(t===rd)return EO(e,n)}function AO(n,e,t,i){let r=e[Jo].queries[i];if(r.matches===null){let o=n.data,s=t.matches,a=[];for(let l=0;s!==null&&l<s.length;l+=2){let c=s[l];if(c<0)a.push(null);else{let u=o[c];a.push(iG(e,u,s[l+1],t.metadata.read))}}r.matches=a}return r.matches}function fC(n,e,t,i){let r=n.queries.getByIndex(t),o=r.matches;if(o!==null){let s=AO(n,e,r,t);for(let a=0;a<o.length;a+=2){let l=o[a];if(l>0)i.push(s[a/2]);else{let c=o[a+1],u=e[-l];for(let d=Cn;d<u.length;d++){let h=u[d];h[Ia]===h[Nn]&&fC(h[He],h,c,i)}if(u[nc]!==null){let d=u[nc];for(let h=0;h<d.length;h++){let f=d[h];fC(f[He],f,c,i)}}}}}return i}function IO(n,e){return n[Jo].queries[e].queryList}function oG(n,e,t){let i=new zg((t&4)===4);return aA(n,e,i,i.destroy),(e[Jo]??=new cC).queries.push(new lC(i))-1}function sG(n,e,t){let i=En();return i.firstCreatePass&&(lG(i,new uC(n,e,t),-1),(e&2)===2&&(i.staticViewQueries=!0)),oG(i,ct(),e)}function aG(n){return n.split(",").map(e=>e.trim())}function lG(n,e,t){n.queries===null&&(n.queries=new dC),n.queries.track(new hC(e,t))}function PO(n,e){return n.queries.getByIndex(e)}function cG(n,e){let t=n[He],i=PO(t,e);return i.crossesNgTemplate?fC(t,n,e,[]):AO(t,n,i,e)}function OO(n,e,t){let i,r=zh(()=>{i._dirtyCounter();let o=dG(i,n);if(e&&o===void 0)throw new ze(-951,!1);return o});return i=r[Zn],i._dirtyCounter=k(0),i._flatValue=void 0,r}function RO(n){return OO(!0,!1,n)}function FO(n){return OO(!0,!0,n)}function uG(n,e){let t=n[Zn];t._lView=ct(),t._queryIndex=e,t._queryList=IO(t._lView,e),t._queryList.onDirty(()=>t._dirtyCounter.update(i=>i+1))}function dG(n,e){let t=n._lView,i=n._queryIndex;if(t===void 0||i===void 0||t[vt]&4)return e?void 0:_i;let r=IO(t,i),o=cG(t,i);return r.reset(o,lz),e?r.first:r._changesDetected||n._flatValue===void 0?n._flatValue=r.toArray():n._flatValue}var vf=class{};var yf=class extends vf{injector;componentFactoryResolver=new aC(this);instance=null;constructor(e){super();let t=new Kl([...e.providers,{provide:vf,useValue:this},{provide:yv,useValue:this.componentFactoryResolver}],e.parent||ku(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function uw(n,e,t=null){return new yf({providers:n,parent:e,debugName:t,runEnvironmentInitializers:!0}).injector}var hG=(()=>{class n{_injector;cachedInjectors=new Map;constructor(t){this._injector=t}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t)){let i=dg(!1,t.type),r=i.length>0?uw([i],this._injector,""):null;this.cachedInjectors.set(t,r)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(let t of this.cachedInjectors.values())t!==null&&t.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=ge({token:n,providedIn:"environment",factory:()=>new n(We(xi))})}return n})();function xt(n){return bf(()=>{let e=NO(n),t=ue(R({},e),{decls:n.decls,vars:n.vars,template:n.template,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,onPush:n.changeDetection===EC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&n.dependencies||null,getStandaloneInjector:e.standalone?r=>r.get(hG).getOrCreateStandaloneInjector(t):null,getExternalStyles:null,signals:n.signals??!1,data:n.data||{},encapsulation:n.encapsulation||mo.Emulated,styles:n.styles||_i,_:null,schemas:n.schemas||null,tView:null,id:""});e.standalone&&go("NgStandalone"),kO(t);let i=n.dependencies;return t.directiveDefs=oI(i,fG),t.pipeDefs=oI(i,Wb),t.id=gG(t),t})}function fG(n){return Ls(n)||sg(n)}function Ys(n){return bf(()=>({type:n.type,bootstrap:n.bootstrap||_i,declarations:n.declarations||_i,imports:n.imports||_i,exports:n.exports||_i,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null}))}function pG(n,e){if(n==null)return Aa;let t={};for(let i in n)if(n.hasOwnProperty(i)){let r=n[i],o,s,a,l;Array.isArray(r)?(a=r[0],o=r[1],s=r[2]??o,l=r[3]||null):(o=r,s=r,a=rv.None,l=null),t[o]=[i,a,l],e[o]=s}return t}function mG(n){if(n==null)return Aa;let e={};for(let t in n)n.hasOwnProperty(t)&&(e[n[t]]=t);return e}function kn(n){return bf(()=>{let e=NO(n);return kO(e),e})}function xv(n){return{type:n.type,name:n.name,factory:null,pure:n.pure!==!1,standalone:n.standalone??!0,onDestroy:n.type.prototype.ngOnDestroy||null}}function NO(n){let e={};return{type:n.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:e,inputConfig:n.inputs||Aa,exportAs:n.exportAs||null,standalone:n.standalone??!0,signals:n.signals===!0,selectors:n.selectors||_i,viewQuery:n.viewQuery||null,features:n.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,inputs:pG(n.inputs,e),outputs:mG(n.outputs),debugInfo:null}}function kO(n){n.features?.forEach(e=>e(n))}function oI(n,e){return n?()=>{let t=typeof n=="function"?n():n,i=[];for(let r of t){let o=e(r);o!==null&&i.push(o)}return i}:null}function gG(n){let e=0,t=typeof n.consts=="function"?"":n.consts,i=[n.selectors,n.ngContentSelectors,n.hostVars,n.hostAttrs,t,n.vars,n.decls,n.encapsulation,n.standalone,n.signals,n.exportAs,JSON.stringify(n.inputs),JSON.stringify(n.outputs),Object.getOwnPropertyNames(n.type.prototype),!!n.contentQueries,!!n.viewQuery];for(let o of i.join("|"))e=Math.imul(31,e)+o.charCodeAt(0)<<0;return e+=2147483648,"c"+e}function vG(n){return Object.getPrototypeOf(n.prototype).constructor}function yr(n){let e=vG(n.type),t=!0,i=[n];for(;e;){let r;if(is(n))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new ze(903,!1);r=e.\u0275dir}if(r){if(t){i.push(r);let s=n;s.inputs=PS(n.inputs),s.declaredInputs=PS(n.declaredInputs),s.outputs=PS(n.outputs);let a=r.hostBindings;a&&SG(n,a);let l=r.viewQuery,c=r.contentQueries;if(l&&xG(n,l),c&&bG(n,c),yG(n,r),zD(n.outputs,r.outputs),is(r)&&r.data.animation){let u=n.data;u.animation=(u.animation||[]).concat(r.data.animation)}}let o=r.features;if(o)for(let s=0;s<o.length;s++){let a=o[s];a&&a.ngInherit&&a(n),a===yr&&(t=!1)}}e=Object.getPrototypeOf(e)}_G(i)}function yG(n,e){for(let t in e.inputs){if(!e.inputs.hasOwnProperty(t)||n.inputs.hasOwnProperty(t))continue;let i=e.inputs[t];i!==void 0&&(n.inputs[t]=i,n.declaredInputs[t]=e.declaredInputs[t])}}function _G(n){let e=0,t=null;for(let i=n.length-1;i>=0;i--){let r=n[i];r.hostVars=e+=r.hostVars,r.hostAttrs=Xu(r.hostAttrs,t=Xu(t,r.hostAttrs))}}function PS(n){return n===Aa?{}:n===_i?[]:n}function xG(n,e){let t=n.viewQuery;t?n.viewQuery=(i,r)=>{e(i,r),t(i,r)}:n.viewQuery=e}function bG(n,e){let t=n.contentQueries;t?n.contentQueries=(i,r,o)=>{e(i,r,o),t(i,r,o)}:n.contentQueries=e}function SG(n,e){let t=n.hostBindings;t?n.hostBindings=(i,r)=>{e(i,r),t(i,r)}:n.hostBindings=e}function LO(n,e,t,i,r,o,s,a){if(t.firstCreatePass){n.mergedAttrs=Xu(n.mergedAttrs,n.attrs);let u=n.tView=WC(2,n,r,o,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,t.consts,null);t.queries!==null&&(t.queries.template(t,n),u.queries=t.queries.embeddedTView(n))}a&&(n.flags|=a),zu(n,!1);let l=UO(t,e,n,i);Sg()&&KC(t,e,l,n),Yu(l,e);let c=sO(l,e,l,n);e[i+zt]=c,XC(e,c),JH(c,n,e)}function CG(n,e,t,i,r,o,s,a,l,c,u){let d=t+zt,h;return e.firstCreatePass?(h=id(e,d,4,s||null,a||null),gg()&&yO(e,n,h,Wr(e.consts,c),QC),CI(e,h)):h=e.data[d],LO(h,n,e,t,i,r,o,l),Vu(h)&&uv(e,n,h),c!=null&&Df(n,h,u),h}function _f(n,e,t,i,r,o,s,a,l,c,u){let d=t+zt,h;if(e.firstCreatePass){if(h=id(e,d,4,s||null,a||null),c!=null){let f=Wr(e.consts,c);h.localNames=[];for(let p=0;p<f.length;p+=2)h.localNames.push(f[p],-1)}}else h=e.data[d];return LO(h,n,e,t,i,r,o,l),c!=null&&Df(n,h,u),h}function bv(n,e,t,i,r,o,s,a){let l=ct(),c=En(),u=Wr(c.consts,o);return CG(l,c,n,e,t,i,r,u,void 0,s,a),bv}var UO=BO;function BO(n,e,t,i){return Hs(!0),e[Gt].createComment("")}function wG(n,e,t,i){let r=!nv(e,t);Hs(r);let o=e[Fi]?.data[$I]?.[i]??null;if(o!==null&&t.tView!==null&&t.tView.ssrId===null&&(t.tView.ssrId=o),r)return BO(n,e);let s=e[Fi],a=fv(s,n,e,t);tv(s,i,a);let l=FC(s,i);return pv(l,a)}function VO(){UO=wG}var vr=(function(n){return n[n.NOT_STARTED=0]="NOT_STARTED",n[n.IN_PROGRESS=1]="IN_PROGRESS",n[n.COMPLETE=2]="COMPLETE",n[n.FAILED=3]="FAILED",n})(vr||{}),sI=0,EG=1,$n=(function(n){return n[n.Placeholder=0]="Placeholder",n[n.Loading=1]="Loading",n[n.Complete=2]="Complete",n[n.Error=3]="Error",n})($n||{});var MG=0,Af=1;var TG=4,DG=5;var AG=7,$u=8,IG=9,dw=(function(n){return n[n.Manual=0]="Manual",n[n.Playthrough=1]="Playthrough",n})(dw||{});function Ng(n,e){let t=OG(n),i=e[t];if(i!==null){for(let r of i)r();e[t]=null}}function PG(n){Ng(1,n),Ng(0,n),Ng(2,n)}function OG(n){let e=TG;return n===1?e=DG:n===2&&(e=IG),e}function zO(n){return n+1}function od(n,e){let t=n[He],i=zO(e.index);return n[i]}function If(n,e){let t=zO(e.index);return n.data[t]}function RG(n,e,t){let i=e[He],r=If(i,t);switch(n){case $n.Complete:return r.primaryTmplIndex;case $n.Loading:return r.loadingTmplIndex;case $n.Error:return r.errorTmplIndex;case $n.Placeholder:return r.placeholderTmplIndex;default:return null}}function aI(n,e){return e===$n.Placeholder?n.placeholderBlockConfig?.[sI]??null:e===$n.Loading?n.loadingBlockConfig?.[sI]??null:null}function FG(n){return n.loadingBlockConfig?.[EG]??null}function lI(n,e){if(!n||n.length===0)return e;let t=new Set(n);for(let i of e)t.add(i);return n.length===t.size?n:Array.from(t)}function NG(n,e){let t=e.primaryTmplIndex+zt;return rc(n,t)}var kG=(()=>{class n{cachedInjectors=new Map;getOrCreateInjector(t,i,r,o){if(!this.cachedInjectors.has(t)){let s=r.length>0?uw(r,i,o):null;this.cachedInjectors.set(t,s)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(let t of this.cachedInjectors.values())t!==null&&t.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=ge({token:n,providedIn:"environment",factory:()=>new n})}return n})();var HO=new Ve("");function OS(n,e,t){return n.get(kG).getOrCreateInjector(e,n,t,"")}function LG(n,e,t){if(n instanceof Wu){let r=n.injector,o=n.parentInjector,s=OS(o,e,t);return new Wu(r,s)}let i=n.get(xi);if(i!==n){let r=OS(i,e,t);return new Wu(n,r)}return OS(n,e,t)}function sc(n,e,t,i=!1){let r=t[Nn],o=r[He];if(Pa(r))return;let s=od(r,e),a=s[Af],l=s[AG];if(!(l!==null&&n<l)&&cI(a,n)&&cI(s[MG]??-1,n)){let c=If(o,e),d=!i&&!0&&(FG(c)!==null||aI(c,$n.Loading)!==null||aI(c,$n.Placeholder))?VG:BG;try{d(n,s,t,e,r)}catch(h){nw(r,h)}}}function UG(n,e){let t=n[ho]?.findIndex(r=>r.data[ZI]===e[Af])??-1;return{dehydratedView:t>-1?n[ho][t]:null,dehydratedViewIx:t}}function BG(n,e,t,i,r){Kt(Ut.DeferBlockStateStart);let o=RG(n,r,i);if(o!==null){e[Af]=n;let s=r[He],a=o+zt,l=rc(s,a),c=0;ow(t,c);let u;if(n===$n.Complete){let p=If(s,i),v=p.providers;v&&v.length>0&&(u=LG(r[hr],p,v))}let{dehydratedView:d,dehydratedViewIx:h}=UG(t,e),f=td(r,l,null,{injector:u,dehydratedView:d});if(nd(t,f,c,cc(l,d)),dv(f,2),h>-1&&t[ho]?.splice(h,1),(n===$n.Complete||n===$n.Error)&&Array.isArray(e[$u])){for(let p of e[$u])p();e[$u]=null}}Kt(Ut.DeferBlockStateEnd)}function cI(n,e){return n<e}function uI(n,e,t){n.loadingPromise.then(()=>{n.loadingState===vr.COMPLETE?sc($n.Complete,e,t):n.loadingState===vr.FAILED&&sc($n.Error,e,t)})}var VG=null;function hw(n){return typeof n=="function"&&n[Zn]!==void 0}function fw(n){return hw(n)&&typeof n.set=="function"}var pw=new Ve("");function sd(n){return!!n&&typeof n.then=="function"}function mw(n){return!!n&&typeof n.subscribe=="function"}var GO=new Ve("");var gw=(()=>{class n{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((t,i)=>{this.resolve=t,this.reject=i});appInits=Z(GO,{optional:!0})??[];injector=Z(bi);constructor(){}runInitializers(){if(this.initialized)return;let t=[];for(let r of this.appInits){let o=Lu(this.injector,r);if(sd(o))t.push(o);else if(mw(o)){let s=new Promise((a,l)=>{o.subscribe({complete:a,error:l})});t.push(s)}}let i=()=>{this.done=!0,this.resolve()};Promise.all(t).then(()=>{i()}).catch(r=>{this.reject(r)}),t.length===0&&i(),this.initialized=!0}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),ad=new Ve("");function jO(){ub(()=>{let n="";throw new ze(600,n)})}function WO(n){return n.isBoundToModule}var zG=10;var _r=(()=>{class n{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=Z(Gs);afterRenderManager=Z(qC);zonelessEnabled=Z(lf);rootEffectScheduler=Z(wg);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new uo;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=Z(Ra);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(Xi(t=>!t))}constructor(){Z(Xs,{optional:!0})}whenStable(){let t;return new Promise(i=>{t=this.isStable.subscribe({next:r=>{r&&i()}})}).finally(()=>{t.unsubscribe()})}_injector=Z(xi);_rendererFactory=null;get injector(){return this._injector}bootstrap(t,i){return this.bootstrapImpl(t,i)}bootstrapImpl(t,i,r=bi.NULL){return this._injector.get(Yi).run(()=>{Kt(Ut.BootstrapComponentStart);let s=t instanceof vv;if(!this._injector.get(gw).done){let p="";throw new ze(405,p)}let l;s?l=t:l=this._injector.get(yv).resolveComponentFactory(t),this.componentTypes.push(l.componentType);let c=WO(l)?void 0:this._injector.get(vf),u=i||l.selector,d=l.create(r,[],u,c),h=d.location.nativeElement,f=d.injector.get(pw,null);return f?.registerApplication(h),d.onDestroy(()=>{this.detachView(d.hostView),df(this.components,d),f?.unregisterApplication(h)}),this._loadComponent(d),Kt(Ut.BootstrapComponentEnd,d),d})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Kt(Ut.ChangeDetectionStart),this.tracingSnapshot!==null?this.tracingSnapshot.run(ov.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw Kt(Ut.ChangeDetectionEnd),new ze(101,!1);let t=it(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,it(t),this.afterTick.next(),Kt(Ut.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(uc,null,{optional:!0}));let t=0;for(;this.dirtyFlags!==0&&t++<zG;){Kt(Ut.ChangeDetectionSyncStart);try{this.synchronizeOnce()}finally{Kt(Ut.ChangeDetectionSyncEnd)}}}synchronizeOnce(){this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush());let t=!1;if(this.dirtyFlags&7){let i=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:r}of this.allViews){if(!i&&!rf(r))continue;let o=i&&!this.zonelessEnabled?0:1;nO(r,o),t=!0}if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}t||(this._rendererFactory?.begin?.(),this._rendererFactory?.end?.()),this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:t})=>rf(t))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(t){let i=t;this._views.push(i),i.attachToAppRef(this)}detachView(t){let i=t;df(this._views,i),i.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView);try{this.tick()}catch(r){this.internalErrorHandler(r)}this.components.push(t),this._injector.get(ad,[]).forEach(r=>r(t))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(t=>t()),this._views.slice().forEach(t=>t.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>df(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new ze(406,!1);let t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function df(n,e){let t=n.indexOf(e);t>-1&&n.splice(t,1)}function $O(){let n,e;return{promise:new Promise((i,r)=>{n=i,e=r}),resolve:n,reject:e}}function XO(n,e,t){let i=e[hr],r=e[He];if(n.loadingState!==vr.NOT_STARTED)return n.loadingPromise??Promise.resolve();let o=od(e,t),s=NG(r,n);n.loadingState=vr.IN_PROGRESS,Ng(1,o);let a=n.dependencyResolverFn,l=i.get(Hu).add();return a?(n.loadingPromise=Promise.allSettled(a()).then(c=>{let u=!1,d=[],h=[];for(let f of c)if(f.status==="fulfilled"){let p=f.value,v=Ls(p)||sg(p);if(v)d.push(v);else{let g=Wb(p);g&&h.push(g)}}else{u=!0;break}if(u){if(n.loadingState=vr.FAILED,n.errorTmplIndex===null){let p=new ze(-750,!1);nw(e,p)}}else{n.loadingState=vr.COMPLETE;let f=s.tView;if(d.length>0){f.directiveRegistry=lI(f.directiveRegistry,d);let p=d.map(g=>g.type),v=dg(!1,...p);n.providers=v}h.length>0&&(f.pipeRegistry=lI(f.pipeRegistry,h))}}),n.loadingPromise.finally(()=>{n.loadingPromise=null,l()})):(n.loadingPromise=Promise.resolve().then(()=>{n.loadingPromise=null,n.loadingState=vr.COMPLETE,l()}),n.loadingPromise)}function HG(n,e){return e[hr].get(HO,null,{optional:!0})?.behavior!==dw.Manual}function GG(n,e,t){let i=e[He],r=e[t.index];if(!HG(n,e))return;let o=od(e,t),s=If(i,t);switch(PG(o),s.loadingState){case vr.NOT_STARTED:sc($n.Loading,t,r),XO(s,e,t),s.loadingState===vr.IN_PROGRESS&&uI(s,t,r);break;case vr.IN_PROGRESS:sc($n.Loading,t,r),uI(s,t,r);break;case vr.COMPLETE:sc($n.Complete,t,r);break;case vr.FAILED:sc($n.Error,t,r);break;default:}}async function YO(n,e,t){let i=n.get(ev);if(i.hydrating.has(e))return;let{parentBlockPromise:o,hydrationQueue:s}=Mz(e,n);if(s.length===0)return;o!==null&&s.shift(),$G(i,s),o!==null&&await o;let a=s[0];i.has(a)?await dI(n,s,t):i.awaitParentBlock(a,async()=>await dI(n,s,t))}async function dI(n,e,t){let i=n.get(ev),r=i.hydrating,o=n.get(Ra),s=o.add();for(let l=0;l<e.length;l++){let c=e[l],u=i.get(c);if(u!=null){if(await YG(u),await XG(n),jG(u)){xH(u),hI(e.slice(l),i);break}r.get(c).resolve()}else{WG(l,e,i),hI(e.slice(l),i);break}}let a=e[e.length-1];await r.get(a)?.promise,o.remove(s),t&&t(e),bH(i.get(a),e,i,n.get(_r))}function jG(n){return od(n.lView,n.tNode)[Af]===$n.Error}function WG(n,e,t){let i=n-1,r=i>-1?t.get(e[i]):null;r&&gv(r.lContainer)}function hI(n,e){let t=e.hydrating;for(let i in n)t.get(i)?.reject();e.cleanup(n)}function $G(n,e){for(let t of e)n.hydrating.set(t,$O())}function XG(n){return new Promise(e=>sv(e,{injector:n}))}async function YG(n){let{tNode:e,lView:t}=n,i=od(t,e);return new Promise(r=>{qG(i,r),GG(2,t,e)})}function qG(n,e){Array.isArray(n[$u])||(n[$u]=[]),n[$u].push(e)}function Xn(n,e,t,i){let r=ct(),o=Vs();if(Ki(r,o,e)){let s=En(),a=sf();H4(a,r,n,e,t,i)}return Xn}function qs(){return ct()[ii][An]}var pC=class{destroy(e){}updateValue(e,t){}swap(e,t){let i=Math.min(e,t),r=Math.max(e,t),o=this.detach(r);if(r-i>1){let s=this.detach(i);this.attach(i,o),this.attach(r,s)}else this.attach(i,o)}move(e,t){this.attach(t,this.detach(e))}};function RS(n,e,t,i,r){return n===t&&Object.is(e,i)?1:Object.is(r(n,e),r(t,i))?-1:0}function ZG(n,e,t,i){let r,o,s=0,a=n.length-1,l=void 0;if(Array.isArray(e)){it(i);let c=e.length-1;for(it(null);s<=a&&s<=c;){let u=n.at(s),d=e[s],h=RS(s,u,s,d,t);if(h!==0){h<0&&n.updateValue(s,d),s++;continue}let f=n.at(a),p=e[c],v=RS(a,f,c,p,t);if(v!==0){v<0&&n.updateValue(a,p),a--,c--;continue}let g=t(s,u),m=t(a,f),y=t(s,d);if(Object.is(y,m)){let _=t(c,p);Object.is(_,g)?(n.swap(s,a),n.updateValue(a,p),c--,a--):n.move(a,s),n.updateValue(s,d),s++;continue}if(r??=new Yg,o??=pI(n,s,a,t),mC(n,r,s,y))n.updateValue(s,d),s++,a++;else if(o.has(y))r.set(g,n.detach(s)),a--;else{let _=n.create(s,e[s]);n.attach(s,_),s++,a++}}for(;s<=c;)fI(n,r,t,s,e[s]),s++}else if(e!=null){it(i);let c=e[Symbol.iterator]();it(null);let u=c.next();for(;!u.done&&s<=a;){let d=n.at(s),h=u.value,f=RS(s,d,s,h,t);if(f!==0)f<0&&n.updateValue(s,h),s++,u=c.next();else{r??=new Yg,o??=pI(n,s,a,t);let p=t(s,h);if(mC(n,r,s,p))n.updateValue(s,h),s++,a++,u=c.next();else if(!o.has(p))n.attach(s,n.create(s,h)),s++,a++,u=c.next();else{let v=t(s,d);r.set(v,n.detach(s)),a--}}}for(;!u.done;)fI(n,r,t,n.length,u.value),u=c.next()}for(;s<=a;)n.destroy(n.detach(a--));r?.forEach(c=>{n.destroy(c)})}function mC(n,e,t,i){return e!==void 0&&e.has(i)?(n.attach(t,e.get(i)),e.delete(i),!0):!1}function fI(n,e,t,i,r){if(mC(n,e,i,t(i,r)))n.updateValue(i,r);else{let o=n.create(i,r);n.attach(i,o)}}function pI(n,e,t,i){let r=new Set;for(let o=e;o<=t;o++)r.add(i(o,n.at(o)));return r}var Yg=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let i=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(i);)i=r.get(i);r.set(i,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,i]of this.kvMap)if(e(i,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(i);)i=r.get(i),e(i,t)}}};function Te(n,e,t,i,r,o,s,a){go("NgControlFlow");let l=ct(),c=En(),u=Wr(c.consts,o);return _f(l,c,n,e,t,i,r,u,256,s,a),vw}function vw(n,e,t,i,r,o,s,a){go("NgControlFlow");let l=ct(),c=En(),u=Wr(c.consts,o);return _f(l,c,n,e,t,i,r,u,512,s,a),vw}function De(n,e){go("NgControlFlow");let t=ct(),i=Vs(),r=t[i]!==Qi?t[i]:-1,o=r!==-1?qg(t,zt+r):void 0,s=0;if(Ki(t,i,n)){let a=it(null);try{if(o!==void 0&&ow(o,s),n!==-1){let l=zt+n,c=qg(t,l),u=_C(t[He],l),d=pO(c,u,t),h=td(t,u,e,{dehydratedView:d});nd(c,h,s,cc(u,d))}}finally{it(a)}}else if(o!==void 0){let a=aO(o,s);a!==void 0&&(a[An]=e)}}var gC=class{lContainer;$implicit;$index;constructor(e,t,i){this.lContainer=e,this.$implicit=t,this.$index=i}get $count(){return this.lContainer.length-Cn}};function Sv(n){return n}function yw(n,e){return e}var vC=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,i){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=i}};function bt(n,e,t,i,r,o,s,a,l,c,u,d,h){go("NgControlFlow");let f=ct(),p=En(),v=l!==void 0,g=ct(),m=a?s.bind(g[ii][An]):s,y=new vC(v,m);g[zt+n]=y,_f(f,p,n+1,e,t,i,r,Wr(p.consts,o),256),v&&_f(f,p,n+2,l,c,u,d,Wr(p.consts,h),512)}var yC=class extends pC{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,i){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=i}get length(){return this.lContainer.length-Cn}at(e){return this.getLView(e)[An].$implicit}attach(e,t){let i=t[Fi];this.needsIndexUpdate||=e!==this.length,nd(this.lContainer,t,e,cc(this.templateTNode,i)),KG(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,JG(this.lContainer,e),QG(this.lContainer,e)}create(e,t){let i=gf(this.lContainer,this.templateTNode.tView.ssrId);return td(this.hostLView,this.templateTNode,new gC(this.lContainer,t,e),{dehydratedView:i})}destroy(e){lv(e[He],e)}updateValue(e,t){this.getLView(e)[An].$implicit=t}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[An].$index=e}getLView(e){return e5(this.lContainer,e)}};function St(n){let e=it(null),t=zs();try{let i=ct(),r=i[He],o=i[t],s=t+1,a=qg(i,s);if(o.liveCollection===void 0){let c=_C(r,s);o.liveCollection=new yC(a,i,c)}else o.liveCollection.reset();let l=o.liveCollection;if(ZG(l,n,o.trackByFn,e),l.updateIndexes(),o.hasEmptyBlock){let c=Vs(),u=l.length===0;if(Ki(i,c,u)){let d=t+2,h=qg(i,d);if(u){let f=_C(r,d),p=pO(h,f,i),v=td(i,f,void 0,{dehydratedView:p});nd(h,v,0,cc(f,p))}else r.firstUpdatePass&&mv(h),ow(h,0)}}}finally{it(e)}}function qg(n,e){return n[e]}function KG(n,e){if(n.length<=Cn)return;let t=Cn+e,i=n[t],r=i?i[es]:void 0;if(i&&r&&r.detachedLeaveAnimationFns&&r.detachedLeaveAnimationFns.length>0){let o=i[hr];y4(o,r),Fa.delete(i[Qo]),r.detachedLeaveAnimationFns=void 0}}function JG(n,e){if(n.length<=Cn)return;let t=Cn+e,i=n[t],r=i?i[es]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function QG(n,e){return mf(n,e)}function e5(n,e){return aO(n,e)}function _C(n,e){return rc(n,e)}function te(n,e,t){let i=ct(),r=Vs();if(Ki(i,r,e)){let o=En(),s=sf();qP(s,i,n,e,i[Gt],t)}return te}function xC(n,e,t,i,r){iw(e,n,t,r?"class":"style",i)}function P(n,e,t,i){let r=ct(),o=r[He],s=n+zt,a=o.firstCreatePass?aw(s,r,2,e,QC,gg(),t,i):o.data[s];if(ew(a,r,n,e,_w),Vu(a)){let l=r[He];uv(l,r,a),NC(l,a,r)}return i!=null&&Df(r,a),P}function I(){let n=En(),e=hi(),t=tw(e);return n.firstCreatePass&&lw(n,t),uS(t)&&dS(),cS(),t.classesWithoutHost!=null&&YV(t)&&xC(n,t,ct(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&qV(t)&&xC(n,t,ct(),t.stylesWithoutHost,!1),I}function be(n,e,t,i){return P(n,e,t,i),I(),be}function Ft(n,e,t,i){let r=ct(),o=r[He],s=n+zt,a=o.firstCreatePass?kH(s,o,2,e,t,i):o.data[s];return ew(a,r,n,e,_w),i!=null&&Df(r,a),Ft}function kt(){let n=hi(),e=tw(n);return uS(e)&&dS(),cS(),kt}function fi(n,e,t,i){return Ft(n,e,t,i),kt(),fi}var _w=(n,e,t,i,r)=>(Hs(!0),HC(e[Gt],i,_S()));function t5(n,e,t,i,r){let o=!nv(e,t);if(Hs(o),o)return HC(e[Gt],i,_S());let s=e[Fi],a=fv(s,n,e,t);return gP(s,r)&&tv(s,r,a.nextSibling),s&&(NI(t)||kI(a))&&ns(t)&&(uA(t),AP(a)),a}function qO(){_w=t5}function xw(n,e,t){let i=ct(),r=i[He],o=n+zt,s=r.firstCreatePass?aw(o,i,8,"ng-container",QC,gg(),e,t):r.data[o];if(ew(s,i,n,"ng-container",ZO),Vu(s)){let a=i[He];uv(a,i,s),NC(a,s,i)}return t!=null&&Df(i,s),xw}function bw(){let n=En(),e=hi(),t=tw(e);return n.firstCreatePass&&lw(n,t),bw}function Pf(n,e,t){return xw(n,e,t),bw(),Pf}var ZO=(n,e,t,i,r)=>(Hs(!0),TP(e[Gt],""));function n5(n,e,t,i,r){let o,s=!nv(e,t);if(Hs(s),s)return TP(e[Gt],"");let a=e[Fi],l=fv(a,n,e,t),c=wz(a,r);return tv(a,r,l),o=pv(c,l),o}function KO(){ZO=n5}function nt(){return ct()}function cs(n,e,t){let i=ct(),r=Vs();if(Ki(i,r,e)){let o=En(),s=sf();ZP(s,i,n,e,i[Gt],t)}return cs}var cf=void 0;function i5(n){let e=Math.floor(Math.abs(n)),t=n.toString().replace(/^[^.]*\.?/,"").length;return e===1&&t===0?1:5}var r5=["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"]],cf,[["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"]],cf,[["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}",cf,cf,cf],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",i5],FS={};function Cv(n){let e=o5(n),t=mI(e);if(t)return t;let i=e.split("-")[0];if(t=mI(i),t)return t;if(i==="en")return r5;throw new ze(701,!1)}function mI(n){return n in FS||(FS[n]=qo.ng&&qo.ng.common&&qo.ng.common.locales&&qo.ng.common.locales[n]),FS[n]}var hc=(function(n){return n[n.LocaleId=0]="LocaleId",n[n.DayPeriodsFormat=1]="DayPeriodsFormat",n[n.DayPeriodsStandalone=2]="DayPeriodsStandalone",n[n.DaysFormat=3]="DaysFormat",n[n.DaysStandalone=4]="DaysStandalone",n[n.MonthsFormat=5]="MonthsFormat",n[n.MonthsStandalone=6]="MonthsStandalone",n[n.Eras=7]="Eras",n[n.FirstDayOfWeek=8]="FirstDayOfWeek",n[n.WeekendRange=9]="WeekendRange",n[n.DateFormat=10]="DateFormat",n[n.TimeFormat=11]="TimeFormat",n[n.DateTimeFormat=12]="DateTimeFormat",n[n.NumberSymbols=13]="NumberSymbols",n[n.NumberFormats=14]="NumberFormats",n[n.CurrencyCode=15]="CurrencyCode",n[n.CurrencySymbol=16]="CurrencySymbol",n[n.CurrencyName=17]="CurrencyName",n[n.Currencies=18]="Currencies",n[n.Directionality=19]="Directionality",n[n.PluralCase=20]="PluralCase",n[n.ExtraData=21]="ExtraData",n})(hc||{});function o5(n){return n.toLowerCase().replace(/_/g,"-")}var Of="en-US";var s5=Of;function JO(n){typeof n=="string"&&(s5=n.toLowerCase().replace(/_/g,"-"))}function oe(n,e,t){let i=ct(),r=En(),o=hi();return QO(r,i,i[Gt],o,n,e,t),oe}function er(n,e,t){let i=ct(),r=En(),o=hi();return(o.type&3||t)&&bO(o,r,i,t,i[Gt],n,e,Fg(o,i,e)),er}function QO(n,e,t,i,r,o,s){let a=!0,l=null;if((i.type&3||s)&&(l??=Fg(i,e,o),bO(i,n,e,s,t,r,o,l)&&(a=!1)),a){let c=i.outputs?.[r],u=i.hostDirectiveOutputs?.[r];if(u&&u.length)for(let d=0;d<u.length;d+=2){let h=u[d],f=u[d+1];l??=Fg(i,e,o),nI(i,e,h,f,r,l)}if(c&&c.length)for(let d of c)l??=Fg(i,e,o),nI(i,e,d,r,r,l)}}function D(n=1){return SA(n)}function a5(n,e){let t=null,i=i4(n);for(let r=0;r<e.length;r++){let o=e[r];if(o==="*"){t=r;continue}if(i===null?RP(n,o,!0):s4(i,o))return r}return t}function pi(n){let e=ct()[ii][Ri];if(!e.projection){let t=n?n.length:1,i=e.projection=XD(t,null),r=i.slice(),o=e.child;for(;o!==null;){if(o.type!==128){let s=n?a5(o,n):0;s!==null&&(r[s]?r[s].projectionNext=o:i[s]=o,r[s]=o)}o=o.next}}}function mi(n,e=0,t,i,r,o){let s=ct(),a=En(),l=i?n+1:null;l!==null&&_f(s,a,l,i,r,o,null,t);let c=id(a,zt+n,16,null,t||null);c.projection===null&&(c.projection=e),pS();let d=!s[Fi]||vg();s[ii][Ri].projection[c.projection]===null&&l!==null?l5(s,a,l):d&&!Ef(c)&&P4(a,s,c)}function l5(n,e,t){let i=zt+t,r=e.data[i],o=n[i],s=gf(o,r.tView.ssrId),a=td(n,r,void 0,{dehydratedView:s});nd(o,a,0,cc(r,s))}function Ua(n,e,t,i){return uG(n,sG(e,t,i)),Ua}function fc(n=1){_g(yA()+n)}function wv(n){let e=hA();return fg(e,zt+n)}function Dg(n,e){return n<<17|e<<2}function dc(n){return n>>17&32767}function c5(n){return(n&2)==2}function u5(n,e){return n&131071|e<<17}function bC(n){return n|2}function Ku(n){return(n&131068)>>2}function NS(n,e){return n&-131069|e<<2}function d5(n){return(n&1)===1}function SC(n){return n|1}function h5(n,e,t,i,r,o){let s=o?e.classBindings:e.styleBindings,a=dc(s),l=Ku(s);n[i]=t;let c=!1,u;if(Array.isArray(t)){let d=t;u=d[1],(u===null||Nu(d,u)>0)&&(c=!0)}else u=t;if(r)if(l!==0){let h=dc(n[a+1]);n[i+1]=Dg(h,a),h!==0&&(n[h+1]=NS(n[h+1],i)),n[a+1]=u5(n[a+1],i)}else n[i+1]=Dg(a,0),a!==0&&(n[a+1]=NS(n[a+1],i)),a=i;else n[i+1]=Dg(l,0),a===0?a=i:n[l+1]=NS(n[l+1],i),l=i;c&&(n[i+1]=bC(n[i+1])),gI(n,u,i,!0),gI(n,u,i,!1),f5(e,u,n,i,o),s=Dg(a,l),o?e.classBindings=s:e.styleBindings=s}function f5(n,e,t,i,r){let o=r?n.residualClasses:n.residualStyles;o!=null&&typeof e=="string"&&Nu(o,e)>=0&&(t[i+1]=SC(t[i+1]))}function gI(n,e,t,i){let r=n[t+1],o=e===null,s=i?dc(r):Ku(r),a=!1;for(;s!==0&&(a===!1||o);){let l=n[s],c=n[s+1];p5(l,e)&&(a=!0,n[s+1]=i?SC(c):bC(c)),s=i?dc(c):Ku(c)}a&&(n[t+1]=i?bC(r):SC(r))}function p5(n,e){return n===null||e==null||(Array.isArray(n)?n[1]:n)===e?!0:Array.isArray(n)&&typeof e=="string"?Nu(n,e)>=0:!1}var po={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function m5(n){return n.substring(po.key,po.keyEnd)}function g5(n){return v5(n),eR(n,tR(n,0,po.textEnd))}function eR(n,e){let t=po.textEnd;return t===e?-1:(e=po.keyEnd=y5(n,po.key=e,t),tR(n,e,t))}function v5(n){po.key=0,po.keyEnd=0,po.value=0,po.valueEnd=0,po.textEnd=n.length}function tR(n,e,t){for(;e<t&&n.charCodeAt(e)<=32;)e++;return e}function y5(n,e,t){for(;e<t&&n.charCodeAt(e)>32;)e++;return e}function vo(n,e,t){return nR(n,e,t,!1),vo}function jt(n,e){return nR(n,e,null,!0),jt}function ld(n){x5(M5,_5,n,!0)}function _5(n,e){for(let t=g5(e);t>=0;t=eR(e,t))cg(n,m5(e),!0)}function nR(n,e,t,i){let r=ct(),o=En(),s=gS(2);if(o.firstUpdatePass&&rR(o,n,s,i),e!==Qi&&Ki(r,s,e)){let a=o.data[zs()];oR(o,a,r,r[Gt],n,r[s+1]=D5(e,t),i,s)}}function x5(n,e,t,i){let r=En(),o=gS(2);r.firstUpdatePass&&rR(r,null,o,i);let s=ct();if(t!==Qi&&Ki(s,o,t)){let a=r.data[zs()];if(sR(a,i)&&!iR(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;l!==null&&(t=ig(l,t||"")),xC(r,a,s,t,i)}else T5(r,a,s,s[Gt],s[o+1],s[o+1]=E5(n,e,t),i,o)}}function iR(n,e){return e>=n.expandoStartIndex}function rR(n,e,t,i){let r=n.data;if(r[t+1]===null){let o=r[zs()],s=iR(n,t);sR(o,i)&&e===null&&!s&&(e=!1),e=b5(r,o,e,i),h5(r,o,e,t,s,i)}}function b5(n,e,t,i){let r=vA(n),o=i?e.residualClasses:e.residualStyles;if(r===null)(i?e.classBindings:e.styleBindings)===0&&(t=kS(null,n,e,t,i),t=xf(t,e.attrs,i),o=null);else{let s=e.directiveStylingLast;if(s===-1||n[s]!==r)if(t=kS(r,n,e,t,i),o===null){let l=S5(n,e,i);l!==void 0&&Array.isArray(l)&&(l=kS(null,n,e,l[1],i),l=xf(l,e.attrs,i),C5(n,e,i,l))}else o=w5(n,e,i)}return o!==void 0&&(i?e.residualClasses=o:e.residualStyles=o),t}function S5(n,e,t){let i=t?e.classBindings:e.styleBindings;if(Ku(i)!==0)return n[dc(i)]}function C5(n,e,t,i){let r=t?e.classBindings:e.styleBindings;n[dc(r)]=i}function w5(n,e,t){let i,r=e.directiveEnd;for(let o=1+e.directiveStylingLast;o<r;o++){let s=n[o].hostAttrs;i=xf(i,s,t)}return xf(i,e.attrs,t)}function kS(n,e,t,i,r){let o=null,s=t.directiveEnd,a=t.directiveStylingLast;for(a===-1?a=t.directiveStart:a++;a<s&&(o=e[a],i=xf(i,o.hostAttrs,r),o!==n);)a++;return n!==null&&(t.directiveStylingLast=a),i}function xf(n,e,t){let i=t?1:2,r=-1;if(e!==null)for(let o=0;o<e.length;o++){let s=e[o];typeof s=="number"?r=s:r===i&&(Array.isArray(n)||(n=n===void 0?[]:["",n]),cg(n,s,t?!0:e[++o]))}return n===void 0?null:n}function E5(n,e,t){if(t==null||t==="")return _i;let i=[],r=as(t);if(Array.isArray(r))for(let o=0;o<r.length;o++)n(i,r[o],!0);else if(r instanceof Set)for(let o of r)n(i,o,!0);else if(typeof r=="object")for(let o in r)r.hasOwnProperty(o)&&n(i,o,r[o]);else typeof r=="string"&&e(i,r);return i}function M5(n,e,t){let i=String(e);i!==""&&!i.includes(" ")&&cg(n,i,t)}function T5(n,e,t,i,r,o,s,a){r===Qi&&(r=_i);let l=0,c=0,u=0<r.length?r[0]:null,d=0<o.length?o[0]:null;for(;u!==null||d!==null;){let h=l<r.length?r[l+1]:void 0,f=c<o.length?o[c+1]:void 0,p=null,v;u===d?(l+=2,c+=2,h!==f&&(p=d,v=f)):d===null||u!==null&&u<d?(l+=2,p=u):(c+=2,p=d,v=f),p!==null&&oR(n,e,t,i,p,v,s,a),u=l<r.length?r[l]:null,d=c<o.length?o[c]:null}}function oR(n,e,t,i,r,o,s,a){if(!(e.type&3))return;let l=n.data,c=l[a+1],u=d5(c)?vI(l,e,t,r,Ku(c),s):void 0;if(!Zg(u)){Zg(o)||c5(c)&&(o=vI(l,null,t,r,a,s));let d=nS(zs(),t);R4(i,s,d,r,o)}}function vI(n,e,t,i,r,o){let s=e===null,a;for(;r>0;){let l=n[r],c=Array.isArray(l),u=c?l[1]:l,d=u===null,h=t[r+1];h===Qi&&(h=d?_i:void 0);let f=d?ug(h,i):u===i?h:void 0;if(c&&!Zg(f)&&(f=ug(l,i)),Zg(f)&&(a=f,s))return a;let p=n[r+1];r=s?dc(p):Ku(p)}if(e!==null){let l=o?e.residualClasses:e.residualStyles;l!=null&&(a=ug(l,i))}return a}function Zg(n){return n!==void 0}function D5(n,e){return n==null||n===""||(typeof e=="string"?n=n+e:typeof n=="object"&&(n=ng(as(n)))),n}function sR(n,e){return(n.flags&(e?8:16))!==0}function se(n,e=""){let t=ct(),i=En(),r=n+zt,o=i.firstCreatePass?id(i,r,1,e,null):i.data[r],s=aR(i,t,o,e);t[r]=s,Sg()&&KC(i,t,s,o),zu(o,!1)}var aR=(n,e,t,i)=>(Hs(!0),MP(e[Gt],i));function A5(n,e,t,i){let r=!nv(e,t);if(Hs(r),r)return MP(e[Gt],i);let o=e[Fi];return fv(o,n,e,t)}function lR(){aR=A5}function I5(n,e,t,i=""){return Ki(n,Vs(),t)?e+Jh(t)+i:Qi}function Wt(n){return Pt("",n),Wt}function Pt(n,e,t){let i=ct(),r=I5(i,n,e,t);return r!==Qi&&P5(i,zs(),r),Pt}function P5(n,e,t){let i=nS(e,n);Yz(n[Gt],i,t)}function pc(n,e,t){fw(e)&&(e=e());let i=ct(),r=Vs();if(Ki(i,r,e)){let o=En(),s=sf();qP(s,i,n,e,i[Gt],t)}return pc}function us(n,e){let t=fw(n);return t&&n.set(e),t}function Rf(n,e){let t=ct(),i=En(),r=hi();return QO(i,t,t[Gt],r,n,e),Rf}function Sw(n){return Ki(ct(),Vs(),n)?Jh(n):Qi}function yI(n,e,t){let i=En();i.firstCreatePass&&cR(e,i.data,i.blueprint,is(n),t)}function cR(n,e,t,i,r){if(n=di(n),Array.isArray(n))for(let o=0;o<n.length;o++)cR(n[o],e,t,i,r);else{let o=En(),s=ct(),a=hi(),l=Zl(n)?n:di(n.provide),c=Jb(n),u=a.providerIndexes&1048575,d=a.directiveStart,h=a.providerIndexes>>20;if(Zl(n)||!n.multi){let f=new lc(c,r,Bt,null),p=US(l,e,r?u:u+h,d);p===-1?(VS(Vg(a,s),o,l),LS(o,n,e.length),e.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),t.push(f),s.push(f)):(t[p]=f,s[p]=f)}else{let f=US(l,e,u+h,d),p=US(l,e,u,u+h),v=f>=0&&t[f],g=p>=0&&t[p];if(r&&!g||!r&&!v){VS(Vg(a,s),o,l);let m=F5(r?R5:O5,t.length,r,i,c,n);!r&&g&&(t[p].providerFactory=m),LS(o,n,e.length,0),e.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),t.push(m),s.push(m)}else{let m=uR(t[r?p:f],c,!r&&i);LS(o,n,f>-1?f:p,m)}!r&&i&&g&&t[p].componentProviders++}}}function LS(n,e,t,i){let r=Zl(e),o=QD(e);if(r||o){let l=(o?di(e.useClass):e).prototype.ngOnDestroy;if(l){let c=n.destroyHooks||(n.destroyHooks=[]);if(!r&&e.multi){let u=c.indexOf(t);u===-1?c.push(t,[i,l]):c[u+1].push(i,l)}else c.push(t,l)}}}function uR(n,e,t){return t&&n.componentProviders++,n.multi.push(e)-1}function US(n,e,t,i){for(let r=t;r<i;r++)if(e[r]===n)return r;return-1}function O5(n,e,t,i,r){return CC(this.multi,[])}function R5(n,e,t,i,r){let o=this.multi,s;if(this.providerFactory){let a=this.providerFactory.componentProviders,l=hf(i,i[He],this.providerFactory.index,r);s=l.slice(0,a),CC(o,s);for(let c=a;c<l.length;c++)s.push(l[c])}else s=[],CC(o,s);return s}function CC(n,e){for(let t=0;t<n.length;t++){let i=n[t];e.push(i())}return e}function F5(n,e,t,i,r,o){let s=new lc(n,t,Bt,null);return s.multi=[],s.index=e,s.componentProviders=0,uR(s,r,i&&!t),s}function Xr(n,e){return t=>{t.providersResolver=(i,r)=>yI(i,r?r(n):n,!1),e&&(t.viewProvidersResolver=(i,r)=>yI(i,r?r(e):e,!0))}}function Cw(n,e){let t=of()+n,i=ct();return i[t]===Qi?_v(i,t,e()):LH(i,t)}function Ba(n,e,t){return N5(ct(),of(),n,e,t)}function ww(n,e){let t=n[e];return t===Qi?void 0:t}function N5(n,e,t,i,r,o){let s=e+t;return Ki(n,s,r)?_v(n,s+1,o?i.call(o,r):i(r)):ww(n,s+1)}function k5(n,e,t,i,r,o,s){let a=e+t;return xO(n,a,r,o)?_v(n,a+2,s?i.call(s,r,o):i(r,o)):ww(n,a+2)}function L5(n,e,t,i,r,o,s,a){let l=e+t;return UH(n,l,r,o,s)?_v(n,l+3,a?i.call(a,r,o,s):i(r,o,s)):ww(n,l+3)}function tr(n,e){let t=En(),i,r=n+zt;t.firstCreatePass?(i=U5(e,t.pipeRegistry),t.data[r]=i,i.onDestroy&&(t.destroyHooks??=[]).push(r,i.onDestroy)):i=t.data[r];let o=i.factory||(i.factory=Ma(i.type,!0)),s,a=Ii(Bt);try{let l=Bg(!1),c=o();return Bg(l),iS(t,ct(),r,c),c}finally{Ii(a)}}function U5(n,e){if(e)for(let t=e.length-1;t>=0;t--){let i=e[t];if(n===i.name)return i}}function xr(n,e,t,i){let r=n+zt,o=ct(),s=fg(o,r);return dR(o,r)?k5(o,of(),e,s.transform,t,i,s):s.transform(t,i)}function Ew(n,e,t,i,r){let o=n+zt,s=ct(),a=fg(s,o);return dR(s,o)?L5(s,of(),e,a.transform,t,i,r,a):a.transform(t,i,r)}function dR(n,e){return n[He].data[e].pure}function Mw(n,e){return hv(n,e)}var hR=(()=>{class n{applicationErrorHandler=Z(Gs);appRef=Z(_r);taskService=Z(Ra);ngZone=Z(Yi);zonelessEnabled=Z(lf);tracing=Z(Xs,{optional:!0});zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Ai;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Zh):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(Z(wS,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{let t=this.taskService.add();if(!this.runningTick&&(this.cleanup(),!this.zonelessEnabled||this.appRef.includeAllTestViews)){this.taskService.remove(t);return}this.switchToMicrotaskScheduler(),this.taskService.remove(t)})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()}))}switchToMicrotaskScheduler(){this.ngZone.runOutsideAngular(()=>{let t=this.taskService.add();this.useMicrotaskScheduler=!0,queueMicrotask(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(t)})})}notify(t){if(!this.zonelessEnabled&&t===5)return;switch(t){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2;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 i=this.useMicrotaskScheduler?TA:xS;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>i(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>i(()=>this.tick()))}shouldScheduleTick(){return!(this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(Zh+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 t=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(i){this.applicationErrorHandler(i)}finally{this.taskService.remove(t),this.cleanup()}}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let t=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(t)}}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function fR(){return[{provide:Yo,useExisting:hR},{provide:Yi,useClass:Kh},{provide:lf,useValue:!0}]}function B5(){return typeof $localize<"u"&&$localize.locale||Of}var Ff=new Ve("",{factory:()=>Z(Ff,{optional:!0,skipSelf:!0})||B5()});var Nf=class{destroyed=!1;listeners=null;errorHandler=Z(Hr,{optional:!0});destroyRef=Z(Zi);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new ze(953,!1);return(this.listeners??=[]).push(e),{unsubscribe:()=>{let t=this.listeners?.indexOf(e);t!==void 0&&t!==-1&&this.listeners?.splice(t,1)}}}emit(e){if(this.destroyed){console.warn(ks(953,!1));return}if(this.listeners===null)return;let t=it(null);try{for(let i of this.listeners)try{i(e)}catch(r){this.errorHandler?.handleError(r)}}finally{it(t)}}};function Ln(n){return kD(n)}function ke(n,e){return zh(n,e?.equal)}var Pw={JSACTION:"__jsaction",OWNER:"__owner"},vR={};function V5(n){return n[Pw.JSACTION]}function pR(n,e){n[Pw.JSACTION]=e}function z5(n){return vR[n]}function H5(n,e){vR[n]=e}var st={AUXCLICK:"auxclick",CHANGE:"change",CLICK:"click",CLICKMOD:"clickmod",CLICKONLY:"clickonly",DBLCLICK:"dblclick",FOCUS:"focus",FOCUSIN:"focusin",BLUR:"blur",FOCUSOUT:"focusout",SUBMIT:"submit",KEYDOWN:"keydown",KEYPRESS:"keypress",KEYUP:"keyup",MOUSEUP:"mouseup",MOUSEDOWN:"mousedown",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEENTER:"mouseenter",MOUSELEAVE:"mouseleave",MOUSEMOVE:"mousemove",POINTERUP:"pointerup",POINTERDOWN:"pointerdown",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERMOVE:"pointermove",POINTERCANCEL:"pointercancel",GOTPOINTERCAPTURE:"gotpointercapture",LOSTPOINTERCAPTURE:"lostpointercapture",ERROR:"error",LOAD:"load",UNLOAD:"unload",TOUCHSTART:"touchstart",TOUCHEND:"touchend",TOUCHMOVE:"touchmove",INPUT:"input",SCROLL:"scroll",TOGGLE:"toggle",CUSTOM:"_custom"},G5=[st.MOUSEENTER,st.MOUSELEAVE,"pointerenter","pointerleave"],zce=[st.CLICK,st.DBLCLICK,st.FOCUSIN,st.FOCUSOUT,st.KEYDOWN,st.KEYUP,st.KEYPRESS,st.MOUSEOVER,st.MOUSEOUT,st.SUBMIT,st.TOUCHSTART,st.TOUCHEND,st.TOUCHMOVE,"touchcancel","auxclick","change","compositionstart","compositionupdate","compositionend","beforeinput","input","select","copy","cut","paste","mousedown","mouseup","wheel","contextmenu","dragover","dragenter","dragleave","drop","dragstart","dragend","pointerdown","pointermove","pointerup","pointercancel","pointerover","pointerout","gotpointercapture","lostpointercapture","ended","loadedmetadata","pagehide","pageshow","visibilitychange","beforematch"],j5=[st.FOCUS,st.BLUR,st.ERROR,st.LOAD,st.TOGGLE],Ow=n=>j5.indexOf(n)>=0;function W5(n){return n===st.MOUSEENTER?st.MOUSEOVER:n===st.MOUSELEAVE?st.MOUSEOUT:n===st.POINTERENTER?st.POINTEROVER:n===st.POINTERLEAVE?st.POINTEROUT:n}function $5(n,e,t,i){let r=!1;Ow(e)&&(r=!0);let o=typeof i=="boolean"?{capture:r,passive:i}:r;return n.addEventListener(e,t,o),{eventType:e,handler:t,capture:r,passive:i}}function X5(n,e){if(n.removeEventListener){let t=typeof e.passive=="boolean"?{capture:e.capture}:e.capture;n.removeEventListener(e.eventType,e.handler,t)}else n.detachEvent&&n.detachEvent(`on${e.eventType}`,e.handler)}function Y5(n){n.preventDefault?n.preventDefault():n.returnValue=!1}var mR=typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);function q5(n){return n.which===2||n.which==null&&n.button===4}function Z5(n){return mR&&n.metaKey||!mR&&n.ctrlKey||q5(n)||n.shiftKey}function K5(n,e,t){let i=n.relatedTarget;return(n.type===st.MOUSEOVER&&e===st.MOUSEENTER||n.type===st.MOUSEOUT&&e===st.MOUSELEAVE||n.type===st.POINTEROVER&&e===st.POINTERENTER||n.type===st.POINTEROUT&&e===st.POINTERLEAVE)&&(!i||i!==t&&!t.contains(i))}function J5(n,e){let t={};for(let i in n){if(i==="srcElement"||i==="target")continue;let r=i,o=n[r];typeof o!="function"&&(t[r]=o)}return n.type===st.MOUSEOVER?t.type=st.MOUSEENTER:n.type===st.MOUSEOUT?t.type=st.MOUSELEAVE:n.type===st.POINTEROVER?t.type=st.POINTERENTER:t.type=st.POINTERLEAVE,t.target=t.srcElement=e,t.bubbles=!1,t._originalEvent=n,t}var Q5=typeof navigator<"u"&&/iPhone|iPad|iPod/.test(navigator.userAgent),Dv=class{element;handlerInfos=[];constructor(e){this.element=e}addEventListener(e,t,i){Q5&&(this.element.style.cursor="pointer"),this.handlerInfos.push($5(this.element,e,t(this.element),i))}cleanUp(){for(let e=0;e<this.handlerInfos.length;e++)X5(this.element,this.handlerInfos[e]);this.handlerInfos=[]}},ej={NAMESPACE_ACTION_SEPARATOR:".",EVENT_ACTION_SEPARATOR:":"};function Va(n){return n.eventType}function Rw(n,e){n.eventType=e}function Mv(n){return n.event}function yR(n,e){n.event=e}function _R(n){return n.targetElement}function xR(n,e){n.targetElement=e}function bR(n){return n.eic}function tj(n,e){n.eic=e}function nj(n){return n.timeStamp}function ij(n,e){n.timeStamp=e}function Tv(n){return n.eia}function SR(n,e,t){n.eia=[e,t]}function Tw(n){n.eia=void 0}function Ev(n){return n[1]}function rj(n){return n.eirp}function CR(n,e){n.eirp=e}function wR(n){return n.eir}function ER(n,e){n.eir=e}function MR(n){return{eventType:n.eventType,event:n.event,targetElement:n.targetElement,eic:n.eic,eia:n.eia,timeStamp:n.timeStamp,eirp:n.eirp,eiack:n.eiack,eir:n.eir}}function oj(n,e,t,i,r,o,s,a){return{eventType:n,event:e,targetElement:t,eic:i,timeStamp:r,eia:o,eirp:s,eiack:a}}var Dw=class n{eventInfo;constructor(e){this.eventInfo=e}getEventType(){return Va(this.eventInfo)}setEventType(e){Rw(this.eventInfo,e)}getEvent(){return Mv(this.eventInfo)}setEvent(e){yR(this.eventInfo,e)}getTargetElement(){return _R(this.eventInfo)}setTargetElement(e){xR(this.eventInfo,e)}getContainer(){return bR(this.eventInfo)}setContainer(e){tj(this.eventInfo,e)}getTimestamp(){return nj(this.eventInfo)}setTimestamp(e){ij(this.eventInfo,e)}getAction(){let e=Tv(this.eventInfo);if(e)return{name:e[0],element:e[1]}}setAction(e){if(!e){Tw(this.eventInfo);return}SR(this.eventInfo,e.name,e.element)}getIsReplay(){return rj(this.eventInfo)}setIsReplay(e){CR(this.eventInfo,e)}getResolved(){return wR(this.eventInfo)}setResolved(e){ER(this.eventInfo,e)}clone(){return new n(MR(this.eventInfo))}},sj={},aj=/\s*;\s*/,lj=st.CLICK,Aw=class{a11yClickSupport=!1;clickModSupport=!0;syntheticMouseEventSupport;updateEventInfoForA11yClick=void 0;preventDefaultForA11yClick=void 0;populateClickOnlyAction=void 0;constructor({syntheticMouseEventSupport:e=!1,clickModSupport:t=!0}={}){this.syntheticMouseEventSupport=e,this.clickModSupport=t}resolveEventType(e){this.clickModSupport&&Va(e)===st.CLICK&&Z5(Mv(e))?Rw(e,st.CLICKMOD):this.a11yClickSupport&&this.updateEventInfoForA11yClick(e)}resolveAction(e){wR(e)||(this.populateAction(e,_R(e)),ER(e,!0))}resolveParentAction(e){let t=Tv(e),i=t&&Ev(t);Tw(e);let r=i&&this.getParentNode(i);r&&this.populateAction(e,r)}populateAction(e,t){let i=t;for(;i&&i!==bR(e)&&(i.nodeType===Node.ELEMENT_NODE&&this.populateActionOnElement(i,e),!Tv(e));)i=this.getParentNode(i);let r=Tv(e);if(r&&(this.a11yClickSupport&&this.preventDefaultForA11yClick(e),this.syntheticMouseEventSupport&&(Va(e)===st.MOUSEENTER||Va(e)===st.MOUSELEAVE||Va(e)===st.POINTERENTER||Va(e)===st.POINTERLEAVE)))if(K5(Mv(e),Va(e),Ev(r))){let o=J5(Mv(e),Ev(r));yR(e,o),xR(e,Ev(r))}else Tw(e)}getParentNode(e){let t=e[Pw.OWNER];if(t)return t;let i=e.parentNode;return i?.nodeName==="#document-fragment"?i?.host??null:i}populateActionOnElement(e,t){let i=this.parseActions(e),r=i[Va(t)];r!==void 0&&SR(t,r,e),this.a11yClickSupport&&this.populateClickOnlyAction(e,t,i)}parseActions(e){let t=V5(e);if(!t){let i=e.getAttribute(Eg.JSACTION);if(!i)t=sj,pR(e,t);else{if(t=z5(i),!t){t={};let r=i.split(aj);for(let o=0;o<r.length;o++){let s=r[o];if(!s)continue;let a=s.indexOf(ej.EVENT_ACTION_SEPARATOR),l=a!==-1,c=l?s.substr(0,a).trim():lj,u=l?s.substr(a+1).trim():s;t[c]=u}H5(i,t)}pR(e,t)}}return t}addA11yClickSupport(e,t,i){this.a11yClickSupport=!0,this.updateEventInfoForA11yClick=e,this.preventDefaultForA11yClick=t,this.populateClickOnlyAction=i}},TR=(function(n){return n[n.I_AM_THE_JSACTION_FRAMEWORK=0]="I_AM_THE_JSACTION_FRAMEWORK",n})(TR||{}),Iw=class{dispatchDelegate;actionResolver;eventReplayer;eventReplayScheduled=!1;replayEventInfoWrappers=[];constructor(e,{actionResolver:t,eventReplayer:i}={}){this.dispatchDelegate=e,this.actionResolver=t,this.eventReplayer=i}dispatch(e){let t=new Dw(e);this.actionResolver?.resolveEventType(e),this.actionResolver?.resolveAction(e);let i=t.getAction();if(i&&cj(i.element,t)&&Y5(t.getEvent()),this.eventReplayer&&t.getIsReplay()){this.scheduleEventInfoWrapperReplay(t);return}this.dispatchDelegate(t)}scheduleEventInfoWrapperReplay(e){this.replayEventInfoWrappers.push(e),!this.eventReplayScheduled&&(this.eventReplayScheduled=!0,Promise.resolve().then(()=>{this.eventReplayScheduled=!1,this.eventReplayer(this.replayEventInfoWrappers)}))}};function cj(n,e){return n.tagName==="A"&&(e.getEventType()===st.CLICK||e.getEventType()===st.CLICKMOD)}var DR=Symbol.for("propagationStopped"),Fw={REPLAY:101};var uj="`preventDefault` called during event replay.";var dj="`composedPath` called during event replay.",Av=class{dispatchDelegate;clickModSupport;actionResolver;dispatcher;constructor(e,t=!0){this.dispatchDelegate=e,this.clickModSupport=t,this.actionResolver=new Aw({clickModSupport:t}),this.dispatcher=new Iw(i=>{this.dispatchToDelegate(i)},{actionResolver:this.actionResolver})}dispatch(e){this.dispatcher.dispatch(e)}dispatchToDelegate(e){for(e.getIsReplay()&&pj(e),hj(e);e.getAction();){if(mj(e),Ow(e.getEventType())&&e.getAction().element!==e.getTargetElement()||(this.dispatchDelegate(e.getEvent(),e.getAction().name),fj(e)))return;this.actionResolver.resolveParentAction(e.eventInfo)}}};function hj(n){let e=n.getEvent(),t=n.getEvent().stopPropagation.bind(e),i=()=>{e[DR]=!0,t()};mc(e,"stopPropagation",i),mc(e,"stopImmediatePropagation",i)}function fj(n){return!!n.getEvent()[DR]}function pj(n){let e=n.getEvent(),t=n.getTargetElement(),i=e.preventDefault.bind(e);mc(e,"target",t),mc(e,"eventPhase",Fw.REPLAY),mc(e,"preventDefault",()=>{throw i(),new Error(uj+"")}),mc(e,"composedPath",()=>{throw new Error(dj+"")})}function mj(n){let e=n.getEvent(),t=n.getAction()?.element;t&&mc(e,"currentTarget",t,{configurable:!0})}function mc(n,e,t,{configurable:i=!1}={}){Object.defineProperty(n,e,{value:t,configurable:i})}function AR(n,e){n.ecrd(t=>{e.dispatch(t)},TR.I_AM_THE_JSACTION_FRAMEWORK)}function gj(n){return n?.q??[]}function vj(n){n&&(gR(n.c,n.et,n.h),gR(n.c,n.etc,n.h,!0))}function gR(n,e,t,i){for(let r=0;r<e.length;r++)n.removeEventListener(e[r],t,i)}var yj=!1,IR=(()=>{class n{static MOUSE_SPECIAL_SUPPORT=yj;containerManager;eventHandlers={};browserEventTypeToExtraEventTypes={};dispatcher=null;queuedEventInfos=[];constructor(t){this.containerManager=t}handleEvent(t,i,r){let o=oj(t,i,i.target,r,Date.now());this.handleEventInfo(o)}handleEventInfo(t){if(!this.dispatcher){CR(t,!0),this.queuedEventInfos?.push(t);return}this.dispatcher(t)}addEvent(t,i,r){if(t in this.eventHandlers||!this.containerManager||!n.MOUSE_SPECIAL_SUPPORT&&G5.indexOf(t)>=0)return;let o=(a,l,c)=>{this.handleEvent(a,l,c)};this.eventHandlers[t]=o;let s=W5(i||t);if(s!==t){let a=this.browserEventTypeToExtraEventTypes[s]||[];a.push(t),this.browserEventTypeToExtraEventTypes[s]=a}this.containerManager.addEventListener(s,a=>l=>{o(t,l,a)},r)}replayEarlyEvents(t=window._ejsa){t&&(this.replayEarlyEventInfos(t.q),vj(t),delete window._ejsa)}replayEarlyEventInfos(t){for(let i=0;i<t.length;i++){let r=t[i],o=this.getEventTypesForBrowserEventType(r.eventType);for(let s=0;s<o.length;s++){let a=MR(r);Rw(a,o[s]),this.handleEventInfo(a)}}}getEventTypesForBrowserEventType(t){let i=[];return this.eventHandlers[t]&&i.push(t),this.browserEventTypeToExtraEventTypes[t]&&i.push(...this.browserEventTypeToExtraEventTypes[t]),i}handler(t){return this.eventHandlers[t]}cleanUp(){this.containerManager?.cleanUp(),this.containerManager=null,this.eventHandlers={},this.browserEventTypeToExtraEventTypes={},this.dispatcher=null,this.queuedEventInfos=[]}registerDispatcher(t,i){this.ecrd(t,i)}ecrd(t,i){if(this.dispatcher=t,this.queuedEventInfos?.length){for(let r=0;r<this.queuedEventInfos.length;r++)this.handleEventInfo(this.queuedEventInfos[r]);this.queuedEventInfos=null}}}return n})();function PR(n,e=window){return gj(e._ejsas?.[n])}function Nw(n,e=window){e._ejsas&&(e._ejsas[n]=void 0)}var Ov=Symbol("InputSignalNode#UNSET"),VR=ue(R({},Dm),{transformFn:void 0,applyValueToInputSignal(n,e){Gl(n,e)}});function zR(n,e){let t=Object.create(VR);t.value=n,t.transformFn=e?.transform;function i(){if(Vl(t),t.value===Ov){let r=null;throw new ze(-950,r)}return t.value}return i[Zn]=t,i}function $t(n){return new Nf}function OR(n,e){return zR(n,e)}function Lj(n){return zR(Ov,n)}var Je=(OR.required=Lj,OR);function RR(n,e){return RO(e)}function Uj(n,e){return FO(e)}var cd=(RR.required=Uj,RR);function HR(n,e){let t=Object.create(VR),i=new Nf;t.value=n;function r(){return Vl(t),FR(t.value),t.value}return r[Zn]=t,r.asReadonly=Cg.bind(r),r.set=o=>{t.equal(t.value,o)||(Gl(t,o),i.emit(o))},r.update=o=>{FR(t.value),r.set(o(t.value))},r.subscribe=i.subscribe.bind(i),r.destroyRef=i.destroyRef,r}function FR(n){if(n===Ov)throw new ze(952,!1)}function NR(n,e){return HR(n,e)}function Bj(n){return HR(Ov,n)}var ds=(NR.required=Bj,NR);var kw=new Ve(""),Vj=new Ve("");function kf(n){return!n.moduleRef}function zj(n){let e=kf(n)?n.r3Injector:n.moduleRef.injector,t=e.get(Yi);return t.run(()=>{kf(n)?n.r3Injector.resolveInjectorInitializers():n.moduleRef.resolveInjectorInitializers();let i=e.get(Gs),r;if(t.runOutsideAngular(()=>{r=t.onError.subscribe({next:i})}),kf(n)){let o=()=>e.destroy(),s=n.platformInjector.get(kw);s.add(o),e.onDestroy(()=>{r.unsubscribe(),s.delete(o)})}else{let o=()=>n.moduleRef.destroy(),s=n.platformInjector.get(kw);s.add(o),n.moduleRef.onDestroy(()=>{df(n.allPlatformModules,n.moduleRef),r.unsubscribe(),s.delete(o)})}return Gj(i,t,()=>{let o=e.get(Ra),s=o.add(),a=e.get(gw);return a.runInitializers(),a.donePromise.then(()=>{let l=e.get(Ff,Of);if(JO(l||Of),!e.get(Vj,!0))return kf(n)?e.get(_r):(n.allPlatformModules.push(n.moduleRef),n.moduleRef);if(kf(n)){let u=e.get(_r);return n.rootComponent!==void 0&&u.bootstrap(n.rootComponent),u}else return Hj?.(n.moduleRef,n.allPlatformModules),n.moduleRef}).finally(()=>{o.remove(s)})})})}var Hj;function Gj(n,e,t){try{let i=t();return sd(i)?i.catch(r=>{throw e.runOutsideAngular(()=>n(r)),r}):i}catch(i){throw e.runOutsideAngular(()=>n(i)),i}}var Pv=null;function jj(n=[],e){return bi.create({name:e,providers:[{provide:tf,useValue:"platform"},{provide:kw,useValue:new Set([()=>Pv=null])},...n]})}function Wj(n=[]){if(Pv)return Pv;let e=jj(n);return Pv=e,jO(),$j(e),e}function $j(n){let e=n.get(Kg,null);Lu(n,()=>{e?.forEach(t=>t())})}var Iv=new WeakSet,kR="";function LR(n){return n.get(IC,QI)}function GR(){let n=[{provide:IC,useFactory:()=>{let e=!0;{let t=Z(ss);e=!!window._ejsas?.[t]}return e&&go("NgEventReplay"),e}}];return n.push({provide:Us,useValue:()=>{let e=Z(_r),{injector:t}=e;if(!Iv.has(e)){let i=Z(PC);if(LR(t)){lP();let r=t.get(ss),o=sP(r,(s,a,l)=>{s.nodeType===Node.ELEMENT_NODE&&(nP(s,a,l),iP(s,i))});e.onDestroy(o)}}},multi:!0},{provide:ad,useFactory:()=>{let e=Z(_r),{injector:t}=e;return()=>{if(!LR(t)||Iv.has(e))return;Iv.add(e);let i=t.get(ss);e.onDestroy(()=>{Iv.delete(e),Nw(i)}),e.whenStable().then(()=>{if(e.destroyed)return;let r=t.get(oP);Xj(r,t);let o=t.get(PC);o.get(kR)?.forEach(rP),o.delete(kR);let s=r.instance;mP(t)?e.onDestroy(()=>s.cleanUp()):s.cleanUp()})}},multi:!0}),n}var Xj=(n,e)=>{let t=e.get(ss),i=window._ejsas[t],r=n.instance=new IR(new Dv(i.c));for(let a of i.et)r.addEvent(a);for(let a of i.etc)r.addEvent(a);let o=PR(t);r.replayEarlyEventInfos(o),Nw(t);let s=new Av(a=>{Yj(e,a,a.currentTarget)});AR(r,s)};function Yj(n,e,t){let i=(t&&t.getAttribute(wf))??"";/d\d+/.test(i)?qj(i,n,e,t):e.eventPhase===Fw.REPLAY&&OC(e,t)}function qj(n,e,t,i){let r=e.get(eP);r.push({event:t,currentTarget:i}),YO(e,n,Zj(r))}function Zj(n){return e=>{let t=new Set(e),i=[];for(let{event:r,currentTarget:o}of n){let s=o.getAttribute(wf);t.has(s)?OC(r,o):i.push({event:r,currentTarget:o})}n.length=0,n.push(...i)}}var UR=!1;var Kj=1e4;function Jj(){UR||(UR=!0,hP(),qO(),lR(),KO(),VO(),DO(),fO(),YP())}function Qj(n){return n.whenStable()}function jR(){let n=[{provide:Cf,useFactory:()=>{let e=!0;return e=!!Z(ed,{optional:!0})?.get(RC,null),e&&go("NgHydration"),e}},{provide:Us,useValue:()=>{cO(!1);let e=Z(wn);Z(Cf)&&(yP(e),Jj())},multi:!0}];return n.push({provide:AC,useFactory:()=>Z(Cf)},{provide:ad,useFactory:()=>{let e=Z(Yo);if(Z(Cf)){let t=Z(_r);return()=>{Qj(t).then(()=>{t.destroyed||(sw(t),e.notify(7))})}}return()=>{}},multi:!0}),Bs(n)}var Lpe=Kj-1e3;var Rv=(()=>{class n{static __NG_ELEMENT_ID__=e8}return n})();function e8(n){return t8(hi(),ct(),(n&16)===16)}function t8(n,e,t){if(ns(n)&&!t){let i=gr(n.index,e);return new Na(i,i)}else if(n.type&175){let i=e[ii];return new Na(i,e)}return null}function WR(n){let{rootComponent:e,appProviders:t,platformProviders:i,platformRef:r}=n;Kt(Ut.BootstrapApplicationStart);try{let o=r?.injector??Wj(i),s=[fR(),AA,...t||[]],a=new yf({providers:s,parent:o,debugName:"",runEnvironmentInitializers:!1});return zj({r3Injector:a.injector,platformInjector:o,rootComponent:e})}catch(o){return Promise.reject(o)}finally{Kt(Ut.BootstrapApplicationEnd)}}function Fv(n){return typeof n=="boolean"?n:n!=null&&n!=="false"}function $R(n,e){let t=Ls(n),i=e.elementInjector||ku();return new Zu(t).create(i,e.projectableNodes,e.hostElement,e.environmentInjector,e.directives,e.bindings)}var XR=null;function Yr(){return XR}function Lw(n){XR??=n}var Lf=class{},Nv=(()=>{class n{historyGo(t){throw new Error("")}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ge({token:n,factory:()=>Z(YR),providedIn:"platform"})}return n})();var YR=(()=>{class n extends Nv{_location;_history;_doc=Z(wn);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Yr().getBaseHref(this._doc)}onPopState(t){let i=Yr().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",t,!1),()=>i.removeEventListener("popstate",t)}onHashChange(t){let i=Yr().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",t,!1),()=>i.removeEventListener("hashchange",t)}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(t){this._location.pathname=t}pushState(t,i,r){this._history.pushState(t,i,r)}replaceState(t,i,r){this._history.replaceState(t,i,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ge({token:n,factory:()=>new n,providedIn:"platform"})}return n})();var zw=(function(n){return n[n.Decimal=0]="Decimal",n[n.Percent=1]="Percent",n[n.Currency=2]="Currency",n[n.Scientific=3]="Scientific",n})(zw||{});var hs={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 ud(n,e){let t=Cv(n),i=t[hc.NumberSymbols][e];if(typeof i>"u"){if(e===hs.CurrencyDecimal)return t[hc.NumberSymbols][hs.Decimal];if(e===hs.CurrencyGroup)return t[hc.NumberSymbols][hs.Group]}return i}function KR(n,e){return Cv(n)[hc.NumberFormats][e]}var n8=/^(\d+)?\.((\d+)(-(\d+))?)?$/,qR=22,kv=".",Uf="0",i8=";",r8=",",Uw="#";function o8(n,e,t,i,r,o,s=!1){let a="",l=!1;if(!isFinite(n))a=ud(t,hs.Infinity);else{let c=l8(n);s&&(c=a8(c));let u=e.minInt,d=e.minFrac,h=e.maxFrac;if(o){let y=o.match(n8);if(y===null)throw new ze(2306,!1);let _=y[1],x=y[3],b=y[5];_!=null&&(u=Bw(_)),x!=null&&(d=Bw(x)),b!=null?h=Bw(b):x!=null&&d>h&&(h=d)}c8(c,d,h);let f=c.digits,p=c.integerLen,v=c.exponent,g=[];for(l=f.every(y=>!y);p<u;p++)f.unshift(0);for(;p<0;p++)f.unshift(0);p>0?g=f.splice(p,f.length):(g=f,f=[0]);let m=[];for(f.length>=e.lgSize&&m.unshift(f.splice(-e.lgSize,f.length).join(""));f.length>e.gSize;)m.unshift(f.splice(-e.gSize,f.length).join(""));f.length&&m.unshift(f.join("")),a=m.join(ud(t,i)),g.length&&(a+=ud(t,r)+g.join("")),v&&(a+=ud(t,hs.Exponential)+"+"+v)}return n<0&&!l?a=e.negPre+a+e.negSuf:a=e.posPre+a+e.posSuf,a}function JR(n,e,t){let i=KR(e,zw.Decimal),r=s8(i,ud(e,hs.MinusSign));return o8(n,r,e,hs.Group,hs.Decimal,t)}function s8(n,e="-"){let t={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=n.split(i8),r=i[0],o=i[1],s=r.indexOf(kv)!==-1?r.split(kv):[r.substring(0,r.lastIndexOf(Uf)+1),r.substring(r.lastIndexOf(Uf)+1)],a=s[0],l=s[1]||"";t.posPre=a.substring(0,a.indexOf(Uw));for(let u=0;u<l.length;u++){let d=l.charAt(u);d===Uf?t.minFrac=t.maxFrac=u+1:d===Uw?t.maxFrac=u+1:t.posSuf+=d}let c=a.split(r8);if(t.gSize=c[1]?c[1].length:0,t.lgSize=c[2]||c[1]?(c[2]||c[1]).length:0,o){let u=r.length-t.posPre.length-t.posSuf.length,d=o.indexOf(Uw);t.negPre=o.substring(0,d).replace(/'/g,""),t.negSuf=o.slice(d+u).replace(/'/g,"")}else t.negPre=e+t.posPre,t.negSuf=t.posSuf;return t}function a8(n){if(n.digits[0]===0)return n;let e=n.digits.length-n.integerLen;return n.exponent?n.exponent+=2:(e===0?n.digits.push(0,0):e===1&&n.digits.push(0),n.integerLen+=2),n}function l8(n){let e=Math.abs(n)+"",t=0,i,r,o,s,a;for((r=e.indexOf(kv))>-1&&(e=e.replace(kv,"")),(o=e.search(/e/i))>0?(r<0&&(r=o),r+=+e.slice(o+1),e=e.substring(0,o)):r<0&&(r=e.length),o=0;e.charAt(o)===Uf;o++);if(o===(a=e.length))i=[0],r=1;else{for(a--;e.charAt(a)===Uf;)a--;for(r-=o,i=[],s=0;o<=a;o++,s++)i[s]=Number(e.charAt(o))}return r>qR&&(i=i.splice(0,qR-1),t=r-1,r=1),{digits:i,exponent:t,integerLen:r}}function c8(n,e,t){if(e>t)throw new ze(2307,!1);let i=n.digits,r=i.length-n.integerLen,o=Math.min(Math.max(e,r),t),s=o+n.integerLen,a=i[s];if(s>0){i.splice(Math.max(n.integerLen,s));for(let d=s;d<i.length;d++)i[d]=0}else{r=Math.max(0,r),n.integerLen=1,i.length=Math.max(1,s=o+1),i[0]=0;for(let d=1;d<s;d++)i[d]=0}if(a>=5)if(s-1<0){for(let d=0;d>s;d--)i.unshift(0),n.integerLen++;i.unshift(1),n.integerLen++}else i[s-1]++;for(;r<Math.max(0,o);r++)i.push(0);let l=o!==0,c=e+n.integerLen,u=i.reduceRight(function(d,h,f,p){return h=h+d,p[f]=h<10?h:h-10,l&&(p[f]===0&&f>=c?p.pop():l=!1),h>=10?1:0},0);u&&(i.unshift(u),n.integerLen++)}function Bw(n){let e=parseInt(n);if(isNaN(e))throw new ze(2305,!1);return e}var Vw=/\s+/,ZR=[],Hw=(()=>{class n{_ngEl;_renderer;initialClasses=ZR;rawClass;stateMap=new Map;constructor(t,i){this._ngEl=t,this._renderer=i}set klass(t){this.initialClasses=t!=null?t.trim().split(Vw):ZR}set ngClass(t){this.rawClass=typeof t=="string"?t.trim().split(Vw):t}ngDoCheck(){for(let i of this.initialClasses)this._updateState(i,!0);let t=this.rawClass;if(Array.isArray(t)||t instanceof Set)for(let i of t)this._updateState(i,!0);else if(t!=null)for(let i of Object.keys(t))this._updateState(i,!!t[i]);this._applyStateDiff()}_updateState(t,i){let r=this.stateMap.get(t);r!==void 0?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(t,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(let t of this.stateMap){let i=t[0],r=t[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(t,i){t=t.trim(),t.length>0&&t.split(Vw).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}static \u0275fac=function(i){return new(i||n)(Bt($r),Bt(La))};static \u0275dir=kn({type:n,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return n})();var Gw=(()=>{class n{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=Z(bi);constructor(t){this._viewContainerRef=t}ngOnChanges(t){if(this._shouldRecreateView(t)){let i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let r=this._createContextForwardProxy();this._viewRef=i.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector==="outlet"?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,i,r)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,i,r):!1,get:(t,i,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,i,r)}})}static \u0275fac=function(i){return new(i||n)(Bt(rd))};static \u0275dir=kn({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[Ju]})}return n})();function QR(n,e){return new ze(2100,!1)}var gc=(()=>{class n{_locale;constructor(t){this._locale=t}transform(t,i,r){if(!u8(t))return null;r||=this._locale;try{let o=d8(t);return JR(o,r,i)}catch(o){throw QR(n,o.message)}}static \u0275fac=function(i){return new(i||n)(Bt(Ff,16))};static \u0275pipe=xv({name:"number",type:n,pure:!0})}return n})();function u8(n){return!(n==null||n===""||n!==n)}function d8(n){if(typeof n=="string"&&!isNaN(Number(n)-parseFloat(n)))return Number(n);if(typeof n!="number")throw new ze(2309,!1);return n}var jw=(()=>{class n{transform(t,i,r){if(t==null)return null;if(!(typeof t=="string"||Array.isArray(t)))throw QR(n,t);return t.slice(i,r)}static \u0275fac=function(i){return new(i||n)};static \u0275pipe=xv({name:"slice",type:n,pure:!1})}return n})();var ln=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Ys({type:n});static \u0275inj=Zo({})}return n})();function Bf(n,e){e=encodeURIComponent(e);for(let t of n.split(";")){let i=t.indexOf("="),[r,o]=i==-1?[t,""]:[t.slice(0,i),t.slice(i+1)];if(r.trim()===e)return decodeURIComponent(o)}return null}var vc=class{};var e2="browser";var Vf=class{_doc;constructor(e){this._doc=e}manager},Uv=(()=>{class n extends Vf{constructor(t){super(t)}supports(t){return!0}addEventListener(t,i,r,o){return t.addEventListener(i,r,o),()=>this.removeEventListener(t,i,r,o)}removeEventListener(t,i,r,o){return t.removeEventListener(i,r,o)}static \u0275fac=function(i){return new(i||n)(We(wn))};static \u0275prov=ge({token:n,factory:n.\u0275fac})}return n})(),zv=new Ve(""),Yw=(()=>{class n{_zone;_plugins;_eventNameToPlugin=new Map;constructor(t,i){this._zone=i,t.forEach(s=>{s.manager=this});let r=t.filter(s=>!(s instanceof Uv));this._plugins=r.slice().reverse();let o=t.find(s=>s instanceof Uv);o&&this._plugins.push(o)}addEventListener(t,i,r,o){return this._findPluginFor(i).addEventListener(t,i,r,o)}getZone(){return this._zone}_findPluginFor(t){let i=this._eventNameToPlugin.get(t);if(i)return i;if(i=this._plugins.find(o=>o.supports(t)),!i)throw new ze(5101,!1);return this._eventNameToPlugin.set(t,i),i}static \u0275fac=function(i){return new(i||n)(We(zv),We(Yi))};static \u0275prov=ge({token:n,factory:n.\u0275fac})}return n})(),Ww="ng-app-id";function t2(n){for(let e of n)e.remove()}function n2(n,e){let t=e.createElement("style");return t.textContent=n,t}function f8(n,e,t,i){let r=n.head?.querySelectorAll(`style[${Ww}="${e}"],link[${Ww}="${e}"]`);if(r)for(let o of r)o.removeAttribute(Ww),o instanceof HTMLLinkElement?i.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&t.set(o.textContent,{usage:0,elements:[o]})}function Xw(n,e){let t=e.createElement("link");return t.setAttribute("rel","stylesheet"),t.setAttribute("href",n),t}var qw=(()=>{class n{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(t,i,r,o={}){this.doc=t,this.appId=i,this.nonce=r,f8(t,i,this.inline,this.external),this.hosts.add(t.head)}addStyles(t,i){for(let r of t)this.addUsage(r,this.inline,n2);i?.forEach(r=>this.addUsage(r,this.external,Xw))}removeStyles(t,i){for(let r of t)this.removeUsage(r,this.inline);i?.forEach(r=>this.removeUsage(r,this.external))}addUsage(t,i,r){let o=i.get(t);o?o.usage++:i.set(t,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,r(t,this.doc)))})}removeUsage(t,i){let r=i.get(t);r&&(r.usage--,r.usage<=0&&(t2(r.elements),i.delete(t)))}ngOnDestroy(){for(let[,{elements:t}]of[...this.inline,...this.external])t2(t);this.hosts.clear()}addHost(t){this.hosts.add(t);for(let[i,{elements:r}]of this.inline)r.push(this.addElement(t,n2(i,this.doc)));for(let[i,{elements:r}]of this.external)r.push(this.addElement(t,Xw(i,this.doc)))}removeHost(t){this.hosts.delete(t)}addElement(t,i){return this.nonce&&i.setAttribute("nonce",this.nonce),t.appendChild(i)}static \u0275fac=function(i){return new(i||n)(We(wn),We(ss),We(Jg,8),We(Sf))};static \u0275prov=ge({token:n,factory:n.\u0275fac})}return n})(),$w={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"},Zw=/%COMP%/g;var r2="%COMP%",p8=`_nghost-${r2}`,m8=`_ngcontent-${r2}`,g8=!0,v8=new Ve("",{factory:()=>g8});function y8(n){return m8.replace(Zw,n)}function _8(n){return p8.replace(Zw,n)}function o2(n,e){return e.map(t=>t.replace(Zw,n))}var Kw=(()=>{class n{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(t,i,r,o,s,a,l=null,c=null){this.eventManager=t,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestroy=o,this.doc=s,this.ngZone=a,this.nonce=l,this.tracingService=c,this.defaultRenderer=new zf(t,s,a,this.tracingService)}createRenderer(t,i){if(!t||!i)return this.defaultRenderer;let r=this.getOrCreateRenderer(t,i);return r instanceof Vv?r.applyToHost(t):r instanceof Hf&&r.applyStyles(),r}getOrCreateRenderer(t,i){let r=this.rendererByCompId,o=r.get(i.id);if(!o){let s=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,u=this.removeStylesOnCompDestroy,d=this.tracingService;switch(i.encapsulation){case mo.Emulated:o=new Vv(l,c,i,this.appId,u,s,a,d);break;case mo.ShadowDom:return new Bv(l,t,i,s,a,this.nonce,d,c);case mo.ExperimentalIsolatedShadowDom:return new Bv(l,t,i,s,a,this.nonce,d);default:o=new Hf(l,c,i,u,s,a,d);break}r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(t){this.rendererByCompId.delete(t)}static \u0275fac=function(i){return new(i||n)(We(Yw),We(qw),We(ss),We(v8),We(wn),We(Yi),We(Jg),We(Xs,8))};static \u0275prov=ge({token:n,factory:n.\u0275fac})}return n})(),zf=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,i,r){this.eventManager=e,this.doc=t,this.ngZone=i,this.tracingService=r}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS($w[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(i2(e)?e.content:e).appendChild(t)}insertBefore(e,t,i){e&&(i2(e)?e.content:e).insertBefore(t,i)}removeChild(e,t){t.remove()}selectRootElement(e,t){let i=typeof e=="string"?this.doc.querySelector(e):e;if(!i)throw new ze(-5104,!1);return t||(i.textContent=""),i}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,i,r){if(r){t=r+":"+t;let o=$w[r];o?e.setAttributeNS(o,t,i):e.setAttribute(t,i)}else e.setAttribute(t,i)}removeAttribute(e,t,i){if(i){let r=$w[i];r?e.removeAttributeNS(r,t):e.removeAttribute(`${i}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,i,r){r&(os.DashCase|os.Important)?e.style.setProperty(t,i,r&os.Important?"important":""):e.style[t]=i}removeStyle(e,t,i){i&os.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,i){e!=null&&(e[t]=i)}setValue(e,t){e.nodeValue=t}listen(e,t,i,r){if(typeof e=="string"&&(e=Yr().getGlobalEventTarget(this.doc,e),!e))throw new ze(5102,!1);let o=this.decoratePreventDefault(i);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(e,t,o)),this.eventManager.addEventListener(e,t,o,r)}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;e(t)===!1&&t.preventDefault()}}};function i2(n){return n.tagName==="TEMPLATE"&&n.content!==void 0}var Bv=class extends zf{hostEl;sharedStylesHost;shadowRoot;constructor(e,t,i,r,o,s,a,l){super(e,r,o,a),this.hostEl=t,this.sharedStylesHost=l,this.shadowRoot=t.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let c=i.styles;c=o2(i.id,c);for(let d of c){let h=document.createElement("style");s&&h.setAttribute("nonce",s),h.textContent=d,this.shadowRoot.appendChild(h)}let u=i.getExternalStyles?.();if(u)for(let d of u){let h=Xw(d,r);s&&h.setAttribute("nonce",s),this.shadowRoot.appendChild(h)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,i){return super.insertBefore(this.nodeOrShadowRoot(e),t,i)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},Hf=class extends zf{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,i,r,o,s,a,l){super(e,o,s,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let c=i.styles;this.styles=l?o2(l,c):c,this.styleUrls=i.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Fa.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Vv=class extends Hf{contentAttr;hostAttr;constructor(e,t,i,r,o,s,a,l){let c=r+"-"+i.id;super(e,t,i,o,s,a,l,c),this.contentAttr=y8(c),this.hostAttr=_8(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let i=super.createElement(e,t);return super.setAttribute(i,this.contentAttr,""),i}};var Hv=class n extends Lf{supportsDOMEvents=!0;static makeCurrent(){Lw(new n)}onAndCancel(e,t,i,r){return e.addEventListener(t,i,r),()=>{e.removeEventListener(t,i,r)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.remove()}createElement(e,t){return t=t||this.getDefaultDocument(),t.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return t==="window"?window:t==="document"?e:t==="body"?e.body:null}getBaseHref(e){let t=x8();return t==null?null:b8(t)}resetBaseElement(){Gf=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return Bf(document.cookie,e)}},Gf=null;function x8(){return Gf=Gf||document.head.querySelector("base"),Gf?Gf.getAttribute("href"):null}function b8(n){return new URL(n,document.baseURI).pathname}var S8=(()=>{class n{build(){return new XMLHttpRequest}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ge({token:n,factory:n.\u0275fac})}return n})(),s2=["alt","control","meta","shift"],C8={"\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"},w8={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey},a2=(()=>{class n extends Vf{constructor(t){super(t)}supports(t){return n.parseEventName(t)!=null}addEventListener(t,i,r,o){let s=n.parseEventName(i),a=n.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Yr().onAndCancel(t,s.domEventName,a,o))}static parseEventName(t){let i=t.toLowerCase().split("."),r=i.shift();if(i.length===0||!(r==="keydown"||r==="keyup"))return null;let o=n._normalizeKey(i.pop()),s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),s2.forEach(c=>{let u=i.indexOf(c);u>-1&&(i.splice(u,1),s+=c+".")}),s+=o,i.length!=0||o.length===0)return null;let l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(t,i){let r=C8[t.key]||t.key,o="";return i.indexOf("code.")>-1&&(r=t.code,o="code."),r==null||!r?!1:(r=r.toLowerCase(),r===" "?r="space":r==="."&&(r="dot"),s2.forEach(s=>{if(s!==r){let a=w8[s];a(t)&&(o+=s+".")}}),o+=r,o===i)}static eventCallback(t,i,r){return o=>{n.matchEventFullKeyCode(o,t)&&r.runGuarded(()=>i(o))}}static _normalizeKey(t){return t==="esc"?"escape":t}static \u0275fac=function(i){return new(i||n)(We(wn))};static \u0275prov=ge({token:n,factory:n.\u0275fac})}return n})();async function Jw(n,e){return WR(E8(n,e))}function E8(n,e){return{platformRef:e?.platformRef,appProviders:[...I8,...n?.providers??[]],platformProviders:A8}}function M8(){Hv.makeCurrent()}function T8(){return new Hr}function D8(){return MC(document),document}var A8=[{provide:Sf,useValue:e2},{provide:Kg,useValue:M8,multi:!0},{provide:wn,useFactory:D8}];var I8=[{provide:tf,useValue:"root"},{provide:Hr,useFactory:T8},{provide:zv,useClass:Uv,multi:!0},{provide:zv,useClass:a2,multi:!0},Kw,qw,Yw,{provide:uc,useExisting:Kw},{provide:vc,useClass:S8},[]];var Zr=class n{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(e){e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(`
|
|
5
|
-
`).forEach(t=>{let i=t.indexOf(":");if(i>0){let r=t.slice(0,i),o=t.slice(i+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,i)=>{this.addHeaderEntry(i,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,i])=>{this.setHeaderEntries(t,i)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof n?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){let t=new n;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof n?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let i=e.value;if(typeof i=="string"&&(i=[i]),i.length===0)return;this.maybeSetNormalizedName(e.name,t);let r=(e.op==="a"?this.headers.get(t):void 0)||[];r.push(...i),this.headers.set(t,r);break;case"d":let o=e.value;if(!o)this.headers.delete(t),this.normalizedNames.delete(t);else{let s=this.headers.get(t);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,s)}break}}addHeaderEntry(e,t){let i=e.toLowerCase();this.maybeSetNormalizedName(e,i),this.headers.has(i)?this.headers.get(i).push(t):this.headers.set(i,[t])}setHeaderEntries(e,t){let i=(Array.isArray(t)?t:[t]).map(o=>o.toString()),r=e.toLowerCase();this.headers.set(r,i),this.maybeSetNormalizedName(e,r)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var jv=class{map=new Map;set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}},Wv=class{encodeKey(e){return l2(e)}encodeValue(e){return l2(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function P8(n,e){let t=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=o==-1?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,o)),e.decodeValue(r.slice(o+1))],l=t.get(s)||[];l.push(a),t.set(s,l)}),t}var O8=/%(\d[a-f0-9])/gi,R8={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function l2(n){return encodeURIComponent(n).replace(O8,(e,t)=>R8[t]??e)}function Gv(n){return`${n}`}var qr=class n{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new Wv,e.fromString){if(e.fromObject)throw new ze(2805,!1);this.map=P8(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let i=e.fromObject[t],r=Array.isArray(i)?i.map(Gv):[Gv(i)];this.map.set(t,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(i=>{let r=e[i];Array.isArray(r)?r.forEach(o=>{t.push({param:i,value:o,op:"a"})}):t.push({param:i,value:r,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(i=>t+"="+this.encoder.encodeValue(i)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new n({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=(e.op==="a"?this.map.get(e.param):void 0)||[];t.push(Gv(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let i=this.map.get(e.param)||[],r=i.indexOf(Gv(e.value));r!==-1&&i.splice(r,1),i.length>0?this.map.set(e.param,i):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};function F8(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function c2(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function u2(n){return typeof Blob<"u"&&n instanceof Blob}function d2(n){return typeof FormData<"u"&&n instanceof FormData}function N8(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}var h2="Content-Type",f2="Accept",p2="text/plain",m2="application/json",k8=`${m2}, ${p2}, */*`,dd=class n{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(e,t,i,r){this.url=t,this.method=e.toUpperCase();let o;if(F8(this.method)||r?(this.body=i!==void 0?i:null,o=r):o=i,o){if(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,this.keepalive=!!o.keepalive,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),o.priority&&(this.priority=o.priority),o.cache&&(this.cache=o.cache),o.credentials&&(this.credentials=o.credentials),typeof o.timeout=="number"){if(o.timeout<1||!Number.isInteger(o.timeout))throw new ze(2822,"");this.timeout=o.timeout}o.mode&&(this.mode=o.mode),o.redirect&&(this.redirect=o.redirect),o.integrity&&(this.integrity=o.integrity),o.referrer&&(this.referrer=o.referrer),o.referrerPolicy&&(this.referrerPolicy=o.referrerPolicy),this.transferCache=o.transferCache}if(this.headers??=new Zr,this.context??=new jv,!this.params)this.params=new qr,this.urlWithParams=t;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=t;else{let a=t.indexOf("?"),l=a===-1?"?":a<t.length-1?"&":"";this.urlWithParams=t+l+s}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||c2(this.body)||u2(this.body)||d2(this.body)||N8(this.body)?this.body:this.body instanceof qr?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||d2(this.body)?null:u2(this.body)?this.body.type||null:c2(this.body)?null:typeof this.body=="string"?p2:this.body instanceof qr?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?m2:null}clone(e={}){let t=e.method||this.method,i=e.url||this.url,r=e.responseType||this.responseType,o=e.keepalive??this.keepalive,s=e.priority||this.priority,a=e.cache||this.cache,l=e.mode||this.mode,c=e.redirect||this.redirect,u=e.credentials||this.credentials,d=e.referrer||this.referrer,h=e.integrity||this.integrity,f=e.referrerPolicy||this.referrerPolicy,p=e.transferCache??this.transferCache,v=e.timeout??this.timeout,g=e.body!==void 0?e.body:this.body,m=e.withCredentials??this.withCredentials,y=e.reportProgress??this.reportProgress,_=e.headers||this.headers,x=e.params||this.params,b=e.context??this.context;return e.setHeaders!==void 0&&(_=Object.keys(e.setHeaders).reduce((w,E)=>w.set(E,e.setHeaders[E]),_)),e.setParams&&(x=Object.keys(e.setParams).reduce((w,E)=>w.set(E,e.setParams[E]),x)),new n(t,i,g,{params:x,headers:_,context:b,reportProgress:y,responseType:r,withCredentials:m,transferCache:p,keepalive:o,cache:a,priority:s,timeout:v,mode:l,redirect:c,credentials:u,referrer:d,integrity:h,referrerPolicy:f})}},yc=(function(n){return n[n.Sent=0]="Sent",n[n.UploadProgress=1]="UploadProgress",n[n.ResponseHeader=2]="ResponseHeader",n[n.DownloadProgress=3]="DownloadProgress",n[n.Response=4]="Response",n[n.User=5]="User",n})(yc||{}),hd=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(e,t=200,i="OK"){this.headers=e.headers||new Zr,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||i,this.url=e.url||null,this.redirected=e.redirected,this.responseType=e.responseType,this.ok=this.status>=200&&this.status<300}},$v=class n extends hd{constructor(e={}){super(e)}type=yc.ResponseHeader;clone(e={}){return new n({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},fd=class n extends hd{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=yc.Response;clone(e={}){return new n({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0,redirected:e.redirected??this.redirected,responseType:e.responseType??this.responseType})}},za=class extends hd{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},L8=200,U8=204;var B8=new Ve("");var V8=/^\)\]\}',?\n/;var eE=(()=>{class n{xhrFactory;tracingService=Z(Xs,{optional:!0});constructor(t){this.xhrFactory=t}maybePropagateTrace(t){return this.tracingService?.propagate?this.tracingService.propagate(t):t}handle(t){if(t.method==="JSONP")throw new ze(-2800,!1);let i=this.xhrFactory;return $o(null).pipe(Eb(()=>new bn(o=>{let s=i.build();if(s.open(t.method,t.urlWithParams),t.withCredentials&&(s.withCredentials=!0),t.headers.forEach((g,m)=>s.setRequestHeader(g,m.join(","))),t.headers.has(f2)||s.setRequestHeader(f2,k8),!t.headers.has(h2)){let g=t.detectContentTypeHeader();g!==null&&s.setRequestHeader(h2,g)}if(t.timeout&&(s.timeout=t.timeout),t.responseType){let g=t.responseType.toLowerCase();s.responseType=g!=="json"?g:"text"}let a=t.serializeBody(),l=null,c=()=>{if(l!==null)return l;let g=s.statusText||"OK",m=new Zr(s.getAllResponseHeaders()),y=s.responseURL||t.url;return l=new $v({headers:m,status:s.status,statusText:g,url:y}),l},u=this.maybePropagateTrace(()=>{let{headers:g,status:m,statusText:y,url:_}=c(),x=null;m!==U8&&(x=typeof s.response>"u"?s.responseText:s.response),m===0&&(m=x?L8:0);let b=m>=200&&m<300;if(t.responseType==="json"&&typeof x=="string"){let w=x;x=x.replace(V8,"");try{x=x!==""?JSON.parse(x):null}catch(E){x=w,b&&(b=!1,x={error:E,text:x})}}b?(o.next(new fd({body:x,headers:g,status:m,statusText:y,url:_||void 0})),o.complete()):o.error(new za({error:x,headers:g,status:m,statusText:y,url:_||void 0}))}),d=this.maybePropagateTrace(g=>{let{url:m}=c(),y=new za({error:g,status:s.status||0,statusText:s.statusText||"Unknown Error",url:m||void 0});o.error(y)}),h=d;t.timeout&&(h=this.maybePropagateTrace(g=>{let{url:m}=c(),y=new za({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:m||void 0});o.error(y)}));let f=!1,p=this.maybePropagateTrace(g=>{f||(o.next(c()),f=!0);let m={type:yc.DownloadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),t.responseType==="text"&&s.responseText&&(m.partialText=s.responseText),o.next(m)}),v=this.maybePropagateTrace(g=>{let m={type:yc.UploadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),o.next(m)});return s.addEventListener("load",u),s.addEventListener("error",d),s.addEventListener("timeout",h),s.addEventListener("abort",d),t.reportProgress&&(s.addEventListener("progress",p),a!==null&&s.upload&&s.upload.addEventListener("progress",v)),s.send(a),o.next({type:yc.Sent}),()=>{s.removeEventListener("error",d),s.removeEventListener("abort",d),s.removeEventListener("load",u),s.removeEventListener("timeout",h),t.reportProgress&&(s.removeEventListener("progress",p),a!==null&&s.upload&&s.upload.removeEventListener("progress",v)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(i){return new(i||n)(We(vc))};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function z8(n,e){return e(n)}function H8(n,e,t){return(i,r)=>Lu(t,()=>e(i,o=>n(o,r)))}var tE=new Ve("",{factory:()=>[]}),nE=new Ve(""),g2=new Ve("",{factory:()=>!0});var iE=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=ge({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=We(eE),r},providedIn:"root"})}return n})();var Xv=(()=>{class n{backend;injector;chain=null;pendingTasks=Z(Hu);contributeToStability=Z(g2);constructor(t,i){this.backend=t,this.injector=i}handle(t){if(this.chain===null){let i=Array.from(new Set([...this.injector.get(tE),...this.injector.get(nE,[])]));this.chain=i.reduceRight((r,o)=>H8(r,o,this.injector),z8)}if(this.contributeToStability){let i=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(Wh(i))}else return this.chain(t,i=>this.backend.handle(i))}static \u0275fac=function(i){return new(i||n)(We(iE),We(xi))};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),rE=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=ge({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=We(Xv),r},providedIn:"root"})}return n})();function Qw(n,e){return{body:e,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials,credentials:n.credentials,transferCache:n.transferCache,timeout:n.timeout,keepalive:n.keepalive,priority:n.priority,cache:n.cache,mode:n.mode,redirect:n.redirect,integrity:n.integrity,referrer:n.referrer,referrerPolicy:n.referrerPolicy}}var Yv=(()=>{class n{handler;constructor(t){this.handler=t}request(t,i,r={}){let o;if(t instanceof dd)o=t;else{let l;r.headers instanceof Zr?l=r.headers:l=new Zr(r.headers);let c;r.params&&(r.params instanceof qr?c=r.params:c=new qr({fromObject:r.params})),o=new dd(t,i,r.body!==void 0?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache,keepalive:r.keepalive,priority:r.priority,cache:r.cache,mode:r.mode,redirect:r.redirect,credentials:r.credentials,referrer:r.referrer,referrerPolicy:r.referrerPolicy,integrity:r.integrity,timeout:r.timeout})}let s=$o(o).pipe(wb(l=>this.handler.handle(l)));if(t instanceof dd||r.observe==="events")return s;let a=s.pipe(Cb(l=>l instanceof fd));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(Xi(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new ze(2806,!1);return l.body}));case"blob":return a.pipe(Xi(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new ze(2807,!1);return l.body}));case"text":return a.pipe(Xi(l=>{if(l.body!==null&&typeof l.body!="string")throw new ze(2808,!1);return l.body}));default:return a.pipe(Xi(l=>l.body))}case"response":return a;default:throw new ze(2809,!1)}}delete(t,i={}){return this.request("DELETE",t,i)}get(t,i={}){return this.request("GET",t,i)}head(t,i={}){return this.request("HEAD",t,i)}jsonp(t,i){return this.request("JSONP",t,{params:new qr().append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,i={}){return this.request("OPTIONS",t,i)}patch(t,i,r={}){return this.request("PATCH",t,Qw(r,i))}post(t,i,r={}){return this.request("POST",t,Qw(r,i))}put(t,i,r={}){return this.request("PUT",t,Qw(r,i))}static \u0275fac=function(i){return new(i||n)(We(rE))};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var G8=new Ve("",{factory:()=>!0}),j8="XSRF-TOKEN",W8=new Ve("",{factory:()=>j8}),$8="X-XSRF-TOKEN",X8=new Ve("",{factory:()=>$8}),Y8=(()=>{class n{cookieName=Z(W8);doc=Z(wn);lastCookieString="";lastToken=null;parseCount=0;getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Bf(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),v2=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=ge({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=We(Y8),r},providedIn:"root"})}return n})();function q8(n,e){if(!Z(G8)||n.method==="GET"||n.method==="HEAD")return e(n);try{let r=Z(Nv).href,{origin:o}=new URL(r),{origin:s}=new URL(n.url,o);if(o!==s)return e(n)}catch{return e(n)}let t=Z(v2).getToken(),i=Z(X8);return t!=null&&!n.headers.has(i)&&(n=n.clone({headers:n.headers.set(i,t)})),e(n)}var oE=(function(n){return n[n.Interceptors=0]="Interceptors",n[n.LegacyInterceptors=1]="LegacyInterceptors",n[n.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",n[n.NoXsrfProtection=3]="NoXsrfProtection",n[n.JsonpSupport=4]="JsonpSupport",n[n.RequestsMadeViaParent=5]="RequestsMadeViaParent",n[n.Fetch=6]="Fetch",n})(oE||{});function Z8(n,e){return{\u0275kind:n,\u0275providers:e}}function sE(...n){let e=[Yv,Xv,{provide:rE,useExisting:Xv},{provide:iE,useFactory:()=>Z(B8,{optional:!0})??Z(eE)},{provide:tE,useValue:q8,multi:!0}];for(let t of n)e.push(...t.\u0275providers);return Bs(e)}function aE(n){return Z8(oE.Interceptors,n.map(e=>({provide:tE,useValue:e,multi:!0})))}var K8=new Ve(""),J8="b",Q8="h",eW="s",tW="st",nW="u",iW="rt",lE=new Ve(""),rW=["GET","HEAD"];function oW(n,e){let f=Z(lE),{isCacheActive:t}=f,i=Zt(f,["isCacheActive"]),{transferCache:r,method:o}=n;if(!t||r===!1||o==="POST"&&!i.includePostRequests&&!r||o!=="POST"&&!rW.includes(o)||!i.includeRequestsWithAuthHeaders&&sW(n)||i.filter?.(n)===!1)return e(n);let s=Z(ed);if(Z(K8,{optional:!0}))throw new ze(2803,!1);let l=n.url,c=aW(n,l),u=s.get(c,null),d=i.includeHeaders;if(typeof r=="object"&&r.includeHeaders&&(d=r.includeHeaders),u){let{[J8]:p,[iW]:v,[Q8]:g,[eW]:m,[tW]:y,[nW]:_}=u,x=p;switch(v){case"arraybuffer":x=_2(p);break;case"blob":x=new Blob([_2(p)]);break}let b=new Zr(g);return $o(new fd({body:x,headers:b,status:m,statusText:y,url:_}))}return e(n)}function sW(n){return n.headers.has("authorization")||n.headers.has("proxy-authorization")}function y2(n){return[...n.keys()].sort().map(e=>`${e}=${n.getAll(e)}`).join("&")}function aW(n,e){let{params:t,method:i,responseType:r}=n,o=y2(t),s=n.serializeBody();s instanceof URLSearchParams?s=y2(s):typeof s!="string"&&(s="");let a=[i,r,e,s,o].join("|"),l=lW(a);return l}function lW(n){let e=0;for(let t of n)e=Math.imul(31,e)+t.charCodeAt(0)<<0;return e+=2147483648,e.toString()}function _2(n){let e=atob(n);return Uint8Array.from(e,i=>i.charCodeAt(0)).buffer}function x2(n){return[{provide:lE,useFactory:()=>(go("NgHttpTransferCache"),R({isCacheActive:!0},n))},{provide:nE,useValue:oW,multi:!0},{provide:ad,multi:!0,useFactory:()=>{let e=Z(_r),t=Z(lE);return()=>{e.whenStable().then(()=>{t.isCacheActive=!1})}}}]}var cE=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=ge({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=We(cW),r},providedIn:"root"})}return n})(),cW=(()=>{class n extends cE{_doc;constructor(t){super(),this._doc=t}sanitize(t,i){if(i==null)return null;switch(t){case ls.NONE:return i;case ls.HTML:return ka(i,"HTML")?as(i):zC(this._doc,String(i)).toString();case ls.STYLE:return ka(i,"Style")?as(i):i;case ls.SCRIPT:if(ka(i,"Script"))return as(i);throw new ze(5200,!1);case ls.URL:return ka(i,"URL")?as(i):Mf(String(i));case ls.RESOURCE_URL:if(ka(i,"ResourceURL"))return as(i);throw new ze(5201,!1);default:throw new ze(5202,!1)}}bypassSecurityTrustHtml(t){return kC(t)}bypassSecurityTrustStyle(t){return LC(t)}bypassSecurityTrustScript(t){return UC(t)}bypassSecurityTrustUrl(t){return BC(t)}bypassSecurityTrustResourceUrl(t){return VC(t)}static \u0275fac=function(i){return new(i||n)(We(wn))};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),qv=(function(n){return n[n.NoHttpTransferCache=0]="NoHttpTransferCache",n[n.HttpTransferCacheOptions=1]="HttpTransferCacheOptions",n[n.I18nSupport=2]="I18nSupport",n[n.EventReplay=3]="EventReplay",n[n.IncrementalHydration=4]="IncrementalHydration",n})(qv||{});function uW(n,e=[],t={}){return{\u0275kind:n,\u0275providers:e}}function b2(){return uW(qv.EventReplay,GR())}function S2(...n){let e=[],t=new Set;for(let{\u0275providers:r,\u0275kind:o}of n)t.add(o),r.length&&e.push(r);let i=t.has(qv.HttpTransferCacheOptions);return Bs([[],[],jR(),t.has(qv.NoHttpTransferCache)||i?[]:x2({}),e])}var pd=class n{loadingCount=k(0);isLoading=ke(()=>this.loadingCount()>0);show(){this.loadingCount.update(e=>e+1)}hide(){this.loadingCount.update(e=>Math.max(0,e-1))}reset(){this.loadingCount.set(0)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})};function Zv(n){let e=s=>Array.isArray(s)?s.filter(a=>typeof a=="string").join(", "):"";if(!n)return"Unhandled error";let t=n?.error,i=e(t?.errors);if(i)return i;let r=e(t?.message??t?.Messages);if(r)return r;if(Array.isArray(t)&&t.length>0)return e(t)||"Unhandled error";if(typeof t=="string"&&t.trim())return t;if(Array.isArray(n)&&n.length>0)return e(n)||"Unhandled error";let o=e(n?.messages);if(o)return o;if(typeof n?.messages=="string"&&n.messages.trim())return n.messages;if(typeof n?.message=="string"&&n.message.trim())return n.message;if(t?.errors&&typeof t.errors=="object"&&!Array.isArray(t.errors)){let s=[];for(let a in t.errors)Object.prototype.hasOwnProperty.call(t.errors,a)&&s.push(...t.errors[a]??[]);if(s.length)return s.join(", ")}return n?.status===401?"Unauthorized: Please verify your credentials and try again":"Unhandled error"}var Zs=class n{toastsSignal=k([]);toasts=ke(()=>this.toastsSignal());defaultTimeoutMs=4500;showSuccess(e,t="Success"){this.pushToast("success",t,e)}showInfo(e,t="Info"){this.pushToast("info",t,e)}showWarn(e,t="Warning"){this.pushToast("warning",t,e)}showError(e,t="Error"){this.pushToast("error",t,e)}showContrast(e,t="Note"){this.pushToast("info",t,e)}showSecondary(e,t="Secondary"){this.pushToast("info",t,e)}dismissToast(e){this.toastsSignal.update(t=>t.filter(i=>i.id!==e))}pushToast(e,t,i){let r={id:Date.now()+Math.floor(Math.random()*1e3),type:e,title:t,message:i,timeout:this.defaultTimeoutMs};this.toastsSignal.update(s=>[...s,r]),(e==="error"?console.error:e==="warning"?console.warn:console.info)(`[${t}] ${i}`),setTimeout(()=>{this.dismissToast(r.id)},r.timeout)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})};var jf=class n{constructor(e){this.toasterService=e}handleError(e){e instanceof za&&this.showError(e)}showError(e){return this.toasterService.showError(Zv(e)),Ea(()=>e)}static \u0275fac=function(t){return new(t||n)(We(Zs))};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})};var C2=(n,e)=>{let t=Z(jf),i=Z(pd),r=n.headers.has("skipHandleError"),o=n.headers.get("Loader")=="true";return o&&i.show(),(a=>a.pipe(Xl(l=>(r||t.handleError(l),r?$o(null):Ea(()=>l))),Wh(()=>{o&&i.hide()})))(e(n))};var w2=[C2];var E2={apiUrl:"https://localhost:8000/api/"};var Kv=new Ve("ENV"),Zve=new Ve("LOADER_DELAY");var M2={provide:Kv,useValue:E2};function T2(){return[CS(),S2(b2()),sE(aE(w2)),M2,pd]}var L2=(()=>{class n{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,i){this._renderer=t,this._elementRef=i}setProperty(t,i){this._renderer.setProperty(this._elementRef.nativeElement,t,i)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(i){return new(i||n)(Bt(La),Bt($r))};static \u0275dir=kn({type:n})}return n})(),Zf=(()=>{class n extends L2{static \u0275fac=(()=>{let t;return function(r){return(t||(t=Ws(n)))(r||n)}})();static \u0275dir=kn({type:n,features:[yr]})}return n})(),Ha=new Ve(""),hW={provide:Ha,useExisting:Pi(()=>mE),multi:!0},mE=(()=>{class n extends Zf{writeValue(t){this.setProperty("checked",t)}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Ws(n)))(r||n)}})();static \u0275dir=kn({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&oe("change",function(s){return r.onChange(s.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[Xr([hW]),yr]})}return n})(),fW={provide:Ha,useExisting:Pi(()=>vd),multi:!0};function pW(){let n=Yr()?Yr().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var mW=new Ve(""),vd=(()=>{class n extends L2{_compositionMode;_composing=!1;constructor(t,i,r){super(t,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!pW())}writeValue(t){let i=t??"";this.setProperty("value",i)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static \u0275fac=function(i){return new(i||n)(Bt(La),Bt($r),Bt(mW,8))};static \u0275dir=kn({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&oe("input",function(s){return r._handleInput(s.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(s){return r._compositionEnd(s.target.value)})},standalone:!1,features:[Xr([fW]),yr]})}return n})();var gE=new Ve(""),gW=new Ve("");function vW(n){return e=>{if(e.value==null||n==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t<n?{min:{min:n,actual:e.value}}:null}}function yW(n){return e=>{if(e.value==null||n==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t>n?{max:{max:n,actual:e.value}}:null}}function D2(n){return null}function U2(n){return n!=null}function B2(n){return sd(n)?jh(n):n}function V2(n){let e={};return n.forEach(t=>{e=t!=null?R(R({},e),t):e}),Object.keys(e).length===0?null:e}function z2(n,e){return e.map(t=>t(n))}function _W(n){return!n.validate}function H2(n){return n.map(e=>_W(e)?e:t=>e.validate(t))}function xW(n){if(!n)return null;let e=n.filter(U2);return e.length==0?null:function(t){return V2(z2(t,e))}}function G2(n){return n!=null?xW(H2(n)):null}function bW(n){if(!n)return null;let e=n.filter(U2);return e.length==0?null:function(t){let i=z2(t,e).map(B2);return Sb(i).pipe(Xi(V2))}}function j2(n){return n!=null?bW(H2(n)):null}function A2(n,e){return n===null?[e]:Array.isArray(n)?[...n,e]:[n,e]}function SW(n){return n._rawValidators}function CW(n){return n._rawAsyncValidators}function uE(n){return n?Array.isArray(n)?n:[n]:[]}function Qv(n,e){return Array.isArray(n)?n.includes(e):n===e}function I2(n,e){let t=uE(e);return uE(n).forEach(r=>{Qv(t,r)||t.push(r)}),t}function P2(n,e){return uE(e).filter(t=>!Qv(n,t))}var e0=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=G2(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=j2(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control?.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},dE=class extends e0{name;get formDirective(){return null}get path(){return null}},qf=class extends e0{_parent=null;name=null;valueAccessor=null},hE=class{_cd;constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var Ga=(()=>{class n extends hE{constructor(t){super(t)}static \u0275fac=function(i){return new(i||n)(Bt(qf,2))};static \u0275dir=kn({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&jt("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[yr]})}return n})();var Wf="VALID",Jv="INVALID",md="PENDING",$f="DISABLED",_c=class{},t0=class extends _c{value;source;constructor(e,t){super(),this.value=e,this.source=t}},Xf=class extends _c{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},Yf=class extends _c{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},gd=class extends _c{status;source;constructor(e,t){super(),this.status=e,this.source=t}};var fE=class extends _c{source;constructor(e){super(),this.source=e}};function wW(n){return(n0(n)?n.validators:n)||null}function EW(n){return Array.isArray(n)?G2(n):n||null}function MW(n,e){return(n0(e)?e.asyncValidators:n)||null}function TW(n){return Array.isArray(n)?j2(n):n||null}function n0(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}var pE=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return Ln(this.statusReactive)}set status(e){Ln(()=>this.statusReactive.set(e))}_status=ke(()=>this.statusReactive());statusReactive=k(void 0);get valid(){return this.status===Wf}get invalid(){return this.status===Jv}get pending(){return this.status==md}get disabled(){return this.status===$f}get enabled(){return this.status!==$f}errors;get pristine(){return Ln(this.pristineReactive)}set pristine(e){Ln(()=>this.pristineReactive.set(e))}_pristine=ke(()=>this.pristineReactive());pristineReactive=k(!0);get dirty(){return!this.pristine}get touched(){return Ln(this.touchedReactive)}set touched(e){Ln(()=>this.touchedReactive.set(e))}_touched=ke(()=>this.touchedReactive());touchedReactive=k(!1);get untouched(){return!this.touched}_events=new uo;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(I2(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(I2(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(P2(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(P2(e,this._rawAsyncValidators))}hasValidator(e){return Qv(this._rawValidators,e)}hasAsyncValidator(e){return Qv(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let i=e.sourceControl??this;e.onlySelf||this._parent?.markAsTouched(ue(R({},e),{sourceControl:i})),t&&e.emitEvent!==!1&&this._events.next(new Yf(!0,i))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(e))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:i})}),e.onlySelf||this._parent?._updateTouched(e,i),t&&e.emitEvent!==!1&&this._events.next(new Yf(!1,i))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let i=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty(ue(R({},e),{sourceControl:i})),t&&e.emitEvent!==!1&&this._events.next(new Xf(!1,i))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),e.onlySelf||this._parent?._updatePristine(e,i),t&&e.emitEvent!==!1&&this._events.next(new Xf(!0,i))}markAsPending(e={}){this.status=md;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new gd(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending(ue(R({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=$f,this.errors=null,this._forEachChild(r=>{r.disable(ue(R({},e),{onlySelf:!0}))}),this._updateValue();let i=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new t0(this.value,i)),this._events.next(new gd(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(ue(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=Wf,this._forEachChild(i=>{i.enable(ue(R({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(ue(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(e,t){e.onlySelf||(this._parent?.updateValueAndValidity(e),e.skipPristineCheck||this._parent?._updatePristine({},t),this._parent?._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Wf||this.status===md)&&this._runAsyncValidator(i,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new t0(this.value,t)),this._events.next(new gd(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity(ue(R({},e),{sourceControl:t}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?$f:Wf}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=md,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let i=B2(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(".")),t.length===0)?null:t.reduce((i,r)=>i&&i._find(r),this)}getError(e,t){let i=t?this.get(t):this;return i?.errors?i.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,i){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||i)&&this._events.next(new gd(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,i)}_initObservables(){this.valueChanges=new dr,this.statusChanges=new dr}_calculateStatus(){return this._allControlsDisabled()?$f:this.errors?Jv:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(md)?md:this._anyControlsHaveStatus(Jv)?Jv:Wf}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,t){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,e.onlySelf||this._parent?._updatePristine(e,t),r&&this._events.next(new Xf(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new Yf(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){n0(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=EW(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=TW(this._rawAsyncValidators)}};var W2=new Ve("",{factory:()=>vE}),vE="always";function DW(n,e){return[...e.path,n]}function AW(n,e,t=vE){PW(n,e),e.valueAccessor.writeValue(n.value),(n.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(n.disabled),OW(n,e),FW(n,e),RW(n,e),IW(n,e)}function O2(n,e){n.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function IW(n,e){if(e.valueAccessor.setDisabledState){let t=i=>{e.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(t),e._registerOnDestroy(()=>{n._unregisterOnDisabledChange(t)})}}function PW(n,e){let t=SW(n);e.validator!==null?n.setValidators(A2(t,e.validator)):typeof t=="function"&&n.setValidators([t]);let i=CW(n);e.asyncValidator!==null?n.setAsyncValidators(A2(i,e.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();O2(e._rawValidators,r),O2(e._rawAsyncValidators,r)}function OW(n,e){e.valueAccessor.registerOnChange(t=>{n._pendingValue=t,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&$2(n,e)})}function RW(n,e){e.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&$2(n,e),n.updateOn!=="submit"&&n.markAsTouched()})}function $2(n,e){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function FW(n,e){let t=(i,r)=>{e.valueAccessor.writeValue(i),r&&e.viewToModelUpdate(i)};n.registerOnChange(t),e._registerOnDestroy(()=>{n._unregisterOnChange(t)})}function NW(n,e){if(!n.hasOwnProperty("model"))return!1;let t=n.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function kW(n){return Object.getPrototypeOf(n.constructor)===Zf}function LW(n,e){if(!e)return null;Array.isArray(e);let t,i,r;return e.forEach(o=>{o.constructor===vd?t=o:kW(o)?i=o:r=o}),r||i||t||null}function R2(n,e){let t=n.indexOf(e);t>-1&&n.splice(t,1)}function F2(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var UW=class extends pE{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,i){super(wW(t),MW(i,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),n0(t)&&(t.nonNullable||t.initialValueIsDefault)&&(F2(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&t.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,t.emitViewToModelChange!==!1)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),t.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,t?.emitEvent!==!1&&this._events.next(new fE(this))}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){R2(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){R2(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){F2(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var BW={provide:qf,useExisting:Pi(()=>Ks)},N2=Promise.resolve(),Ks=(()=>{class n extends qf{_changeDetectorRef;callSetDisabledState;control=new UW;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new dr;constructor(t,i,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this._parent=t,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=LW(this,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let i=t.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),NW(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective?.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){AW(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(t){N2.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let i=t.isDisabled.currentValue,r=i!==0&&Fv(i);N2.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?DW(t,this._parent):[t]}static \u0275fac=function(i){return new(i||n)(Bt(dE,9),Bt(gE,10),Bt(gW,10),Bt(Ha,10),Bt(Rv,8),Bt(W2,8))};static \u0275dir=kn({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[Xr([BW]),yr,Ju]})}return n})();var VW={provide:Ha,useExisting:Pi(()=>Kf),multi:!0},Kf=(()=>{class n extends Zf{writeValue(t){let i=t??"";this.setProperty("value",i)}registerOnChange(t){this.onChange=i=>{t(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Ws(n)))(r||n)}})();static \u0275dir=kn({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&oe("input",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[Xr([VW]),yr]})}return n})();var zW={provide:Ha,useExisting:Pi(()=>i0),multi:!0};function X2(n,e){return n==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${n}: ${e}`.slice(0,50))}function HW(n){return n.split(":")[0]}var i0=(()=>{class n extends Zf{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=Z(_r).injector;destroyRef=Z(Zi);cdr=Z(Rv);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,sv({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(t){this.cdr.markForCheck(),this.value=t;let i=this._getOptionId(t),r=X2(i,t);this.setProperty("value",r)}registerOnChange(t){this.onChange=i=>{this.value=this._getOptionValue(i),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),t))return i;return null}_getOptionValue(t){let i=HW(t);return this._optionMap.has(i)?this._optionMap.get(i):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Ws(n)))(r||n)}})();static \u0275dir=kn({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&oe("change",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[Xr([zW]),yr]})}return n})(),Y2=(()=>{class n{_element;_renderer;_select;id;constructor(t,i,r){this._element=t,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(t){this._select!=null&&(this._select._optionMap.set(this.id,t),this._setElementValue(X2(this.id,t)),this._select._writeValueAfterRender())}set value(t){this._setElementValue(t),this._select?._writeValueAfterRender()}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select?._optionMap.delete(this.id),this._select?._writeValueAfterRender()}static \u0275fac=function(i){return new(i||n)(Bt($r),Bt(La),Bt(i0,9))};static \u0275dir=kn({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),GW={provide:Ha,useExisting:Pi(()=>q2),multi:!0};function k2(n,e){return n==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${n}: ${e}`.slice(0,50))}function jW(n){return n.split(":")[0]}var q2=(()=>{class n extends Zf{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let i;if(Array.isArray(t)){let r=t.map(o=>this._getOptionId(o));i=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(t){this.onChange=i=>{let r=[],o=i.selectedOptions;if(o!==void 0){let s=o;for(let a=0;a<s.length;a++){let l=s[a],c=this._getOptionValue(l.value);r.push(c)}}else{let s=i.options;for(let a=0;a<s.length;a++){let l=s[a];if(l.selected){let c=this._getOptionValue(l.value);r.push(c)}}}this.value=r,t(r)}}_registerOption(t){let i=(this._idCounter++).toString();return this._optionMap.set(i,t),i}_getOptionId(t){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,t))return i;return null}_getOptionValue(t){let i=jW(t);return this._optionMap.has(i)?this._optionMap.get(i)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Ws(n)))(r||n)}})();static \u0275dir=kn({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&oe("change",function(s){return r.onChange(s.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[Xr([GW]),yr]})}return n})(),Z2=(()=>{class n{_element;_renderer;_select;id;_value;constructor(t,i,r){this._element=t,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(k2(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(k2(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(i){return new(i||n)(Bt($r),Bt(La),Bt(q2,9))};static \u0275dir=kn({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();function K2(n){return typeof n=="number"?n:parseFloat(n)}var J2=(()=>{class n{_validator=D2;_onChange;_enabled;ngOnChanges(t){if(this.inputName in t){let i=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):D2,this._onChange?.()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=kn({type:n,features:[Ju]})}return n})(),WW={provide:gE,useExisting:Pi(()=>Jf),multi:!0},Jf=(()=>{class n extends J2{max;inputName="max";normalizeInput=t=>K2(t);createValidator=t=>yW(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=Ws(n)))(r||n)}})();static \u0275dir=kn({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&Xn("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[Xr([WW]),yr]})}return n})(),$W={provide:gE,useExisting:Pi(()=>Qf),multi:!0},Qf=(()=>{class n extends J2{min;inputName="min";normalizeInput=t=>K2(t);createValidator=t=>vW(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=Ws(n)))(r||n)}})();static \u0275dir=kn({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&Xn("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[Xr([$W]),yr]})}return n})();var XW=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Ys({type:n});static \u0275inj=Zo({})}return n})();var Kr=(()=>{class n{static withConfig(t){return{ngModule:n,providers:[{provide:W2,useValue:t.callSetDisabledState??vE}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Ys({type:n});static \u0275inj=Zo({imports:[XW]})}return n})();var ol={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},sl={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},TF=0,QE=1,DF=2;var wp=1,AF=2,Yd=3,So=0,Bi=1,ms=2,gs=0,Ec=1,eM=2,tM=3,nM=4,IF=5,Ka=100,PF=101,OF=102,RF=103,FF=104,NF=200,kF=201,LF=202,UF=203,D0=204,A0=205,BF=206,VF=207,zF=208,HF=209,GF=210,jF=211,WF=212,$F=213,XF=214,ey=0,ty=1,ny=2,Mc=3,iy=4,ry=5,oy=6,sy=7,ay=0,YF=1,qF=2,wo=0,iM=1,rM=2,oM=3,Nc=4,sM=5,aM=6,lM=7;var zE=300,al=301,kc=302,ly=303,cy=304,Ep=306,Fd=1e3,wi=1001,I0=1002,si=1003,ZF=1004;var Mp=1005;var Vn=1006,uy=1007;var to=1008;var nr=1009,cM=1010,uM=1011,qd=1012,dy=1013,Eo=1014,Mo=1015,vs=1016,hy=1017,fy=1018,Zd=1020,dM=35902,hM=35899,fM=1021,pM=1022,no=1023,fs=1026,ll=1027,mM=1028,py=1029,Lc=1030,my=1031;var gy=1033,Tp=33776,Dp=33777,Ap=33778,Ip=33779,vy=35840,yy=35841,_y=35842,xy=35843,by=36196,Sy=37492,Cy=37496,wy=37488,Ey=37489,My=37490,Ty=37491,Dy=37808,Ay=37809,Iy=37810,Py=37811,Oy=37812,Ry=37813,Fy=37814,Ny=37815,ky=37816,Ly=37817,Uy=37818,By=37819,Vy=37820,zy=37821,Hy=36492,Gy=36494,jy=36495,Wy=36283,$y=36284,Xy=36285,Yy=36286;var ap=2300,P0=2301,T0=2302,HE=2400,GE=2401,jE=2402;var KF=3200;var gM=0,JF=1,la="",pn="srgb",Tc="srgb-linear",lp="linear",Qt="srgb";var wc=7680;var WE=519,QF=512,eN=513,tN=514,qy=515,nN=516,iN=517,Zy=518,rN=519,$E=35044;var vM="300 es",bo=2e3,cp=2001;function yM(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}function YW(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function Nd(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function oN(){let n=Nd("canvas");return n.style.display="block",n}var Q2={},kd=null;function _M(...n){let e="THREE."+n.shift();kd?kd("log",e,...n):console.log(e,...n)}function at(...n){let e="THREE."+n.shift();kd?kd("warn",e,...n):console.warn(e,...n)}function ut(...n){let e="THREE."+n.shift();kd?kd("error",e,...n):console.error(e,...n)}function Ld(...n){let e=n.join(" ");e in Q2||(Q2[e]=!0,at(...n))}function sN(n,e,t){return new Promise(function(i,r){function o(){switch(n.clientWaitSync(e,n.SYNC_FLUSH_COMMANDS_BIT,0)){case n.WAIT_FAILED:r();break;case n.TIMEOUT_EXPIRED:setTimeout(o,t);break;default:i()}}setTimeout(o,t)})}var ps=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){let i=this._listeners;return i===void 0?!1:i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){let i=this._listeners;if(i===void 0)return;let r=i[e];if(r!==void 0){let o=r.indexOf(t);o!==-1&&r.splice(o,1)}}dispatchEvent(e){let t=this._listeners;if(t===void 0)return;let i=t[e.type];if(i!==void 0){e.target=this;let r=i.slice(0);for(let o=0,s=r.length;o<s;o++)r[o].call(this,e);e.target=null}}},Si=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],eF=1234567,op=Math.PI/180,Ud=180/Math.PI;function Kd(){let n=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(Si[n&255]+Si[n>>8&255]+Si[n>>16&255]+Si[n>>24&255]+"-"+Si[e&255]+Si[e>>8&255]+"-"+Si[e>>16&15|64]+Si[e>>24&255]+"-"+Si[t&63|128]+Si[t>>8&255]+"-"+Si[t>>16&255]+Si[t>>24&255]+Si[i&255]+Si[i>>8&255]+Si[i>>16&255]+Si[i>>24&255]).toLowerCase()}function Rt(n,e,t){return Math.max(e,Math.min(t,n))}function xM(n,e){return(n%e+e)%e}function qW(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function ZW(n,e,t){return n!==e?(t-n)/(e-n):0}function sp(n,e,t){return(1-t)*n+t*e}function KW(n,e,t,i){return sp(n,e,1-Math.exp(-t*i))}function JW(n,e=1){return e-Math.abs(xM(n,e*2)-e)}function QW(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function e6(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function t6(n,e){return n+Math.floor(Math.random()*(e-n+1))}function n6(n,e){return n+Math.random()*(e-n)}function i6(n){return n*(.5-Math.random())}function r6(n){n!==void 0&&(eF=n);let e=eF+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function o6(n){return n*op}function s6(n){return n*Ud}function a6(n){return(n&n-1)===0&&n!==0}function l6(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function c6(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function u6(n,e,t,i,r){let o=Math.cos,s=Math.sin,a=o(t/2),l=s(t/2),c=o((e+i)/2),u=s((e+i)/2),d=o((e-i)/2),h=s((e-i)/2),f=o((i-e)/2),p=s((i-e)/2);switch(r){case"XYX":n.set(a*u,l*d,l*h,a*c);break;case"YZY":n.set(l*h,a*u,l*d,a*c);break;case"ZXZ":n.set(l*d,l*h,a*u,a*c);break;case"XZX":n.set(a*u,l*p,l*f,a*c);break;case"YXY":n.set(l*f,a*u,l*p,a*c);break;case"ZYZ":n.set(l*p,l*f,a*u,a*c);break;default:at("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function Pd(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function Ni(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}var mn={DEG2RAD:op,RAD2DEG:Ud,generateUUID:Kd,clamp:Rt,euclideanModulo:xM,mapLinear:qW,inverseLerp:ZW,lerp:sp,damp:KW,pingpong:JW,smoothstep:QW,smootherstep:e6,randInt:t6,randFloat:n6,randFloatSpread:i6,seededRandom:r6,degToRad:o6,radToDeg:s6,isPowerOfTwo:a6,ceilPowerOfTwo:l6,floorPowerOfTwo:c6,setQuaternionFromProperEuler:u6,normalize:Ni,denormalize:Pd},dt=class n{constructor(e=0,t=0){n.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,i=this.y,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6],this.y=r[1]*t+r[4]*i+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Rt(this.x,e.x,t.x),this.y=Rt(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Rt(this.x,e,t),this.y=Rt(this.y,e,t),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Rt(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let i=this.dot(e)/t;return Math.acos(Rt(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let i=Math.cos(t),r=Math.sin(t),o=this.x-e.x,s=this.y-e.y;return this.x=o*i-s*r+e.x,this.y=o*r+s*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},eo=class{constructor(e=0,t=0,i=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=r}static slerpFlat(e,t,i,r,o,s,a){let l=i[r+0],c=i[r+1],u=i[r+2],d=i[r+3],h=o[s+0],f=o[s+1],p=o[s+2],v=o[s+3];if(a<=0){e[t+0]=l,e[t+1]=c,e[t+2]=u,e[t+3]=d;return}if(a>=1){e[t+0]=h,e[t+1]=f,e[t+2]=p,e[t+3]=v;return}if(d!==v||l!==h||c!==f||u!==p){let g=l*h+c*f+u*p+d*v;g<0&&(h=-h,f=-f,p=-p,v=-v,g=-g);let m=1-a;if(g<.9995){let y=Math.acos(g),_=Math.sin(y);m=Math.sin(m*y)/_,a=Math.sin(a*y)/_,l=l*m+h*a,c=c*m+f*a,u=u*m+p*a,d=d*m+v*a}else{l=l*m+h*a,c=c*m+f*a,u=u*m+p*a,d=d*m+v*a;let y=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=y,c*=y,u*=y,d*=y}}e[t]=l,e[t+1]=c,e[t+2]=u,e[t+3]=d}static multiplyQuaternionsFlat(e,t,i,r,o,s){let a=i[r],l=i[r+1],c=i[r+2],u=i[r+3],d=o[s],h=o[s+1],f=o[s+2],p=o[s+3];return e[t]=a*p+u*d+l*f-c*h,e[t+1]=l*p+u*h+c*d-a*f,e[t+2]=c*p+u*f+a*h-l*d,e[t+3]=u*p-a*d-l*h-c*f,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,r){return this._x=e,this._y=t,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let i=e._x,r=e._y,o=e._z,s=e._order,a=Math.cos,l=Math.sin,c=a(i/2),u=a(r/2),d=a(o/2),h=l(i/2),f=l(r/2),p=l(o/2);switch(s){case"XYZ":this._x=h*u*d+c*f*p,this._y=c*f*d-h*u*p,this._z=c*u*p+h*f*d,this._w=c*u*d-h*f*p;break;case"YXZ":this._x=h*u*d+c*f*p,this._y=c*f*d-h*u*p,this._z=c*u*p-h*f*d,this._w=c*u*d+h*f*p;break;case"ZXY":this._x=h*u*d-c*f*p,this._y=c*f*d+h*u*p,this._z=c*u*p+h*f*d,this._w=c*u*d-h*f*p;break;case"ZYX":this._x=h*u*d-c*f*p,this._y=c*f*d+h*u*p,this._z=c*u*p-h*f*d,this._w=c*u*d+h*f*p;break;case"YZX":this._x=h*u*d+c*f*p,this._y=c*f*d+h*u*p,this._z=c*u*p-h*f*d,this._w=c*u*d-h*f*p;break;case"XZY":this._x=h*u*d-c*f*p,this._y=c*f*d-h*u*p,this._z=c*u*p+h*f*d,this._w=c*u*d+h*f*p;break;default:at("Quaternion: .setFromEuler() encountered an unknown order: "+s)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let i=t/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,i=t[0],r=t[4],o=t[8],s=t[1],a=t[5],l=t[9],c=t[2],u=t[6],d=t[10],h=i+a+d;if(h>0){let f=.5/Math.sqrt(h+1);this._w=.25/f,this._x=(u-l)*f,this._y=(o-c)*f,this._z=(s-r)*f}else if(i>a&&i>d){let f=2*Math.sqrt(1+i-a-d);this._w=(u-l)/f,this._x=.25*f,this._y=(r+s)/f,this._z=(o+c)/f}else if(a>d){let f=2*Math.sqrt(1+a-i-d);this._w=(o-c)/f,this._x=(r+s)/f,this._y=.25*f,this._z=(l+u)/f}else{let f=2*Math.sqrt(1+d-i-a);this._w=(s-r)/f,this._x=(o+c)/f,this._y=(l+u)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return i<1e-8?(i=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Rt(this.dot(e),-1,1)))}rotateTowards(e,t){let i=this.angleTo(e);if(i===0)return this;let r=Math.min(1,t/i);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let i=e._x,r=e._y,o=e._z,s=e._w,a=t._x,l=t._y,c=t._z,u=t._w;return this._x=i*u+s*a+r*c-o*l,this._y=r*u+s*l+o*a-i*c,this._z=o*u+s*c+i*l-r*a,this._w=s*u-i*a-r*l-o*c,this._onChangeCallback(),this}slerp(e,t){if(t<=0)return this;if(t>=1)return this.copy(e);let i=e._x,r=e._y,o=e._z,s=e._w,a=this.dot(e);a<0&&(i=-i,r=-r,o=-o,s=-s,a=-a);let l=1-t;if(a<.9995){let c=Math.acos(a),u=Math.sin(c);l=Math.sin(l*c)/u,t=Math.sin(t*c)/u,this._x=this._x*l+i*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+s*t,this._onChangeCallback()}else this._x=this._x*l+i*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+s*t,this.normalize();return this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),i=Math.random(),r=Math.sqrt(1-i),o=Math.sqrt(i);return this.set(r*Math.sin(e),r*Math.cos(e),o*Math.sin(t),o*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},V=class n{constructor(e=0,t=0,i=0){n.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(tF.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(tF.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,i=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[3]*i+o[6]*r,this.y=o[1]*t+o[4]*i+o[7]*r,this.z=o[2]*t+o[5]*i+o[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,i=this.y,r=this.z,o=e.elements,s=1/(o[3]*t+o[7]*i+o[11]*r+o[15]);return this.x=(o[0]*t+o[4]*i+o[8]*r+o[12])*s,this.y=(o[1]*t+o[5]*i+o[9]*r+o[13])*s,this.z=(o[2]*t+o[6]*i+o[10]*r+o[14])*s,this}applyQuaternion(e){let t=this.x,i=this.y,r=this.z,o=e.x,s=e.y,a=e.z,l=e.w,c=2*(s*r-a*i),u=2*(a*t-o*r),d=2*(o*i-s*t);return this.x=t+l*c+s*d-a*u,this.y=i+l*u+a*c-o*d,this.z=r+l*d+o*u-s*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,i=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*r,this.y=o[1]*t+o[5]*i+o[9]*r,this.z=o[2]*t+o[6]*i+o[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Rt(this.x,e.x,t.x),this.y=Rt(this.y,e.y,t.y),this.z=Rt(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Rt(this.x,e,t),this.y=Rt(this.y,e,t),this.z=Rt(this.z,e,t),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Rt(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let i=e.x,r=e.y,o=e.z,s=t.x,a=t.y,l=t.z;return this.x=r*l-o*a,this.y=o*s-i*l,this.z=i*a-r*s,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return yE.copy(this).projectOnVector(e),this.sub(yE)}reflect(e){return this.sub(yE.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let i=this.dot(e)/t;return Math.acos(Rt(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+i*i+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){let r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=Math.random()*2-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},yE=new V,tF=new eo,Ct=class n{constructor(e,t,i,r,o,s,a,l,c){n.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,r,o,s,a,l,c)}set(e,t,i,r,o,s,a,l,c){let u=this.elements;return u[0]=e,u[1]=r,u[2]=a,u[3]=t,u[4]=o,u[5]=l,u[6]=i,u[7]=s,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,r=t.elements,o=this.elements,s=i[0],a=i[3],l=i[6],c=i[1],u=i[4],d=i[7],h=i[2],f=i[5],p=i[8],v=r[0],g=r[3],m=r[6],y=r[1],_=r[4],x=r[7],b=r[2],w=r[5],E=r[8];return o[0]=s*v+a*y+l*b,o[3]=s*g+a*_+l*w,o[6]=s*m+a*x+l*E,o[1]=c*v+u*y+d*b,o[4]=c*g+u*_+d*w,o[7]=c*m+u*x+d*E,o[2]=h*v+f*y+p*b,o[5]=h*g+f*_+p*w,o[8]=h*m+f*x+p*E,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return t*s*u-t*a*c-i*o*u+i*a*l+r*o*c-r*s*l}invert(){let e=this.elements,t=e[0],i=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=u*s-a*c,h=a*l-u*o,f=c*o-s*l,p=t*d+i*h+r*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);let v=1/p;return e[0]=d*v,e[1]=(r*c-u*i)*v,e[2]=(a*i-r*s)*v,e[3]=h*v,e[4]=(u*t-r*l)*v,e[5]=(r*o-a*t)*v,e[6]=f*v,e[7]=(i*l-c*t)*v,e[8]=(s*t-i*o)*v,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,r,o,s,a){let l=Math.cos(o),c=Math.sin(o);return this.set(i*l,i*c,-i*(l*s+c*a)+s+e,-r*c,r*l,-r*(-c*s+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(_E.makeScale(e,t)),this}rotate(e){return this.premultiply(_E.makeRotation(-e)),this}translate(e,t){return this.premultiply(_E.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,i=e.elements;for(let r=0;r<9;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){let i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}},_E=new Ct,nF=new Ct().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),iF=new Ct().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function d6(){let n={enabled:!0,workingColorSpace:Tc,spaces:{},convert:function(r,o,s){return this.enabled===!1||o===s||!o||!s||(this.spaces[o].transfer===Qt&&(r.r=oa(r.r),r.g=oa(r.g),r.b=oa(r.b)),this.spaces[o].primaries!==this.spaces[s].primaries&&(r.applyMatrix3(this.spaces[o].toXYZ),r.applyMatrix3(this.spaces[s].fromXYZ)),this.spaces[s].transfer===Qt&&(r.r=Od(r.r),r.g=Od(r.g),r.b=Od(r.b))),r},workingToColorSpace:function(r,o){return this.convert(r,this.workingColorSpace,o)},colorSpaceToWorking:function(r,o){return this.convert(r,o,this.workingColorSpace)},getPrimaries:function(r){return this.spaces[r].primaries},getTransfer:function(r){return r===la?lp:this.spaces[r].transfer},getToneMappingMode:function(r){return this.spaces[r].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(r,o=this.workingColorSpace){return r.fromArray(this.spaces[o].luminanceCoefficients)},define:function(r){Object.assign(this.spaces,r)},_getMatrix:function(r,o,s){return r.copy(this.spaces[o].toXYZ).multiply(this.spaces[s].fromXYZ)},_getDrawingBufferColorSpace:function(r){return this.spaces[r].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(r=this.workingColorSpace){return this.spaces[r].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(r,o){return Ld("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),n.workingToColorSpace(r,o)},toWorkingColorSpace:function(r,o){return Ld("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),n.colorSpaceToWorking(r,o)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],i=[.3127,.329];return n.define({[Tc]:{primaries:e,whitePoint:i,transfer:lp,toXYZ:nF,fromXYZ:iF,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:pn},outputColorSpaceConfig:{drawingBufferColorSpace:pn}},[pn]:{primaries:e,whitePoint:i,transfer:Qt,toXYZ:nF,fromXYZ:iF,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:pn}}}),n}var Ot=d6();function oa(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Od(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}var yd,O0=class{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let i;if(e instanceof HTMLCanvasElement)i=e;else{yd===void 0&&(yd=Nd("canvas")),yd.width=e.width,yd.height=e.height;let r=yd.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),i=yd}return i.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){let t=Nd("canvas");t.width=e.width,t.height=e.height;let i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);let r=i.getImageData(0,0,e.width,e.height),o=r.data;for(let s=0;s<o.length;s++)o[s]=oa(o[s]/255)*255;return i.putImageData(r,0,0),t}else if(e.data){let t=e.data.slice(0);for(let i=0;i<t.length;i++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[i]=Math.floor(oa(t[i]/255)*255):t[i]=oa(t[i]);return{data:t,width:e.width,height:e.height}}else return at("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},h6=0,Bd=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:h6++}),this.uuid=Kd(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){let t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<"u"&&t instanceof VideoFrame?e.set(t.displayHeight,t.displayWidth,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){let t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];let i={uuid:this.uuid,url:""},r=this.data;if(r!==null){let o;if(Array.isArray(r)){o=[];for(let s=0,a=r.length;s<a;s++)r[s].isDataTexture?o.push(xE(r[s].image)):o.push(xE(r[s]))}else o=xE(r);i.url=o}return t||(e.images[this.uuid]=i),i}};function xE(n){return typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&n instanceof ImageBitmap?O0.getDataURL(n):n.data?{data:Array.from(n.data),width:n.width,height:n.height,type:n.data.constructor.name}:(at("Texture: Unable to serialize Texture."),{})}var f6=0,bE=new V,To=(()=>{class n extends ps{constructor(t=n.DEFAULT_IMAGE,i=n.DEFAULT_MAPPING,r=wi,o=wi,s=Vn,a=to,l=no,c=nr,u=n.DEFAULT_ANISOTROPY,d=la){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:f6++}),this.uuid=Kd(),this.name="",this.source=new Bd(t),this.mipmaps=[],this.mapping=i,this.channel=0,this.wrapS=r,this.wrapT=o,this.magFilter=s,this.minFilter=a,this.anisotropy=u,this.format=l,this.internalFormat=null,this.type=c,this.offset=new dt(0,0),this.repeat=new dt(1,1),this.center=new dt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ct,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=d,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(bE).x}get height(){return this.source.getSize(bE).y}get depth(){return this.source.getSize(bE).z}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(t,i){this.updateRanges.push({start:t,count:i})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.isArrayTexture=t.isArrayTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}setValues(t){for(let i in t){let r=t[i];if(r===void 0){at(`Texture.setValues(): parameter '${i}' has value of undefined.`);continue}let o=this[i];if(o===void 0){at(`Texture.setValues(): property '${i}' does not exist.`);continue}o&&r&&o.isVector2&&r.isVector2||o&&r&&o.isVector3&&r.isVector3||o&&r&&o.isMatrix3&&r.isMatrix3?o.copy(r):this[i]=r}}toJSON(t){let i=t===void 0||typeof t=="string";if(!i&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];let r={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(r.userData=this.userData),i||(t.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==zE)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Fd:t.x=t.x-Math.floor(t.x);break;case wi:t.x=t.x<0?0:1;break;case I0:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case Fd:t.y=t.y-Math.floor(t.y);break;case wi:t.y=t.y<0?0:1;break;case I0:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}}return n.DEFAULT_IMAGE=null,n.DEFAULT_MAPPING=zE,n.DEFAULT_ANISOTROPY=1,n})(),Mn=class n{constructor(e=0,t=0,i=0,r=1){n.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,r){return this.x=e,this.y=t,this.z=i,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,i=this.y,r=this.z,o=this.w,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*r+s[12]*o,this.y=s[1]*t+s[5]*i+s[9]*r+s[13]*o,this.z=s[2]*t+s[6]*i+s[10]*r+s[14]*o,this.w=s[3]*t+s[7]*i+s[11]*r+s[15]*o,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,r,o,l=e.elements,c=l[0],u=l[4],d=l[8],h=l[1],f=l[5],p=l[9],v=l[2],g=l[6],m=l[10];if(Math.abs(u-h)<.01&&Math.abs(d-v)<.01&&Math.abs(p-g)<.01){if(Math.abs(u+h)<.1&&Math.abs(d+v)<.1&&Math.abs(p+g)<.1&&Math.abs(c+f+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let _=(c+1)/2,x=(f+1)/2,b=(m+1)/2,w=(u+h)/4,E=(d+v)/4,A=(p+g)/4;return _>x&&_>b?_<.01?(i=0,r=.707106781,o=.707106781):(i=Math.sqrt(_),r=w/i,o=E/i):x>b?x<.01?(i=.707106781,r=0,o=.707106781):(r=Math.sqrt(x),i=w/r,o=A/r):b<.01?(i=.707106781,r=.707106781,o=0):(o=Math.sqrt(b),i=E/o,r=A/o),this.set(i,r,o,t),this}let y=Math.sqrt((g-p)*(g-p)+(d-v)*(d-v)+(h-u)*(h-u));return Math.abs(y)<.001&&(y=1),this.x=(g-p)/y,this.y=(d-v)/y,this.z=(h-u)/y,this.w=Math.acos((c+f+m-1)/2),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Rt(this.x,e.x,t.x),this.y=Rt(this.y,e.y,t.y),this.z=Rt(this.z,e.z,t.z),this.w=Rt(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Rt(this.x,e,t),this.y=Rt(this.y,e,t),this.z=Rt(this.z,e,t),this.w=Rt(this.w,e,t),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Rt(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},R0=class extends ps{constructor(e=1,t=1,i={}){super(),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Vn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},i),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=i.depth,this.scissor=new Mn(0,0,e,t),this.scissorTest=!1,this.viewport=new Mn(0,0,e,t);let r={width:e,height:t,depth:i.depth},o=new To(r);this.textures=[];let s=i.count;for(let a=0;a<s;a++)this.textures[a]=o.clone(),this.textures[a].isRenderTargetTexture=!0,this.textures[a].renderTarget=this;this._setTextureOptions(i),this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.resolveDepthBuffer=i.resolveDepthBuffer,this.resolveStencilBuffer=i.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=i.depthTexture,this.samples=i.samples,this.multiview=i.multiview}_setTextureOptions(e={}){let t={minFilter:Vn,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let i=0;i<this.textures.length;i++)this.textures[i].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,i=1){if(this.width!==e||this.height!==t||this.depth!==i){this.width=e,this.height=t,this.depth=i;for(let r=0,o=this.textures.length;r<o;r++)this.textures[r].image.width=e,this.textures[r].image.height=t,this.textures[r].image.depth=i,this.textures[r].isData3DTexture!==!0&&(this.textures[r].isArrayTexture=this.textures[r].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,i=e.textures.length;t<i;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;let r=Object.assign({},e.textures[t].image);this.textures[t].source=new Bd(r)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},wr=class extends R0{constructor(e=1,t=1,i={}){super(e,t,i),this.isWebGLRenderTarget=!0}},up=class extends To{constructor(e=null,t=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=si,this.minFilter=si,this.wrapR=wi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var F0=class extends To{constructor(e=null,t=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=si,this.minFilter=si,this.wrapR=wi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var ki=class{constructor(e=new V(1/0,1/0,1/0),t=new V(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t+=3)this.expandByPoint(yo.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,i=e.count;t<i;t++)this.expandByPoint(yo.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let i=yo.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);let i=e.geometry;if(i!==void 0){let o=i.getAttribute("position");if(t===!0&&o!==void 0&&e.isInstancedMesh!==!0)for(let s=0,a=o.count;s<a;s++)e.isMesh===!0?e.getVertexPosition(s,yo):yo.fromBufferAttribute(o,s),yo.applyMatrix4(e.matrixWorld),this.expandByPoint(yo);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),o0.copy(e.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),o0.copy(i.boundingBox)),o0.applyMatrix4(e.matrixWorld),this.union(o0)}let r=e.children;for(let o=0,s=r.length;o<s;o++)this.expandByObject(r[o],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,yo),yo.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(ep),s0.subVectors(this.max,ep),_d.subVectors(e.a,ep),xd.subVectors(e.b,ep),bd.subVectors(e.c,ep),ja.subVectors(xd,_d),Wa.subVectors(bd,xd),xc.subVectors(_d,bd);let t=[0,-ja.z,ja.y,0,-Wa.z,Wa.y,0,-xc.z,xc.y,ja.z,0,-ja.x,Wa.z,0,-Wa.x,xc.z,0,-xc.x,-ja.y,ja.x,0,-Wa.y,Wa.x,0,-xc.y,xc.x,0];return!SE(t,_d,xd,bd,s0)||(t=[1,0,0,0,1,0,0,0,1],!SE(t,_d,xd,bd,s0))?!1:(a0.crossVectors(ja,Wa),t=[a0.x,a0.y,a0.z],SE(t,_d,xd,bd,s0))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,yo).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(yo).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Js[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Js[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Js[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Js[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Js[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Js[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Js[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Js[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Js),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}},Js=[new V,new V,new V,new V,new V,new V,new V,new V],yo=new V,o0=new ki,_d=new V,xd=new V,bd=new V,ja=new V,Wa=new V,xc=new V,ep=new V,s0=new V,a0=new V,bc=new V;function SE(n,e,t,i,r){for(let o=0,s=n.length-3;o<=s;o+=3){bc.fromArray(n,o);let a=r.x*Math.abs(bc.x)+r.y*Math.abs(bc.y)+r.z*Math.abs(bc.z),l=e.dot(bc),c=t.dot(bc),u=i.dot(bc);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}var p6=new ki,tp=new V,CE=new V,Ja=class{constructor(e=new V,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let i=this.center;t!==void 0?i.copy(t):p6.setFromPoints(e).getCenter(i);let r=0;for(let o=0,s=e.length;o<s;o++)r=Math.max(r,i.distanceToSquared(e[o]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){let t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){let i=this.center.distanceToSquared(e);return t.copy(e),i>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;tp.subVectors(e,this.center);let t=tp.lengthSq();if(t>this.radius*this.radius){let i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(tp,r/i),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(CE.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(tp.copy(e.center).add(CE)),this.expandByPoint(tp.copy(e.center).sub(CE))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}},Qs=new V,wE=new V,l0=new V,$a=new V,EE=new V,c0=new V,ME=new V,sa=class{constructor(e=new V,t=new V(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Qs)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=Qs.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Qs.copy(this.origin).addScaledVector(this.direction,t),Qs.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){wE.copy(e).add(t).multiplyScalar(.5),l0.copy(t).sub(e).normalize(),$a.copy(this.origin).sub(wE);let o=e.distanceTo(t)*.5,s=-this.direction.dot(l0),a=$a.dot(this.direction),l=-$a.dot(l0),c=$a.lengthSq(),u=Math.abs(1-s*s),d,h,f,p;if(u>0)if(d=s*l-a,h=s*a-l,p=o*u,d>=0)if(h>=-p)if(h<=p){let v=1/u;d*=v,h*=v,f=d*(d+s*h+2*a)+h*(s*d+h+2*l)+c}else h=o,d=Math.max(0,-(s*h+a)),f=-d*d+h*(h+2*l)+c;else h=-o,d=Math.max(0,-(s*h+a)),f=-d*d+h*(h+2*l)+c;else h<=-p?(d=Math.max(0,-(-s*o+a)),h=d>0?-o:Math.min(Math.max(-o,-l),o),f=-d*d+h*(h+2*l)+c):h<=p?(d=0,h=Math.min(Math.max(-o,-l),o),f=h*(h+2*l)+c):(d=Math.max(0,-(s*o+a)),h=d>0?o:Math.min(Math.max(-o,-l),o),f=-d*d+h*(h+2*l)+c);else h=s>0?-o:o,d=Math.max(0,-(s*h+a)),f=-d*d+h*(h+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,d),r&&r.copy(wE).addScaledVector(l0,h),f}intersectSphere(e,t){Qs.subVectors(e.center,this.origin);let i=Qs.dot(this.direction),r=Qs.dot(Qs)-i*i,o=e.radius*e.radius;if(r>o)return null;let s=Math.sqrt(o-r),a=i-s,l=i+s;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){let i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,r,o,s,a,l,c=1/this.direction.x,u=1/this.direction.y,d=1/this.direction.z,h=this.origin;return c>=0?(i=(e.min.x-h.x)*c,r=(e.max.x-h.x)*c):(i=(e.max.x-h.x)*c,r=(e.min.x-h.x)*c),u>=0?(o=(e.min.y-h.y)*u,s=(e.max.y-h.y)*u):(o=(e.max.y-h.y)*u,s=(e.min.y-h.y)*u),i>s||o>r||((o>i||isNaN(i))&&(i=o),(s<r||isNaN(r))&&(r=s),d>=0?(a=(e.min.z-h.z)*d,l=(e.max.z-h.z)*d):(a=(e.max.z-h.z)*d,l=(e.min.z-h.z)*d),i>l||a>r)||((a>i||i!==i)&&(i=a),(l<r||r!==r)&&(r=l),r<0)?null:this.at(i>=0?i:r,t)}intersectsBox(e){return this.intersectBox(e,Qs)!==null}intersectTriangle(e,t,i,r,o){EE.subVectors(t,e),c0.subVectors(i,e),ME.crossVectors(EE,c0);let s=this.direction.dot(ME),a;if(s>0){if(r)return null;a=1}else if(s<0)a=-1,s=-s;else return null;$a.subVectors(this.origin,e);let l=a*this.direction.dot(c0.crossVectors($a,c0));if(l<0)return null;let c=a*this.direction.dot(EE.cross($a));if(c<0||l+c>s)return null;let u=-a*$a.dot(ME);return u<0?null:this.at(u/s,o)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},Sn=class n{constructor(e,t,i,r,o,s,a,l,c,u,d,h,f,p,v,g){n.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,r,o,s,a,l,c,u,d,h,f,p,v,g)}set(e,t,i,r,o,s,a,l,c,u,d,h,f,p,v,g){let m=this.elements;return m[0]=e,m[4]=t,m[8]=i,m[12]=r,m[1]=o,m[5]=s,m[9]=a,m[13]=l,m[2]=c,m[6]=u,m[10]=d,m[14]=h,m[3]=f,m[7]=p,m[11]=v,m[15]=g,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new n().fromArray(this.elements)}copy(e){let t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){let t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),i.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this)}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();let t=this.elements,i=e.elements,r=1/Sd.setFromMatrixColumn(e,0).length(),o=1/Sd.setFromMatrixColumn(e,1).length(),s=1/Sd.setFromMatrixColumn(e,2).length();return t[0]=i[0]*r,t[1]=i[1]*r,t[2]=i[2]*r,t[3]=0,t[4]=i[4]*o,t[5]=i[5]*o,t[6]=i[6]*o,t[7]=0,t[8]=i[8]*s,t[9]=i[9]*s,t[10]=i[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,i=e.x,r=e.y,o=e.z,s=Math.cos(i),a=Math.sin(i),l=Math.cos(r),c=Math.sin(r),u=Math.cos(o),d=Math.sin(o);if(e.order==="XYZ"){let h=s*u,f=s*d,p=a*u,v=a*d;t[0]=l*u,t[4]=-l*d,t[8]=c,t[1]=f+p*c,t[5]=h-v*c,t[9]=-a*l,t[2]=v-h*c,t[6]=p+f*c,t[10]=s*l}else if(e.order==="YXZ"){let h=l*u,f=l*d,p=c*u,v=c*d;t[0]=h+v*a,t[4]=p*a-f,t[8]=s*c,t[1]=s*d,t[5]=s*u,t[9]=-a,t[2]=f*a-p,t[6]=v+h*a,t[10]=s*l}else if(e.order==="ZXY"){let h=l*u,f=l*d,p=c*u,v=c*d;t[0]=h-v*a,t[4]=-s*d,t[8]=p+f*a,t[1]=f+p*a,t[5]=s*u,t[9]=v-h*a,t[2]=-s*c,t[6]=a,t[10]=s*l}else if(e.order==="ZYX"){let h=s*u,f=s*d,p=a*u,v=a*d;t[0]=l*u,t[4]=p*c-f,t[8]=h*c+v,t[1]=l*d,t[5]=v*c+h,t[9]=f*c-p,t[2]=-c,t[6]=a*l,t[10]=s*l}else if(e.order==="YZX"){let h=s*l,f=s*c,p=a*l,v=a*c;t[0]=l*u,t[4]=v-h*d,t[8]=p*d+f,t[1]=d,t[5]=s*u,t[9]=-a*u,t[2]=-c*u,t[6]=f*d+p,t[10]=h-v*d}else if(e.order==="XZY"){let h=s*l,f=s*c,p=a*l,v=a*c;t[0]=l*u,t[4]=-d,t[8]=c*u,t[1]=h*d+v,t[5]=s*u,t[9]=f*d-p,t[2]=p*d-f,t[6]=a*u,t[10]=v*d+h}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(m6,e,g6)}lookAt(e,t,i){let r=this.elements;return br.subVectors(e,t),br.lengthSq()===0&&(br.z=1),br.normalize(),Xa.crossVectors(i,br),Xa.lengthSq()===0&&(Math.abs(i.z)===1?br.x+=1e-4:br.z+=1e-4,br.normalize(),Xa.crossVectors(i,br)),Xa.normalize(),u0.crossVectors(br,Xa),r[0]=Xa.x,r[4]=u0.x,r[8]=br.x,r[1]=Xa.y,r[5]=u0.y,r[9]=br.y,r[2]=Xa.z,r[6]=u0.z,r[10]=br.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,r=t.elements,o=this.elements,s=i[0],a=i[4],l=i[8],c=i[12],u=i[1],d=i[5],h=i[9],f=i[13],p=i[2],v=i[6],g=i[10],m=i[14],y=i[3],_=i[7],x=i[11],b=i[15],w=r[0],E=r[4],A=r[8],C=r[12],M=r[1],N=r[5],j=r[9],z=r[13],$=r[2],q=r[6],X=r[10],G=r[14],Q=r[3],pe=r[7],me=r[11],ve=r[15];return o[0]=s*w+a*M+l*$+c*Q,o[4]=s*E+a*N+l*q+c*pe,o[8]=s*A+a*j+l*X+c*me,o[12]=s*C+a*z+l*G+c*ve,o[1]=u*w+d*M+h*$+f*Q,o[5]=u*E+d*N+h*q+f*pe,o[9]=u*A+d*j+h*X+f*me,o[13]=u*C+d*z+h*G+f*ve,o[2]=p*w+v*M+g*$+m*Q,o[6]=p*E+v*N+g*q+m*pe,o[10]=p*A+v*j+g*X+m*me,o[14]=p*C+v*z+g*G+m*ve,o[3]=y*w+_*M+x*$+b*Q,o[7]=y*E+_*N+x*q+b*pe,o[11]=y*A+_*j+x*X+b*me,o[15]=y*C+_*z+x*G+b*ve,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[4],r=e[8],o=e[12],s=e[1],a=e[5],l=e[9],c=e[13],u=e[2],d=e[6],h=e[10],f=e[14],p=e[3],v=e[7],g=e[11],m=e[15],y=l*f-c*h,_=a*f-c*d,x=a*h-l*d,b=s*f-c*u,w=s*h-l*u,E=s*d-a*u;return t*(v*y-g*_+m*x)-i*(p*y-g*b+m*w)+r*(p*_-v*b+m*E)-o*(p*x-v*w+g*E)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=i),this}invert(){let e=this.elements,t=e[0],i=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=e[9],h=e[10],f=e[11],p=e[12],v=e[13],g=e[14],m=e[15],y=d*g*c-v*h*c+v*l*f-a*g*f-d*l*m+a*h*m,_=p*h*c-u*g*c-p*l*f+s*g*f+u*l*m-s*h*m,x=u*v*c-p*d*c+p*a*f-s*v*f-u*a*m+s*d*m,b=p*d*l-u*v*l-p*a*h+s*v*h+u*a*g-s*d*g,w=t*y+i*_+r*x+o*b;if(w===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let E=1/w;return e[0]=y*E,e[1]=(v*h*o-d*g*o-v*r*f+i*g*f+d*r*m-i*h*m)*E,e[2]=(a*g*o-v*l*o+v*r*c-i*g*c-a*r*m+i*l*m)*E,e[3]=(d*l*o-a*h*o-d*r*c+i*h*c+a*r*f-i*l*f)*E,e[4]=_*E,e[5]=(u*g*o-p*h*o+p*r*f-t*g*f-u*r*m+t*h*m)*E,e[6]=(p*l*o-s*g*o-p*r*c+t*g*c+s*r*m-t*l*m)*E,e[7]=(s*h*o-u*l*o+u*r*c-t*h*c-s*r*f+t*l*f)*E,e[8]=x*E,e[9]=(p*d*o-u*v*o-p*i*f+t*v*f+u*i*m-t*d*m)*E,e[10]=(s*v*o-p*a*o+p*i*c-t*v*c-s*i*m+t*a*m)*E,e[11]=(u*a*o-s*d*o-u*i*c+t*d*c+s*i*f-t*a*f)*E,e[12]=b*E,e[13]=(u*v*r-p*d*r+p*i*h-t*v*h-u*i*g+t*d*g)*E,e[14]=(p*a*r-s*v*r-p*i*l+t*v*l+s*i*g-t*a*g)*E,e[15]=(s*d*r-u*a*r+u*i*l-t*d*l-s*i*h+t*a*h)*E,this}scale(e){let t=this.elements,i=e.x,r=e.y,o=e.z;return t[0]*=i,t[4]*=r,t[8]*=o,t[1]*=i,t[5]*=r,t[9]*=o,t[2]*=i,t[6]*=r,t[10]*=o,t[3]*=i,t[7]*=r,t[11]*=o,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,r))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let i=Math.cos(t),r=Math.sin(t),o=1-i,s=e.x,a=e.y,l=e.z,c=o*s,u=o*a;return this.set(c*s+i,c*a-r*l,c*l+r*a,0,c*a+r*l,u*a+i,u*l-r*s,0,c*l-r*a,u*l+r*s,o*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,r,o,s){return this.set(1,i,o,0,e,1,s,0,t,r,1,0,0,0,0,1),this}compose(e,t,i){let r=this.elements,o=t._x,s=t._y,a=t._z,l=t._w,c=o+o,u=s+s,d=a+a,h=o*c,f=o*u,p=o*d,v=s*u,g=s*d,m=a*d,y=l*c,_=l*u,x=l*d,b=i.x,w=i.y,E=i.z;return r[0]=(1-(v+m))*b,r[1]=(f+x)*b,r[2]=(p-_)*b,r[3]=0,r[4]=(f-x)*w,r[5]=(1-(h+m))*w,r[6]=(g+y)*w,r[7]=0,r[8]=(p+_)*E,r[9]=(g-y)*E,r[10]=(1-(h+v))*E,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,i){let r=this.elements;if(e.x=r[12],e.y=r[13],e.z=r[14],this.determinant()===0)return i.set(1,1,1),t.identity(),this;let o=Sd.set(r[0],r[1],r[2]).length(),s=Sd.set(r[4],r[5],r[6]).length(),a=Sd.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),_o.copy(this);let c=1/o,u=1/s,d=1/a;return _o.elements[0]*=c,_o.elements[1]*=c,_o.elements[2]*=c,_o.elements[4]*=u,_o.elements[5]*=u,_o.elements[6]*=u,_o.elements[8]*=d,_o.elements[9]*=d,_o.elements[10]*=d,t.setFromRotationMatrix(_o),i.x=o,i.y=s,i.z=a,this}makePerspective(e,t,i,r,o,s,a=bo,l=!1){let c=this.elements,u=2*o/(t-e),d=2*o/(i-r),h=(t+e)/(t-e),f=(i+r)/(i-r),p,v;if(l)p=o/(s-o),v=s*o/(s-o);else if(a===bo)p=-(s+o)/(s-o),v=-2*s*o/(s-o);else if(a===cp)p=-s/(s-o),v=-s*o/(s-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=u,c[4]=0,c[8]=h,c[12]=0,c[1]=0,c[5]=d,c[9]=f,c[13]=0,c[2]=0,c[6]=0,c[10]=p,c[14]=v,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,i,r,o,s,a=bo,l=!1){let c=this.elements,u=2/(t-e),d=2/(i-r),h=-(t+e)/(t-e),f=-(i+r)/(i-r),p,v;if(l)p=1/(s-o),v=s/(s-o);else if(a===bo)p=-2/(s-o),v=-(s+o)/(s-o);else if(a===cp)p=-1/(s-o),v=-o/(s-o);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=u,c[4]=0,c[8]=0,c[12]=h,c[1]=0,c[5]=d,c[9]=0,c[13]=f,c[2]=0,c[6]=0,c[10]=p,c[14]=v,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){let t=this.elements,i=e.elements;for(let r=0;r<16;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){let i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}},Sd=new V,_o=new Sn,m6=new V(0,0,0),g6=new V(1,1,1),Xa=new V,u0=new V,br=new V,rF=new Sn,oF=new eo,Qa=(()=>{class n{constructor(t=0,i=0,r=0,o=n.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=i,this._z=r,this._order=o}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,i,r,o=this._order){return this._x=t,this._y=i,this._z=r,this._order=o,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,i=this._order,r=!0){let o=t.elements,s=o[0],a=o[4],l=o[8],c=o[1],u=o[5],d=o[9],h=o[2],f=o[6],p=o[10];switch(i){case"XYZ":this._y=Math.asin(Rt(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-d,p),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(f,u),this._z=0);break;case"YXZ":this._x=Math.asin(-Rt(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(l,p),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-h,s),this._z=0);break;case"ZXY":this._x=Math.asin(Rt(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-h,p),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,s));break;case"ZYX":this._y=Math.asin(-Rt(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(f,p),this._z=Math.atan2(c,s)):(this._x=0,this._z=Math.atan2(-a,u));break;case"YZX":this._z=Math.asin(Rt(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-d,u),this._y=Math.atan2(-h,s)):(this._x=0,this._y=Math.atan2(l,p));break;case"XZY":this._z=Math.asin(-Rt(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(f,u),this._y=Math.atan2(l,s)):(this._x=Math.atan2(-d,p),this._y=0);break;default:at("Euler: .setFromRotationMatrix() encountered an unknown order: "+i)}return this._order=i,r===!0&&this._onChangeCallback(),this}setFromQuaternion(t,i,r){return rF.makeRotationFromQuaternion(t),this.setFromRotationMatrix(rF,i,r)}setFromVector3(t,i=this._order){return this.set(t.x,t.y,t.z,i)}reorder(t){return oF.setFromEuler(this),this.setFromQuaternion(oF,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],i=0){return t[i]=this._x,t[i+1]=this._y,t[i+2]=this._z,t[i+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}return n.DEFAULT_ORDER="XYZ",n})(),Vd=class{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}},v6=0,sF=new V,Cd=new eo,ea=new Sn,d0=new V,np=new V,y6=new V,_6=new eo,aF=new V(1,0,0),lF=new V(0,1,0),cF=new V(0,0,1),uF={type:"added"},x6={type:"removed"},wd={type:"childadded",child:null},TE={type:"childremoved",child:null},Er=(()=>{class n extends ps{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:v6++}),this.uuid=Kd(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=n.DEFAULT_UP.clone();let t=new V,i=new Qa,r=new eo,o=new V(1,1,1);function s(){r.setFromEuler(i,!1)}function a(){i.setFromQuaternion(r,void 0,!1)}i._onChange(s),r._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:i},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:o},modelViewMatrix:{value:new Sn},normalMatrix:{value:new Ct}}),this.matrix=new Sn,this.matrixWorld=new Sn,this.matrixAutoUpdate=n.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=n.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Vd,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,i){this.quaternion.setFromAxisAngle(t,i)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,i){return Cd.setFromAxisAngle(t,i),this.quaternion.multiply(Cd),this}rotateOnWorldAxis(t,i){return Cd.setFromAxisAngle(t,i),this.quaternion.premultiply(Cd),this}rotateX(t){return this.rotateOnAxis(aF,t)}rotateY(t){return this.rotateOnAxis(lF,t)}rotateZ(t){return this.rotateOnAxis(cF,t)}translateOnAxis(t,i){return sF.copy(t).applyQuaternion(this.quaternion),this.position.add(sF.multiplyScalar(i)),this}translateX(t){return this.translateOnAxis(aF,t)}translateY(t){return this.translateOnAxis(lF,t)}translateZ(t){return this.translateOnAxis(cF,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(ea.copy(this.matrixWorld).invert())}lookAt(t,i,r){t.isVector3?d0.copy(t):d0.set(t,i,r);let o=this.parent;this.updateWorldMatrix(!0,!1),np.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ea.lookAt(np,d0,this.up):ea.lookAt(d0,np,this.up),this.quaternion.setFromRotationMatrix(ea),o&&(ea.extractRotation(o.matrixWorld),Cd.setFromRotationMatrix(ea),this.quaternion.premultiply(Cd.invert()))}add(t){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.add(arguments[i]);return this}return t===this?(ut("Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(uF),wd.child=t,this.dispatchEvent(wd),wd.child=null):ut("Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.remove(arguments[r]);return this}let i=this.children.indexOf(t);return i!==-1&&(t.parent=null,this.children.splice(i,1),t.dispatchEvent(x6),TE.child=t,this.dispatchEvent(TE),TE.child=null),this}removeFromParent(){let t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),ea.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),ea.multiply(t.parent.matrixWorld)),t.applyMatrix4(ea),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(uF),wd.child=t,this.dispatchEvent(wd),wd.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,i){if(this[t]===i)return this;for(let r=0,o=this.children.length;r<o;r++){let a=this.children[r].getObjectByProperty(t,i);if(a!==void 0)return a}}getObjectsByProperty(t,i,r=[]){this[t]===i&&r.push(this);let o=this.children;for(let s=0,a=o.length;s<a;s++)o[s].getObjectsByProperty(t,i,r);return r}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(np,t,y6),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(np,_6,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let i=this.matrixWorld.elements;return t.set(i[8],i[9],i[10]).normalize()}raycast(){}traverse(t){t(this);let i=this.children;for(let r=0,o=i.length;r<o;r++)i[r].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);let i=this.children;for(let r=0,o=i.length;r<o;r++)i[r].traverseVisible(t)}traverseAncestors(t){let i=this.parent;i!==null&&(t(i),i.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);let i=this.children;for(let r=0,o=i.length;r<o;r++)i[r].updateMatrixWorld(t)}updateWorldMatrix(t,i){let r=this.parent;if(t===!0&&r!==null&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),i===!0){let o=this.children;for(let s=0,a=o.length;s<a;s++)o[s].updateWorldMatrix(!1,!0)}}toJSON(t){let i=t===void 0||typeof t=="string",r={};i&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});let o={};o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.castShadow===!0&&(o.castShadow=!0),this.receiveShadow===!0&&(o.receiveShadow=!0),this.visible===!1&&(o.visible=!1),this.frustumCulled===!1&&(o.frustumCulled=!1),this.renderOrder!==0&&(o.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(o.userData=this.userData),o.layers=this.layers.mask,o.matrix=this.matrix.toArray(),o.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(o.matrixAutoUpdate=!1),this.isInstancedMesh&&(o.type="InstancedMesh",o.count=this.count,o.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(o.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(o.type="BatchedMesh",o.perObjectFrustumCulled=this.perObjectFrustumCulled,o.sortObjects=this.sortObjects,o.drawRanges=this._drawRanges,o.reservedRanges=this._reservedRanges,o.geometryInfo=this._geometryInfo.map(l=>ue(R({},l),{boundingBox:l.boundingBox?l.boundingBox.toJSON():void 0,boundingSphere:l.boundingSphere?l.boundingSphere.toJSON():void 0})),o.instanceInfo=this._instanceInfo.map(l=>R({},l)),o.availableInstanceIds=this._availableInstanceIds.slice(),o.availableGeometryIds=this._availableGeometryIds.slice(),o.nextIndexStart=this._nextIndexStart,o.nextVertexStart=this._nextVertexStart,o.geometryCount=this._geometryCount,o.maxInstanceCount=this._maxInstanceCount,o.maxVertexCount=this._maxVertexCount,o.maxIndexCount=this._maxIndexCount,o.geometryInitialized=this._geometryInitialized,o.matricesTexture=this._matricesTexture.toJSON(t),o.indirectTexture=this._indirectTexture.toJSON(t),this._colorsTexture!==null&&(o.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(o.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(o.boundingBox=this.boundingBox.toJSON()));function s(l,c){return l[c.uuid]===void 0&&(l[c.uuid]=c.toJSON(t)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?o.background=this.background.toJSON():this.background.isTexture&&(o.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(o.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){o.geometry=s(t.geometries,this.geometry);let l=this.geometry.parameters;if(l!==void 0&&l.shapes!==void 0){let c=l.shapes;if(Array.isArray(c))for(let u=0,d=c.length;u<d;u++){let h=c[u];s(t.shapes,h)}else s(t.shapes,c)}}if(this.isSkinnedMesh&&(o.bindMode=this.bindMode,o.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(t.skeletons,this.skeleton),o.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let l=[];for(let c=0,u=this.material.length;c<u;c++)l.push(s(t.materials,this.material[c]));o.material=l}else o.material=s(t.materials,this.material);if(this.children.length>0){o.children=[];for(let l=0;l<this.children.length;l++)o.children.push(this.children[l].toJSON(t).object)}if(this.animations.length>0){o.animations=[];for(let l=0;l<this.animations.length;l++){let c=this.animations[l];o.animations.push(s(t.animations,c))}}if(i){let l=a(t.geometries),c=a(t.materials),u=a(t.textures),d=a(t.images),h=a(t.shapes),f=a(t.skeletons),p=a(t.animations),v=a(t.nodes);l.length>0&&(r.geometries=l),c.length>0&&(r.materials=c),u.length>0&&(r.textures=u),d.length>0&&(r.images=d),h.length>0&&(r.shapes=h),f.length>0&&(r.skeletons=f),p.length>0&&(r.animations=p),v.length>0&&(r.nodes=v)}return r.object=o,r;function a(l){let c=[];for(let u in l){let d=l[u];delete d.metadata,c.push(d)}return c}}clone(t){return new this.constructor().copy(this,t)}copy(t,i=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),i===!0)for(let r=0;r<t.children.length;r++){let o=t.children[r];this.add(o.clone())}return this}}return n.DEFAULT_UP=new V(0,1,0),n.DEFAULT_MATRIX_AUTO_UPDATE=!0,n.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0,n})(),xo=new V,ta=new V,DE=new V,na=new V,Ed=new V,Md=new V,dF=new V,AE=new V,IE=new V,PE=new V,OE=new Mn,RE=new Mn,FE=new Mn,Za=class n{constructor(e=new V,t=new V,i=new V){this.a=e,this.b=t,this.c=i}static getNormal(e,t,i,r){r.subVectors(i,t),xo.subVectors(e,t),r.cross(xo);let o=r.lengthSq();return o>0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(e,t,i,r,o){xo.subVectors(r,t),ta.subVectors(i,t),DE.subVectors(e,t);let s=xo.dot(xo),a=xo.dot(ta),l=xo.dot(DE),c=ta.dot(ta),u=ta.dot(DE),d=s*c-a*a;if(d===0)return o.set(0,0,0),null;let h=1/d,f=(c*l-a*u)*h,p=(s*u-a*l)*h;return o.set(1-f-p,p,f)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,na)===null?!1:na.x>=0&&na.y>=0&&na.x+na.y<=1}static getInterpolation(e,t,i,r,o,s,a,l){return this.getBarycoord(e,t,i,r,na)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(o,na.x),l.addScaledVector(s,na.y),l.addScaledVector(a,na.z),l)}static getInterpolatedAttribute(e,t,i,r,o,s){return OE.setScalar(0),RE.setScalar(0),FE.setScalar(0),OE.fromBufferAttribute(e,t),RE.fromBufferAttribute(e,i),FE.fromBufferAttribute(e,r),s.setScalar(0),s.addScaledVector(OE,o.x),s.addScaledVector(RE,o.y),s.addScaledVector(FE,o.z),s}static isFrontFacing(e,t,i,r){return xo.subVectors(i,t),ta.subVectors(e,t),xo.cross(ta).dot(r)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,i,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return xo.subVectors(this.c,this.b),ta.subVectors(this.a,this.b),xo.cross(ta).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return n.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return n.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,r,o){return n.getInterpolation(e,this.a,this.b,this.c,t,i,r,o)}containsPoint(e){return n.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return n.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let i=this.a,r=this.b,o=this.c,s,a;Ed.subVectors(r,i),Md.subVectors(o,i),AE.subVectors(e,i);let l=Ed.dot(AE),c=Md.dot(AE);if(l<=0&&c<=0)return t.copy(i);IE.subVectors(e,r);let u=Ed.dot(IE),d=Md.dot(IE);if(u>=0&&d<=u)return t.copy(r);let h=l*d-u*c;if(h<=0&&l>=0&&u<=0)return s=l/(l-u),t.copy(i).addScaledVector(Ed,s);PE.subVectors(e,o);let f=Ed.dot(PE),p=Md.dot(PE);if(p>=0&&f<=p)return t.copy(o);let v=f*c-l*p;if(v<=0&&c>=0&&p<=0)return a=c/(c-p),t.copy(i).addScaledVector(Md,a);let g=u*p-f*d;if(g<=0&&d-u>=0&&f-p>=0)return dF.subVectors(o,r),a=(d-u)/(d-u+(f-p)),t.copy(r).addScaledVector(dF,a);let m=1/(g+v+h);return s=v*m,a=h*m,t.copy(i).addScaledVector(Ed,s).addScaledVector(Md,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},aN={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},Ya={h:0,s:0,l:0},h0={h:0,s:0,l:0};function NE(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}var mt=class{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){let r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=pn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Ot.colorSpaceToWorking(this,t),this}setRGB(e,t,i,r=Ot.workingColorSpace){return this.r=e,this.g=t,this.b=i,Ot.colorSpaceToWorking(this,r),this}setHSL(e,t,i,r=Ot.workingColorSpace){if(e=xM(e,1),t=Rt(t,0,1),i=Rt(i,0,1),t===0)this.r=this.g=this.b=i;else{let o=i<=.5?i*(1+t):i+t-i*t,s=2*i-o;this.r=NE(s,o,e+1/3),this.g=NE(s,o,e),this.b=NE(s,o,e-1/3)}return Ot.colorSpaceToWorking(this,r),this}setStyle(e,t=pn){function i(o){o!==void 0&&parseFloat(o)<1&&at("Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let o,s=r[1],a=r[2];switch(s){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,t);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,t);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,t);break;default:at("Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let o=r[1],s=o.length;if(s===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,t);if(s===6)return this.setHex(parseInt(o,16),t);at("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=pn){let i=aN[e.toLowerCase()];return i!==void 0?this.setHex(i,t):at("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=oa(e.r),this.g=oa(e.g),this.b=oa(e.b),this}copyLinearToSRGB(e){return this.r=Od(e.r),this.g=Od(e.g),this.b=Od(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=pn){return Ot.workingToColorSpace(Ci.copy(this),e),Math.round(Rt(Ci.r*255,0,255))*65536+Math.round(Rt(Ci.g*255,0,255))*256+Math.round(Rt(Ci.b*255,0,255))}getHexString(e=pn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Ot.workingColorSpace){Ot.workingToColorSpace(Ci.copy(this),t);let i=Ci.r,r=Ci.g,o=Ci.b,s=Math.max(i,r,o),a=Math.min(i,r,o),l,c,u=(a+s)/2;if(a===s)l=0,c=0;else{let d=s-a;switch(c=u<=.5?d/(s+a):d/(2-s-a),s){case i:l=(r-o)/d+(r<o?6:0);break;case r:l=(o-i)/d+2;break;case o:l=(i-r)/d+4;break}l/=6}return e.h=l,e.s=c,e.l=u,e}getRGB(e,t=Ot.workingColorSpace){return Ot.workingToColorSpace(Ci.copy(this),t),e.r=Ci.r,e.g=Ci.g,e.b=Ci.b,e}getStyle(e=pn){Ot.workingToColorSpace(Ci.copy(this),e);let t=Ci.r,i=Ci.g,r=Ci.b;return e!==pn?`color(${e} ${t.toFixed(3)} ${i.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(i*255)},${Math.round(r*255)})`}offsetHSL(e,t,i){return this.getHSL(Ya),this.setHSL(Ya.h+e,Ya.s+t,Ya.l+i)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,i){return this.r=e.r+(t.r-e.r)*i,this.g=e.g+(t.g-e.g)*i,this.b=e.b+(t.b-e.b)*i,this}lerpHSL(e,t){this.getHSL(Ya),e.getHSL(h0);let i=sp(Ya.h,h0.h,t),r=sp(Ya.s,h0.s,t),o=sp(Ya.l,h0.l,t);return this.setHSL(i,r,o),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let t=this.r,i=this.g,r=this.b,o=e.elements;return this.r=o[0]*t+o[3]*i+o[6]*r,this.g=o[1]*t+o[4]*i+o[7]*r,this.b=o[2]*t+o[5]*i+o[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},Ci=new mt;mt.NAMES=aN;var b6=0,Mr=class extends ps{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:b6++}),this.uuid=Kd(),this.name="",this.type="Material",this.blending=Ec,this.side=So,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=D0,this.blendDst=A0,this.blendEquation=Ka,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new mt(0,0,0),this.blendAlpha=0,this.depthFunc=Mc,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=WE,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=wc,this.stencilZFail=wc,this.stencilZPass=wc,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let i=e[t];if(i===void 0){at(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){at(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[t]=i}}toJSON(e){let t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});let i={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(i.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(i.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Ec&&(i.blending=this.blending),this.side!==So&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==D0&&(i.blendSrc=this.blendSrc),this.blendDst!==A0&&(i.blendDst=this.blendDst),this.blendEquation!==Ka&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==Mc&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==WE&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==wc&&(i.stencilFail=this.stencilFail),this.stencilZFail!==wc&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==wc&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.allowOverride===!1&&(i.allowOverride=!1),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function r(o){let s=[];for(let a in o){let l=o[a];delete l.metadata,s.push(l)}return s}if(t){let o=r(e.textures),s=r(e.images);o.length>0&&(i.textures=o),s.length>0&&(i.images=s)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,i=null;if(t!==null){let r=t.length;i=new Array(r);for(let o=0;o!==r;++o)i[o]=t[o].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}},dp=class extends Mr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new mt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Qa,this.combine=ay,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}};var Yn=new V,f0=new dt,S6=0,Cr=class{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:S6++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=$E,this.updateRanges=[],this.gpuType=Mo,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let r=0,o=this.itemSize;r<o;r++)this.array[e+r]=t.array[i+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,i=this.count;t<i;t++)f0.fromBufferAttribute(this,t),f0.applyMatrix3(e),this.setXY(t,f0.x,f0.y);else if(this.itemSize===3)for(let t=0,i=this.count;t<i;t++)Yn.fromBufferAttribute(this,t),Yn.applyMatrix3(e),this.setXYZ(t,Yn.x,Yn.y,Yn.z);return this}applyMatrix4(e){for(let t=0,i=this.count;t<i;t++)Yn.fromBufferAttribute(this,t),Yn.applyMatrix4(e),this.setXYZ(t,Yn.x,Yn.y,Yn.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)Yn.fromBufferAttribute(this,t),Yn.applyNormalMatrix(e),this.setXYZ(t,Yn.x,Yn.y,Yn.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)Yn.fromBufferAttribute(this,t),Yn.transformDirection(e),this.setXYZ(t,Yn.x,Yn.y,Yn.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let i=this.array[e*this.itemSize+t];return this.normalized&&(i=Pd(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=Ni(i,this.array)),this.array[e*this.itemSize+t]=i,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=Pd(t,this.array)),t}setX(e,t){return this.normalized&&(t=Ni(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=Pd(t,this.array)),t}setY(e,t){return this.normalized&&(t=Ni(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=Pd(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Ni(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=Pd(t,this.array)),t}setW(e,t){return this.normalized&&(t=Ni(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,i){return e*=this.itemSize,this.normalized&&(t=Ni(t,this.array),i=Ni(i,this.array)),this.array[e+0]=t,this.array[e+1]=i,this}setXYZ(e,t,i,r){return e*=this.itemSize,this.normalized&&(t=Ni(t,this.array),i=Ni(i,this.array),r=Ni(r,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=r,this}setXYZW(e,t,i,r,o){return e*=this.itemSize,this.normalized&&(t=Ni(t,this.array),i=Ni(i,this.array),r=Ni(r,this.array),o=Ni(o,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=r,this.array[e+3]=o,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==$E&&(e.usage=this.usage),e}};var hp=class extends Cr{constructor(e,t,i){super(new Uint16Array(e),t,i)}};var fp=class extends Cr{constructor(e,t,i){super(new Uint32Array(e),t,i)}};var Bn=class extends Cr{constructor(e,t,i){super(new Float32Array(e),t,i)}},C6=0,Jr=new Sn,kE=new Er,Td=new V,Sr=new ki,ip=new ki,ri=new V,Li=class n extends ps{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:C6++}),this.uuid=Kd(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(yM(e)?fp:hp)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,i=0){this.groups.push({start:e,count:t,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let i=this.attributes.normal;if(i!==void 0){let o=new Ct().getNormalMatrix(e);i.applyNormalMatrix(o),i.needsUpdate=!0}let r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return Jr.makeRotationFromQuaternion(e),this.applyMatrix4(Jr),this}rotateX(e){return Jr.makeRotationX(e),this.applyMatrix4(Jr),this}rotateY(e){return Jr.makeRotationY(e),this.applyMatrix4(Jr),this}rotateZ(e){return Jr.makeRotationZ(e),this.applyMatrix4(Jr),this}translate(e,t,i){return Jr.makeTranslation(e,t,i),this.applyMatrix4(Jr),this}scale(e,t,i){return Jr.makeScale(e,t,i),this.applyMatrix4(Jr),this}lookAt(e){return kE.lookAt(e),kE.updateMatrix(),this.applyMatrix4(kE.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Td).negate(),this.translate(Td.x,Td.y,Td.z),this}setFromPoints(e){let t=this.getAttribute("position");if(t===void 0){let i=[];for(let r=0,o=e.length;r<o;r++){let s=e[r];i.push(s.x,s.y,s.z||0)}this.setAttribute("position",new Bn(i,3))}else{let i=Math.min(e.length,t.count);for(let r=0;r<i;r++){let o=e[r];t.setXYZ(r,o.x,o.y,o.z||0)}e.length>t.count&&at("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new ki);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){ut("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new V(-1/0,-1/0,-1/0),new V(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let i=0,r=t.length;i<r;i++){let o=t[i];Sr.setFromBufferAttribute(o),this.morphTargetsRelative?(ri.addVectors(this.boundingBox.min,Sr.min),this.boundingBox.expandByPoint(ri),ri.addVectors(this.boundingBox.max,Sr.max),this.boundingBox.expandByPoint(ri)):(this.boundingBox.expandByPoint(Sr.min),this.boundingBox.expandByPoint(Sr.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&ut('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Ja);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){ut("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new V,1/0);return}if(e){let i=this.boundingSphere.center;if(Sr.setFromBufferAttribute(e),t)for(let o=0,s=t.length;o<s;o++){let a=t[o];ip.setFromBufferAttribute(a),this.morphTargetsRelative?(ri.addVectors(Sr.min,ip.min),Sr.expandByPoint(ri),ri.addVectors(Sr.max,ip.max),Sr.expandByPoint(ri)):(Sr.expandByPoint(ip.min),Sr.expandByPoint(ip.max))}Sr.getCenter(i);let r=0;for(let o=0,s=e.count;o<s;o++)ri.fromBufferAttribute(e,o),r=Math.max(r,i.distanceToSquared(ri));if(t)for(let o=0,s=t.length;o<s;o++){let a=t[o],l=this.morphTargetsRelative;for(let c=0,u=a.count;c<u;c++)ri.fromBufferAttribute(a,c),l&&(Td.fromBufferAttribute(e,c),ri.add(Td)),r=Math.max(r,i.distanceToSquared(ri))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&ut('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){ut("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let i=t.position,r=t.normal,o=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Cr(new Float32Array(4*i.count),4));let s=this.getAttribute("tangent"),a=[],l=[];for(let A=0;A<i.count;A++)a[A]=new V,l[A]=new V;let c=new V,u=new V,d=new V,h=new dt,f=new dt,p=new dt,v=new V,g=new V;function m(A,C,M){c.fromBufferAttribute(i,A),u.fromBufferAttribute(i,C),d.fromBufferAttribute(i,M),h.fromBufferAttribute(o,A),f.fromBufferAttribute(o,C),p.fromBufferAttribute(o,M),u.sub(c),d.sub(c),f.sub(h),p.sub(h);let N=1/(f.x*p.y-p.x*f.y);isFinite(N)&&(v.copy(u).multiplyScalar(p.y).addScaledVector(d,-f.y).multiplyScalar(N),g.copy(d).multiplyScalar(f.x).addScaledVector(u,-p.x).multiplyScalar(N),a[A].add(v),a[C].add(v),a[M].add(v),l[A].add(g),l[C].add(g),l[M].add(g))}let y=this.groups;y.length===0&&(y=[{start:0,count:e.count}]);for(let A=0,C=y.length;A<C;++A){let M=y[A],N=M.start,j=M.count;for(let z=N,$=N+j;z<$;z+=3)m(e.getX(z+0),e.getX(z+1),e.getX(z+2))}let _=new V,x=new V,b=new V,w=new V;function E(A){b.fromBufferAttribute(r,A),w.copy(b);let C=a[A];_.copy(C),_.sub(b.multiplyScalar(b.dot(C))).normalize(),x.crossVectors(w,C);let N=x.dot(l[A])<0?-1:1;s.setXYZW(A,_.x,_.y,_.z,N)}for(let A=0,C=y.length;A<C;++A){let M=y[A],N=M.start,j=M.count;for(let z=N,$=N+j;z<$;z+=3)E(e.getX(z+0)),E(e.getX(z+1)),E(e.getX(z+2))}}computeVertexNormals(){let e=this.index,t=this.getAttribute("position");if(t!==void 0){let i=this.getAttribute("normal");if(i===void 0)i=new Cr(new Float32Array(t.count*3),3),this.setAttribute("normal",i);else for(let h=0,f=i.count;h<f;h++)i.setXYZ(h,0,0,0);let r=new V,o=new V,s=new V,a=new V,l=new V,c=new V,u=new V,d=new V;if(e)for(let h=0,f=e.count;h<f;h+=3){let p=e.getX(h+0),v=e.getX(h+1),g=e.getX(h+2);r.fromBufferAttribute(t,p),o.fromBufferAttribute(t,v),s.fromBufferAttribute(t,g),u.subVectors(s,o),d.subVectors(r,o),u.cross(d),a.fromBufferAttribute(i,p),l.fromBufferAttribute(i,v),c.fromBufferAttribute(i,g),a.add(u),l.add(u),c.add(u),i.setXYZ(p,a.x,a.y,a.z),i.setXYZ(v,l.x,l.y,l.z),i.setXYZ(g,c.x,c.y,c.z)}else for(let h=0,f=t.count;h<f;h+=3)r.fromBufferAttribute(t,h+0),o.fromBufferAttribute(t,h+1),s.fromBufferAttribute(t,h+2),u.subVectors(s,o),d.subVectors(r,o),u.cross(d),i.setXYZ(h+0,u.x,u.y,u.z),i.setXYZ(h+1,u.x,u.y,u.z),i.setXYZ(h+2,u.x,u.y,u.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){let e=this.attributes.normal;for(let t=0,i=e.count;t<i;t++)ri.fromBufferAttribute(e,t),ri.normalize(),e.setXYZ(t,ri.x,ri.y,ri.z)}toNonIndexed(){function e(a,l){let c=a.array,u=a.itemSize,d=a.normalized,h=new c.constructor(l.length*u),f=0,p=0;for(let v=0,g=l.length;v<g;v++){a.isInterleavedBufferAttribute?f=l[v]*a.data.stride+a.offset:f=l[v]*u;for(let m=0;m<u;m++)h[p++]=c[f++]}return new Cr(h,u,d)}if(this.index===null)return at("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let t=new n,i=this.index.array,r=this.attributes;for(let a in r){let l=r[a],c=e(l,i);t.setAttribute(a,c)}let o=this.morphAttributes;for(let a in o){let l=[],c=o[a];for(let u=0,d=c.length;u<d;u++){let h=c[u],f=e(h,i);l.push(f)}t.morphAttributes[a]=l}t.morphTargetsRelative=this.morphTargetsRelative;let s=this.groups;for(let a=0,l=s.length;a<l;a++){let c=s[a];t.addGroup(c.start,c.count,c.materialIndex)}return t}toJSON(){let e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){let l=this.parameters;for(let c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let i=this.attributes;for(let l in i){let c=i[l];e.data.attributes[l]=c.toJSON(e.data)}let r={},o=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],u=[];for(let d=0,h=c.length;d<h;d++){let f=c[d];u.push(f.toJSON(e.data))}u.length>0&&(r[l]=u,o=!0)}o&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);let s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));let a=this.boundingSphere;return a!==null&&(e.data.boundingSphere=a.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let i=e.index;i!==null&&this.setIndex(i.clone());let r=e.attributes;for(let c in r){let u=r[c];this.setAttribute(c,u.clone(t))}let o=e.morphAttributes;for(let c in o){let u=[],d=o[c];for(let h=0,f=d.length;h<f;h++)u.push(d[h].clone(t));this.morphAttributes[c]=u}this.morphTargetsRelative=e.morphTargetsRelative;let s=e.groups;for(let c=0,u=s.length;c<u;c++){let d=s[c];this.addGroup(d.start,d.count,d.materialIndex)}let a=e.boundingBox;a!==null&&(this.boundingBox=a.clone());let l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}},hF=new Sn,Sc=new sa,p0=new Ja,fF=new V,m0=new V,g0=new V,v0=new V,LE=new V,y0=new V,pF=new V,_0=new V,Ui=class extends Er{constructor(e=new Li,t=new dp){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){let t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){let r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=r.length;o<s;o++){let a=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=o}}}}getVertexPosition(e,t){let i=this.geometry,r=i.attributes.position,o=i.morphAttributes.position,s=i.morphTargetsRelative;t.fromBufferAttribute(r,e);let a=this.morphTargetInfluences;if(o&&a){y0.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let u=a[l],d=o[l];u!==0&&(LE.fromBufferAttribute(d,e),s?y0.addScaledVector(LE,u):y0.addScaledVector(LE.sub(t),u))}t.add(y0)}return t}raycast(e,t){let i=this.geometry,r=this.material,o=this.matrixWorld;r!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),p0.copy(i.boundingSphere),p0.applyMatrix4(o),Sc.copy(e.ray).recast(e.near),!(p0.containsPoint(Sc.origin)===!1&&(Sc.intersectSphere(p0,fF)===null||Sc.origin.distanceToSquared(fF)>(e.far-e.near)**2))&&(hF.copy(o).invert(),Sc.copy(e.ray).applyMatrix4(hF),!(i.boundingBox!==null&&Sc.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,Sc)))}_computeIntersections(e,t,i){let r,o=this.geometry,s=this.material,a=o.index,l=o.attributes.position,c=o.attributes.uv,u=o.attributes.uv1,d=o.attributes.normal,h=o.groups,f=o.drawRange;if(a!==null)if(Array.isArray(s))for(let p=0,v=h.length;p<v;p++){let g=h[p],m=s[g.materialIndex],y=Math.max(g.start,f.start),_=Math.min(a.count,Math.min(g.start+g.count,f.start+f.count));for(let x=y,b=_;x<b;x+=3){let w=a.getX(x),E=a.getX(x+1),A=a.getX(x+2);r=x0(this,m,e,i,c,u,d,w,E,A),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,f.start),v=Math.min(a.count,f.start+f.count);for(let g=p,m=v;g<m;g+=3){let y=a.getX(g),_=a.getX(g+1),x=a.getX(g+2);r=x0(this,s,e,i,c,u,d,y,_,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}else if(l!==void 0)if(Array.isArray(s))for(let p=0,v=h.length;p<v;p++){let g=h[p],m=s[g.materialIndex],y=Math.max(g.start,f.start),_=Math.min(l.count,Math.min(g.start+g.count,f.start+f.count));for(let x=y,b=_;x<b;x+=3){let w=x,E=x+1,A=x+2;r=x0(this,m,e,i,c,u,d,w,E,A),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,f.start),v=Math.min(l.count,f.start+f.count);for(let g=p,m=v;g<m;g+=3){let y=g,_=g+1,x=g+2;r=x0(this,s,e,i,c,u,d,y,_,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}}};function w6(n,e,t,i,r,o,s,a){let l;if(e.side===Bi?l=i.intersectTriangle(s,o,r,!0,a):l=i.intersectTriangle(r,o,s,e.side===So,a),l===null)return null;_0.copy(a),_0.applyMatrix4(n.matrixWorld);let c=t.ray.origin.distanceTo(_0);return c<t.near||c>t.far?null:{distance:c,point:_0.clone(),object:n}}function x0(n,e,t,i,r,o,s,a,l,c){n.getVertexPosition(a,m0),n.getVertexPosition(l,g0),n.getVertexPosition(c,v0);let u=w6(n,e,t,i,m0,g0,v0,pF);if(u){let d=new V;Za.getBarycoord(pF,m0,g0,v0,d),r&&(u.uv=Za.getInterpolatedAttribute(r,a,l,c,d,new dt)),o&&(u.uv1=Za.getInterpolatedAttribute(o,a,l,c,d,new dt)),s&&(u.normal=Za.getInterpolatedAttribute(s,a,l,c,d,new V),u.normal.dot(i.direction)>0&&u.normal.multiplyScalar(-1));let h={a,b:l,c,normal:new V,materialIndex:0};Za.getNormal(m0,g0,v0,h.normal),u.face=h,u.barycoord=d}return u}var zd=class n extends Li{constructor(e=1,t=1,i=1,r=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:r,heightSegments:o,depthSegments:s};let a=this;r=Math.floor(r),o=Math.floor(o),s=Math.floor(s);let l=[],c=[],u=[],d=[],h=0,f=0;p("z","y","x",-1,-1,i,t,e,s,o,0),p("z","y","x",1,-1,i,t,-e,s,o,1),p("x","z","y",1,1,e,i,t,r,s,2),p("x","z","y",1,-1,e,i,-t,r,s,3),p("x","y","z",1,-1,e,t,i,r,o,4),p("x","y","z",-1,-1,e,t,-i,r,o,5),this.setIndex(l),this.setAttribute("position",new Bn(c,3)),this.setAttribute("normal",new Bn(u,3)),this.setAttribute("uv",new Bn(d,2));function p(v,g,m,y,_,x,b,w,E,A,C){let M=x/E,N=b/A,j=x/2,z=b/2,$=w/2,q=E+1,X=A+1,G=0,Q=0,pe=new V;for(let me=0;me<X;me++){let ve=me*N-z;for(let Ye=0;Ye<q;Ye++){let lt=Ye*M-j;pe[v]=lt*y,pe[g]=ve*_,pe[m]=$,c.push(pe.x,pe.y,pe.z),pe[v]=0,pe[g]=0,pe[m]=w>0?1:-1,u.push(pe.x,pe.y,pe.z),d.push(Ye/E),d.push(1-me/A),G+=1}}for(let me=0;me<A;me++)for(let ve=0;ve<E;ve++){let Ye=h+ve+q*me,lt=h+ve+q*(me+1),Vt=h+(ve+1)+q*(me+1),Xt=h+(ve+1)+q*me;l.push(Ye,lt,Xt),l.push(lt,Vt,Xt),Q+=6}a.addGroup(f,Q,C),f+=Q,h+=G}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new n(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}};function Uc(n){let e={};for(let t in n){e[t]={};for(let i in n[t]){let r=n[t][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(at("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][i]=null):e[t][i]=r.clone():Array.isArray(r)?e[t][i]=r.slice():e[t][i]=r}}return e}function Ei(n){let e={};for(let t=0;t<n.length;t++){let i=Uc(n[t]);for(let r in i)e[r]=i[r]}return e}function E6(n){let e=[];for(let t=0;t<n.length;t++)e.push(n[t].clone());return e}function bM(n){let e=n.getRenderTarget();return e===null?n.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:Ot.workingColorSpace}var lN={clone:Uc,merge:Ei},M6=`void main() {
|
|
5
|
+
`).forEach(t=>{let i=t.indexOf(":");if(i>0){let r=t.slice(0,i),o=t.slice(i+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,i)=>{this.addHeaderEntry(i,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,i])=>{this.setHeaderEntries(t,i)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof n?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){let t=new n;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof n?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let i=e.value;if(typeof i=="string"&&(i=[i]),i.length===0)return;this.maybeSetNormalizedName(e.name,t);let r=(e.op==="a"?this.headers.get(t):void 0)||[];r.push(...i),this.headers.set(t,r);break;case"d":let o=e.value;if(!o)this.headers.delete(t),this.normalizedNames.delete(t);else{let s=this.headers.get(t);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,s)}break}}addHeaderEntry(e,t){let i=e.toLowerCase();this.maybeSetNormalizedName(e,i),this.headers.has(i)?this.headers.get(i).push(t):this.headers.set(i,[t])}setHeaderEntries(e,t){let i=(Array.isArray(t)?t:[t]).map(o=>o.toString()),r=e.toLowerCase();this.headers.set(r,i),this.maybeSetNormalizedName(e,r)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var jv=class{map=new Map;set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}},Wv=class{encodeKey(e){return l2(e)}encodeValue(e){return l2(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function P8(n,e){let t=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=o==-1?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,o)),e.decodeValue(r.slice(o+1))],l=t.get(s)||[];l.push(a),t.set(s,l)}),t}var O8=/%(\d[a-f0-9])/gi,R8={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function l2(n){return encodeURIComponent(n).replace(O8,(e,t)=>R8[t]??e)}function Gv(n){return`${n}`}var qr=class n{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new Wv,e.fromString){if(e.fromObject)throw new ze(2805,!1);this.map=P8(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let i=e.fromObject[t],r=Array.isArray(i)?i.map(Gv):[Gv(i)];this.map.set(t,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(i=>{let r=e[i];Array.isArray(r)?r.forEach(o=>{t.push({param:i,value:o,op:"a"})}):t.push({param:i,value:r,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(i=>t+"="+this.encoder.encodeValue(i)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new n({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=(e.op==="a"?this.map.get(e.param):void 0)||[];t.push(Gv(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let i=this.map.get(e.param)||[],r=i.indexOf(Gv(e.value));r!==-1&&i.splice(r,1),i.length>0?this.map.set(e.param,i):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};function F8(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function c2(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function u2(n){return typeof Blob<"u"&&n instanceof Blob}function d2(n){return typeof FormData<"u"&&n instanceof FormData}function N8(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}var h2="Content-Type",f2="Accept",p2="text/plain",m2="application/json",k8=`${m2}, ${p2}, */*`,dd=class n{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(e,t,i,r){this.url=t,this.method=e.toUpperCase();let o;if(F8(this.method)||r?(this.body=i!==void 0?i:null,o=r):o=i,o){if(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,this.keepalive=!!o.keepalive,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),o.priority&&(this.priority=o.priority),o.cache&&(this.cache=o.cache),o.credentials&&(this.credentials=o.credentials),typeof o.timeout=="number"){if(o.timeout<1||!Number.isInteger(o.timeout))throw new ze(2822,"");this.timeout=o.timeout}o.mode&&(this.mode=o.mode),o.redirect&&(this.redirect=o.redirect),o.integrity&&(this.integrity=o.integrity),o.referrer&&(this.referrer=o.referrer),o.referrerPolicy&&(this.referrerPolicy=o.referrerPolicy),this.transferCache=o.transferCache}if(this.headers??=new Zr,this.context??=new jv,!this.params)this.params=new qr,this.urlWithParams=t;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=t;else{let a=t.indexOf("?"),l=a===-1?"?":a<t.length-1?"&":"";this.urlWithParams=t+l+s}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||c2(this.body)||u2(this.body)||d2(this.body)||N8(this.body)?this.body:this.body instanceof qr?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||d2(this.body)?null:u2(this.body)?this.body.type||null:c2(this.body)?null:typeof this.body=="string"?p2:this.body instanceof qr?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?m2:null}clone(e={}){let t=e.method||this.method,i=e.url||this.url,r=e.responseType||this.responseType,o=e.keepalive??this.keepalive,s=e.priority||this.priority,a=e.cache||this.cache,l=e.mode||this.mode,c=e.redirect||this.redirect,u=e.credentials||this.credentials,d=e.referrer||this.referrer,h=e.integrity||this.integrity,f=e.referrerPolicy||this.referrerPolicy,p=e.transferCache??this.transferCache,v=e.timeout??this.timeout,g=e.body!==void 0?e.body:this.body,m=e.withCredentials??this.withCredentials,y=e.reportProgress??this.reportProgress,_=e.headers||this.headers,x=e.params||this.params,b=e.context??this.context;return e.setHeaders!==void 0&&(_=Object.keys(e.setHeaders).reduce((w,E)=>w.set(E,e.setHeaders[E]),_)),e.setParams&&(x=Object.keys(e.setParams).reduce((w,E)=>w.set(E,e.setParams[E]),x)),new n(t,i,g,{params:x,headers:_,context:b,reportProgress:y,responseType:r,withCredentials:m,transferCache:p,keepalive:o,cache:a,priority:s,timeout:v,mode:l,redirect:c,credentials:u,referrer:d,integrity:h,referrerPolicy:f})}},yc=(function(n){return n[n.Sent=0]="Sent",n[n.UploadProgress=1]="UploadProgress",n[n.ResponseHeader=2]="ResponseHeader",n[n.DownloadProgress=3]="DownloadProgress",n[n.Response=4]="Response",n[n.User=5]="User",n})(yc||{}),hd=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(e,t=200,i="OK"){this.headers=e.headers||new Zr,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||i,this.url=e.url||null,this.redirected=e.redirected,this.responseType=e.responseType,this.ok=this.status>=200&&this.status<300}},$v=class n extends hd{constructor(e={}){super(e)}type=yc.ResponseHeader;clone(e={}){return new n({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},fd=class n extends hd{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=yc.Response;clone(e={}){return new n({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0,redirected:e.redirected??this.redirected,responseType:e.responseType??this.responseType})}},za=class extends hd{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},L8=200,U8=204;var B8=new Ve("");var V8=/^\)\]\}',?\n/;var eE=(()=>{class n{xhrFactory;tracingService=Z(Xs,{optional:!0});constructor(t){this.xhrFactory=t}maybePropagateTrace(t){return this.tracingService?.propagate?this.tracingService.propagate(t):t}handle(t){if(t.method==="JSONP")throw new ze(-2800,!1);let i=this.xhrFactory;return $o(null).pipe(Eb(()=>new bn(o=>{let s=i.build();if(s.open(t.method,t.urlWithParams),t.withCredentials&&(s.withCredentials=!0),t.headers.forEach((g,m)=>s.setRequestHeader(g,m.join(","))),t.headers.has(f2)||s.setRequestHeader(f2,k8),!t.headers.has(h2)){let g=t.detectContentTypeHeader();g!==null&&s.setRequestHeader(h2,g)}if(t.timeout&&(s.timeout=t.timeout),t.responseType){let g=t.responseType.toLowerCase();s.responseType=g!=="json"?g:"text"}let a=t.serializeBody(),l=null,c=()=>{if(l!==null)return l;let g=s.statusText||"OK",m=new Zr(s.getAllResponseHeaders()),y=s.responseURL||t.url;return l=new $v({headers:m,status:s.status,statusText:g,url:y}),l},u=this.maybePropagateTrace(()=>{let{headers:g,status:m,statusText:y,url:_}=c(),x=null;m!==U8&&(x=typeof s.response>"u"?s.responseText:s.response),m===0&&(m=x?L8:0);let b=m>=200&&m<300;if(t.responseType==="json"&&typeof x=="string"){let w=x;x=x.replace(V8,"");try{x=x!==""?JSON.parse(x):null}catch(E){x=w,b&&(b=!1,x={error:E,text:x})}}b?(o.next(new fd({body:x,headers:g,status:m,statusText:y,url:_||void 0})),o.complete()):o.error(new za({error:x,headers:g,status:m,statusText:y,url:_||void 0}))}),d=this.maybePropagateTrace(g=>{let{url:m}=c(),y=new za({error:g,status:s.status||0,statusText:s.statusText||"Unknown Error",url:m||void 0});o.error(y)}),h=d;t.timeout&&(h=this.maybePropagateTrace(g=>{let{url:m}=c(),y=new za({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:m||void 0});o.error(y)}));let f=!1,p=this.maybePropagateTrace(g=>{f||(o.next(c()),f=!0);let m={type:yc.DownloadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),t.responseType==="text"&&s.responseText&&(m.partialText=s.responseText),o.next(m)}),v=this.maybePropagateTrace(g=>{let m={type:yc.UploadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),o.next(m)});return s.addEventListener("load",u),s.addEventListener("error",d),s.addEventListener("timeout",h),s.addEventListener("abort",d),t.reportProgress&&(s.addEventListener("progress",p),a!==null&&s.upload&&s.upload.addEventListener("progress",v)),s.send(a),o.next({type:yc.Sent}),()=>{s.removeEventListener("error",d),s.removeEventListener("abort",d),s.removeEventListener("load",u),s.removeEventListener("timeout",h),t.reportProgress&&(s.removeEventListener("progress",p),a!==null&&s.upload&&s.upload.removeEventListener("progress",v)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(i){return new(i||n)(We(vc))};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function z8(n,e){return e(n)}function H8(n,e,t){return(i,r)=>Lu(t,()=>e(i,o=>n(o,r)))}var tE=new Ve("",{factory:()=>[]}),nE=new Ve(""),g2=new Ve("",{factory:()=>!0});var iE=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=ge({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=We(eE),r},providedIn:"root"})}return n})();var Xv=(()=>{class n{backend;injector;chain=null;pendingTasks=Z(Hu);contributeToStability=Z(g2);constructor(t,i){this.backend=t,this.injector=i}handle(t){if(this.chain===null){let i=Array.from(new Set([...this.injector.get(tE),...this.injector.get(nE,[])]));this.chain=i.reduceRight((r,o)=>H8(r,o,this.injector),z8)}if(this.contributeToStability){let i=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(Wh(i))}else return this.chain(t,i=>this.backend.handle(i))}static \u0275fac=function(i){return new(i||n)(We(iE),We(xi))};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),rE=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=ge({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=We(Xv),r},providedIn:"root"})}return n})();function Qw(n,e){return{body:e,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials,credentials:n.credentials,transferCache:n.transferCache,timeout:n.timeout,keepalive:n.keepalive,priority:n.priority,cache:n.cache,mode:n.mode,redirect:n.redirect,integrity:n.integrity,referrer:n.referrer,referrerPolicy:n.referrerPolicy}}var Yv=(()=>{class n{handler;constructor(t){this.handler=t}request(t,i,r={}){let o;if(t instanceof dd)o=t;else{let l;r.headers instanceof Zr?l=r.headers:l=new Zr(r.headers);let c;r.params&&(r.params instanceof qr?c=r.params:c=new qr({fromObject:r.params})),o=new dd(t,i,r.body!==void 0?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache,keepalive:r.keepalive,priority:r.priority,cache:r.cache,mode:r.mode,redirect:r.redirect,credentials:r.credentials,referrer:r.referrer,referrerPolicy:r.referrerPolicy,integrity:r.integrity,timeout:r.timeout})}let s=$o(o).pipe(wb(l=>this.handler.handle(l)));if(t instanceof dd||r.observe==="events")return s;let a=s.pipe(Cb(l=>l instanceof fd));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(Xi(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new ze(2806,!1);return l.body}));case"blob":return a.pipe(Xi(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new ze(2807,!1);return l.body}));case"text":return a.pipe(Xi(l=>{if(l.body!==null&&typeof l.body!="string")throw new ze(2808,!1);return l.body}));default:return a.pipe(Xi(l=>l.body))}case"response":return a;default:throw new ze(2809,!1)}}delete(t,i={}){return this.request("DELETE",t,i)}get(t,i={}){return this.request("GET",t,i)}head(t,i={}){return this.request("HEAD",t,i)}jsonp(t,i){return this.request("JSONP",t,{params:new qr().append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,i={}){return this.request("OPTIONS",t,i)}patch(t,i,r={}){return this.request("PATCH",t,Qw(r,i))}post(t,i,r={}){return this.request("POST",t,Qw(r,i))}put(t,i,r={}){return this.request("PUT",t,Qw(r,i))}static \u0275fac=function(i){return new(i||n)(We(rE))};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var G8=new Ve("",{factory:()=>!0}),j8="XSRF-TOKEN",W8=new Ve("",{factory:()=>j8}),$8="X-XSRF-TOKEN",X8=new Ve("",{factory:()=>$8}),Y8=(()=>{class n{cookieName=Z(W8);doc=Z(wn);lastCookieString="";lastToken=null;parseCount=0;getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Bf(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),v2=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=ge({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=We(Y8),r},providedIn:"root"})}return n})();function q8(n,e){if(!Z(G8)||n.method==="GET"||n.method==="HEAD")return e(n);try{let r=Z(Nv).href,{origin:o}=new URL(r),{origin:s}=new URL(n.url,o);if(o!==s)return e(n)}catch{return e(n)}let t=Z(v2).getToken(),i=Z(X8);return t!=null&&!n.headers.has(i)&&(n=n.clone({headers:n.headers.set(i,t)})),e(n)}var oE=(function(n){return n[n.Interceptors=0]="Interceptors",n[n.LegacyInterceptors=1]="LegacyInterceptors",n[n.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",n[n.NoXsrfProtection=3]="NoXsrfProtection",n[n.JsonpSupport=4]="JsonpSupport",n[n.RequestsMadeViaParent=5]="RequestsMadeViaParent",n[n.Fetch=6]="Fetch",n})(oE||{});function Z8(n,e){return{\u0275kind:n,\u0275providers:e}}function sE(...n){let e=[Yv,Xv,{provide:rE,useExisting:Xv},{provide:iE,useFactory:()=>Z(B8,{optional:!0})??Z(eE)},{provide:tE,useValue:q8,multi:!0}];for(let t of n)e.push(...t.\u0275providers);return Bs(e)}function aE(n){return Z8(oE.Interceptors,n.map(e=>({provide:tE,useValue:e,multi:!0})))}var K8=new Ve(""),J8="b",Q8="h",eW="s",tW="st",nW="u",iW="rt",lE=new Ve(""),rW=["GET","HEAD"];function oW(n,e){let f=Z(lE),{isCacheActive:t}=f,i=Zt(f,["isCacheActive"]),{transferCache:r,method:o}=n;if(!t||r===!1||o==="POST"&&!i.includePostRequests&&!r||o!=="POST"&&!rW.includes(o)||!i.includeRequestsWithAuthHeaders&&sW(n)||i.filter?.(n)===!1)return e(n);let s=Z(ed);if(Z(K8,{optional:!0}))throw new ze(2803,!1);let l=n.url,c=aW(n,l),u=s.get(c,null),d=i.includeHeaders;if(typeof r=="object"&&r.includeHeaders&&(d=r.includeHeaders),u){let{[J8]:p,[iW]:v,[Q8]:g,[eW]:m,[tW]:y,[nW]:_}=u,x=p;switch(v){case"arraybuffer":x=_2(p);break;case"blob":x=new Blob([_2(p)]);break}let b=new Zr(g);return $o(new fd({body:x,headers:b,status:m,statusText:y,url:_}))}return e(n)}function sW(n){return n.headers.has("authorization")||n.headers.has("proxy-authorization")}function y2(n){return[...n.keys()].sort().map(e=>`${e}=${n.getAll(e)}`).join("&")}function aW(n,e){let{params:t,method:i,responseType:r}=n,o=y2(t),s=n.serializeBody();s instanceof URLSearchParams?s=y2(s):typeof s!="string"&&(s="");let a=[i,r,e,s,o].join("|"),l=lW(a);return l}function lW(n){let e=0;for(let t of n)e=Math.imul(31,e)+t.charCodeAt(0)<<0;return e+=2147483648,e.toString()}function _2(n){let e=atob(n);return Uint8Array.from(e,i=>i.charCodeAt(0)).buffer}function x2(n){return[{provide:lE,useFactory:()=>(go("NgHttpTransferCache"),R({isCacheActive:!0},n))},{provide:nE,useValue:oW,multi:!0},{provide:ad,multi:!0,useFactory:()=>{let e=Z(_r),t=Z(lE);return()=>{e.whenStable().then(()=>{t.isCacheActive=!1})}}}]}var cE=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=ge({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=We(cW),r},providedIn:"root"})}return n})(),cW=(()=>{class n extends cE{_doc;constructor(t){super(),this._doc=t}sanitize(t,i){if(i==null)return null;switch(t){case ls.NONE:return i;case ls.HTML:return ka(i,"HTML")?as(i):zC(this._doc,String(i)).toString();case ls.STYLE:return ka(i,"Style")?as(i):i;case ls.SCRIPT:if(ka(i,"Script"))return as(i);throw new ze(5200,!1);case ls.URL:return ka(i,"URL")?as(i):Mf(String(i));case ls.RESOURCE_URL:if(ka(i,"ResourceURL"))return as(i);throw new ze(5201,!1);default:throw new ze(5202,!1)}}bypassSecurityTrustHtml(t){return kC(t)}bypassSecurityTrustStyle(t){return LC(t)}bypassSecurityTrustScript(t){return UC(t)}bypassSecurityTrustUrl(t){return BC(t)}bypassSecurityTrustResourceUrl(t){return VC(t)}static \u0275fac=function(i){return new(i||n)(We(wn))};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),qv=(function(n){return n[n.NoHttpTransferCache=0]="NoHttpTransferCache",n[n.HttpTransferCacheOptions=1]="HttpTransferCacheOptions",n[n.I18nSupport=2]="I18nSupport",n[n.EventReplay=3]="EventReplay",n[n.IncrementalHydration=4]="IncrementalHydration",n})(qv||{});function uW(n,e=[],t={}){return{\u0275kind:n,\u0275providers:e}}function b2(){return uW(qv.EventReplay,GR())}function S2(...n){let e=[],t=new Set;for(let{\u0275providers:r,\u0275kind:o}of n)t.add(o),r.length&&e.push(r);let i=t.has(qv.HttpTransferCacheOptions);return Bs([[],[],jR(),t.has(qv.NoHttpTransferCache)||i?[]:x2({}),e])}var pd=class n{loadingCount=k(0);isLoading=ke(()=>this.loadingCount()>0);show(){this.loadingCount.update(e=>e+1)}hide(){this.loadingCount.update(e=>Math.max(0,e-1))}reset(){this.loadingCount.set(0)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})};function Zv(n){let e=s=>Array.isArray(s)?s.filter(a=>typeof a=="string").join(", "):"";if(!n)return"Unhandled error";let t=n?.error,i=e(t?.errors);if(i)return i;let r=e(t?.message??t?.Messages);if(r)return r;if(Array.isArray(t)&&t.length>0)return e(t)||"Unhandled error";if(typeof t=="string"&&t.trim())return t;if(Array.isArray(n)&&n.length>0)return e(n)||"Unhandled error";let o=e(n?.messages);if(o)return o;if(typeof n?.messages=="string"&&n.messages.trim())return n.messages;if(typeof n?.message=="string"&&n.message.trim())return n.message;if(t?.errors&&typeof t.errors=="object"&&!Array.isArray(t.errors)){let s=[];for(let a in t.errors)Object.prototype.hasOwnProperty.call(t.errors,a)&&s.push(...t.errors[a]??[]);if(s.length)return s.join(", ")}return n?.status===401?"Unauthorized: Please verify your credentials and try again":"Unhandled error"}var Zs=class n{toastsSignal=k([]);toasts=ke(()=>this.toastsSignal());defaultTimeoutMs=4500;showSuccess(e,t="Success"){this.pushToast("success",t,e)}showInfo(e,t="Info"){this.pushToast("info",t,e)}showWarn(e,t="Warning"){this.pushToast("warning",t,e)}showError(e,t="Error"){this.pushToast("error",t,e)}showContrast(e,t="Note"){this.pushToast("info",t,e)}showSecondary(e,t="Secondary"){this.pushToast("info",t,e)}dismissToast(e){this.toastsSignal.update(t=>t.filter(i=>i.id!==e))}pushToast(e,t,i){let r={id:Date.now()+Math.floor(Math.random()*1e3),type:e,title:t,message:i,timeout:this.defaultTimeoutMs};this.toastsSignal.update(s=>[...s,r]),(e==="error"?console.error:e==="warning"?console.warn:console.info)(`[${t}] ${i}`),setTimeout(()=>{this.dismissToast(r.id)},r.timeout)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})};var jf=class n{constructor(e){this.toasterService=e}handleError(e){e instanceof za&&this.showError(e)}showError(e){return this.toasterService.showError(Zv(e)),Ea(()=>e)}static \u0275fac=function(t){return new(t||n)(We(Zs))};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})};var C2=(n,e)=>{let t=Z(jf),i=Z(pd),r=n.headers.has("skipHandleError"),o=n.headers.get("Loader")=="true";return o&&i.show(),(a=>a.pipe(Xl(l=>(r||t.handleError(l),r?$o(null):Ea(()=>l))),Wh(()=>{o&&i.hide()})))(e(n))};var w2=[C2];var E2={apiUrl:"https://pixeasy-stage-api.azurewebsites.net/api/"};var Kv=new Ve("ENV"),Zve=new Ve("LOADER_DELAY");var M2={provide:Kv,useValue:E2};function T2(){return[CS(),S2(b2()),sE(aE(w2)),M2,pd]}var L2=(()=>{class n{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,i){this._renderer=t,this._elementRef=i}setProperty(t,i){this._renderer.setProperty(this._elementRef.nativeElement,t,i)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(i){return new(i||n)(Bt(La),Bt($r))};static \u0275dir=kn({type:n})}return n})(),Zf=(()=>{class n extends L2{static \u0275fac=(()=>{let t;return function(r){return(t||(t=Ws(n)))(r||n)}})();static \u0275dir=kn({type:n,features:[yr]})}return n})(),Ha=new Ve(""),hW={provide:Ha,useExisting:Pi(()=>mE),multi:!0},mE=(()=>{class n extends Zf{writeValue(t){this.setProperty("checked",t)}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Ws(n)))(r||n)}})();static \u0275dir=kn({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&oe("change",function(s){return r.onChange(s.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[Xr([hW]),yr]})}return n})(),fW={provide:Ha,useExisting:Pi(()=>vd),multi:!0};function pW(){let n=Yr()?Yr().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var mW=new Ve(""),vd=(()=>{class n extends L2{_compositionMode;_composing=!1;constructor(t,i,r){super(t,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!pW())}writeValue(t){let i=t??"";this.setProperty("value",i)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static \u0275fac=function(i){return new(i||n)(Bt(La),Bt($r),Bt(mW,8))};static \u0275dir=kn({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&oe("input",function(s){return r._handleInput(s.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(s){return r._compositionEnd(s.target.value)})},standalone:!1,features:[Xr([fW]),yr]})}return n})();var gE=new Ve(""),gW=new Ve("");function vW(n){return e=>{if(e.value==null||n==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t<n?{min:{min:n,actual:e.value}}:null}}function yW(n){return e=>{if(e.value==null||n==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t>n?{max:{max:n,actual:e.value}}:null}}function D2(n){return null}function U2(n){return n!=null}function B2(n){return sd(n)?jh(n):n}function V2(n){let e={};return n.forEach(t=>{e=t!=null?R(R({},e),t):e}),Object.keys(e).length===0?null:e}function z2(n,e){return e.map(t=>t(n))}function _W(n){return!n.validate}function H2(n){return n.map(e=>_W(e)?e:t=>e.validate(t))}function xW(n){if(!n)return null;let e=n.filter(U2);return e.length==0?null:function(t){return V2(z2(t,e))}}function G2(n){return n!=null?xW(H2(n)):null}function bW(n){if(!n)return null;let e=n.filter(U2);return e.length==0?null:function(t){let i=z2(t,e).map(B2);return Sb(i).pipe(Xi(V2))}}function j2(n){return n!=null?bW(H2(n)):null}function A2(n,e){return n===null?[e]:Array.isArray(n)?[...n,e]:[n,e]}function SW(n){return n._rawValidators}function CW(n){return n._rawAsyncValidators}function uE(n){return n?Array.isArray(n)?n:[n]:[]}function Qv(n,e){return Array.isArray(n)?n.includes(e):n===e}function I2(n,e){let t=uE(e);return uE(n).forEach(r=>{Qv(t,r)||t.push(r)}),t}function P2(n,e){return uE(e).filter(t=>!Qv(n,t))}var e0=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=G2(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=j2(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control?.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},dE=class extends e0{name;get formDirective(){return null}get path(){return null}},qf=class extends e0{_parent=null;name=null;valueAccessor=null},hE=class{_cd;constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var Ga=(()=>{class n extends hE{constructor(t){super(t)}static \u0275fac=function(i){return new(i||n)(Bt(qf,2))};static \u0275dir=kn({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&jt("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[yr]})}return n})();var Wf="VALID",Jv="INVALID",md="PENDING",$f="DISABLED",_c=class{},t0=class extends _c{value;source;constructor(e,t){super(),this.value=e,this.source=t}},Xf=class extends _c{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},Yf=class extends _c{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},gd=class extends _c{status;source;constructor(e,t){super(),this.status=e,this.source=t}};var fE=class extends _c{source;constructor(e){super(),this.source=e}};function wW(n){return(n0(n)?n.validators:n)||null}function EW(n){return Array.isArray(n)?G2(n):n||null}function MW(n,e){return(n0(e)?e.asyncValidators:n)||null}function TW(n){return Array.isArray(n)?j2(n):n||null}function n0(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}var pE=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return Ln(this.statusReactive)}set status(e){Ln(()=>this.statusReactive.set(e))}_status=ke(()=>this.statusReactive());statusReactive=k(void 0);get valid(){return this.status===Wf}get invalid(){return this.status===Jv}get pending(){return this.status==md}get disabled(){return this.status===$f}get enabled(){return this.status!==$f}errors;get pristine(){return Ln(this.pristineReactive)}set pristine(e){Ln(()=>this.pristineReactive.set(e))}_pristine=ke(()=>this.pristineReactive());pristineReactive=k(!0);get dirty(){return!this.pristine}get touched(){return Ln(this.touchedReactive)}set touched(e){Ln(()=>this.touchedReactive.set(e))}_touched=ke(()=>this.touchedReactive());touchedReactive=k(!1);get untouched(){return!this.touched}_events=new uo;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(I2(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(I2(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(P2(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(P2(e,this._rawAsyncValidators))}hasValidator(e){return Qv(this._rawValidators,e)}hasAsyncValidator(e){return Qv(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let i=e.sourceControl??this;e.onlySelf||this._parent?.markAsTouched(ue(R({},e),{sourceControl:i})),t&&e.emitEvent!==!1&&this._events.next(new Yf(!0,i))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(e))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:i})}),e.onlySelf||this._parent?._updateTouched(e,i),t&&e.emitEvent!==!1&&this._events.next(new Yf(!1,i))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let i=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty(ue(R({},e),{sourceControl:i})),t&&e.emitEvent!==!1&&this._events.next(new Xf(!1,i))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),e.onlySelf||this._parent?._updatePristine(e,i),t&&e.emitEvent!==!1&&this._events.next(new Xf(!0,i))}markAsPending(e={}){this.status=md;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new gd(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending(ue(R({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=$f,this.errors=null,this._forEachChild(r=>{r.disable(ue(R({},e),{onlySelf:!0}))}),this._updateValue();let i=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new t0(this.value,i)),this._events.next(new gd(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(ue(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=Wf,this._forEachChild(i=>{i.enable(ue(R({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(ue(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(e,t){e.onlySelf||(this._parent?.updateValueAndValidity(e),e.skipPristineCheck||this._parent?._updatePristine({},t),this._parent?._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Wf||this.status===md)&&this._runAsyncValidator(i,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new t0(this.value,t)),this._events.next(new gd(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity(ue(R({},e),{sourceControl:t}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?$f:Wf}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=md,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let i=B2(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(".")),t.length===0)?null:t.reduce((i,r)=>i&&i._find(r),this)}getError(e,t){let i=t?this.get(t):this;return i?.errors?i.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,i){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||i)&&this._events.next(new gd(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,i)}_initObservables(){this.valueChanges=new dr,this.statusChanges=new dr}_calculateStatus(){return this._allControlsDisabled()?$f:this.errors?Jv:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(md)?md:this._anyControlsHaveStatus(Jv)?Jv:Wf}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,t){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,e.onlySelf||this._parent?._updatePristine(e,t),r&&this._events.next(new Xf(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new Yf(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){n0(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=EW(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=TW(this._rawAsyncValidators)}};var W2=new Ve("",{factory:()=>vE}),vE="always";function DW(n,e){return[...e.path,n]}function AW(n,e,t=vE){PW(n,e),e.valueAccessor.writeValue(n.value),(n.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(n.disabled),OW(n,e),FW(n,e),RW(n,e),IW(n,e)}function O2(n,e){n.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function IW(n,e){if(e.valueAccessor.setDisabledState){let t=i=>{e.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(t),e._registerOnDestroy(()=>{n._unregisterOnDisabledChange(t)})}}function PW(n,e){let t=SW(n);e.validator!==null?n.setValidators(A2(t,e.validator)):typeof t=="function"&&n.setValidators([t]);let i=CW(n);e.asyncValidator!==null?n.setAsyncValidators(A2(i,e.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();O2(e._rawValidators,r),O2(e._rawAsyncValidators,r)}function OW(n,e){e.valueAccessor.registerOnChange(t=>{n._pendingValue=t,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&$2(n,e)})}function RW(n,e){e.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&$2(n,e),n.updateOn!=="submit"&&n.markAsTouched()})}function $2(n,e){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function FW(n,e){let t=(i,r)=>{e.valueAccessor.writeValue(i),r&&e.viewToModelUpdate(i)};n.registerOnChange(t),e._registerOnDestroy(()=>{n._unregisterOnChange(t)})}function NW(n,e){if(!n.hasOwnProperty("model"))return!1;let t=n.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function kW(n){return Object.getPrototypeOf(n.constructor)===Zf}function LW(n,e){if(!e)return null;Array.isArray(e);let t,i,r;return e.forEach(o=>{o.constructor===vd?t=o:kW(o)?i=o:r=o}),r||i||t||null}function R2(n,e){let t=n.indexOf(e);t>-1&&n.splice(t,1)}function F2(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var UW=class extends pE{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,i){super(wW(t),MW(i,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),n0(t)&&(t.nonNullable||t.initialValueIsDefault)&&(F2(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&t.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,t.emitViewToModelChange!==!1)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),t.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,t?.emitEvent!==!1&&this._events.next(new fE(this))}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){R2(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){R2(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){F2(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var BW={provide:qf,useExisting:Pi(()=>Ks)},N2=Promise.resolve(),Ks=(()=>{class n extends qf{_changeDetectorRef;callSetDisabledState;control=new UW;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new dr;constructor(t,i,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this._parent=t,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=LW(this,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let i=t.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),NW(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective?.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){AW(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(t){N2.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let i=t.isDisabled.currentValue,r=i!==0&&Fv(i);N2.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?DW(t,this._parent):[t]}static \u0275fac=function(i){return new(i||n)(Bt(dE,9),Bt(gE,10),Bt(gW,10),Bt(Ha,10),Bt(Rv,8),Bt(W2,8))};static \u0275dir=kn({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[Xr([BW]),yr,Ju]})}return n})();var VW={provide:Ha,useExisting:Pi(()=>Kf),multi:!0},Kf=(()=>{class n extends Zf{writeValue(t){let i=t??"";this.setProperty("value",i)}registerOnChange(t){this.onChange=i=>{t(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Ws(n)))(r||n)}})();static \u0275dir=kn({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&oe("input",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[Xr([VW]),yr]})}return n})();var zW={provide:Ha,useExisting:Pi(()=>i0),multi:!0};function X2(n,e){return n==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${n}: ${e}`.slice(0,50))}function HW(n){return n.split(":")[0]}var i0=(()=>{class n extends Zf{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=Z(_r).injector;destroyRef=Z(Zi);cdr=Z(Rv);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,sv({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(t){this.cdr.markForCheck(),this.value=t;let i=this._getOptionId(t),r=X2(i,t);this.setProperty("value",r)}registerOnChange(t){this.onChange=i=>{this.value=this._getOptionValue(i),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),t))return i;return null}_getOptionValue(t){let i=HW(t);return this._optionMap.has(i)?this._optionMap.get(i):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Ws(n)))(r||n)}})();static \u0275dir=kn({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&oe("change",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[Xr([zW]),yr]})}return n})(),Y2=(()=>{class n{_element;_renderer;_select;id;constructor(t,i,r){this._element=t,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(t){this._select!=null&&(this._select._optionMap.set(this.id,t),this._setElementValue(X2(this.id,t)),this._select._writeValueAfterRender())}set value(t){this._setElementValue(t),this._select?._writeValueAfterRender()}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select?._optionMap.delete(this.id),this._select?._writeValueAfterRender()}static \u0275fac=function(i){return new(i||n)(Bt($r),Bt(La),Bt(i0,9))};static \u0275dir=kn({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),GW={provide:Ha,useExisting:Pi(()=>q2),multi:!0};function k2(n,e){return n==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${n}: ${e}`.slice(0,50))}function jW(n){return n.split(":")[0]}var q2=(()=>{class n extends Zf{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let i;if(Array.isArray(t)){let r=t.map(o=>this._getOptionId(o));i=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(t){this.onChange=i=>{let r=[],o=i.selectedOptions;if(o!==void 0){let s=o;for(let a=0;a<s.length;a++){let l=s[a],c=this._getOptionValue(l.value);r.push(c)}}else{let s=i.options;for(let a=0;a<s.length;a++){let l=s[a];if(l.selected){let c=this._getOptionValue(l.value);r.push(c)}}}this.value=r,t(r)}}_registerOption(t){let i=(this._idCounter++).toString();return this._optionMap.set(i,t),i}_getOptionId(t){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,t))return i;return null}_getOptionValue(t){let i=jW(t);return this._optionMap.has(i)?this._optionMap.get(i)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Ws(n)))(r||n)}})();static \u0275dir=kn({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&oe("change",function(s){return r.onChange(s.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[Xr([GW]),yr]})}return n})(),Z2=(()=>{class n{_element;_renderer;_select;id;_value;constructor(t,i,r){this._element=t,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(k2(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(k2(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(i){return new(i||n)(Bt($r),Bt(La),Bt(q2,9))};static \u0275dir=kn({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();function K2(n){return typeof n=="number"?n:parseFloat(n)}var J2=(()=>{class n{_validator=D2;_onChange;_enabled;ngOnChanges(t){if(this.inputName in t){let i=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):D2,this._onChange?.()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=kn({type:n,features:[Ju]})}return n})(),WW={provide:gE,useExisting:Pi(()=>Jf),multi:!0},Jf=(()=>{class n extends J2{max;inputName="max";normalizeInput=t=>K2(t);createValidator=t=>yW(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=Ws(n)))(r||n)}})();static \u0275dir=kn({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&Xn("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[Xr([WW]),yr]})}return n})(),$W={provide:gE,useExisting:Pi(()=>Qf),multi:!0},Qf=(()=>{class n extends J2{min;inputName="min";normalizeInput=t=>K2(t);createValidator=t=>vW(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=Ws(n)))(r||n)}})();static \u0275dir=kn({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&Xn("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[Xr([$W]),yr]})}return n})();var XW=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Ys({type:n});static \u0275inj=Zo({})}return n})();var Kr=(()=>{class n{static withConfig(t){return{ngModule:n,providers:[{provide:W2,useValue:t.callSetDisabledState??vE}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Ys({type:n});static \u0275inj=Zo({imports:[XW]})}return n})();var ol={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},sl={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},TF=0,QE=1,DF=2;var wp=1,AF=2,Yd=3,So=0,Bi=1,ms=2,gs=0,Ec=1,eM=2,tM=3,nM=4,IF=5,Ka=100,PF=101,OF=102,RF=103,FF=104,NF=200,kF=201,LF=202,UF=203,D0=204,A0=205,BF=206,VF=207,zF=208,HF=209,GF=210,jF=211,WF=212,$F=213,XF=214,ey=0,ty=1,ny=2,Mc=3,iy=4,ry=5,oy=6,sy=7,ay=0,YF=1,qF=2,wo=0,iM=1,rM=2,oM=3,Nc=4,sM=5,aM=6,lM=7;var zE=300,al=301,kc=302,ly=303,cy=304,Ep=306,Fd=1e3,wi=1001,I0=1002,si=1003,ZF=1004;var Mp=1005;var Vn=1006,uy=1007;var to=1008;var nr=1009,cM=1010,uM=1011,qd=1012,dy=1013,Eo=1014,Mo=1015,vs=1016,hy=1017,fy=1018,Zd=1020,dM=35902,hM=35899,fM=1021,pM=1022,no=1023,fs=1026,ll=1027,mM=1028,py=1029,Lc=1030,my=1031;var gy=1033,Tp=33776,Dp=33777,Ap=33778,Ip=33779,vy=35840,yy=35841,_y=35842,xy=35843,by=36196,Sy=37492,Cy=37496,wy=37488,Ey=37489,My=37490,Ty=37491,Dy=37808,Ay=37809,Iy=37810,Py=37811,Oy=37812,Ry=37813,Fy=37814,Ny=37815,ky=37816,Ly=37817,Uy=37818,By=37819,Vy=37820,zy=37821,Hy=36492,Gy=36494,jy=36495,Wy=36283,$y=36284,Xy=36285,Yy=36286;var ap=2300,P0=2301,T0=2302,HE=2400,GE=2401,jE=2402;var KF=3200;var gM=0,JF=1,la="",pn="srgb",Tc="srgb-linear",lp="linear",Qt="srgb";var wc=7680;var WE=519,QF=512,eN=513,tN=514,qy=515,nN=516,iN=517,Zy=518,rN=519,$E=35044;var vM="300 es",bo=2e3,cp=2001;function yM(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}function YW(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function Nd(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function oN(){let n=Nd("canvas");return n.style.display="block",n}var Q2={},kd=null;function _M(...n){let e="THREE."+n.shift();kd?kd("log",e,...n):console.log(e,...n)}function at(...n){let e="THREE."+n.shift();kd?kd("warn",e,...n):console.warn(e,...n)}function ut(...n){let e="THREE."+n.shift();kd?kd("error",e,...n):console.error(e,...n)}function Ld(...n){let e=n.join(" ");e in Q2||(Q2[e]=!0,at(...n))}function sN(n,e,t){return new Promise(function(i,r){function o(){switch(n.clientWaitSync(e,n.SYNC_FLUSH_COMMANDS_BIT,0)){case n.WAIT_FAILED:r();break;case n.TIMEOUT_EXPIRED:setTimeout(o,t);break;default:i()}}setTimeout(o,t)})}var ps=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){let i=this._listeners;return i===void 0?!1:i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){let i=this._listeners;if(i===void 0)return;let r=i[e];if(r!==void 0){let o=r.indexOf(t);o!==-1&&r.splice(o,1)}}dispatchEvent(e){let t=this._listeners;if(t===void 0)return;let i=t[e.type];if(i!==void 0){e.target=this;let r=i.slice(0);for(let o=0,s=r.length;o<s;o++)r[o].call(this,e);e.target=null}}},Si=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],eF=1234567,op=Math.PI/180,Ud=180/Math.PI;function Kd(){let n=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(Si[n&255]+Si[n>>8&255]+Si[n>>16&255]+Si[n>>24&255]+"-"+Si[e&255]+Si[e>>8&255]+"-"+Si[e>>16&15|64]+Si[e>>24&255]+"-"+Si[t&63|128]+Si[t>>8&255]+"-"+Si[t>>16&255]+Si[t>>24&255]+Si[i&255]+Si[i>>8&255]+Si[i>>16&255]+Si[i>>24&255]).toLowerCase()}function Rt(n,e,t){return Math.max(e,Math.min(t,n))}function xM(n,e){return(n%e+e)%e}function qW(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function ZW(n,e,t){return n!==e?(t-n)/(e-n):0}function sp(n,e,t){return(1-t)*n+t*e}function KW(n,e,t,i){return sp(n,e,1-Math.exp(-t*i))}function JW(n,e=1){return e-Math.abs(xM(n,e*2)-e)}function QW(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function e6(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function t6(n,e){return n+Math.floor(Math.random()*(e-n+1))}function n6(n,e){return n+Math.random()*(e-n)}function i6(n){return n*(.5-Math.random())}function r6(n){n!==void 0&&(eF=n);let e=eF+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function o6(n){return n*op}function s6(n){return n*Ud}function a6(n){return(n&n-1)===0&&n!==0}function l6(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function c6(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function u6(n,e,t,i,r){let o=Math.cos,s=Math.sin,a=o(t/2),l=s(t/2),c=o((e+i)/2),u=s((e+i)/2),d=o((e-i)/2),h=s((e-i)/2),f=o((i-e)/2),p=s((i-e)/2);switch(r){case"XYX":n.set(a*u,l*d,l*h,a*c);break;case"YZY":n.set(l*h,a*u,l*d,a*c);break;case"ZXZ":n.set(l*d,l*h,a*u,a*c);break;case"XZX":n.set(a*u,l*p,l*f,a*c);break;case"YXY":n.set(l*f,a*u,l*p,a*c);break;case"ZYZ":n.set(l*p,l*f,a*u,a*c);break;default:at("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function Pd(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function Ni(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}var mn={DEG2RAD:op,RAD2DEG:Ud,generateUUID:Kd,clamp:Rt,euclideanModulo:xM,mapLinear:qW,inverseLerp:ZW,lerp:sp,damp:KW,pingpong:JW,smoothstep:QW,smootherstep:e6,randInt:t6,randFloat:n6,randFloatSpread:i6,seededRandom:r6,degToRad:o6,radToDeg:s6,isPowerOfTwo:a6,ceilPowerOfTwo:l6,floorPowerOfTwo:c6,setQuaternionFromProperEuler:u6,normalize:Ni,denormalize:Pd},dt=class n{constructor(e=0,t=0){n.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,i=this.y,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6],this.y=r[1]*t+r[4]*i+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Rt(this.x,e.x,t.x),this.y=Rt(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Rt(this.x,e,t),this.y=Rt(this.y,e,t),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Rt(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let i=this.dot(e)/t;return Math.acos(Rt(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let i=Math.cos(t),r=Math.sin(t),o=this.x-e.x,s=this.y-e.y;return this.x=o*i-s*r+e.x,this.y=o*r+s*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},eo=class{constructor(e=0,t=0,i=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=r}static slerpFlat(e,t,i,r,o,s,a){let l=i[r+0],c=i[r+1],u=i[r+2],d=i[r+3],h=o[s+0],f=o[s+1],p=o[s+2],v=o[s+3];if(a<=0){e[t+0]=l,e[t+1]=c,e[t+2]=u,e[t+3]=d;return}if(a>=1){e[t+0]=h,e[t+1]=f,e[t+2]=p,e[t+3]=v;return}if(d!==v||l!==h||c!==f||u!==p){let g=l*h+c*f+u*p+d*v;g<0&&(h=-h,f=-f,p=-p,v=-v,g=-g);let m=1-a;if(g<.9995){let y=Math.acos(g),_=Math.sin(y);m=Math.sin(m*y)/_,a=Math.sin(a*y)/_,l=l*m+h*a,c=c*m+f*a,u=u*m+p*a,d=d*m+v*a}else{l=l*m+h*a,c=c*m+f*a,u=u*m+p*a,d=d*m+v*a;let y=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=y,c*=y,u*=y,d*=y}}e[t]=l,e[t+1]=c,e[t+2]=u,e[t+3]=d}static multiplyQuaternionsFlat(e,t,i,r,o,s){let a=i[r],l=i[r+1],c=i[r+2],u=i[r+3],d=o[s],h=o[s+1],f=o[s+2],p=o[s+3];return e[t]=a*p+u*d+l*f-c*h,e[t+1]=l*p+u*h+c*d-a*f,e[t+2]=c*p+u*f+a*h-l*d,e[t+3]=u*p-a*d-l*h-c*f,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,r){return this._x=e,this._y=t,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let i=e._x,r=e._y,o=e._z,s=e._order,a=Math.cos,l=Math.sin,c=a(i/2),u=a(r/2),d=a(o/2),h=l(i/2),f=l(r/2),p=l(o/2);switch(s){case"XYZ":this._x=h*u*d+c*f*p,this._y=c*f*d-h*u*p,this._z=c*u*p+h*f*d,this._w=c*u*d-h*f*p;break;case"YXZ":this._x=h*u*d+c*f*p,this._y=c*f*d-h*u*p,this._z=c*u*p-h*f*d,this._w=c*u*d+h*f*p;break;case"ZXY":this._x=h*u*d-c*f*p,this._y=c*f*d+h*u*p,this._z=c*u*p+h*f*d,this._w=c*u*d-h*f*p;break;case"ZYX":this._x=h*u*d-c*f*p,this._y=c*f*d+h*u*p,this._z=c*u*p-h*f*d,this._w=c*u*d+h*f*p;break;case"YZX":this._x=h*u*d+c*f*p,this._y=c*f*d+h*u*p,this._z=c*u*p-h*f*d,this._w=c*u*d-h*f*p;break;case"XZY":this._x=h*u*d-c*f*p,this._y=c*f*d-h*u*p,this._z=c*u*p+h*f*d,this._w=c*u*d+h*f*p;break;default:at("Quaternion: .setFromEuler() encountered an unknown order: "+s)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let i=t/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,i=t[0],r=t[4],o=t[8],s=t[1],a=t[5],l=t[9],c=t[2],u=t[6],d=t[10],h=i+a+d;if(h>0){let f=.5/Math.sqrt(h+1);this._w=.25/f,this._x=(u-l)*f,this._y=(o-c)*f,this._z=(s-r)*f}else if(i>a&&i>d){let f=2*Math.sqrt(1+i-a-d);this._w=(u-l)/f,this._x=.25*f,this._y=(r+s)/f,this._z=(o+c)/f}else if(a>d){let f=2*Math.sqrt(1+a-i-d);this._w=(o-c)/f,this._x=(r+s)/f,this._y=.25*f,this._z=(l+u)/f}else{let f=2*Math.sqrt(1+d-i-a);this._w=(s-r)/f,this._x=(o+c)/f,this._y=(l+u)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return i<1e-8?(i=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Rt(this.dot(e),-1,1)))}rotateTowards(e,t){let i=this.angleTo(e);if(i===0)return this;let r=Math.min(1,t/i);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let i=e._x,r=e._y,o=e._z,s=e._w,a=t._x,l=t._y,c=t._z,u=t._w;return this._x=i*u+s*a+r*c-o*l,this._y=r*u+s*l+o*a-i*c,this._z=o*u+s*c+i*l-r*a,this._w=s*u-i*a-r*l-o*c,this._onChangeCallback(),this}slerp(e,t){if(t<=0)return this;if(t>=1)return this.copy(e);let i=e._x,r=e._y,o=e._z,s=e._w,a=this.dot(e);a<0&&(i=-i,r=-r,o=-o,s=-s,a=-a);let l=1-t;if(a<.9995){let c=Math.acos(a),u=Math.sin(c);l=Math.sin(l*c)/u,t=Math.sin(t*c)/u,this._x=this._x*l+i*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+s*t,this._onChangeCallback()}else this._x=this._x*l+i*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+s*t,this.normalize();return this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),i=Math.random(),r=Math.sqrt(1-i),o=Math.sqrt(i);return this.set(r*Math.sin(e),r*Math.cos(e),o*Math.sin(t),o*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},V=class n{constructor(e=0,t=0,i=0){n.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(tF.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(tF.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,i=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[3]*i+o[6]*r,this.y=o[1]*t+o[4]*i+o[7]*r,this.z=o[2]*t+o[5]*i+o[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,i=this.y,r=this.z,o=e.elements,s=1/(o[3]*t+o[7]*i+o[11]*r+o[15]);return this.x=(o[0]*t+o[4]*i+o[8]*r+o[12])*s,this.y=(o[1]*t+o[5]*i+o[9]*r+o[13])*s,this.z=(o[2]*t+o[6]*i+o[10]*r+o[14])*s,this}applyQuaternion(e){let t=this.x,i=this.y,r=this.z,o=e.x,s=e.y,a=e.z,l=e.w,c=2*(s*r-a*i),u=2*(a*t-o*r),d=2*(o*i-s*t);return this.x=t+l*c+s*d-a*u,this.y=i+l*u+a*c-o*d,this.z=r+l*d+o*u-s*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,i=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*r,this.y=o[1]*t+o[5]*i+o[9]*r,this.z=o[2]*t+o[6]*i+o[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Rt(this.x,e.x,t.x),this.y=Rt(this.y,e.y,t.y),this.z=Rt(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Rt(this.x,e,t),this.y=Rt(this.y,e,t),this.z=Rt(this.z,e,t),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Rt(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let i=e.x,r=e.y,o=e.z,s=t.x,a=t.y,l=t.z;return this.x=r*l-o*a,this.y=o*s-i*l,this.z=i*a-r*s,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return yE.copy(this).projectOnVector(e),this.sub(yE)}reflect(e){return this.sub(yE.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let i=this.dot(e)/t;return Math.acos(Rt(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+i*i+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){let r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=Math.random()*2-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},yE=new V,tF=new eo,Ct=class n{constructor(e,t,i,r,o,s,a,l,c){n.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,r,o,s,a,l,c)}set(e,t,i,r,o,s,a,l,c){let u=this.elements;return u[0]=e,u[1]=r,u[2]=a,u[3]=t,u[4]=o,u[5]=l,u[6]=i,u[7]=s,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,r=t.elements,o=this.elements,s=i[0],a=i[3],l=i[6],c=i[1],u=i[4],d=i[7],h=i[2],f=i[5],p=i[8],v=r[0],g=r[3],m=r[6],y=r[1],_=r[4],x=r[7],b=r[2],w=r[5],E=r[8];return o[0]=s*v+a*y+l*b,o[3]=s*g+a*_+l*w,o[6]=s*m+a*x+l*E,o[1]=c*v+u*y+d*b,o[4]=c*g+u*_+d*w,o[7]=c*m+u*x+d*E,o[2]=h*v+f*y+p*b,o[5]=h*g+f*_+p*w,o[8]=h*m+f*x+p*E,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return t*s*u-t*a*c-i*o*u+i*a*l+r*o*c-r*s*l}invert(){let e=this.elements,t=e[0],i=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=u*s-a*c,h=a*l-u*o,f=c*o-s*l,p=t*d+i*h+r*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);let v=1/p;return e[0]=d*v,e[1]=(r*c-u*i)*v,e[2]=(a*i-r*s)*v,e[3]=h*v,e[4]=(u*t-r*l)*v,e[5]=(r*o-a*t)*v,e[6]=f*v,e[7]=(i*l-c*t)*v,e[8]=(s*t-i*o)*v,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,r,o,s,a){let l=Math.cos(o),c=Math.sin(o);return this.set(i*l,i*c,-i*(l*s+c*a)+s+e,-r*c,r*l,-r*(-c*s+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(_E.makeScale(e,t)),this}rotate(e){return this.premultiply(_E.makeRotation(-e)),this}translate(e,t){return this.premultiply(_E.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,i=e.elements;for(let r=0;r<9;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){let i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}},_E=new Ct,nF=new Ct().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),iF=new Ct().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function d6(){let n={enabled:!0,workingColorSpace:Tc,spaces:{},convert:function(r,o,s){return this.enabled===!1||o===s||!o||!s||(this.spaces[o].transfer===Qt&&(r.r=oa(r.r),r.g=oa(r.g),r.b=oa(r.b)),this.spaces[o].primaries!==this.spaces[s].primaries&&(r.applyMatrix3(this.spaces[o].toXYZ),r.applyMatrix3(this.spaces[s].fromXYZ)),this.spaces[s].transfer===Qt&&(r.r=Od(r.r),r.g=Od(r.g),r.b=Od(r.b))),r},workingToColorSpace:function(r,o){return this.convert(r,this.workingColorSpace,o)},colorSpaceToWorking:function(r,o){return this.convert(r,o,this.workingColorSpace)},getPrimaries:function(r){return this.spaces[r].primaries},getTransfer:function(r){return r===la?lp:this.spaces[r].transfer},getToneMappingMode:function(r){return this.spaces[r].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(r,o=this.workingColorSpace){return r.fromArray(this.spaces[o].luminanceCoefficients)},define:function(r){Object.assign(this.spaces,r)},_getMatrix:function(r,o,s){return r.copy(this.spaces[o].toXYZ).multiply(this.spaces[s].fromXYZ)},_getDrawingBufferColorSpace:function(r){return this.spaces[r].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(r=this.workingColorSpace){return this.spaces[r].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(r,o){return Ld("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),n.workingToColorSpace(r,o)},toWorkingColorSpace:function(r,o){return Ld("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),n.colorSpaceToWorking(r,o)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],i=[.3127,.329];return n.define({[Tc]:{primaries:e,whitePoint:i,transfer:lp,toXYZ:nF,fromXYZ:iF,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:pn},outputColorSpaceConfig:{drawingBufferColorSpace:pn}},[pn]:{primaries:e,whitePoint:i,transfer:Qt,toXYZ:nF,fromXYZ:iF,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:pn}}}),n}var Ot=d6();function oa(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Od(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}var yd,O0=class{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let i;if(e instanceof HTMLCanvasElement)i=e;else{yd===void 0&&(yd=Nd("canvas")),yd.width=e.width,yd.height=e.height;let r=yd.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),i=yd}return i.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){let t=Nd("canvas");t.width=e.width,t.height=e.height;let i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);let r=i.getImageData(0,0,e.width,e.height),o=r.data;for(let s=0;s<o.length;s++)o[s]=oa(o[s]/255)*255;return i.putImageData(r,0,0),t}else if(e.data){let t=e.data.slice(0);for(let i=0;i<t.length;i++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[i]=Math.floor(oa(t[i]/255)*255):t[i]=oa(t[i]);return{data:t,width:e.width,height:e.height}}else return at("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},h6=0,Bd=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:h6++}),this.uuid=Kd(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){let t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<"u"&&t instanceof VideoFrame?e.set(t.displayHeight,t.displayWidth,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){let t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];let i={uuid:this.uuid,url:""},r=this.data;if(r!==null){let o;if(Array.isArray(r)){o=[];for(let s=0,a=r.length;s<a;s++)r[s].isDataTexture?o.push(xE(r[s].image)):o.push(xE(r[s]))}else o=xE(r);i.url=o}return t||(e.images[this.uuid]=i),i}};function xE(n){return typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&n instanceof ImageBitmap?O0.getDataURL(n):n.data?{data:Array.from(n.data),width:n.width,height:n.height,type:n.data.constructor.name}:(at("Texture: Unable to serialize Texture."),{})}var f6=0,bE=new V,To=(()=>{class n extends ps{constructor(t=n.DEFAULT_IMAGE,i=n.DEFAULT_MAPPING,r=wi,o=wi,s=Vn,a=to,l=no,c=nr,u=n.DEFAULT_ANISOTROPY,d=la){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:f6++}),this.uuid=Kd(),this.name="",this.source=new Bd(t),this.mipmaps=[],this.mapping=i,this.channel=0,this.wrapS=r,this.wrapT=o,this.magFilter=s,this.minFilter=a,this.anisotropy=u,this.format=l,this.internalFormat=null,this.type=c,this.offset=new dt(0,0),this.repeat=new dt(1,1),this.center=new dt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ct,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=d,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(bE).x}get height(){return this.source.getSize(bE).y}get depth(){return this.source.getSize(bE).z}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(t,i){this.updateRanges.push({start:t,count:i})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.isArrayTexture=t.isArrayTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}setValues(t){for(let i in t){let r=t[i];if(r===void 0){at(`Texture.setValues(): parameter '${i}' has value of undefined.`);continue}let o=this[i];if(o===void 0){at(`Texture.setValues(): property '${i}' does not exist.`);continue}o&&r&&o.isVector2&&r.isVector2||o&&r&&o.isVector3&&r.isVector3||o&&r&&o.isMatrix3&&r.isMatrix3?o.copy(r):this[i]=r}}toJSON(t){let i=t===void 0||typeof t=="string";if(!i&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];let r={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(r.userData=this.userData),i||(t.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==zE)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Fd:t.x=t.x-Math.floor(t.x);break;case wi:t.x=t.x<0?0:1;break;case I0:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case Fd:t.y=t.y-Math.floor(t.y);break;case wi:t.y=t.y<0?0:1;break;case I0:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}}return n.DEFAULT_IMAGE=null,n.DEFAULT_MAPPING=zE,n.DEFAULT_ANISOTROPY=1,n})(),Mn=class n{constructor(e=0,t=0,i=0,r=1){n.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,r){return this.x=e,this.y=t,this.z=i,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,i=this.y,r=this.z,o=this.w,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*r+s[12]*o,this.y=s[1]*t+s[5]*i+s[9]*r+s[13]*o,this.z=s[2]*t+s[6]*i+s[10]*r+s[14]*o,this.w=s[3]*t+s[7]*i+s[11]*r+s[15]*o,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,r,o,l=e.elements,c=l[0],u=l[4],d=l[8],h=l[1],f=l[5],p=l[9],v=l[2],g=l[6],m=l[10];if(Math.abs(u-h)<.01&&Math.abs(d-v)<.01&&Math.abs(p-g)<.01){if(Math.abs(u+h)<.1&&Math.abs(d+v)<.1&&Math.abs(p+g)<.1&&Math.abs(c+f+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let _=(c+1)/2,x=(f+1)/2,b=(m+1)/2,w=(u+h)/4,E=(d+v)/4,A=(p+g)/4;return _>x&&_>b?_<.01?(i=0,r=.707106781,o=.707106781):(i=Math.sqrt(_),r=w/i,o=E/i):x>b?x<.01?(i=.707106781,r=0,o=.707106781):(r=Math.sqrt(x),i=w/r,o=A/r):b<.01?(i=.707106781,r=.707106781,o=0):(o=Math.sqrt(b),i=E/o,r=A/o),this.set(i,r,o,t),this}let y=Math.sqrt((g-p)*(g-p)+(d-v)*(d-v)+(h-u)*(h-u));return Math.abs(y)<.001&&(y=1),this.x=(g-p)/y,this.y=(d-v)/y,this.z=(h-u)/y,this.w=Math.acos((c+f+m-1)/2),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Rt(this.x,e.x,t.x),this.y=Rt(this.y,e.y,t.y),this.z=Rt(this.z,e.z,t.z),this.w=Rt(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Rt(this.x,e,t),this.y=Rt(this.y,e,t),this.z=Rt(this.z,e,t),this.w=Rt(this.w,e,t),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Rt(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},R0=class extends ps{constructor(e=1,t=1,i={}){super(),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Vn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},i),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=i.depth,this.scissor=new Mn(0,0,e,t),this.scissorTest=!1,this.viewport=new Mn(0,0,e,t);let r={width:e,height:t,depth:i.depth},o=new To(r);this.textures=[];let s=i.count;for(let a=0;a<s;a++)this.textures[a]=o.clone(),this.textures[a].isRenderTargetTexture=!0,this.textures[a].renderTarget=this;this._setTextureOptions(i),this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.resolveDepthBuffer=i.resolveDepthBuffer,this.resolveStencilBuffer=i.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=i.depthTexture,this.samples=i.samples,this.multiview=i.multiview}_setTextureOptions(e={}){let t={minFilter:Vn,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let i=0;i<this.textures.length;i++)this.textures[i].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,i=1){if(this.width!==e||this.height!==t||this.depth!==i){this.width=e,this.height=t,this.depth=i;for(let r=0,o=this.textures.length;r<o;r++)this.textures[r].image.width=e,this.textures[r].image.height=t,this.textures[r].image.depth=i,this.textures[r].isData3DTexture!==!0&&(this.textures[r].isArrayTexture=this.textures[r].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,i=e.textures.length;t<i;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;let r=Object.assign({},e.textures[t].image);this.textures[t].source=new Bd(r)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},wr=class extends R0{constructor(e=1,t=1,i={}){super(e,t,i),this.isWebGLRenderTarget=!0}},up=class extends To{constructor(e=null,t=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=si,this.minFilter=si,this.wrapR=wi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var F0=class extends To{constructor(e=null,t=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=si,this.minFilter=si,this.wrapR=wi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var ki=class{constructor(e=new V(1/0,1/0,1/0),t=new V(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t+=3)this.expandByPoint(yo.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,i=e.count;t<i;t++)this.expandByPoint(yo.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let i=yo.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);let i=e.geometry;if(i!==void 0){let o=i.getAttribute("position");if(t===!0&&o!==void 0&&e.isInstancedMesh!==!0)for(let s=0,a=o.count;s<a;s++)e.isMesh===!0?e.getVertexPosition(s,yo):yo.fromBufferAttribute(o,s),yo.applyMatrix4(e.matrixWorld),this.expandByPoint(yo);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),o0.copy(e.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),o0.copy(i.boundingBox)),o0.applyMatrix4(e.matrixWorld),this.union(o0)}let r=e.children;for(let o=0,s=r.length;o<s;o++)this.expandByObject(r[o],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,yo),yo.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(ep),s0.subVectors(this.max,ep),_d.subVectors(e.a,ep),xd.subVectors(e.b,ep),bd.subVectors(e.c,ep),ja.subVectors(xd,_d),Wa.subVectors(bd,xd),xc.subVectors(_d,bd);let t=[0,-ja.z,ja.y,0,-Wa.z,Wa.y,0,-xc.z,xc.y,ja.z,0,-ja.x,Wa.z,0,-Wa.x,xc.z,0,-xc.x,-ja.y,ja.x,0,-Wa.y,Wa.x,0,-xc.y,xc.x,0];return!SE(t,_d,xd,bd,s0)||(t=[1,0,0,0,1,0,0,0,1],!SE(t,_d,xd,bd,s0))?!1:(a0.crossVectors(ja,Wa),t=[a0.x,a0.y,a0.z],SE(t,_d,xd,bd,s0))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,yo).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(yo).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Js[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Js[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Js[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Js[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Js[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Js[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Js[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Js[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Js),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}},Js=[new V,new V,new V,new V,new V,new V,new V,new V],yo=new V,o0=new ki,_d=new V,xd=new V,bd=new V,ja=new V,Wa=new V,xc=new V,ep=new V,s0=new V,a0=new V,bc=new V;function SE(n,e,t,i,r){for(let o=0,s=n.length-3;o<=s;o+=3){bc.fromArray(n,o);let a=r.x*Math.abs(bc.x)+r.y*Math.abs(bc.y)+r.z*Math.abs(bc.z),l=e.dot(bc),c=t.dot(bc),u=i.dot(bc);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}var p6=new ki,tp=new V,CE=new V,Ja=class{constructor(e=new V,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let i=this.center;t!==void 0?i.copy(t):p6.setFromPoints(e).getCenter(i);let r=0;for(let o=0,s=e.length;o<s;o++)r=Math.max(r,i.distanceToSquared(e[o]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){let t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){let i=this.center.distanceToSquared(e);return t.copy(e),i>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;tp.subVectors(e,this.center);let t=tp.lengthSq();if(t>this.radius*this.radius){let i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(tp,r/i),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(CE.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(tp.copy(e.center).add(CE)),this.expandByPoint(tp.copy(e.center).sub(CE))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}},Qs=new V,wE=new V,l0=new V,$a=new V,EE=new V,c0=new V,ME=new V,sa=class{constructor(e=new V,t=new V(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Qs)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=Qs.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Qs.copy(this.origin).addScaledVector(this.direction,t),Qs.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){wE.copy(e).add(t).multiplyScalar(.5),l0.copy(t).sub(e).normalize(),$a.copy(this.origin).sub(wE);let o=e.distanceTo(t)*.5,s=-this.direction.dot(l0),a=$a.dot(this.direction),l=-$a.dot(l0),c=$a.lengthSq(),u=Math.abs(1-s*s),d,h,f,p;if(u>0)if(d=s*l-a,h=s*a-l,p=o*u,d>=0)if(h>=-p)if(h<=p){let v=1/u;d*=v,h*=v,f=d*(d+s*h+2*a)+h*(s*d+h+2*l)+c}else h=o,d=Math.max(0,-(s*h+a)),f=-d*d+h*(h+2*l)+c;else h=-o,d=Math.max(0,-(s*h+a)),f=-d*d+h*(h+2*l)+c;else h<=-p?(d=Math.max(0,-(-s*o+a)),h=d>0?-o:Math.min(Math.max(-o,-l),o),f=-d*d+h*(h+2*l)+c):h<=p?(d=0,h=Math.min(Math.max(-o,-l),o),f=h*(h+2*l)+c):(d=Math.max(0,-(s*o+a)),h=d>0?o:Math.min(Math.max(-o,-l),o),f=-d*d+h*(h+2*l)+c);else h=s>0?-o:o,d=Math.max(0,-(s*h+a)),f=-d*d+h*(h+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,d),r&&r.copy(wE).addScaledVector(l0,h),f}intersectSphere(e,t){Qs.subVectors(e.center,this.origin);let i=Qs.dot(this.direction),r=Qs.dot(Qs)-i*i,o=e.radius*e.radius;if(r>o)return null;let s=Math.sqrt(o-r),a=i-s,l=i+s;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){let i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,r,o,s,a,l,c=1/this.direction.x,u=1/this.direction.y,d=1/this.direction.z,h=this.origin;return c>=0?(i=(e.min.x-h.x)*c,r=(e.max.x-h.x)*c):(i=(e.max.x-h.x)*c,r=(e.min.x-h.x)*c),u>=0?(o=(e.min.y-h.y)*u,s=(e.max.y-h.y)*u):(o=(e.max.y-h.y)*u,s=(e.min.y-h.y)*u),i>s||o>r||((o>i||isNaN(i))&&(i=o),(s<r||isNaN(r))&&(r=s),d>=0?(a=(e.min.z-h.z)*d,l=(e.max.z-h.z)*d):(a=(e.max.z-h.z)*d,l=(e.min.z-h.z)*d),i>l||a>r)||((a>i||i!==i)&&(i=a),(l<r||r!==r)&&(r=l),r<0)?null:this.at(i>=0?i:r,t)}intersectsBox(e){return this.intersectBox(e,Qs)!==null}intersectTriangle(e,t,i,r,o){EE.subVectors(t,e),c0.subVectors(i,e),ME.crossVectors(EE,c0);let s=this.direction.dot(ME),a;if(s>0){if(r)return null;a=1}else if(s<0)a=-1,s=-s;else return null;$a.subVectors(this.origin,e);let l=a*this.direction.dot(c0.crossVectors($a,c0));if(l<0)return null;let c=a*this.direction.dot(EE.cross($a));if(c<0||l+c>s)return null;let u=-a*$a.dot(ME);return u<0?null:this.at(u/s,o)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},Sn=class n{constructor(e,t,i,r,o,s,a,l,c,u,d,h,f,p,v,g){n.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,r,o,s,a,l,c,u,d,h,f,p,v,g)}set(e,t,i,r,o,s,a,l,c,u,d,h,f,p,v,g){let m=this.elements;return m[0]=e,m[4]=t,m[8]=i,m[12]=r,m[1]=o,m[5]=s,m[9]=a,m[13]=l,m[2]=c,m[6]=u,m[10]=d,m[14]=h,m[3]=f,m[7]=p,m[11]=v,m[15]=g,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new n().fromArray(this.elements)}copy(e){let t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){let t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),i.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this)}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();let t=this.elements,i=e.elements,r=1/Sd.setFromMatrixColumn(e,0).length(),o=1/Sd.setFromMatrixColumn(e,1).length(),s=1/Sd.setFromMatrixColumn(e,2).length();return t[0]=i[0]*r,t[1]=i[1]*r,t[2]=i[2]*r,t[3]=0,t[4]=i[4]*o,t[5]=i[5]*o,t[6]=i[6]*o,t[7]=0,t[8]=i[8]*s,t[9]=i[9]*s,t[10]=i[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,i=e.x,r=e.y,o=e.z,s=Math.cos(i),a=Math.sin(i),l=Math.cos(r),c=Math.sin(r),u=Math.cos(o),d=Math.sin(o);if(e.order==="XYZ"){let h=s*u,f=s*d,p=a*u,v=a*d;t[0]=l*u,t[4]=-l*d,t[8]=c,t[1]=f+p*c,t[5]=h-v*c,t[9]=-a*l,t[2]=v-h*c,t[6]=p+f*c,t[10]=s*l}else if(e.order==="YXZ"){let h=l*u,f=l*d,p=c*u,v=c*d;t[0]=h+v*a,t[4]=p*a-f,t[8]=s*c,t[1]=s*d,t[5]=s*u,t[9]=-a,t[2]=f*a-p,t[6]=v+h*a,t[10]=s*l}else if(e.order==="ZXY"){let h=l*u,f=l*d,p=c*u,v=c*d;t[0]=h-v*a,t[4]=-s*d,t[8]=p+f*a,t[1]=f+p*a,t[5]=s*u,t[9]=v-h*a,t[2]=-s*c,t[6]=a,t[10]=s*l}else if(e.order==="ZYX"){let h=s*u,f=s*d,p=a*u,v=a*d;t[0]=l*u,t[4]=p*c-f,t[8]=h*c+v,t[1]=l*d,t[5]=v*c+h,t[9]=f*c-p,t[2]=-c,t[6]=a*l,t[10]=s*l}else if(e.order==="YZX"){let h=s*l,f=s*c,p=a*l,v=a*c;t[0]=l*u,t[4]=v-h*d,t[8]=p*d+f,t[1]=d,t[5]=s*u,t[9]=-a*u,t[2]=-c*u,t[6]=f*d+p,t[10]=h-v*d}else if(e.order==="XZY"){let h=s*l,f=s*c,p=a*l,v=a*c;t[0]=l*u,t[4]=-d,t[8]=c*u,t[1]=h*d+v,t[5]=s*u,t[9]=f*d-p,t[2]=p*d-f,t[6]=a*u,t[10]=v*d+h}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(m6,e,g6)}lookAt(e,t,i){let r=this.elements;return br.subVectors(e,t),br.lengthSq()===0&&(br.z=1),br.normalize(),Xa.crossVectors(i,br),Xa.lengthSq()===0&&(Math.abs(i.z)===1?br.x+=1e-4:br.z+=1e-4,br.normalize(),Xa.crossVectors(i,br)),Xa.normalize(),u0.crossVectors(br,Xa),r[0]=Xa.x,r[4]=u0.x,r[8]=br.x,r[1]=Xa.y,r[5]=u0.y,r[9]=br.y,r[2]=Xa.z,r[6]=u0.z,r[10]=br.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,r=t.elements,o=this.elements,s=i[0],a=i[4],l=i[8],c=i[12],u=i[1],d=i[5],h=i[9],f=i[13],p=i[2],v=i[6],g=i[10],m=i[14],y=i[3],_=i[7],x=i[11],b=i[15],w=r[0],E=r[4],A=r[8],C=r[12],M=r[1],N=r[5],j=r[9],z=r[13],$=r[2],q=r[6],X=r[10],G=r[14],Q=r[3],pe=r[7],me=r[11],ve=r[15];return o[0]=s*w+a*M+l*$+c*Q,o[4]=s*E+a*N+l*q+c*pe,o[8]=s*A+a*j+l*X+c*me,o[12]=s*C+a*z+l*G+c*ve,o[1]=u*w+d*M+h*$+f*Q,o[5]=u*E+d*N+h*q+f*pe,o[9]=u*A+d*j+h*X+f*me,o[13]=u*C+d*z+h*G+f*ve,o[2]=p*w+v*M+g*$+m*Q,o[6]=p*E+v*N+g*q+m*pe,o[10]=p*A+v*j+g*X+m*me,o[14]=p*C+v*z+g*G+m*ve,o[3]=y*w+_*M+x*$+b*Q,o[7]=y*E+_*N+x*q+b*pe,o[11]=y*A+_*j+x*X+b*me,o[15]=y*C+_*z+x*G+b*ve,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[4],r=e[8],o=e[12],s=e[1],a=e[5],l=e[9],c=e[13],u=e[2],d=e[6],h=e[10],f=e[14],p=e[3],v=e[7],g=e[11],m=e[15],y=l*f-c*h,_=a*f-c*d,x=a*h-l*d,b=s*f-c*u,w=s*h-l*u,E=s*d-a*u;return t*(v*y-g*_+m*x)-i*(p*y-g*b+m*w)+r*(p*_-v*b+m*E)-o*(p*x-v*w+g*E)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=i),this}invert(){let e=this.elements,t=e[0],i=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=e[9],h=e[10],f=e[11],p=e[12],v=e[13],g=e[14],m=e[15],y=d*g*c-v*h*c+v*l*f-a*g*f-d*l*m+a*h*m,_=p*h*c-u*g*c-p*l*f+s*g*f+u*l*m-s*h*m,x=u*v*c-p*d*c+p*a*f-s*v*f-u*a*m+s*d*m,b=p*d*l-u*v*l-p*a*h+s*v*h+u*a*g-s*d*g,w=t*y+i*_+r*x+o*b;if(w===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let E=1/w;return e[0]=y*E,e[1]=(v*h*o-d*g*o-v*r*f+i*g*f+d*r*m-i*h*m)*E,e[2]=(a*g*o-v*l*o+v*r*c-i*g*c-a*r*m+i*l*m)*E,e[3]=(d*l*o-a*h*o-d*r*c+i*h*c+a*r*f-i*l*f)*E,e[4]=_*E,e[5]=(u*g*o-p*h*o+p*r*f-t*g*f-u*r*m+t*h*m)*E,e[6]=(p*l*o-s*g*o-p*r*c+t*g*c+s*r*m-t*l*m)*E,e[7]=(s*h*o-u*l*o+u*r*c-t*h*c-s*r*f+t*l*f)*E,e[8]=x*E,e[9]=(p*d*o-u*v*o-p*i*f+t*v*f+u*i*m-t*d*m)*E,e[10]=(s*v*o-p*a*o+p*i*c-t*v*c-s*i*m+t*a*m)*E,e[11]=(u*a*o-s*d*o-u*i*c+t*d*c+s*i*f-t*a*f)*E,e[12]=b*E,e[13]=(u*v*r-p*d*r+p*i*h-t*v*h-u*i*g+t*d*g)*E,e[14]=(p*a*r-s*v*r-p*i*l+t*v*l+s*i*g-t*a*g)*E,e[15]=(s*d*r-u*a*r+u*i*l-t*d*l-s*i*h+t*a*h)*E,this}scale(e){let t=this.elements,i=e.x,r=e.y,o=e.z;return t[0]*=i,t[4]*=r,t[8]*=o,t[1]*=i,t[5]*=r,t[9]*=o,t[2]*=i,t[6]*=r,t[10]*=o,t[3]*=i,t[7]*=r,t[11]*=o,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,r))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let i=Math.cos(t),r=Math.sin(t),o=1-i,s=e.x,a=e.y,l=e.z,c=o*s,u=o*a;return this.set(c*s+i,c*a-r*l,c*l+r*a,0,c*a+r*l,u*a+i,u*l-r*s,0,c*l-r*a,u*l+r*s,o*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,r,o,s){return this.set(1,i,o,0,e,1,s,0,t,r,1,0,0,0,0,1),this}compose(e,t,i){let r=this.elements,o=t._x,s=t._y,a=t._z,l=t._w,c=o+o,u=s+s,d=a+a,h=o*c,f=o*u,p=o*d,v=s*u,g=s*d,m=a*d,y=l*c,_=l*u,x=l*d,b=i.x,w=i.y,E=i.z;return r[0]=(1-(v+m))*b,r[1]=(f+x)*b,r[2]=(p-_)*b,r[3]=0,r[4]=(f-x)*w,r[5]=(1-(h+m))*w,r[6]=(g+y)*w,r[7]=0,r[8]=(p+_)*E,r[9]=(g-y)*E,r[10]=(1-(h+v))*E,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,i){let r=this.elements;if(e.x=r[12],e.y=r[13],e.z=r[14],this.determinant()===0)return i.set(1,1,1),t.identity(),this;let o=Sd.set(r[0],r[1],r[2]).length(),s=Sd.set(r[4],r[5],r[6]).length(),a=Sd.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),_o.copy(this);let c=1/o,u=1/s,d=1/a;return _o.elements[0]*=c,_o.elements[1]*=c,_o.elements[2]*=c,_o.elements[4]*=u,_o.elements[5]*=u,_o.elements[6]*=u,_o.elements[8]*=d,_o.elements[9]*=d,_o.elements[10]*=d,t.setFromRotationMatrix(_o),i.x=o,i.y=s,i.z=a,this}makePerspective(e,t,i,r,o,s,a=bo,l=!1){let c=this.elements,u=2*o/(t-e),d=2*o/(i-r),h=(t+e)/(t-e),f=(i+r)/(i-r),p,v;if(l)p=o/(s-o),v=s*o/(s-o);else if(a===bo)p=-(s+o)/(s-o),v=-2*s*o/(s-o);else if(a===cp)p=-s/(s-o),v=-s*o/(s-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=u,c[4]=0,c[8]=h,c[12]=0,c[1]=0,c[5]=d,c[9]=f,c[13]=0,c[2]=0,c[6]=0,c[10]=p,c[14]=v,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,i,r,o,s,a=bo,l=!1){let c=this.elements,u=2/(t-e),d=2/(i-r),h=-(t+e)/(t-e),f=-(i+r)/(i-r),p,v;if(l)p=1/(s-o),v=s/(s-o);else if(a===bo)p=-2/(s-o),v=-(s+o)/(s-o);else if(a===cp)p=-1/(s-o),v=-o/(s-o);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=u,c[4]=0,c[8]=0,c[12]=h,c[1]=0,c[5]=d,c[9]=0,c[13]=f,c[2]=0,c[6]=0,c[10]=p,c[14]=v,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){let t=this.elements,i=e.elements;for(let r=0;r<16;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){let i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}},Sd=new V,_o=new Sn,m6=new V(0,0,0),g6=new V(1,1,1),Xa=new V,u0=new V,br=new V,rF=new Sn,oF=new eo,Qa=(()=>{class n{constructor(t=0,i=0,r=0,o=n.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=i,this._z=r,this._order=o}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,i,r,o=this._order){return this._x=t,this._y=i,this._z=r,this._order=o,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,i=this._order,r=!0){let o=t.elements,s=o[0],a=o[4],l=o[8],c=o[1],u=o[5],d=o[9],h=o[2],f=o[6],p=o[10];switch(i){case"XYZ":this._y=Math.asin(Rt(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-d,p),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(f,u),this._z=0);break;case"YXZ":this._x=Math.asin(-Rt(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(l,p),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-h,s),this._z=0);break;case"ZXY":this._x=Math.asin(Rt(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-h,p),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,s));break;case"ZYX":this._y=Math.asin(-Rt(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(f,p),this._z=Math.atan2(c,s)):(this._x=0,this._z=Math.atan2(-a,u));break;case"YZX":this._z=Math.asin(Rt(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-d,u),this._y=Math.atan2(-h,s)):(this._x=0,this._y=Math.atan2(l,p));break;case"XZY":this._z=Math.asin(-Rt(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(f,u),this._y=Math.atan2(l,s)):(this._x=Math.atan2(-d,p),this._y=0);break;default:at("Euler: .setFromRotationMatrix() encountered an unknown order: "+i)}return this._order=i,r===!0&&this._onChangeCallback(),this}setFromQuaternion(t,i,r){return rF.makeRotationFromQuaternion(t),this.setFromRotationMatrix(rF,i,r)}setFromVector3(t,i=this._order){return this.set(t.x,t.y,t.z,i)}reorder(t){return oF.setFromEuler(this),this.setFromQuaternion(oF,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],i=0){return t[i]=this._x,t[i+1]=this._y,t[i+2]=this._z,t[i+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}return n.DEFAULT_ORDER="XYZ",n})(),Vd=class{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}},v6=0,sF=new V,Cd=new eo,ea=new Sn,d0=new V,np=new V,y6=new V,_6=new eo,aF=new V(1,0,0),lF=new V(0,1,0),cF=new V(0,0,1),uF={type:"added"},x6={type:"removed"},wd={type:"childadded",child:null},TE={type:"childremoved",child:null},Er=(()=>{class n extends ps{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:v6++}),this.uuid=Kd(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=n.DEFAULT_UP.clone();let t=new V,i=new Qa,r=new eo,o=new V(1,1,1);function s(){r.setFromEuler(i,!1)}function a(){i.setFromQuaternion(r,void 0,!1)}i._onChange(s),r._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:i},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:o},modelViewMatrix:{value:new Sn},normalMatrix:{value:new Ct}}),this.matrix=new Sn,this.matrixWorld=new Sn,this.matrixAutoUpdate=n.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=n.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Vd,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,i){this.quaternion.setFromAxisAngle(t,i)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,i){return Cd.setFromAxisAngle(t,i),this.quaternion.multiply(Cd),this}rotateOnWorldAxis(t,i){return Cd.setFromAxisAngle(t,i),this.quaternion.premultiply(Cd),this}rotateX(t){return this.rotateOnAxis(aF,t)}rotateY(t){return this.rotateOnAxis(lF,t)}rotateZ(t){return this.rotateOnAxis(cF,t)}translateOnAxis(t,i){return sF.copy(t).applyQuaternion(this.quaternion),this.position.add(sF.multiplyScalar(i)),this}translateX(t){return this.translateOnAxis(aF,t)}translateY(t){return this.translateOnAxis(lF,t)}translateZ(t){return this.translateOnAxis(cF,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(ea.copy(this.matrixWorld).invert())}lookAt(t,i,r){t.isVector3?d0.copy(t):d0.set(t,i,r);let o=this.parent;this.updateWorldMatrix(!0,!1),np.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ea.lookAt(np,d0,this.up):ea.lookAt(d0,np,this.up),this.quaternion.setFromRotationMatrix(ea),o&&(ea.extractRotation(o.matrixWorld),Cd.setFromRotationMatrix(ea),this.quaternion.premultiply(Cd.invert()))}add(t){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.add(arguments[i]);return this}return t===this?(ut("Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(uF),wd.child=t,this.dispatchEvent(wd),wd.child=null):ut("Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.remove(arguments[r]);return this}let i=this.children.indexOf(t);return i!==-1&&(t.parent=null,this.children.splice(i,1),t.dispatchEvent(x6),TE.child=t,this.dispatchEvent(TE),TE.child=null),this}removeFromParent(){let t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),ea.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),ea.multiply(t.parent.matrixWorld)),t.applyMatrix4(ea),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(uF),wd.child=t,this.dispatchEvent(wd),wd.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,i){if(this[t]===i)return this;for(let r=0,o=this.children.length;r<o;r++){let a=this.children[r].getObjectByProperty(t,i);if(a!==void 0)return a}}getObjectsByProperty(t,i,r=[]){this[t]===i&&r.push(this);let o=this.children;for(let s=0,a=o.length;s<a;s++)o[s].getObjectsByProperty(t,i,r);return r}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(np,t,y6),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(np,_6,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let i=this.matrixWorld.elements;return t.set(i[8],i[9],i[10]).normalize()}raycast(){}traverse(t){t(this);let i=this.children;for(let r=0,o=i.length;r<o;r++)i[r].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);let i=this.children;for(let r=0,o=i.length;r<o;r++)i[r].traverseVisible(t)}traverseAncestors(t){let i=this.parent;i!==null&&(t(i),i.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);let i=this.children;for(let r=0,o=i.length;r<o;r++)i[r].updateMatrixWorld(t)}updateWorldMatrix(t,i){let r=this.parent;if(t===!0&&r!==null&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),i===!0){let o=this.children;for(let s=0,a=o.length;s<a;s++)o[s].updateWorldMatrix(!1,!0)}}toJSON(t){let i=t===void 0||typeof t=="string",r={};i&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});let o={};o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.castShadow===!0&&(o.castShadow=!0),this.receiveShadow===!0&&(o.receiveShadow=!0),this.visible===!1&&(o.visible=!1),this.frustumCulled===!1&&(o.frustumCulled=!1),this.renderOrder!==0&&(o.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(o.userData=this.userData),o.layers=this.layers.mask,o.matrix=this.matrix.toArray(),o.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(o.matrixAutoUpdate=!1),this.isInstancedMesh&&(o.type="InstancedMesh",o.count=this.count,o.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(o.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(o.type="BatchedMesh",o.perObjectFrustumCulled=this.perObjectFrustumCulled,o.sortObjects=this.sortObjects,o.drawRanges=this._drawRanges,o.reservedRanges=this._reservedRanges,o.geometryInfo=this._geometryInfo.map(l=>ue(R({},l),{boundingBox:l.boundingBox?l.boundingBox.toJSON():void 0,boundingSphere:l.boundingSphere?l.boundingSphere.toJSON():void 0})),o.instanceInfo=this._instanceInfo.map(l=>R({},l)),o.availableInstanceIds=this._availableInstanceIds.slice(),o.availableGeometryIds=this._availableGeometryIds.slice(),o.nextIndexStart=this._nextIndexStart,o.nextVertexStart=this._nextVertexStart,o.geometryCount=this._geometryCount,o.maxInstanceCount=this._maxInstanceCount,o.maxVertexCount=this._maxVertexCount,o.maxIndexCount=this._maxIndexCount,o.geometryInitialized=this._geometryInitialized,o.matricesTexture=this._matricesTexture.toJSON(t),o.indirectTexture=this._indirectTexture.toJSON(t),this._colorsTexture!==null&&(o.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(o.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(o.boundingBox=this.boundingBox.toJSON()));function s(l,c){return l[c.uuid]===void 0&&(l[c.uuid]=c.toJSON(t)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?o.background=this.background.toJSON():this.background.isTexture&&(o.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(o.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){o.geometry=s(t.geometries,this.geometry);let l=this.geometry.parameters;if(l!==void 0&&l.shapes!==void 0){let c=l.shapes;if(Array.isArray(c))for(let u=0,d=c.length;u<d;u++){let h=c[u];s(t.shapes,h)}else s(t.shapes,c)}}if(this.isSkinnedMesh&&(o.bindMode=this.bindMode,o.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(t.skeletons,this.skeleton),o.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let l=[];for(let c=0,u=this.material.length;c<u;c++)l.push(s(t.materials,this.material[c]));o.material=l}else o.material=s(t.materials,this.material);if(this.children.length>0){o.children=[];for(let l=0;l<this.children.length;l++)o.children.push(this.children[l].toJSON(t).object)}if(this.animations.length>0){o.animations=[];for(let l=0;l<this.animations.length;l++){let c=this.animations[l];o.animations.push(s(t.animations,c))}}if(i){let l=a(t.geometries),c=a(t.materials),u=a(t.textures),d=a(t.images),h=a(t.shapes),f=a(t.skeletons),p=a(t.animations),v=a(t.nodes);l.length>0&&(r.geometries=l),c.length>0&&(r.materials=c),u.length>0&&(r.textures=u),d.length>0&&(r.images=d),h.length>0&&(r.shapes=h),f.length>0&&(r.skeletons=f),p.length>0&&(r.animations=p),v.length>0&&(r.nodes=v)}return r.object=o,r;function a(l){let c=[];for(let u in l){let d=l[u];delete d.metadata,c.push(d)}return c}}clone(t){return new this.constructor().copy(this,t)}copy(t,i=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),i===!0)for(let r=0;r<t.children.length;r++){let o=t.children[r];this.add(o.clone())}return this}}return n.DEFAULT_UP=new V(0,1,0),n.DEFAULT_MATRIX_AUTO_UPDATE=!0,n.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0,n})(),xo=new V,ta=new V,DE=new V,na=new V,Ed=new V,Md=new V,dF=new V,AE=new V,IE=new V,PE=new V,OE=new Mn,RE=new Mn,FE=new Mn,Za=class n{constructor(e=new V,t=new V,i=new V){this.a=e,this.b=t,this.c=i}static getNormal(e,t,i,r){r.subVectors(i,t),xo.subVectors(e,t),r.cross(xo);let o=r.lengthSq();return o>0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(e,t,i,r,o){xo.subVectors(r,t),ta.subVectors(i,t),DE.subVectors(e,t);let s=xo.dot(xo),a=xo.dot(ta),l=xo.dot(DE),c=ta.dot(ta),u=ta.dot(DE),d=s*c-a*a;if(d===0)return o.set(0,0,0),null;let h=1/d,f=(c*l-a*u)*h,p=(s*u-a*l)*h;return o.set(1-f-p,p,f)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,na)===null?!1:na.x>=0&&na.y>=0&&na.x+na.y<=1}static getInterpolation(e,t,i,r,o,s,a,l){return this.getBarycoord(e,t,i,r,na)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(o,na.x),l.addScaledVector(s,na.y),l.addScaledVector(a,na.z),l)}static getInterpolatedAttribute(e,t,i,r,o,s){return OE.setScalar(0),RE.setScalar(0),FE.setScalar(0),OE.fromBufferAttribute(e,t),RE.fromBufferAttribute(e,i),FE.fromBufferAttribute(e,r),s.setScalar(0),s.addScaledVector(OE,o.x),s.addScaledVector(RE,o.y),s.addScaledVector(FE,o.z),s}static isFrontFacing(e,t,i,r){return xo.subVectors(i,t),ta.subVectors(e,t),xo.cross(ta).dot(r)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,i,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return xo.subVectors(this.c,this.b),ta.subVectors(this.a,this.b),xo.cross(ta).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return n.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return n.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,r,o){return n.getInterpolation(e,this.a,this.b,this.c,t,i,r,o)}containsPoint(e){return n.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return n.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let i=this.a,r=this.b,o=this.c,s,a;Ed.subVectors(r,i),Md.subVectors(o,i),AE.subVectors(e,i);let l=Ed.dot(AE),c=Md.dot(AE);if(l<=0&&c<=0)return t.copy(i);IE.subVectors(e,r);let u=Ed.dot(IE),d=Md.dot(IE);if(u>=0&&d<=u)return t.copy(r);let h=l*d-u*c;if(h<=0&&l>=0&&u<=0)return s=l/(l-u),t.copy(i).addScaledVector(Ed,s);PE.subVectors(e,o);let f=Ed.dot(PE),p=Md.dot(PE);if(p>=0&&f<=p)return t.copy(o);let v=f*c-l*p;if(v<=0&&c>=0&&p<=0)return a=c/(c-p),t.copy(i).addScaledVector(Md,a);let g=u*p-f*d;if(g<=0&&d-u>=0&&f-p>=0)return dF.subVectors(o,r),a=(d-u)/(d-u+(f-p)),t.copy(r).addScaledVector(dF,a);let m=1/(g+v+h);return s=v*m,a=h*m,t.copy(i).addScaledVector(Ed,s).addScaledVector(Md,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},aN={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},Ya={h:0,s:0,l:0},h0={h:0,s:0,l:0};function NE(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}var mt=class{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){let r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=pn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Ot.colorSpaceToWorking(this,t),this}setRGB(e,t,i,r=Ot.workingColorSpace){return this.r=e,this.g=t,this.b=i,Ot.colorSpaceToWorking(this,r),this}setHSL(e,t,i,r=Ot.workingColorSpace){if(e=xM(e,1),t=Rt(t,0,1),i=Rt(i,0,1),t===0)this.r=this.g=this.b=i;else{let o=i<=.5?i*(1+t):i+t-i*t,s=2*i-o;this.r=NE(s,o,e+1/3),this.g=NE(s,o,e),this.b=NE(s,o,e-1/3)}return Ot.colorSpaceToWorking(this,r),this}setStyle(e,t=pn){function i(o){o!==void 0&&parseFloat(o)<1&&at("Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let o,s=r[1],a=r[2];switch(s){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,t);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,t);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,t);break;default:at("Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let o=r[1],s=o.length;if(s===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,t);if(s===6)return this.setHex(parseInt(o,16),t);at("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=pn){let i=aN[e.toLowerCase()];return i!==void 0?this.setHex(i,t):at("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=oa(e.r),this.g=oa(e.g),this.b=oa(e.b),this}copyLinearToSRGB(e){return this.r=Od(e.r),this.g=Od(e.g),this.b=Od(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=pn){return Ot.workingToColorSpace(Ci.copy(this),e),Math.round(Rt(Ci.r*255,0,255))*65536+Math.round(Rt(Ci.g*255,0,255))*256+Math.round(Rt(Ci.b*255,0,255))}getHexString(e=pn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Ot.workingColorSpace){Ot.workingToColorSpace(Ci.copy(this),t);let i=Ci.r,r=Ci.g,o=Ci.b,s=Math.max(i,r,o),a=Math.min(i,r,o),l,c,u=(a+s)/2;if(a===s)l=0,c=0;else{let d=s-a;switch(c=u<=.5?d/(s+a):d/(2-s-a),s){case i:l=(r-o)/d+(r<o?6:0);break;case r:l=(o-i)/d+2;break;case o:l=(i-r)/d+4;break}l/=6}return e.h=l,e.s=c,e.l=u,e}getRGB(e,t=Ot.workingColorSpace){return Ot.workingToColorSpace(Ci.copy(this),t),e.r=Ci.r,e.g=Ci.g,e.b=Ci.b,e}getStyle(e=pn){Ot.workingToColorSpace(Ci.copy(this),e);let t=Ci.r,i=Ci.g,r=Ci.b;return e!==pn?`color(${e} ${t.toFixed(3)} ${i.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(i*255)},${Math.round(r*255)})`}offsetHSL(e,t,i){return this.getHSL(Ya),this.setHSL(Ya.h+e,Ya.s+t,Ya.l+i)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,i){return this.r=e.r+(t.r-e.r)*i,this.g=e.g+(t.g-e.g)*i,this.b=e.b+(t.b-e.b)*i,this}lerpHSL(e,t){this.getHSL(Ya),e.getHSL(h0);let i=sp(Ya.h,h0.h,t),r=sp(Ya.s,h0.s,t),o=sp(Ya.l,h0.l,t);return this.setHSL(i,r,o),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let t=this.r,i=this.g,r=this.b,o=e.elements;return this.r=o[0]*t+o[3]*i+o[6]*r,this.g=o[1]*t+o[4]*i+o[7]*r,this.b=o[2]*t+o[5]*i+o[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},Ci=new mt;mt.NAMES=aN;var b6=0,Mr=class extends ps{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:b6++}),this.uuid=Kd(),this.name="",this.type="Material",this.blending=Ec,this.side=So,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=D0,this.blendDst=A0,this.blendEquation=Ka,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new mt(0,0,0),this.blendAlpha=0,this.depthFunc=Mc,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=WE,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=wc,this.stencilZFail=wc,this.stencilZPass=wc,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let i=e[t];if(i===void 0){at(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){at(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[t]=i}}toJSON(e){let t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});let i={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(i.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(i.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Ec&&(i.blending=this.blending),this.side!==So&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==D0&&(i.blendSrc=this.blendSrc),this.blendDst!==A0&&(i.blendDst=this.blendDst),this.blendEquation!==Ka&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==Mc&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==WE&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==wc&&(i.stencilFail=this.stencilFail),this.stencilZFail!==wc&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==wc&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.allowOverride===!1&&(i.allowOverride=!1),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function r(o){let s=[];for(let a in o){let l=o[a];delete l.metadata,s.push(l)}return s}if(t){let o=r(e.textures),s=r(e.images);o.length>0&&(i.textures=o),s.length>0&&(i.images=s)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,i=null;if(t!==null){let r=t.length;i=new Array(r);for(let o=0;o!==r;++o)i[o]=t[o].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}},dp=class extends Mr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new mt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Qa,this.combine=ay,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}};var Yn=new V,f0=new dt,S6=0,Cr=class{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:S6++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=$E,this.updateRanges=[],this.gpuType=Mo,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let r=0,o=this.itemSize;r<o;r++)this.array[e+r]=t.array[i+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,i=this.count;t<i;t++)f0.fromBufferAttribute(this,t),f0.applyMatrix3(e),this.setXY(t,f0.x,f0.y);else if(this.itemSize===3)for(let t=0,i=this.count;t<i;t++)Yn.fromBufferAttribute(this,t),Yn.applyMatrix3(e),this.setXYZ(t,Yn.x,Yn.y,Yn.z);return this}applyMatrix4(e){for(let t=0,i=this.count;t<i;t++)Yn.fromBufferAttribute(this,t),Yn.applyMatrix4(e),this.setXYZ(t,Yn.x,Yn.y,Yn.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)Yn.fromBufferAttribute(this,t),Yn.applyNormalMatrix(e),this.setXYZ(t,Yn.x,Yn.y,Yn.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)Yn.fromBufferAttribute(this,t),Yn.transformDirection(e),this.setXYZ(t,Yn.x,Yn.y,Yn.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let i=this.array[e*this.itemSize+t];return this.normalized&&(i=Pd(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=Ni(i,this.array)),this.array[e*this.itemSize+t]=i,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=Pd(t,this.array)),t}setX(e,t){return this.normalized&&(t=Ni(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=Pd(t,this.array)),t}setY(e,t){return this.normalized&&(t=Ni(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=Pd(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Ni(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=Pd(t,this.array)),t}setW(e,t){return this.normalized&&(t=Ni(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,i){return e*=this.itemSize,this.normalized&&(t=Ni(t,this.array),i=Ni(i,this.array)),this.array[e+0]=t,this.array[e+1]=i,this}setXYZ(e,t,i,r){return e*=this.itemSize,this.normalized&&(t=Ni(t,this.array),i=Ni(i,this.array),r=Ni(r,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=r,this}setXYZW(e,t,i,r,o){return e*=this.itemSize,this.normalized&&(t=Ni(t,this.array),i=Ni(i,this.array),r=Ni(r,this.array),o=Ni(o,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=r,this.array[e+3]=o,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==$E&&(e.usage=this.usage),e}};var hp=class extends Cr{constructor(e,t,i){super(new Uint16Array(e),t,i)}};var fp=class extends Cr{constructor(e,t,i){super(new Uint32Array(e),t,i)}};var Bn=class extends Cr{constructor(e,t,i){super(new Float32Array(e),t,i)}},C6=0,Jr=new Sn,kE=new Er,Td=new V,Sr=new ki,ip=new ki,ri=new V,Li=class n extends ps{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:C6++}),this.uuid=Kd(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(yM(e)?fp:hp)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,i=0){this.groups.push({start:e,count:t,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let i=this.attributes.normal;if(i!==void 0){let o=new Ct().getNormalMatrix(e);i.applyNormalMatrix(o),i.needsUpdate=!0}let r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return Jr.makeRotationFromQuaternion(e),this.applyMatrix4(Jr),this}rotateX(e){return Jr.makeRotationX(e),this.applyMatrix4(Jr),this}rotateY(e){return Jr.makeRotationY(e),this.applyMatrix4(Jr),this}rotateZ(e){return Jr.makeRotationZ(e),this.applyMatrix4(Jr),this}translate(e,t,i){return Jr.makeTranslation(e,t,i),this.applyMatrix4(Jr),this}scale(e,t,i){return Jr.makeScale(e,t,i),this.applyMatrix4(Jr),this}lookAt(e){return kE.lookAt(e),kE.updateMatrix(),this.applyMatrix4(kE.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Td).negate(),this.translate(Td.x,Td.y,Td.z),this}setFromPoints(e){let t=this.getAttribute("position");if(t===void 0){let i=[];for(let r=0,o=e.length;r<o;r++){let s=e[r];i.push(s.x,s.y,s.z||0)}this.setAttribute("position",new Bn(i,3))}else{let i=Math.min(e.length,t.count);for(let r=0;r<i;r++){let o=e[r];t.setXYZ(r,o.x,o.y,o.z||0)}e.length>t.count&&at("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new ki);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){ut("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new V(-1/0,-1/0,-1/0),new V(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let i=0,r=t.length;i<r;i++){let o=t[i];Sr.setFromBufferAttribute(o),this.morphTargetsRelative?(ri.addVectors(this.boundingBox.min,Sr.min),this.boundingBox.expandByPoint(ri),ri.addVectors(this.boundingBox.max,Sr.max),this.boundingBox.expandByPoint(ri)):(this.boundingBox.expandByPoint(Sr.min),this.boundingBox.expandByPoint(Sr.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&ut('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Ja);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){ut("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new V,1/0);return}if(e){let i=this.boundingSphere.center;if(Sr.setFromBufferAttribute(e),t)for(let o=0,s=t.length;o<s;o++){let a=t[o];ip.setFromBufferAttribute(a),this.morphTargetsRelative?(ri.addVectors(Sr.min,ip.min),Sr.expandByPoint(ri),ri.addVectors(Sr.max,ip.max),Sr.expandByPoint(ri)):(Sr.expandByPoint(ip.min),Sr.expandByPoint(ip.max))}Sr.getCenter(i);let r=0;for(let o=0,s=e.count;o<s;o++)ri.fromBufferAttribute(e,o),r=Math.max(r,i.distanceToSquared(ri));if(t)for(let o=0,s=t.length;o<s;o++){let a=t[o],l=this.morphTargetsRelative;for(let c=0,u=a.count;c<u;c++)ri.fromBufferAttribute(a,c),l&&(Td.fromBufferAttribute(e,c),ri.add(Td)),r=Math.max(r,i.distanceToSquared(ri))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&ut('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){ut("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let i=t.position,r=t.normal,o=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Cr(new Float32Array(4*i.count),4));let s=this.getAttribute("tangent"),a=[],l=[];for(let A=0;A<i.count;A++)a[A]=new V,l[A]=new V;let c=new V,u=new V,d=new V,h=new dt,f=new dt,p=new dt,v=new V,g=new V;function m(A,C,M){c.fromBufferAttribute(i,A),u.fromBufferAttribute(i,C),d.fromBufferAttribute(i,M),h.fromBufferAttribute(o,A),f.fromBufferAttribute(o,C),p.fromBufferAttribute(o,M),u.sub(c),d.sub(c),f.sub(h),p.sub(h);let N=1/(f.x*p.y-p.x*f.y);isFinite(N)&&(v.copy(u).multiplyScalar(p.y).addScaledVector(d,-f.y).multiplyScalar(N),g.copy(d).multiplyScalar(f.x).addScaledVector(u,-p.x).multiplyScalar(N),a[A].add(v),a[C].add(v),a[M].add(v),l[A].add(g),l[C].add(g),l[M].add(g))}let y=this.groups;y.length===0&&(y=[{start:0,count:e.count}]);for(let A=0,C=y.length;A<C;++A){let M=y[A],N=M.start,j=M.count;for(let z=N,$=N+j;z<$;z+=3)m(e.getX(z+0),e.getX(z+1),e.getX(z+2))}let _=new V,x=new V,b=new V,w=new V;function E(A){b.fromBufferAttribute(r,A),w.copy(b);let C=a[A];_.copy(C),_.sub(b.multiplyScalar(b.dot(C))).normalize(),x.crossVectors(w,C);let N=x.dot(l[A])<0?-1:1;s.setXYZW(A,_.x,_.y,_.z,N)}for(let A=0,C=y.length;A<C;++A){let M=y[A],N=M.start,j=M.count;for(let z=N,$=N+j;z<$;z+=3)E(e.getX(z+0)),E(e.getX(z+1)),E(e.getX(z+2))}}computeVertexNormals(){let e=this.index,t=this.getAttribute("position");if(t!==void 0){let i=this.getAttribute("normal");if(i===void 0)i=new Cr(new Float32Array(t.count*3),3),this.setAttribute("normal",i);else for(let h=0,f=i.count;h<f;h++)i.setXYZ(h,0,0,0);let r=new V,o=new V,s=new V,a=new V,l=new V,c=new V,u=new V,d=new V;if(e)for(let h=0,f=e.count;h<f;h+=3){let p=e.getX(h+0),v=e.getX(h+1),g=e.getX(h+2);r.fromBufferAttribute(t,p),o.fromBufferAttribute(t,v),s.fromBufferAttribute(t,g),u.subVectors(s,o),d.subVectors(r,o),u.cross(d),a.fromBufferAttribute(i,p),l.fromBufferAttribute(i,v),c.fromBufferAttribute(i,g),a.add(u),l.add(u),c.add(u),i.setXYZ(p,a.x,a.y,a.z),i.setXYZ(v,l.x,l.y,l.z),i.setXYZ(g,c.x,c.y,c.z)}else for(let h=0,f=t.count;h<f;h+=3)r.fromBufferAttribute(t,h+0),o.fromBufferAttribute(t,h+1),s.fromBufferAttribute(t,h+2),u.subVectors(s,o),d.subVectors(r,o),u.cross(d),i.setXYZ(h+0,u.x,u.y,u.z),i.setXYZ(h+1,u.x,u.y,u.z),i.setXYZ(h+2,u.x,u.y,u.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){let e=this.attributes.normal;for(let t=0,i=e.count;t<i;t++)ri.fromBufferAttribute(e,t),ri.normalize(),e.setXYZ(t,ri.x,ri.y,ri.z)}toNonIndexed(){function e(a,l){let c=a.array,u=a.itemSize,d=a.normalized,h=new c.constructor(l.length*u),f=0,p=0;for(let v=0,g=l.length;v<g;v++){a.isInterleavedBufferAttribute?f=l[v]*a.data.stride+a.offset:f=l[v]*u;for(let m=0;m<u;m++)h[p++]=c[f++]}return new Cr(h,u,d)}if(this.index===null)return at("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let t=new n,i=this.index.array,r=this.attributes;for(let a in r){let l=r[a],c=e(l,i);t.setAttribute(a,c)}let o=this.morphAttributes;for(let a in o){let l=[],c=o[a];for(let u=0,d=c.length;u<d;u++){let h=c[u],f=e(h,i);l.push(f)}t.morphAttributes[a]=l}t.morphTargetsRelative=this.morphTargetsRelative;let s=this.groups;for(let a=0,l=s.length;a<l;a++){let c=s[a];t.addGroup(c.start,c.count,c.materialIndex)}return t}toJSON(){let e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){let l=this.parameters;for(let c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let i=this.attributes;for(let l in i){let c=i[l];e.data.attributes[l]=c.toJSON(e.data)}let r={},o=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],u=[];for(let d=0,h=c.length;d<h;d++){let f=c[d];u.push(f.toJSON(e.data))}u.length>0&&(r[l]=u,o=!0)}o&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);let s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));let a=this.boundingSphere;return a!==null&&(e.data.boundingSphere=a.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let i=e.index;i!==null&&this.setIndex(i.clone());let r=e.attributes;for(let c in r){let u=r[c];this.setAttribute(c,u.clone(t))}let o=e.morphAttributes;for(let c in o){let u=[],d=o[c];for(let h=0,f=d.length;h<f;h++)u.push(d[h].clone(t));this.morphAttributes[c]=u}this.morphTargetsRelative=e.morphTargetsRelative;let s=e.groups;for(let c=0,u=s.length;c<u;c++){let d=s[c];this.addGroup(d.start,d.count,d.materialIndex)}let a=e.boundingBox;a!==null&&(this.boundingBox=a.clone());let l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}},hF=new Sn,Sc=new sa,p0=new Ja,fF=new V,m0=new V,g0=new V,v0=new V,LE=new V,y0=new V,pF=new V,_0=new V,Ui=class extends Er{constructor(e=new Li,t=new dp){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){let t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){let r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=r.length;o<s;o++){let a=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=o}}}}getVertexPosition(e,t){let i=this.geometry,r=i.attributes.position,o=i.morphAttributes.position,s=i.morphTargetsRelative;t.fromBufferAttribute(r,e);let a=this.morphTargetInfluences;if(o&&a){y0.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let u=a[l],d=o[l];u!==0&&(LE.fromBufferAttribute(d,e),s?y0.addScaledVector(LE,u):y0.addScaledVector(LE.sub(t),u))}t.add(y0)}return t}raycast(e,t){let i=this.geometry,r=this.material,o=this.matrixWorld;r!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),p0.copy(i.boundingSphere),p0.applyMatrix4(o),Sc.copy(e.ray).recast(e.near),!(p0.containsPoint(Sc.origin)===!1&&(Sc.intersectSphere(p0,fF)===null||Sc.origin.distanceToSquared(fF)>(e.far-e.near)**2))&&(hF.copy(o).invert(),Sc.copy(e.ray).applyMatrix4(hF),!(i.boundingBox!==null&&Sc.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,Sc)))}_computeIntersections(e,t,i){let r,o=this.geometry,s=this.material,a=o.index,l=o.attributes.position,c=o.attributes.uv,u=o.attributes.uv1,d=o.attributes.normal,h=o.groups,f=o.drawRange;if(a!==null)if(Array.isArray(s))for(let p=0,v=h.length;p<v;p++){let g=h[p],m=s[g.materialIndex],y=Math.max(g.start,f.start),_=Math.min(a.count,Math.min(g.start+g.count,f.start+f.count));for(let x=y,b=_;x<b;x+=3){let w=a.getX(x),E=a.getX(x+1),A=a.getX(x+2);r=x0(this,m,e,i,c,u,d,w,E,A),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,f.start),v=Math.min(a.count,f.start+f.count);for(let g=p,m=v;g<m;g+=3){let y=a.getX(g),_=a.getX(g+1),x=a.getX(g+2);r=x0(this,s,e,i,c,u,d,y,_,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}else if(l!==void 0)if(Array.isArray(s))for(let p=0,v=h.length;p<v;p++){let g=h[p],m=s[g.materialIndex],y=Math.max(g.start,f.start),_=Math.min(l.count,Math.min(g.start+g.count,f.start+f.count));for(let x=y,b=_;x<b;x+=3){let w=x,E=x+1,A=x+2;r=x0(this,m,e,i,c,u,d,w,E,A),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,f.start),v=Math.min(l.count,f.start+f.count);for(let g=p,m=v;g<m;g+=3){let y=g,_=g+1,x=g+2;r=x0(this,s,e,i,c,u,d,y,_,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}}};function w6(n,e,t,i,r,o,s,a){let l;if(e.side===Bi?l=i.intersectTriangle(s,o,r,!0,a):l=i.intersectTriangle(r,o,s,e.side===So,a),l===null)return null;_0.copy(a),_0.applyMatrix4(n.matrixWorld);let c=t.ray.origin.distanceTo(_0);return c<t.near||c>t.far?null:{distance:c,point:_0.clone(),object:n}}function x0(n,e,t,i,r,o,s,a,l,c){n.getVertexPosition(a,m0),n.getVertexPosition(l,g0),n.getVertexPosition(c,v0);let u=w6(n,e,t,i,m0,g0,v0,pF);if(u){let d=new V;Za.getBarycoord(pF,m0,g0,v0,d),r&&(u.uv=Za.getInterpolatedAttribute(r,a,l,c,d,new dt)),o&&(u.uv1=Za.getInterpolatedAttribute(o,a,l,c,d,new dt)),s&&(u.normal=Za.getInterpolatedAttribute(s,a,l,c,d,new V),u.normal.dot(i.direction)>0&&u.normal.multiplyScalar(-1));let h={a,b:l,c,normal:new V,materialIndex:0};Za.getNormal(m0,g0,v0,h.normal),u.face=h,u.barycoord=d}return u}var zd=class n extends Li{constructor(e=1,t=1,i=1,r=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:r,heightSegments:o,depthSegments:s};let a=this;r=Math.floor(r),o=Math.floor(o),s=Math.floor(s);let l=[],c=[],u=[],d=[],h=0,f=0;p("z","y","x",-1,-1,i,t,e,s,o,0),p("z","y","x",1,-1,i,t,-e,s,o,1),p("x","z","y",1,1,e,i,t,r,s,2),p("x","z","y",1,-1,e,i,-t,r,s,3),p("x","y","z",1,-1,e,t,i,r,o,4),p("x","y","z",-1,-1,e,t,-i,r,o,5),this.setIndex(l),this.setAttribute("position",new Bn(c,3)),this.setAttribute("normal",new Bn(u,3)),this.setAttribute("uv",new Bn(d,2));function p(v,g,m,y,_,x,b,w,E,A,C){let M=x/E,N=b/A,j=x/2,z=b/2,$=w/2,q=E+1,X=A+1,G=0,Q=0,pe=new V;for(let me=0;me<X;me++){let ve=me*N-z;for(let Ye=0;Ye<q;Ye++){let lt=Ye*M-j;pe[v]=lt*y,pe[g]=ve*_,pe[m]=$,c.push(pe.x,pe.y,pe.z),pe[v]=0,pe[g]=0,pe[m]=w>0?1:-1,u.push(pe.x,pe.y,pe.z),d.push(Ye/E),d.push(1-me/A),G+=1}}for(let me=0;me<A;me++)for(let ve=0;ve<E;ve++){let Ye=h+ve+q*me,lt=h+ve+q*(me+1),Vt=h+(ve+1)+q*(me+1),Xt=h+(ve+1)+q*me;l.push(Ye,lt,Xt),l.push(lt,Vt,Xt),Q+=6}a.addGroup(f,Q,C),f+=Q,h+=G}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new n(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}};function Uc(n){let e={};for(let t in n){e[t]={};for(let i in n[t]){let r=n[t][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(at("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][i]=null):e[t][i]=r.clone():Array.isArray(r)?e[t][i]=r.slice():e[t][i]=r}}return e}function Ei(n){let e={};for(let t=0;t<n.length;t++){let i=Uc(n[t]);for(let r in i)e[r]=i[r]}return e}function E6(n){let e=[];for(let t=0;t<n.length;t++)e.push(n[t].clone());return e}function bM(n){let e=n.getRenderTarget();return e===null?n.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:Ot.workingColorSpace}var lN={clone:Uc,merge:Ei},M6=`void main() {
|
|
6
6
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
7
7
|
}`,T6=`void main() {
|
|
8
8
|
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
|