@pixeasy/customizer 0.0.21-beta.uat → 0.0.22-beta.uat

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 b4=Object.defineProperty,y4=Object.defineProperties;var x4=Object.getOwnProp
2
2
  ${t.map((n,r)=>`${r+1}) ${n.toString()}`).join(`
3
3
  `)}`:"",this.name="UnsubscriptionError",this.errors=t});function uh(i,e){if(i){let t=i.indexOf(e);0<=t&&i.splice(t,1)}}var Bi=class i{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:n}=this;if(kt(n))try{n()}catch(o){e=o instanceof Zm?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{BD(o)}catch(s){e=e??[],s instanceof Zm?e=[...e,...s.errors]:e.push(s)}}if(e)throw new Zm(e)}}add(e){var t;if(e&&e!==this)if(this.closed)BD(e);else{if(e instanceof i){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)&&uh(t,e)}remove(e){let{_finalizers:t}=this;t&&uh(t,e),e instanceof i&&e._removeParent(this)}};Bi.EMPTY=(()=>{let i=new Bi;return i.closed=!0,i})();var Y_=Bi.EMPTY;function Jm(i){return i instanceof Bi||i&&"closed"in i&&kt(i.remove)&&kt(i.add)&&kt(i.unsubscribe)}function BD(i){kt(i)?i():i.unsubscribe()}var Co={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var $d={setTimeout(i,e,...t){let{delegate:n}=$d;return n?.setTimeout?n.setTimeout(i,e,...t):setTimeout(i,e,...t)},clearTimeout(i){let{delegate:e}=$d;return(e?.clearTimeout||clearTimeout)(i)},delegate:void 0};function Qm(i){$d.setTimeout(()=>{let{onUnhandledError:e}=Co;if(e)e(i);else throw i})}function q_(){}var UD=K_("C",void 0,void 0);function zD(i){return K_("E",void 0,i)}function VD(i){return K_("N",i,void 0)}function K_(i,e,t){return{kind:i,value:e,error:t}}var ac=null;function Xd(i){if(Co.useDeprecatedSynchronousErrorHandling){let e=!ac;if(e&&(ac={errorThrown:!1,error:null}),i(),e){let{errorThrown:t,error:n}=ac;if(ac=null,t)throw n}}else i()}function GD(i){Co.useDeprecatedSynchronousErrorHandling&&ac&&(ac.errorThrown=!0,ac.error=i)}var lc=class extends Bi{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Jm(e)&&e.add(this)):this.destination=A4}static create(e,t,n){return new Ba(e,t,n)}next(e){this.isStopped?J_(VD(e),this):this._next(e)}error(e){this.isStopped?J_(zD(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?J_(UD,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()}}},I4=Function.prototype.bind;function Z_(i,e){return I4.call(i,e)}var Q_=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(n){eg(n)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(n){eg(n)}else eg(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){eg(t)}}},Ba=class extends lc{constructor(e,t,n){super();let r;if(kt(e)||!e)r={next:e??void 0,error:t??void 0,complete:n??void 0};else{let o;this&&Co.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&Z_(e.next,o),error:e.error&&Z_(e.error,o),complete:e.complete&&Z_(e.complete,o)}):r=e}this.destination=new Q_(r)}};function eg(i){Co.useDeprecatedSynchronousErrorHandling?GD(i):Qm(i)}function P4(i){throw i}function J_(i,e){let{onStoppedNotification:t}=Co;t&&$d.setTimeout(()=>t(i,e))}var A4={closed:!0,next:q_,error:P4,complete:q_};var Yd=typeof Symbol=="function"&&Symbol.observable||"@@observable";function tg(i){return i}function HD(i){return i.length===0?tg:i.length===1?i[0]:function(t){return i.reduce((n,r)=>r(n),t)}}var wn=(()=>{class i{constructor(t){t&&(this._subscribe=t)}lift(t){let n=new i;return n.source=this,n.operator=t,n}subscribe(t,n,r){let o=R4(t)?t:new Ba(t,n,r);return Xd(()=>{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(n){t.error(n)}}forEach(t,n){return n=jD(n),new n((r,o)=>{let s=new Ba({next:a=>{try{t(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:r});this.subscribe(s)})}_subscribe(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)}[Yd](){return this}pipe(...t){return HD(t)(this)}toPromise(t){return t=jD(t),new t((n,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>n(o))})}}return i.create=e=>new i(e),i})();function jD(i){var e;return(e=i??Co.Promise)!==null&&e!==void 0?e:Promise}function O4(i){return i&&kt(i.next)&&kt(i.error)&&kt(i.complete)}function R4(i){return i&&i instanceof lc||O4(i)&&Jm(i)}function k4(i){return kt(i?.lift)}function si(i){return e=>{if(k4(e))return e.lift(function(t){try{return i(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function ai(i,e,t,n,r){return new eS(i,e,t,n,r)}var eS=class extends lc{constructor(e,t,n,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=n?function(){try{n()}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 WD=Wd(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var wo=(()=>{class i extends wn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){let n=new ng(this,this);return n.operator=t,n}_throwIfClosed(){if(this.closed)throw new WD}next(t){Xd(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(t)}})}error(t){Xd(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;let{observers:n}=this;for(;n.length;)n.shift().error(t)}})}complete(){Xd(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:t}=this;for(;t.length;)t.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){let{hasError:n,isStopped:r,observers:o}=this;return n||r?Y_:(this.currentObservers=null,o.push(t),new Bi(()=>{this.currentObservers=null,uh(o,t)}))}_checkFinalizedStatuses(t){let{hasError:n,thrownError:r,isStopped:o}=this;n?t.error(r):o&&t.complete()}asObservable(){let t=new wn;return t.source=this,t}}return i.create=(e,t)=>new ng(e,t),i})(),ng=class extends wo{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.next)===null||n===void 0||n.call(t,e)}error(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.error)===null||n===void 0||n.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,n;return(n=(t=this.source)===null||t===void 0?void 0:t.subscribe(e))!==null&&n!==void 0?n:Y_}};var fh=class extends wo{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:n}=this;if(e)throw t;return this._throwIfClosed(),n}next(e){super.next(this._value=e)}};function $D(i){return i&&kt(i.schedule)}function XD(i){return i[i.length-1]}function YD(i){return kt(XD(i))?i.pop():void 0}function qD(i){return $D(XD(i))?i.pop():void 0}function ZD(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})}function KD(i){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&i[e],n=0;if(t)return t.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&n>=i.length&&(i=void 0),{value:i&&i[n++],done:!i}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function cc(i){return this instanceof cc?(this.v=i,this):new cc(i)}function JD(i,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t.apply(i,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(h){return function(p){return Promise.resolve(p).then(h,u)}}function a(h,p){n[h]&&(r[h]=function(v){return new Promise(function(g,m){o.push([h,v,g,m])>1||l(h,v)})},p&&(r[h]=p(r[h])))}function l(h,p){try{c(n[h](p))}catch(v){f(o[0][3],v)}}function c(h){h.value instanceof cc?Promise.resolve(h.value.v).then(d,u):f(o[0][2],h)}function d(h){l("next",h)}function u(h){l("throw",h)}function f(h,p){h(p),o.shift(),o.length&&l(o[0][0],o[0][1])}}function QD(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=i[Symbol.asyncIterator],t;return e?e.call(i):(i=typeof KD=="function"?KD(i):i[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=i[o]&&function(s){return new Promise(function(a,l){s=i[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 ig=i=>i&&typeof i.length=="number"&&typeof i!="function";function rg(i){return kt(i?.then)}function og(i){return kt(i[Yd])}function sg(i){return Symbol.asyncIterator&&kt(i?.[Symbol.asyncIterator])}function ag(i){return new TypeError(`You provided ${i!==null&&typeof i=="object"?"an invalid object":`'${i}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function F4(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var lg=F4();function cg(i){return kt(i?.[lg])}function dg(i){return JD(this,arguments,function*(){let t=i.getReader();try{for(;;){let{value:n,done:r}=yield cc(t.read());if(r)return yield cc(void 0);yield yield cc(n)}}finally{t.releaseLock()}})}function ug(i){return kt(i?.getReader)}function wi(i){if(i instanceof wn)return i;if(i!=null){if(og(i))return N4(i);if(ig(i))return L4(i);if(rg(i))return B4(i);if(sg(i))return eI(i);if(cg(i))return U4(i);if(ug(i))return z4(i)}throw ag(i)}function N4(i){return new wn(e=>{let t=i[Yd]();if(kt(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function L4(i){return new wn(e=>{for(let t=0;t<i.length&&!e.closed;t++)e.next(i[t]);e.complete()})}function B4(i){return new wn(e=>{i.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,Qm)})}function U4(i){return new wn(e=>{for(let t of i)if(e.next(t),e.closed)return;e.complete()})}function eI(i){return new wn(e=>{V4(i,e).catch(t=>e.error(t))})}function z4(i){return eI(dg(i))}function V4(i,e){var t,n,r,o;return ZD(this,void 0,void 0,function*(){try{for(t=QD(i);n=yield t.next(),!n.done;){let s=n.value;if(e.next(s),e.closed)return}}catch(s){r={error:s}}finally{try{n&&!n.done&&(o=t.return)&&(yield o.call(t))}finally{if(r)throw r.error}}e.complete()})}function Zr(i,e,t,n=0,r=!1){let o=e.schedule(function(){t(),r?i.add(this.schedule(null,n)):this.unsubscribe()},n);if(i.add(o),!r)return o}function fg(i,e=0){return si((t,n)=>{t.subscribe(ai(n,r=>Zr(n,i,()=>n.next(r),e),()=>Zr(n,i,()=>n.complete(),e),r=>Zr(n,i,()=>n.error(r),e)))})}function hg(i,e=0){return si((t,n)=>{n.add(i.schedule(()=>t.subscribe(n),e))})}function tI(i,e){return wi(i).pipe(hg(e),fg(e))}function nI(i,e){return wi(i).pipe(hg(e),fg(e))}function iI(i,e){return new wn(t=>{let n=0;return e.schedule(function(){n===i.length?t.complete():(t.next(i[n++]),t.closed||this.schedule())})})}function rI(i,e){return new wn(t=>{let n;return Zr(t,e,()=>{n=i[lg](),Zr(t,e,()=>{let r,o;try{({value:r,done:o}=n.next())}catch(s){t.error(s);return}o?t.complete():t.next(r)},0,!0)}),()=>kt(n?.return)&&n.return()})}function pg(i,e){if(!i)throw new Error("Iterable cannot be null");return new wn(t=>{Zr(t,e,()=>{let n=i[Symbol.asyncIterator]();Zr(t,e,()=>{n.next().then(r=>{r.done?t.complete():t.next(r.value)})},0,!0)})})}function oI(i,e){return pg(dg(i),e)}function sI(i,e){if(i!=null){if(og(i))return tI(i,e);if(ig(i))return iI(i,e);if(rg(i))return nI(i,e);if(sg(i))return pg(i,e);if(cg(i))return rI(i,e);if(ug(i))return oI(i,e)}throw ag(i)}function hh(i,e){return e?sI(i,e):wi(i)}function os(...i){let e=qD(i);return hh(i,e)}function Ua(i,e){let t=kt(i)?i:()=>i,n=r=>r.error(t());return new wn(e?r=>e.schedule(n,0,r):n)}var aI=Wd(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"});function dc(i,e){let t=typeof e=="object";return new Promise((n,r)=>{let o=new Ba({next:s=>{n(s),o.unsubscribe()},error:r,complete:()=>{t?n(e.defaultValue):r(new aI)}});i.subscribe(o)})}function rr(i,e){return si((t,n)=>{let r=0;t.subscribe(ai(n,o=>{n.next(i.call(e,o,r++))}))})}var{isArray:G4}=Array;function H4(i,e){return G4(e)?i(...e):i(e)}function lI(i){return rr(e=>H4(i,e))}var{isArray:j4}=Array,{getPrototypeOf:W4,prototype:$4,keys:X4}=Object;function cI(i){if(i.length===1){let e=i[0];if(j4(e))return{args:e,keys:null};if(Y4(e)){let t=X4(e);return{args:t.map(n=>e[n]),keys:t}}}return{args:i,keys:null}}function Y4(i){return i&&typeof i=="object"&&W4(i)===$4}function dI(i,e){return i.reduce((t,n,r)=>(t[n]=e[r],t),{})}function uI(i,e,t,n,r,o,s,a){let l=[],c=0,d=0,u=!1,f=()=>{u&&!l.length&&!c&&e.complete()},h=v=>c<n?p(v):l.push(v),p=v=>{o&&e.next(v),c++;let g=!1;wi(t(v,d++)).subscribe(ai(e,m=>{r?.(m),o?h(m):e.next(m)},()=>{g=!0},void 0,()=>{if(g)try{for(c--;l.length&&c<n;){let m=l.shift();s?Zr(e,s,()=>p(m)):p(m)}f()}catch(m){e.error(m)}}))};return i.subscribe(ai(e,h,()=>{u=!0,f()})),()=>{a?.()}}function mg(i,e,t=1/0){return kt(e)?mg((n,r)=>rr((o,s)=>e(n,o,r,s))(wi(i(n,r))),t):(typeof e=="number"&&(t=e),si((n,r)=>uI(n,r,i,t)))}function tS(...i){let e=YD(i),{args:t,keys:n}=cI(i),r=new wn(o=>{let{length:s}=t;if(!s){o.complete();return}let a=new Array(s),l=s,c=s;for(let d=0;d<s;d++){let u=!1;wi(t[d]).subscribe(ai(o,f=>{u||(u=!0,c--),a[d]=f},()=>l--,void 0,()=>{(!l||!u)&&(c||o.next(n?dI(n,a):a),o.complete())}))}});return e?r.pipe(lI(e)):r}function nS(i,e){return si((t,n)=>{let r=0;t.subscribe(ai(n,o=>i.call(e,o,r++)&&n.next(o)))})}function uc(i){return si((e,t)=>{let n=null,r=!1,o;n=e.subscribe(ai(t,void 0,void 0,s=>{o=wi(i(s,uc(i)(e))),n?(n.unsubscribe(),n=null,o.subscribe(t)):r=!0})),r&&(n.unsubscribe(),n=null,o.subscribe(t))})}function iS(i,e){return kt(e)?mg(i,e,1):mg(i,1)}function ph(i){return si((e,t)=>{try{e.subscribe(t)}finally{t.add(i)}})}function rS(i,e){return si((t,n)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&n.complete();t.subscribe(ai(n,l=>{r?.unsubscribe();let c=0,d=o++;wi(i(l,d)).subscribe(r=ai(n,u=>n.next(e?e(l,u,d,c++):u),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function oS(i,e,t){let n=kt(i)||e||t?{next:i,error:e,complete:t}:i;return n?si((r,o)=>{var s;(s=n.subscribe)===null||s===void 0||s.call(n);let a=!0;r.subscribe(ai(o,l=>{var c;(c=n.next)===null||c===void 0||c.call(n,l),o.next(l)},()=>{var l;a=!1,(l=n.complete)===null||l===void 0||l.call(n),o.complete()},l=>{var c;a=!1,(c=n.error)===null||c===void 0||c.call(n,l),o.error(l)},()=>{var l,c;a&&((l=n.unsubscribe)===null||l===void 0||l.call(n)),(c=n.finalize)===null||c===void 0||c.call(n)}))}):tg}var sS;function gg(){return sS}function ss(i){let e=sS;return sS=i,e}var fI=Symbol("NotFound");function qd(i){return i===fI||i?.name==="\u0275NotFound"}function hI(i){let e=at(null);try{return i()}finally{at(e)}}var Cg="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",Ye=class extends Error{code;constructor(e,t){super(Ks(e,t)),this.code=e}};function q4(i){return`NG0${Math.abs(i)}`}function Ks(i,e){return`${q4(i)}${e?": "+e:""}`}var Qr=globalThis;function fn(i){for(let e in i)if(i[e]===fn)return e;throw Error("")}function bI(i,e){for(let t in e)e.hasOwnProperty(t)&&!i.hasOwnProperty(t)&&(i[t]=e[t])}function wg(i){if(typeof i=="string")return i;if(Array.isArray(i))return`[${i.map(wg).join(", ")}]`;if(i==null)return""+i;let e=i.overriddenName||i.name;if(e)return`${e}`;let t=i.toString();if(t==null)return""+t;let n=t.indexOf(`
4
4
  `);return n>=0?t.slice(0,n):t}function Eg(i,e){return i?e?`${i} ${e}`:i:e||""}var K4=fn({__forward_ref__:fn});function zi(i){return i.__forward_ref__=zi,i}function bi(i){return yS(i)?i():i}function yS(i){return typeof i=="function"&&i.hasOwnProperty(K4)&&i.__forward_ref__===zi}function _e(i){return{token:i.token,providedIn:i.providedIn||null,factory:i.factory,value:void 0}}function ls(i){return{providers:i.providers||[],imports:i.imports||[]}}function Mg(i){return Z4(i,Tg)}function Z4(i,e){return i.hasOwnProperty(e)&&i[e]||null}function J4(i){let e=i?.[Tg]??null;return e||null}function lS(i){return i&&i.hasOwnProperty(bg)?i[bg]:null}var Tg=fn({\u0275prov:fn}),bg=fn({\u0275inj:fn}),Xe=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=_e({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function xS(i){return i&&!!i.\u0275providers}var _S=fn({\u0275cmp:fn}),SS=fn({\u0275dir:fn}),CS=fn({\u0275pipe:fn});var gh=fn({\u0275fac:fn}),gc=fn({__NG_ELEMENT_ID__:fn}),pI=fn({__NG_ENV_ID__:fn});function Zs(i){return ES(i,"@Component"),i[_S]||null}function Dg(i){return ES(i,"@Directive"),i[SS]||null}function wS(i){return ES(i,"@Pipe"),i[CS]||null}function ES(i,e){if(i==null)throw new Ye(-919,!1)}function _h(i){return typeof i=="string"?i:i==null?"":String(i)}var yI=fn({ngErrorCode:fn}),Q4=fn({ngErrorMessage:fn}),e5=fn({ngTokenPath:fn});function MS(i,e){return xI("",-200,e)}function Ig(i,e){throw new Ye(-201,!1)}function xI(i,e,t){let n=new Ye(e,i);return n[yI]=e,n[Q4]=i,t&&(n[e5]=t),n}function t5(i){return i[yI]}var cS;function _I(){return cS}function Ui(i){let e=cS;return cS=i,e}function TS(i,e,t){let n=Mg(i);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(t&8)return null;if(e!==void 0)return e;Ig(i,"")}var n5={},fc=n5,i5="__NG_DI_FLAG__",dS=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=hc(t)||0;try{return this.injector.get(e,n&8?null:fc,n)}catch(r){if(qd(r))return r;throw r}}};function r5(i,e=0){let t=gg();if(t===void 0)throw new Ye(-203,!1);if(t===null)return TS(i,void 0,e);{let n=o5(e),r=t.retrieve(i,n);if(qd(r)){if(n.optional)return null;throw r}return r}}function We(i,e=0){return(_I()||r5)(bi(i),e)}function Z(i,e){return We(i,hc(e))}function hc(i){return typeof i>"u"||typeof i=="number"?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function o5(i){return{optional:!!(i&8),host:!!(i&1),self:!!(i&2),skipSelf:!!(i&4)}}function uS(i){let e=[];for(let t=0;t<i.length;t++){let n=bi(i[t]);if(Array.isArray(n)){if(n.length===0)throw new Ye(900,!1);let r,o=0;for(let s=0;s<n.length;s++){let a=n[s],l=s5(a);typeof l=="number"?l===-1?r=a.token:o|=l:r=a}e.push(We(r,o))}else e.push(We(n))}return e}function s5(i){return i[i5]}function za(i,e){let t=i.hasOwnProperty(gh);return t?i[gh]:null}function SI(i,e,t){if(i.length!==e.length)return!1;for(let n=0;n<i.length;n++){let r=i[n],o=e[n];if(t&&(r=t(r),o=t(o)),o!==r)return!1}return!0}function CI(i){return i.flat(Number.POSITIVE_INFINITY)}function Pg(i,e){i.forEach(t=>Array.isArray(t)?Pg(t,e):e(t))}function DS(i,e,t){e>=i.length?i.push(t):i.splice(e,0,t)}function Sh(i,e){return e>=i.length-1?i.pop():i.splice(e,1)[0]}function wI(i,e){let t=[];for(let n=0;n<i;n++)t.push(e);return t}function EI(i,e,t,n){let r=i.length;if(r==e)i.push(t,n);else if(r===1)i.push(n,i[0]),i[0]=t;else{for(r--,i.push(i[r-1],i[r]);r>e;){let o=r-2;i[r]=i[o],r--}i[e]=t,i[e+1]=n}}function Ag(i,e,t){let n=Zd(i,e);return n>=0?i[n|1]=t:(n=~n,EI(i,n,e,t)),n}function Og(i,e){let t=Zd(i,e);if(t>=0)return i[t|1]}function Zd(i,e){return a5(i,e,1)}function a5(i,e,t){let n=0,r=i.length>>t;for(;r!==n;){let o=n+(r-n>>1),s=i[o<<t];if(e===s)return o<<t;s>e?r=o:n=o+1}return~(r<<t)}var Ha={},Ei=[],Js=new Xe(""),Ch=new Xe("",-1),IS=new Xe(""),vh=class{get(e,t=fc){if(t===fc){let r=xI("",-201);throw r.name="\u0275NotFound",r}return t}};function Qs(i){return{\u0275providers:i}}function MI(i){return Qs([{provide:Js,multi:!0,useValue:i}])}function TI(...i){return{\u0275providers:Rg(!0,i),\u0275fromNgModule:!0}}function Rg(i,...e){let t=[],n=new Set,r,o=s=>{t.push(s)};return Pg(e,s=>{let a=s;yg(a,o,[],n)&&(r||=[],r.push(a))}),r!==void 0&&DI(r,o),t}function DI(i,e){for(let t=0;t<i.length;t++){let{ngModule:n,providers:r}=i[t];PS(r,o=>{e(o,n)})}}function yg(i,e,t,n){if(i=bi(i),!i)return!1;let r=null,o=lS(i),s=!o&&Zs(i);if(!o&&!s){let l=i.ngModule;if(o=lS(l),o)r=l;else return!1}else{if(s&&!s.standalone)return!1;r=i}let a=n.has(r);if(s){if(a)return!1;if(n.add(r),s.dependencies){let l=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let c of l)yg(c,e,t,n)}}else if(o){if(o.imports!=null&&!a){n.add(r);let c;Pg(o.imports,d=>{yg(d,e,t,n)&&(c||=[],c.push(d))}),c!==void 0&&DI(c,e)}if(!a){let c=za(r)||(()=>new r);e({provide:r,useFactory:c,deps:Ei},r),e({provide:IS,useValue:r,multi:!0},r),e({provide:Js,useValue:()=>We(r),multi:!0},r)}let l=o.providers;if(l!=null&&!a){let c=i;PS(l,d=>{e(d,c)})}}else return!1;return r!==i&&i.providers!==void 0}function PS(i,e){for(let t of i)xS(t)&&(t=t.\u0275providers),Array.isArray(t)?PS(t,e):e(t)}var l5=fn({provide:String,useValue:fn});function II(i){return i!==null&&typeof i=="object"&&l5 in i}function c5(i){return!!(i&&i.useExisting)}function d5(i){return!!(i&&i.useFactory)}function pc(i){return typeof i=="function"}function PI(i){return!!i.useClass}var wh=new Xe(""),vg={},mI={},aS;function Jd(){return aS===void 0&&(aS=new vh),aS}var Mi=class{},mc=class extends Mi{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,hS(e,s=>this.processProvider(s)),this.records.set(Ch,Kd(void 0,this)),r.has("environment")&&this.records.set(Mi,Kd(void 0,this));let o=this.records.get(wh);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(IS,Ei,{self:!0}))}retrieve(e,t){let n=hc(t)||0;try{return this.get(e,fc,n)}catch(r){if(qd(r))return r;throw r}}destroy(){mh(this),this._destroyed=!0;let e=at(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of t)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),at(e)}}onDestroy(e){return mh(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){mh(this);let t=ss(this),n=Ui(void 0),r;try{return e()}finally{ss(t),Ui(n)}}get(e,t=fc,n){if(mh(this),e.hasOwnProperty(pI))return e[pI](this);let r=hc(n),o,s=ss(this),a=Ui(void 0);try{if(!(r&4)){let c=this.records.get(e);if(c===void 0){let d=m5(e)&&Mg(e);d&&this.injectableDefInScope(d)?c=Kd(fS(e),vg):c=null,this.records.set(e,c)}if(c!=null)return this.hydrate(e,c,r)}let l=r&2?Jd():this.parent;return t=r&8&&t===fc?null:t,l.get(e,t)}catch(l){let c=t5(l);throw c===-200||c===-201?new Ye(c,null):l}finally{Ui(a),ss(s)}}resolveInjectorInitializers(){let e=at(null),t=ss(this),n=Ui(void 0),r;try{let o=this.get(Js,Ei,{self:!0});for(let s of o)s()}finally{ss(t),Ui(n),at(e)}}toString(){return"R3Injector[...]"}processProvider(e){e=bi(e);let t=pc(e)?e:bi(e&&e.provide),n=f5(e);if(!pc(e)&&e.multi===!0){let r=this.records.get(t);r||(r=Kd(void 0,vg,!0),r.factory=()=>uS(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=at(null);try{if(t.value===mI)throw MS("");return t.value===vg&&(t.value=mI,t.value=t.factory(void 0,n)),typeof t.value=="object"&&t.value&&p5(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{at(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=bi(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 fS(i){let e=Mg(i),t=e!==null?e.factory:za(i);if(t!==null)return t;if(i instanceof Xe)throw new Ye(-204,!1);if(i instanceof Function)return u5(i);throw new Ye(-204,!1)}function u5(i){if(i.length>0)throw new Ye(-204,!1);let t=J4(i);return t!==null?()=>t.factory(i):()=>new i}function f5(i){if(II(i))return Kd(void 0,i.useValue);{let e=AS(i);return Kd(e,vg)}}function AS(i,e,t){let n;if(pc(i)){let r=bi(i);return za(r)||fS(r)}else if(II(i))n=()=>bi(i.useValue);else if(d5(i))n=()=>i.useFactory(...uS(i.deps||[]));else if(c5(i))n=(r,o)=>We(bi(i.useExisting),o!==void 0&&o&8?8:void 0);else{let r=bi(i&&(i.useClass||i.provide));if(h5(i))n=()=>new r(...uS(i.deps));else return za(r)||fS(r)}return n}function mh(i){if(i.destroyed)throw new Ye(-205,!1)}function Kd(i,e,t=!1){return{factory:i,value:e,multi:t?[]:void 0}}function h5(i){return!!i.deps}function p5(i){return i!==null&&typeof i=="object"&&typeof i.ngOnDestroy=="function"}function m5(i){return typeof i=="function"||typeof i=="object"&&i.ngMetadataName==="InjectionToken"}function hS(i,e){for(let t of i)Array.isArray(t)?hS(t,e):t&&xS(t)?hS(t.\u0275providers,e):e(t)}function Qd(i,e){let t;i instanceof mc?(mh(i),t=i):t=new dS(i);let n,r=ss(t),o=Ui(void 0);try{return e()}finally{ss(r),Ui(o)}}function AI(){return _I()!==void 0||gg()!=null}var Vi=0,qe=1,Ct=2,Vn=3,eo=4,Gi=5,Hi=6,eu=7,kn=8,xr=9,cs=10,qt=11,tu=12,OS=13,vc=14,li=15,ja=16,bc=17,ds=18,us=19,RS=20,qs=21,kg=22,Va=23,_r=24,yc=25,fs=26,$t=27,OI=1,Eo=6,hs=7,Eh=8,xc=9,Tn=10;function Sr(i){return Array.isArray(i)&&typeof i[OI]=="object"}function sr(i){return Array.isArray(i)&&i[OI]===!0}function kS(i){return(i.flags&4)!==0}function ps(i){return i.componentOffset>-1}function nu(i){return(i.flags&1)===1}function ms(i){return!!i.template}function _c(i){return(i[Ct]&512)!==0}function Wa(i){return(i[Ct]&256)===256}var FS="svg",RI="math";function Cr(i){for(;Array.isArray(i);)i=i[Vi];return i}function NS(i,e){return Cr(e[i])}function to(i,e){return Cr(e[i.index])}function Sc(i,e){return i.data[e]}function Fg(i,e){return i[e]}function LS(i,e,t,n){t>=i.data.length&&(i.data[t]=null,i.blueprint[t]=null),e[t]=n}function wr(i,e){let t=e[i];return Sr(t)?t:t[Vi]}function Ng(i){return(i[Ct]&128)===128}function kI(i){return sr(i[Vn])}function no(i,e){return e==null?null:i[e]}function BS(i){i[bc]=0}function US(i){i[Ct]&1024||(i[Ct]|=1024,Ng(i)&&Cc(i))}function FI(i,e){for(;i>0;)e=e[vc],i--;return e}function Mh(i){return!!(i[Ct]&9216||i[_r]?.dirty)}function Lg(i){i[cs].changeDetectionScheduler?.notify(8),i[Ct]&64&&(i[Ct]|=1024),Mh(i)&&Cc(i)}function Cc(i){i[cs].changeDetectionScheduler?.notify(0);let e=Ga(i);for(;e!==null&&!(e[Ct]&8192||(e[Ct]|=8192,!Ng(e)));)e=Ga(e)}function zS(i,e){if(Wa(i))throw new Ye(911,!1);i[qs]===null&&(i[qs]=[]),i[qs].push(e)}function NI(i,e){if(i[qs]===null)return;let t=i[qs].indexOf(e);t!==-1&&i[qs].splice(t,1)}function Ga(i){let e=i[Vn];return sr(e)?e[Vn]:e}function VS(i){return i[eu]??=[]}function GS(i){return i.cleanup??=[]}function LI(i,e,t,n){let r=VS(e);r.push(t),i.firstCreatePass&&GS(i).push(n,r.length-1)}var It={lFrame:KI(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var pS=!1;function BI(){return It.lFrame.elementDepthCount}function UI(){It.lFrame.elementDepthCount++}function HS(){It.lFrame.elementDepthCount--}function Bg(){return It.bindingsEnabled}function Ug(){return It.skipHydrationRootTNode!==null}function jS(i){return It.skipHydrationRootTNode===i}function zI(i){It.skipHydrationRootTNode=i}function WS(){It.skipHydrationRootTNode=null}function ht(){return It.lFrame.lView}function In(){return It.lFrame.tView}function J(i){return It.lFrame.contextLView=i,i[kn]}function Q(i){return It.lFrame.contextLView=null,i}function yi(){let i=$S();for(;i!==null&&i.type===64;)i=i.parent;return i}function $S(){return It.lFrame.currentTNode}function VI(){let i=It.lFrame,e=i.currentTNode;return i.isParent?e:e.parent}function iu(i,e){let t=It.lFrame;t.currentTNode=i,t.isParent=e}function XS(){return It.lFrame.isParent}function YS(){It.lFrame.isParent=!1}function GI(){return It.lFrame.contextLView}function qS(){return pS}function bh(i){let e=pS;return pS=i,e}function ru(){let i=It.lFrame,e=i.bindingRootIndex;return e===-1&&(e=i.bindingRootIndex=i.tView.bindingStartIndex),e}function HI(i){return It.lFrame.bindingIndex=i}function $a(){return It.lFrame.bindingIndex++}function KS(i){let e=It.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+i,t}function jI(){return It.lFrame.inI18n}function WI(i,e){let t=It.lFrame;t.bindingIndex=t.bindingRootIndex=i,zg(e)}function $I(){return It.lFrame.currentDirectiveIndex}function zg(i){It.lFrame.currentDirectiveIndex=i}function XI(i){let e=It.lFrame.currentDirectiveIndex;return e===-1?null:i[e]}function YI(){return It.lFrame.currentQueryIndex}function Vg(i){It.lFrame.currentQueryIndex=i}function g5(i){let e=i[qe];return e.type===2?e.declTNode:e.type===1?i[Gi]:null}function ZS(i,e,t){if(t&4){let r=e,o=i;for(;r=r.parent,r===null&&!(t&1);)if(r=g5(o),r===null||(o=o[vc],r.type&10))break;if(r===null)return!1;e=r,i=o}let n=It.lFrame=qI();return n.currentTNode=e,n.lView=i,!0}function Gg(i){let e=qI(),t=i[qe];It.lFrame=e,e.currentTNode=t.firstChild,e.lView=i,e.tView=t,e.contextLView=i,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function qI(){let i=It.lFrame,e=i===null?null:i.child;return e===null?KI(i):e}function KI(i){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:i,child:null,inI18n:!1};return i!==null&&(i.child=e),e}function ZI(){let i=It.lFrame;return It.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}var JS=ZI;function Hg(){let i=ZI();i.isParent=!0,i.tView=null,i.selectedIndex=-1,i.contextLView=null,i.elementDepthCount=0,i.currentDirectiveIndex=-1,i.currentNamespace=null,i.bindingRootIndex=-1,i.bindingIndex=-1,i.currentQueryIndex=0}function JI(i){return(It.lFrame.contextLView=FI(i,It.lFrame.contextLView))[kn]}function ea(){return It.lFrame.selectedIndex}function Xa(i){It.lFrame.selectedIndex=i}function Th(){let i=It.lFrame;return Sc(i.tView,i.selectedIndex)}function Ya(){It.lFrame.currentNamespace=FS}function ou(){v5()}function v5(){It.lFrame.currentNamespace=null}function QS(){return It.lFrame.currentNamespace}var QI=!0;function jg(){return QI}function ta(i){QI=i}function mS(i,e=null,t=null,n){let r=eP(i,e,t,n);return r.resolveInjectorInitializers(),r}function eP(i,e=null,t=null,n,r=new Set){let o=[t||Ei,TI(i)],s;return new mc(o,e||Jd(),s||null,r)}var Ti=class i{static THROW_IF_NOT_FOUND=fc;static NULL=new vh;static create(e,t){if(Array.isArray(e))return mS({name:""},t,e,"");{let n=e.name??"";return mS({name:n},e.parent,e.providers,n)}}static \u0275prov=_e({token:i,providedIn:"any",factory:()=>We(Ch)});static __NG_ELEMENT_ID__=-1},Cn=new Xe(""),ar=(()=>{class i{static __NG_ELEMENT_ID__=b5;static __NG_ENV_ID__=t=>t}return i})(),xg=class extends ar{_lView;constructor(e){super(),this._lView=e}get destroyed(){return Wa(this._lView)}onDestroy(e){let t=this._lView;return zS(t,e),()=>NI(t,e)}};function b5(){return new xg(ht())}var tP=!1,nP=new Xe(""),qa=(()=>{class i{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new fh(!1);debugTaskTracker=Z(nP,{optional:!0});get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new wn(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=_e({token:i,providedIn:"root",factory:()=>new i})}return i})(),gS=class extends wo{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,AI()&&(this.destroyRef=Z(ar,{optional:!0})??void 0,this.pendingTasks=Z(qa,{optional:!0})??void 0)}emit(e){let t=at(null);try{super.next(e)}finally{at(t)}}subscribe(e,t,n){let r=e,o=t||(()=>null),s=n;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 Bi&&e.add(a),a}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{try{e(t)}finally{n!==void 0&&this.pendingTasks?.remove(n)}})}}},yr=gS;function _g(...i){}function e1(i){let e,t;function n(){i=_g;try{t!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(t),e!==void 0&&clearTimeout(e)}catch{}}return e=setTimeout(()=>{i(),n()}),typeof requestAnimationFrame=="function"&&(t=requestAnimationFrame(()=>{i(),n()})),()=>n()}function iP(i){return queueMicrotask(()=>i()),()=>{i=_g}}var t1="isAngularZone",yh=t1+"_ID",y5=0,or=class i{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new yr(!1);onMicrotaskEmpty=new yr(!1);onStable=new yr(!1);onError=new yr(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=tP}=e;if(typeof Zone>"u")throw new Ye(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&&n,s.shouldCoalesceRunChangeDetection=r,s.callbackScheduled=!1,s.scheduleInRootZone=o,S5(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(t1)===!0}static assertInAngularZone(){if(!i.isInAngularZone())throw new Ye(909,!1)}static assertNotInAngularZone(){if(i.isInAngularZone())throw new Ye(909,!1)}run(e,t,n){return this._inner.run(e,t,n)}runTask(e,t,n,r){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,e,x5,_g,_g);try{return o.runTask(s,t,n)}finally{o.cancelTask(s)}}runGuarded(e,t,n){return this._inner.runGuarded(e,t,n)}runOutsideAngular(e){return this._outer.run(e)}},x5={};function n1(i){if(i._nesting==0&&!i.hasPendingMicrotasks&&!i.isStable)try{i._nesting++,i.onMicrotaskEmpty.emit(null)}finally{if(i._nesting--,!i.hasPendingMicrotasks)try{i.runOutsideAngular(()=>i.onStable.emit(null))}finally{i.isStable=!0}}}function _5(i){if(i.isCheckStableRunning||i.callbackScheduled)return;i.callbackScheduled=!0;function e(){e1(()=>{i.callbackScheduled=!1,vS(i),i.isCheckStableRunning=!0,n1(i),i.isCheckStableRunning=!1})}i.scheduleInRootZone?Zone.root.run(()=>{e()}):i._outer.run(()=>{e()}),vS(i)}function S5(i){let e=()=>{_5(i)},t=y5++;i._inner=i._inner.fork({name:"angular",properties:{[t1]:!0,[yh]:t,[yh+t]:!0},onInvokeTask:(n,r,o,s,a,l)=>{if(C5(l))return n.invokeTask(o,s,a,l);try{return gI(i),n.invokeTask(o,s,a,l)}finally{(i.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||i.shouldCoalesceRunChangeDetection)&&e(),vI(i)}},onInvoke:(n,r,o,s,a,l,c)=>{try{return gI(i),n.invoke(o,s,a,l,c)}finally{i.shouldCoalesceRunChangeDetection&&!i.callbackScheduled&&!w5(l)&&e(),vI(i)}},onHasTask:(n,r,o,s)=>{n.hasTask(o,s),r===o&&(s.change=="microTask"?(i._hasPendingMicrotasks=s.microTask,vS(i),n1(i)):s.change=="macroTask"&&(i.hasPendingMacrotasks=s.macroTask))},onHandleError:(n,r,o,s)=>(n.handleError(o,s),i.runOutsideAngular(()=>i.onError.emit(s)),!1)})}function vS(i){i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&i.callbackScheduled===!0?i.hasPendingMicrotasks=!0:i.hasPendingMicrotasks=!1}function gI(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function vI(i){i._nesting--,n1(i)}var xh=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new yr;onMicrotaskEmpty=new yr;onStable=new yr;onError=new yr;run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function C5(i){return rP(i,"__ignore_ng_zone__")}function w5(i){return rP(i,"__scheduler_tick__")}function rP(i,e){return!Array.isArray(i)||i.length!==1?!1:i[0]?.data?.[e]===!0}var Jr=class{_console=console;handleError(e){this._console.error("ERROR",e)}},na=new Xe("",{factory:()=>{let i=Z(or),e=Z(Mi),t;return n=>{i.runOutsideAngular(()=>{e.destroyed&&!t?setTimeout(()=>{throw n}):(t??=e.get(Jr),t.handleError(n))})}}}),oP={provide:Js,useValue:()=>{let i=Z(Jr,{optional:!0})},multi:!0},E5=new Xe("",{factory:()=>{let i=Z(Cn).defaultView;if(!i)return;let e=Z(na),t=o=>{e(o.reason),o.preventDefault()},n=o=>{o.error?e(o.error):e(new Error(o.message,{cause:o})),o.preventDefault()},r=()=>{i.addEventListener("unhandledrejection",t),i.addEventListener("error",n)};typeof Zone<"u"?Zone.root.run(r):r(),Z(ar).onDestroy(()=>{i.removeEventListener("error",n),i.removeEventListener("unhandledrejection",t)})}});function i1(){return Qs([MI(()=>{Z(E5)})])}function N(i,e){let[t,n,r]=j_(i,e?.equal),o=t,s=o[Qn];return o.set=n,o.update=r,o.asReadonly=Wg.bind(o),o}function Wg(){let i=this[Qn];if(i.readonlyFn===void 0){let e=()=>this();e[Qn]=i,i.readonlyFn=e}return i.readonlyFn}var Dh=(()=>{class i{view;node;constructor(t,n){this.view=t,this.node=n}static __NG_ELEMENT_ID__=M5}return i})();function M5(){return new Dh(ht(),yi())}var as=class{},Ih=new Xe("",{factory:()=>!0});var r1=new Xe(""),su=(()=>{class i{internalPendingTasks=Z(qa);scheduler=Z(as);errorHandler=Z(na);add(){let t=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(t)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(t))}}run(t){let n=this.add();t().catch(this.errorHandler).finally(n)}static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new i})}return i})(),$g=(()=>{class i{static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new bS})}return i})(),bS=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,n=this.queues.get(t);n.has(e)&&(n.delete(e),e.dirty&&this.dirtyEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let n=this.queues.get(t);n.has(e)||n.add(e)}flush(){for(;this.dirtyEffectCount>0;){let e=!1;for(let[t,n]of this.queues)t===null?e||=this.flushQueue(n):e||=t.run(()=>this.flushQueue(n));e||(this.dirtyEffectCount=0)}}flushQueue(e){let t=!1;for(let n of e)n.dirty&&(this.dirtyEffectCount--,t=!0,n.run());return t}},Sg=class{[Qn];constructor(e){this[Qn]=e}destroy(){this[Qn].destroy()}};function rn(i,e){let t=e?.injector??Z(Ti),n=e?.manualCleanup!==!0?t.get(ar):null,r,o=t.get(Dh,null,{optional:!0}),s=t.get(as);return o!==null?(r=I5(o.view,s,i),n instanceof xg&&n._lView===o.view&&(n=null)):r=P5(i,t.get($g),s),r.injector=t,n!==null&&(r.onDestroyFns=[n.onDestroy(()=>r.destroy())]),new Sg(r)}var sP=fe(R({},$_),{cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let i=bh(!1);try{X_(this)}finally{bh(i)}},cleanup(){if(!this.cleanupFns?.length)return;let i=at(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],at(i)}}}),T5=fe(R({},sP),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(oc(this),this.onDestroyFns!==null)for(let i of this.onDestroyFns)i();this.cleanup(),this.scheduler.remove(this)}}),D5=fe(R({},sP),{consumerMarkedDirty(){this.view[Ct]|=8192,Cc(this.view),this.notifier.notify(13)},destroy(){if(oc(this),this.onDestroyFns!==null)for(let i of this.onDestroyFns)i();this.cleanup(),this.view[Va]?.delete(this)}});function I5(i,e,t){let n=Object.create(D5);return n.view=i,n.zone=typeof Zone<"u"?Zone.current:null,n.notifier=e,n.fn=aP(n,t),i[Va]??=new Set,i[Va].add(n),n.consumerMarkedDirty(n),n}function P5(i,e,t){let n=Object.create(T5);return n.fn=aP(n,i),n.scheduler=e,n.notifier=t,n.zone=typeof Zone<"u"?Zone.current:null,n.scheduler.add(n),n.notifier.notify(12),n}function aP(i,e){return()=>{e(t=>(i.cleanupFns??=[]).push(t))}}var Xg={JSACTION:"jsaction"};function Gh(i){return{toString:i}.toString()}function B5(i){return typeof i=="function"}function KP(i,e,t,n){e!==null?e.applyValueToInputSignal(e,n):i[t]=n}var o0=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}},gu=(()=>{let i=()=>ZP;return i.ngInherit=!0,i})();function ZP(i){return i.type.prototype.ngOnChanges&&(i.setInput=z5),U5}function U5(){let i=QP(this),e=i?.current;if(e){let t=i.previous;if(t===Ha)i.previous=e;else for(let n in e)t[n]=e[n];i.current=null,this.ngOnChanges(e)}}function z5(i,e,t,n,r){let o=this.declaredInputs[n],s=QP(i)||V5(i,{previous:Ha,current:null}),a=s.current||(s.current={}),l=s.previous,c=l[o];a[o]=new o0(c&&c.currentValue,t,l===Ha),KP(i,e,r,t)}var JP="__ngSimpleChanges__";function QP(i){return i[JP]||null}function V5(i,e){return i[JP]=e}var lP=[];var en=function(i,e=null,t){for(let n=0;n<lP.length;n++){let r=lP[n];r(i,e,t)}},Ht=(function(i){return i[i.TemplateCreateStart=0]="TemplateCreateStart",i[i.TemplateCreateEnd=1]="TemplateCreateEnd",i[i.TemplateUpdateStart=2]="TemplateUpdateStart",i[i.TemplateUpdateEnd=3]="TemplateUpdateEnd",i[i.LifecycleHookStart=4]="LifecycleHookStart",i[i.LifecycleHookEnd=5]="LifecycleHookEnd",i[i.OutputStart=6]="OutputStart",i[i.OutputEnd=7]="OutputEnd",i[i.BootstrapApplicationStart=8]="BootstrapApplicationStart",i[i.BootstrapApplicationEnd=9]="BootstrapApplicationEnd",i[i.BootstrapComponentStart=10]="BootstrapComponentStart",i[i.BootstrapComponentEnd=11]="BootstrapComponentEnd",i[i.ChangeDetectionStart=12]="ChangeDetectionStart",i[i.ChangeDetectionEnd=13]="ChangeDetectionEnd",i[i.ChangeDetectionSyncStart=14]="ChangeDetectionSyncStart",i[i.ChangeDetectionSyncEnd=15]="ChangeDetectionSyncEnd",i[i.AfterRenderHooksStart=16]="AfterRenderHooksStart",i[i.AfterRenderHooksEnd=17]="AfterRenderHooksEnd",i[i.ComponentStart=18]="ComponentStart",i[i.ComponentEnd=19]="ComponentEnd",i[i.DeferBlockStateStart=20]="DeferBlockStateStart",i[i.DeferBlockStateEnd=21]="DeferBlockStateEnd",i[i.DynamicComponentStart=22]="DynamicComponentStart",i[i.DynamicComponentEnd=23]="DynamicComponentEnd",i[i.HostBindingsUpdateStart=24]="HostBindingsUpdateStart",i[i.HostBindingsUpdateEnd=25]="HostBindingsUpdateEnd",i})(Ht||{});function G5(i,e,t){let{ngOnChanges:n,ngOnInit:r,ngDoCheck:o}=e.type.prototype;if(n){let s=ZP(e);(t.preOrderHooks??=[]).push(i,s),(t.preOrderCheckHooks??=[]).push(i,s)}r&&(t.preOrderHooks??=[]).push(0-i,r),o&&((t.preOrderHooks??=[]).push(i,o),(t.preOrderCheckHooks??=[]).push(i,o))}function e2(i,e){for(let t=e.directiveStart,n=e.directiveEnd;t<n;t++){let o=i.data[t].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:l,ngAfterViewChecked:c,ngOnDestroy:d}=o;s&&(i.contentHooks??=[]).push(-t,s),a&&((i.contentHooks??=[]).push(t,a),(i.contentCheckHooks??=[]).push(t,a)),l&&(i.viewHooks??=[]).push(-t,l),c&&((i.viewHooks??=[]).push(t,c),(i.viewCheckHooks??=[]).push(t,c)),d!=null&&(i.destroyHooks??=[]).push(t,d)}}function Jg(i,e,t){t2(i,e,3,t)}function Qg(i,e,t,n){(i[Ct]&3)===t&&t2(i,e,t,n)}function o1(i,e){let t=i[Ct];(t&3)===e&&(t&=16383,t+=1,i[Ct]=t)}function t2(i,e,t,n){let r=n!==void 0?i[bc]&65535:0,o=n??-1,s=e.length-1,a=0;for(let l=r;l<s;l++)if(typeof e[l+1]=="number"){if(a=e[l],n!=null&&a>=n)break}else e[l]<0&&(i[bc]+=65536),(a<o||o==-1)&&(H5(i,t,e,l),i[bc]=(i[bc]&4294901760)+l+2),l++}function cP(i,e){en(Ht.LifecycleHookStart,i,e);let t=at(null);try{e.call(i)}finally{at(t),en(Ht.LifecycleHookEnd,i,e)}}function H5(i,e,t,n){let r=t[n]<0,o=t[n+1],s=r?-t[n]:t[n],a=i[s];r?i[Ct]>>14<i[bc]>>16&&(i[Ct]&3)===e&&(i[Ct]+=16384,cP(a,o)):cP(a,o)}var lu=-1,Mc=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,n,r){this.factory=e,this.name=r,this.canSeeViewProviders=t,this.injectImpl=n}};function j5(i){return(i.flags&8)!==0}function W5(i){return(i.flags&16)!==0}function $5(i,e,t){let n=0;for(;n<t.length;){let r=t[n];if(typeof r=="number"){if(r!==0)break;n++;let o=t[n++],s=t[n++],a=t[n++];i.setAttribute(e,s,a,o)}else{let o=r,s=t[++n];Y5(o)?i.setProperty(e,o,s):i.setAttribute(e,o,s),n++}}return n}function X5(i){return i===3||i===4||i===6}function Y5(i){return i.charCodeAt(0)===64}function uu(i,e){if(!(e===null||e.length===0))if(i===null||i.length===0)i=e.slice();else{let t=-1;for(let n=0;n<e.length;n++){let r=e[n];typeof r=="number"?t=r:t===0||(t===-1||t===2?dP(i,t,r,null,e[++n]):dP(i,t,r,null,null))}}return i}function dP(i,e,t,n,r){let o=0,s=i.length;if(e===-1)s=-1;else for(;o<i.length;){let a=i[o++];if(typeof a=="number"){if(a===e){s=-1;break}else if(a>e){s=o-1;break}}}for(;o<i.length;){let a=i[o];if(typeof a=="number")break;if(a===t){r!==null&&(i[o+1]=r);return}o++,r!==null&&o++}s!==-1&&(i.splice(s,0,e),o=s+1),i.splice(o++,0,t),r!==null&&i.splice(o++,0,r)}function n2(i){return i!==lu}function s0(i){return i&32767}function q5(i){return i>>16}function a0(i,e){let t=q5(i),n=e;for(;t>0;)n=n[vc],t--;return n}var y1=!0;function l0(i){let e=y1;return y1=i,e}var K5=256,i2=K5-1,r2=5,Z5=0,gs={};function J5(i,e,t){let n;typeof t=="string"?n=t.charCodeAt(0)||0:t.hasOwnProperty(gc)&&(n=t[gc]),n==null&&(n=t[gc]=Z5++);let r=n&i2,o=1<<r;e.data[i+(r>>r2)]|=o}function c0(i,e){let t=o2(i,e);if(t!==-1)return t;let n=e[qe];n.firstCreatePass&&(i.injectorIndex=e.length,s1(n.data,i),s1(e,null),s1(n.blueprint,null));let r=rC(i,e),o=i.injectorIndex;if(n2(r)){let s=s0(r),a=a0(r,e),l=a[qe].data;for(let c=0;c<8;c++)e[o+c]=a[s+c]|l[s+c]}return e[o+8]=r,o}function s1(i,e){i.push(0,0,0,0,0,0,0,0,e)}function o2(i,e){return i.injectorIndex===-1||i.parent&&i.parent.injectorIndex===i.injectorIndex||e[i.injectorIndex+8]===null?-1:i.injectorIndex}function rC(i,e){if(i.parent&&i.parent.injectorIndex!==-1)return i.parent.injectorIndex;let t=0,n=null,r=e;for(;r!==null;){if(n=d2(r),n===null)return lu;if(t++,r=r[vc],n.injectorIndex!==-1)return n.injectorIndex|t<<16}return lu}function x1(i,e,t){J5(i,e,t)}function s2(i,e,t){if(t&8||i!==void 0)return i;Ig(e,"NodeInjector")}function a2(i,e,t,n){if(t&8&&n===void 0&&(n=null),(t&3)===0){let r=i[xr],o=Ui(void 0);try{return r?r.get(e,n,t&8):TS(e,n,t&8)}finally{Ui(o)}}return s2(n,e,t)}function l2(i,e,t,n=0,r){if(i!==null){if(e[Ct]&2048&&!(n&2)){let s=nz(i,e,t,n,gs);if(s!==gs)return s}let o=c2(i,e,t,n,gs);if(o!==gs)return o}return a2(e,t,n,r)}function c2(i,e,t,n,r){let o=ez(t);if(typeof o=="function"){if(!ZS(e,i,n))return n&1?s2(r,t,n):a2(e,t,n,r);try{let s;if(s=o(n),s==null&&!(n&8))Ig(t);else return s}finally{JS()}}else if(typeof o=="number"){let s=null,a=o2(i,e),l=lu,c=n&1?e[li][Gi]:null;for((a===-1||n&4)&&(l=a===-1?rC(i,e):e[a+8],l===lu||!fP(n,!1)?a=-1:(s=e[qe],a=s0(l),e=a0(l,e)));a!==-1;){let d=e[qe];if(uP(o,a,d.data)){let u=Q5(a,e,t,s,n,c);if(u!==gs)return u}l=e[a+8],l!==lu&&fP(n,e[qe].data[a+8]===c)&&uP(o,a,e)?(s=d,a=s0(l),e=a0(l,e)):a=-1}}return r}function Q5(i,e,t,n,r,o){let s=e[qe],a=s.data[i+8],l=n==null?ps(a)&&y1:n!=s&&(a.type&3)!==0,c=r&1&&o===a,d=e0(a,s,t,l,c);return d!==null?Rh(e,s,d,a,r):gs}function e0(i,e,t,n,r){let o=i.providerIndexes,s=e.data,a=o&1048575,l=i.directiveStart,c=i.directiveEnd,d=o>>20,u=n?a:a+d,f=r?a+d:c;for(let h=u;h<f;h++){let p=s[h];if(h<l&&t===p||h>=l&&p.type===t)return h}if(r){let h=s[l];if(h&&ms(h)&&h.type===t)return l}return null}function Rh(i,e,t,n,r){let o=i[t],s=e.data;if(o instanceof Mc){let a=o;if(a.resolving)throw MS("");let l=l0(a.canSeeViewProviders);a.resolving=!0;let c=s[t].type||s[t],d,u=a.injectImpl?Ui(a.injectImpl):null,f=ZS(i,n,0);try{o=i[t]=a.factory(void 0,r,s,i,n),e.firstCreatePass&&t>=n.directiveStart&&G5(t,s[t],e)}finally{u!==null&&Ui(u),l0(l),a.resolving=!1,JS()}}return o}function ez(i){if(typeof i=="string")return i.charCodeAt(0)||0;let e=i.hasOwnProperty(gc)?i[gc]:void 0;return typeof e=="number"?e>=0?e&i2:tz:e}function uP(i,e,t){let n=1<<i;return!!(t[e+(i>>r2)]&n)}function fP(i,e){return!(i&2)&&!(i&1&&e)}var Ec=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return l2(this._tNode,this._lView,e,hc(n),t)}};function tz(){return new Ec(yi(),ht())}function ra(i){return Gh(()=>{let e=i.prototype.constructor,t=e[gh]||_1(e),n=Object.prototype,r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){let o=r[gh]||_1(r);if(o&&o!==t)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function _1(i){return yS(i)?()=>{let e=_1(bi(i));return e&&e()}:za(i)}function nz(i,e,t,n,r){let o=i,s=e;for(;o!==null&&s!==null&&s[Ct]&2048&&!_c(s);){let a=c2(o,s,t,n|2,gs);if(a!==gs)return a;let l=o.parent;if(!l){let c=s[RS];if(c){let d=c.get(t,gs,n&-5);if(d!==gs)return d}l=d2(s),s=s[vc]}o=l}return r}function d2(i){let e=i[qe],t=e.type;return t===2?e.declTNode:t===1?i[Gi]:null}function iz(){return vu(yi(),ht())}function vu(i,e){return new Tr(to(i,e))}var Tr=(()=>{class i{nativeElement;constructor(t){this.nativeElement=t}static __NG_ELEMENT_ID__=iz}return i})();function rz(i){return i instanceof Tr?i.nativeElement:i}function oz(){return this._results[Symbol.iterator]()}var d0=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 wo}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 n=CI(e);(this._changesDetected=!SI(this._results,n,t))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[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]=oz},u2="ngSkipHydration",sz="ngskiphydration";function f2(i){let e=i.mergedAttrs;if(e===null)return!1;for(let t=0;t<e.length;t+=2){let n=e[t];if(typeof n=="number")return!1;if(typeof n=="string"&&n.toLowerCase()===sz)return!0}return!1}function h2(i){return i.hasAttribute(u2)}function u0(i){return(i.flags&128)===128}function p2(i){if(u0(i))return!0;let e=i.parent;for(;e;){if(u0(i)||f2(e))return!0;e=e.parent}return!1}var oC=(function(i){return i[i.OnPush=0]="OnPush",i[i.Eager=1]="Eager",i[i.Default=1]="Default",i})(oC||{}),m2=new Map,az=0;function lz(){return az++}function cz(i){m2.set(i[us],i)}function S1(i){m2.delete(i[us])}var hP="__ngContext__";function fu(i,e){Sr(e)?(i[hP]=e[us],cz(e)):i[hP]=e}function g2(i){return b2(i[tu])}function v2(i){return b2(i[eo])}function b2(i){for(;i!==null&&!sr(i);)i=i[eo];return i}var C1;function sC(i){C1=i}function aC(){if(C1!==void 0)return C1;if(typeof document<"u")return document;throw new Ye(210,!1)}var bs=new Xe("",{factory:()=>dz}),dz="ng";var x0=new Xe(""),Hh=new Xe("",{providedIn:"platform",factory:()=>"unknown"});var _0=new Xe("",{factory:()=>Z(Cn).body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var bu=(()=>{class i{static \u0275prov=_e({token:i,providedIn:"root",factory:()=>{let t=new i;return t.store=uz(Z(Cn),Z(bs)),t}});store={};onSerializeCallbacks={};get(t,n){return this.store[t]!==void 0?this.store[t]:n}set(t,n){this.store[t]=n}remove(t){delete this.store[t]}hasKey(t){return this.store.hasOwnProperty(t)}get isEmpty(){return Object.keys(this.store).length===0}onSerialize(t,n){this.onSerializeCallbacks[t]=n}toJson(){for(let t in this.onSerializeCallbacks)if(this.onSerializeCallbacks.hasOwnProperty(t))try{this.store[t]=this.onSerializeCallbacks[t]()}catch(n){console.warn("Exception in onSerialize callback: ",n)}return JSON.stringify(this.store).replace(/</g,"\\u003C")}}return i})();function uz(i,e){let t=i.getElementById(e+"-state");if(t?.textContent)try{return JSON.parse(t.textContent)}catch(n){console.warn("Exception while restoring TransferState for app "+e,n)}return{}}var y2="h",x2="b",fz="f",hz="n",_2="e",S2="t",S0="c",lC="x",kh="r",C2="i",w2="n",cC="d";var E2="di",M2="s",T2="p";var jh=new Xe(""),D2=!1,dC=new Xe("",{factory:()=>D2});var uC=new Xe(""),I2=!1,P2=new Xe("",{factory:()=>[]}),A2=new Xe(""),fC=new Xe("",{factory:()=>new Map});var Wh="ngb";var O2=(i,e,t)=>{let n=i,r=n.__jsaction_fns??new Map,o=r.get(e)??[];o.push(t),r.set(e,o),n.__jsaction_fns=r},R2=(i,e)=>{let t=i,n=t.getAttribute(Wh)??"",r=e.get(n)??new Set;r.has(t)||r.add(t),e.set(n,r)};var k2=i=>{i.removeAttribute(Xg.JSACTION),i.removeAttribute(Wh),i.__jsaction_fns=void 0},F2=new Xe("",{factory:()=>({})});function hC(i,e){let t=e?.__jsaction_fns?.get(i.type);if(!(!t||!e?.isConnected))for(let n of t)n(i)}var w1=new Map;function N2(i,e){return w1.set(i,e),()=>w1.delete(i)}var pP=!1,L2=(i,e,t,n)=>{};function pz(i,e,t,n){L2(i,e,t,n)}function B2(){pP||(L2=(i,e,t,n)=>{let r=i[xr].get(bs);w1.get(r)?.(e,t,n)},pP=!0)}var C0=new Xe("");function $h(i){return(i.flags&32)===32}var mz="__nghData__",pC=mz,gz="__nghDeferData__",U2=gz;var t0="ngh",z2="nghm",V2=()=>null;function vz(i,e,t=!1){let n=i.getAttribute(t0);if(n==null)return null;let[r,o]=n.split("|");if(n=t?o:r,!n)return null;let s=o?`|${o}`:"",a=t?r:s,l={};if(n!==""){let d=e.get(bu,null,{optional:!0});d!==null&&(l=d.get(pC,[])[Number(n)])}let c={data:l,firstChild:i.firstChild??null};return t&&(c.firstChild=i,w0(c,0,i.nextSibling)),a?i.setAttribute(t0,a):i.removeAttribute(t0),c}function G2(){V2=vz}function H2(i,e,t=!1){return V2(i,e,t)}function j2(i){let e=i._lView;return e[qe].type===2?null:(_c(e)&&(e=e[$t]),e)}function bz(i){return i.textContent?.replace(/\s/gm,"")}function yz(i){let e=aC(),t=e.createNodeIterator(i,NodeFilter.SHOW_COMMENT,{acceptNode(o){let s=bz(o);return s==="ngetn"||s==="ngtns"?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),n,r=[];for(;n=t.nextNode();)r.push(n);for(let o of r)o.textContent==="ngetn"?o.replaceWith(e.createTextNode("")):o.remove()}function w0(i,e,t){i.segmentHeads??={},i.segmentHeads[e]=t}function E1(i,e){return i.segmentHeads?.[e]??null}function W2(i){return i.get(A2,!1,{optional:!0})}function xz(i,e){let t=i.data,n=t[_2]?.[e]??null;return n===null&&t[S0]?.[e]&&(n=mC(i,e)),n}function $2(i,e){return i.data[S0]?.[e]??null}function mC(i,e){let t=$2(i,e)??[],n=0;for(let r of t)n+=r[kh]*(r[lC]??1);return n}function _z(i){if(typeof i.disconnectedNodes>"u"){let e=i.data[cC];i.disconnectedNodes=e?new Set(e):null}return i.disconnectedNodes}function X2(i,e){if(typeof i.disconnectedNodes>"u"){let t=i.data[cC];i.disconnectedNodes=t?new Set(t):null}return!!_z(i)?.has(e)}function E0(i,e){let t=i[Hi];return t!==null&&!Ug()&&!$h(e)&&!X2(t,e.index-$t)}function Sz(i,e){let t=e.get(C0),r=e.get(bu).get(U2,{}),o=!1,s=i,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][T2]}return{parentBlockPromise:a,hydrationQueue:l}}function a1(i){return!!i&&i.nodeType===Node.COMMENT_NODE&&i.textContent?.trim()===z2}function mP(i){for(;i&&i.nodeType===Node.TEXT_NODE;)i=i.previousSibling;return i}function Y2(i){for(let n of i.body.childNodes)if(a1(n))return;let e=mP(i.body.previousSibling);if(a1(e))return;let t=mP(i.head.lastChild);if(!a1(t))throw new Ye(-507,!1)}function q2(i,e){let t=i.contentQueries;if(t!==null){let n=at(null);try{for(let r=0;r<t.length;r+=2){let o=t[r],s=t[r+1];if(s!==-1){let a=i.data[s];Vg(o),a.contentQueries(2,e[s],s)}}}finally{at(n)}}}function M1(i,e,t){Vg(0);let n=at(null);try{e(i,t)}finally{at(n)}}function gC(i,e,t){if(kS(e)){let n=at(null);try{let r=e.directiveStart,o=e.directiveEnd;for(let s=r;s<o;s++){let a=i.data[s];if(a.contentQueries){let l=t[s];a.contentQueries(1,l,s)}}}finally{at(n)}}}var Do=(function(i){return i[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",i[i.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom",i})(Do||{});var Yg;function Cz(){if(Yg===void 0&&(Yg=null,Qr.trustedTypes))try{Yg=Qr.trustedTypes.createPolicy("angular",{createHTML:i=>i,createScript:i=>i,createScriptURL:i=>i})}catch{}return Yg}function M0(i){return Cz()?.createHTML(i)||i}var qg;function wz(){if(qg===void 0&&(qg=null,Qr.trustedTypes))try{qg=Qr.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:i=>i,createScript:i=>i,createScriptURL:i=>i})}catch{}return qg}function gP(i){return wz()?.createHTML(i)||i}var ia=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Cg})`}},T1=class extends ia{getTypeName(){return"HTML"}},D1=class extends ia{getTypeName(){return"Style"}},I1=class extends ia{getTypeName(){return"Script"}},P1=class extends ia{getTypeName(){return"URL"}},A1=class extends ia{getTypeName(){return"ResourceURL"}};function Io(i){return i instanceof ia?i.changingThisBreaksApplicationSecurity:i}function oa(i,e){let t=K2(i);if(t!=null&&t!==e){if(t==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${t} (see ${Cg})`)}return t===e}function K2(i){return i instanceof ia&&i.getTypeName()||null}function vC(i){return new T1(i)}function bC(i){return new D1(i)}function yC(i){return new I1(i)}function xC(i){return new P1(i)}function _C(i){return new A1(i)}function Ez(i){let e=new R1(i);return Mz()?new O1(e):e}var O1=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(M0(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},R1=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=M0(e),t}};function Mz(){try{return!!new window.DOMParser().parseFromString(M0(""),"text/html")}catch{return!1}}var Tz=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Xh(i){return i=String(i),i.match(Tz)?i:"unsafe:"+i}function sa(i){let e={};for(let t of i.split(","))e[t]=!0;return e}function Yh(...i){let e={};for(let t of i)for(let n in t)t.hasOwnProperty(n)&&(e[n]=!0);return e}var Z2=sa("area,br,col,hr,img,wbr"),J2=sa("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Q2=sa("rp,rt"),Dz=Yh(Q2,J2),Iz=Yh(J2,sa("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")),Pz=Yh(Q2,sa("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")),vP=Yh(Z2,Iz,Pz,Dz),eA=sa("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Az=sa("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"),Oz=sa("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"),Rz=Yh(eA,Az,Oz),kz=sa("script,style,template"),k1=class{sanitizedSomething=!1;buf=[];sanitizeChildren(e){let t=e.firstChild,n=!0,r=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild){r.push(t),t=Lz(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let o=Nz(t);if(o){t=o;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=bP(e).toLowerCase();if(!vP.hasOwnProperty(t))return this.sanitizedSomething=!0,!kz.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let n=e.attributes;for(let r=0;r<n.length;r++){let o=n.item(r),s=o.name,a=s.toLowerCase();if(!Rz.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=o.value;eA[a]&&(l=Xh(l)),this.buf.push(" ",s,'="',yP(l),'"')}return this.buf.push(">"),!0}endElement(e){let t=bP(e).toLowerCase();vP.hasOwnProperty(t)&&!Z2.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(yP(e))}};function Fz(i,e){return(i.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function Nz(i){let e=i.nextSibling;if(e&&i!==e.previousSibling)throw tA(e);return e}function Lz(i){let e=i.firstChild;if(e&&Fz(i,e))throw tA(e);return e}function bP(i){let e=i.nodeName;return typeof e=="string"?e:"FORM"}function tA(i){return new Error(`Failed to sanitize html because the element is clobbered: ${i.outerHTML}`)}var Bz=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Uz=/([^\#-~ |!])/g;function yP(i){return i.replace(/&/g,"&amp;").replace(Bz,function(e){let t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+((t-55296)*1024+(n-56320)+65536)+";"}).replace(Uz,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Kg;function T0(i,e){let t=null;try{Kg=Kg||Ez(i);let n=e?String(e):"";t=Kg.getInertBodyElement(n);let r=5,o=n;do{if(r===0)throw new Error("Failed to sanitize html because the input is unstable");r--,n=o,o=t.innerHTML,t=Kg.getInertBodyElement(n)}while(n!==o);let a=new k1().sanitizeChildren(xP(t)||t);return M0(a)}finally{if(t){let n=xP(t)||t;for(;n.firstChild;)n.firstChild.remove()}}}function xP(i){return"content"in i&&zz(i)?i.content:null}function zz(i){return i.nodeType===Node.ELEMENT_NODE&&i.nodeName==="TEMPLATE"}var Vz=/^>|^->|<!--|-->|--!>|<!-$/g,Gz=/(<|>)/g,Hz="\u200B$1\u200B";function jz(i){return i.replace(Vz,e=>e.replace(Gz,Hz))}function nA(i,e){return i.createText(e)}function Wz(i,e,t){i.setValue(e,t)}function iA(i,e){return i.createComment(jz(e))}function SC(i,e,t){return i.createElement(e,t)}function f0(i,e,t,n,r){i.insertBefore(e,t,n,r)}function rA(i,e,t){i.appendChild(e,t)}function _P(i,e,t,n,r){n!==null?f0(i,e,t,n,r):rA(i,e,t)}function CC(i,e,t,n){i.removeChild(null,e,t,n)}function oA(i){i.textContent=""}function $z(i,e,t){i.setAttribute(e,"style",t)}function Xz(i,e,t){t===""?i.removeAttribute(e,"class"):i.setAttribute(e,"class",t)}function sA(i,e,t){let{mergedAttrs:n,classes:r,styles:o}=t;n!==null&&$5(i,e,n),r!==null&&Xz(i,e,r),o!==null&&$z(i,e,o)}var Po=(function(i){return i[i.NONE=0]="NONE",i[i.HTML=1]="HTML",i[i.STYLE=2]="STYLE",i[i.SCRIPT=3]="SCRIPT",i[i.URL=4]="URL",i[i.RESOURCE_URL=5]="RESOURCE_URL",i})(Po||{});function D0(i){let e=aA();return e?gP(e.sanitize(Po.HTML,i)||""):oa(i,"HTML")?gP(Io(i)):T0(aC(),_h(i))}function ji(i){let e=aA();return e?e.sanitize(Po.URL,i)||"":oa(i,"URL")?Io(i):Xh(_h(i))}function aA(){let i=ht();return i&&i[cs].sanitizer}function wC(i){return i.ownerDocument.defaultView}function EC(i){return i.ownerDocument}function lA(i){return i.ownerDocument.body}function Yz(i,e,t){let n=i.length;for(;;){let r=i.indexOf(e,t);if(r===-1)return r;if(r===0||i.charCodeAt(r-1)<=32){let o=e.length;if(r+o===n||i.charCodeAt(r+o)<=32)return r}t=r+1}}var cA="ng-template";function qz(i,e,t,n){let r=0;if(n){for(;r<e.length&&typeof e[r]=="string";r+=2)if(e[r]==="class"&&Yz(e[r+1].toLowerCase(),t,0)!==-1)return!0}else if(MC(i))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 MC(i){return i.type===4&&i.value!==cA}function Kz(i,e,t){let n=i.type===4&&!t?cA:i.value;return e===n}function Zz(i,e,t){let n=4,r=i.attrs,o=r!==null?eV(r):0,s=!1;for(let a=0;a<e.length;a++){let l=e[a];if(typeof l=="number"){if(!s&&!Mo(n)&&!Mo(l))return!1;if(s&&Mo(l))continue;s=!1,n=l|n&1;continue}if(!s)if(n&4){if(n=2|n&1,l!==""&&!Kz(i,l,t)||l===""&&e.length===1){if(Mo(n))return!1;s=!0}}else if(n&8){if(r===null||!qz(i,r,l,t)){if(Mo(n))return!1;s=!0}}else{let c=e[++a],d=Jz(l,r,MC(i),t);if(d===-1){if(Mo(n))return!1;s=!0;continue}if(c!==""){let u;if(d>o?u="":u=r[d+1].toLowerCase(),n&2&&c!==u){if(Mo(n))return!1;s=!0}}}}return Mo(n)||s}function Mo(i){return(i&1)===0}function Jz(i,e,t,n){if(e===null)return-1;let r=0;if(n||!t){let o=!1;for(;r<e.length;){let s=e[r];if(s===i)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 tV(e,i)}function dA(i,e,t=!1){for(let n=0;n<e.length;n++)if(Zz(i,e[n],t))return!0;return!1}function Qz(i){let e=i.attrs;if(e!=null){let t=e.indexOf(5);if((t&1)===0)return e[t+1]}return null}function eV(i){for(let e=0;e<i.length;e++){let t=i[e];if(X5(t))return e}return i.length}function tV(i,e){let t=i.indexOf(4);if(t>-1)for(t++;t<i.length;){let n=i[t];if(typeof n=="number")return-1;if(n===e)return t;t++}return-1}function nV(i,e){e:for(let t=0;t<e.length;t++){let n=e[t];if(i.length===n.length){for(let r=0;r<i.length;r++)if(i[r]!==n[r])continue e;return!0}}return!1}function SP(i,e){return i?":not("+e.trim()+")":e}function iV(i){let e=i[0],t=1,n=2,r="",o=!1;for(;t<i.length;){let s=i[t];if(typeof s=="string")if(n&2){let a=i[++t];r+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else n&8?r+="."+s:n&4&&(r+=" "+s);else r!==""&&!Mo(s)&&(e+=SP(o,r),r=""),n=s,o=o||!Mo(n);t++}return r!==""&&(e+=SP(o,r)),e}function rV(i){return i.map(iV).join(",")}function oV(i){let e=[],t=[],n=1,r=2;for(;n<i.length;){let o=i[n];if(typeof o=="string")r===2?o!==""&&e.push(o,i[++n]):r===8&&t.push(o);else{if(!Mo(r))break;r=o}n++}return t.length&&e.push(1,...t),e}var Dr={};function TC(i,e,t,n,r,o,s,a,l,c,d){let u=$t+n,f=u+r,h=sV(u,f),p=typeof c=="function"?c():c;return h[qe]={type:i,blueprint:h,template:t,queries:null,viewQuery:a,declTNode:e,data:h.slice().fill(null,u),bindingStartIndex:u,expandoStartIndex:f,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:d}}function sV(i,e){let t=[];for(let n=0;n<e;n++)t.push(n<i?null:Dr);return t}function aV(i){let e=i.tView;return e===null||e.incompleteFirstPass?i.tView=TC(1,null,i.template,i.decls,i.vars,i.directiveDefs,i.pipeDefs,i.viewQuery,i.schemas,i.consts,i.id):e}function DC(i,e,t,n,r,o,s,a,l,c,d){let u=e.blueprint.slice();return u[Vi]=r,u[Ct]=n|4|128|8|64|1024,(c!==null||i&&i[Ct]&2048)&&(u[Ct]|=2048),BS(u),u[Vn]=u[vc]=i,u[kn]=t,u[cs]=s||i&&i[cs],u[qt]=a||i&&i[qt],u[xr]=l||i&&i[xr]||null,u[Gi]=o,u[us]=lz(),u[Hi]=d,u[RS]=c,u[li]=e.type==2?i[li]:u,u}function lV(i,e,t){let n=to(e,i),r=aV(t),o=i[cs].rendererFactory,s=IC(i,DC(i,r,null,uA(t),n,e,null,o.createRenderer(n,t),null,null,null));return i[e.index]=s}function uA(i){let e=16;return i.signals?e=4096:i.onPush&&(e=64),e}function fA(i,e,t,n){if(t===0)return-1;let r=e.length;for(let o=0;o<t;o++)e.push(n),i.blueprint.push(n),i.data.push(null);return r}function IC(i,e){return i[tu]?i[OS][eo]=e:i[tu]=e,i[OS]=e,e}function A(i=1){hA(In(),ht(),ea()+i,!1)}function hA(i,e,t,n){if(!n)if((e[Ct]&3)===3){let o=i.preOrderCheckHooks;o!==null&&Jg(e,o,t)}else{let o=i.preOrderHooks;o!==null&&Qg(e,o,0,t)}Xa(t)}var I0=(function(i){return i[i.None=0]="None",i[i.SignalBased=1]="SignalBased",i[i.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",i})(I0||{});function F1(i,e,t,n){let r=at(null);try{let[o,s,a]=i.inputs[t],l=null;(s&I0.SignalBased)!==0&&(l=e[o][Qn]),l!==null&&l.transformFn!==void 0?n=l.transformFn(n):a!==null&&(n=a.call(e,n)),i.setInput!==null?i.setInput(e,l,n,t,o):KP(e,l,o,n)}finally{at(r)}}var vs=(function(i){return i[i.Important=1]="Important",i[i.DashCase=2]="DashCase",i})(vs||{}),cV;function PC(i,e){return cV(i,e)}var Oue=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";var N1=new WeakMap;function dV(i,e){let t=N1.get(i);if(!t||t.length===0)return;let n=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&&n&&a!==n)&&(t.splice(o,1),s.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}})),s.parentNode?.removeChild(s))}}function uV(i,e){let t=N1.get(i);t?t.includes(e)||t.push(e):N1.set(i,[e])}var Ka=new Set,P0=(function(i){return i[i.CHANGE_DETECTION=0]="CHANGE_DETECTION",i[i.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",i})(P0||{}),aa=new Xe(""),CP=new Set;function Ao(i){CP.has(i)||(CP.add(i),performance?.mark?.("mark_feature_usage",{detail:{feature:i}}))}var AC=(()=>{class i{impl=null;execute(){this.impl?.execute()}static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new i})}return i})(),pA=[0,1,2,3],mA=(()=>{class i{ngZone=Z(or);scheduler=Z(as);errorHandler=Z(Jr,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){Z(aa,{optional:!0})}execute(){let t=this.sequences.size>0;t&&en(Ht.AfterRenderHooksStart),this.executing=!0;for(let n of pA)for(let r of this.sequences)if(!(r.erroredOrDestroyed||!r.hooks[n]))try{r.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let o=r.hooks[n];return o(r.pipelinedValue)},r.snapshot))}catch(o){r.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}this.executing=!1;for(let n of this.sequences)n.afterRun(),n.once&&(this.sequences.delete(n),n.destroy());for(let n of this.deferredRegistrations)this.sequences.add(n);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),t&&en(Ht.AfterRenderHooksEnd)}register(t){let{view:n}=t;n!==void 0?((n[yc]??=[]).push(t),Cc(n),n[Ct]|=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,n){return n?n.run(P0.AFTER_NEXT_RENDER,t):t()}static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new i})}return i})(),h0=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,n,r,o,s=null){this.impl=e,this.hooks=t,this.view=n,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?.[yc];e&&(this.view[yc]=e.filter(t=>t!==this))}};function A0(i,e){let t=e?.injector??Z(Ti);return Ao("NgAfterNextRender"),hV(i,t,e,!0)}function fV(i){return i instanceof Function?[void 0,void 0,i,void 0]:[i.earlyRead,i.write,i.mixedReadWrite,i.read]}function hV(i,e,t,n){let r=e.get(AC);r.impl??=e.get(mA);let o=e.get(aa,null,{optional:!0}),s=t?.manualCleanup!==!0?e.get(ar):null,a=e.get(Dh,null,{optional:!0}),l=new h0(r.impl,fV(i),a?.view,n,s,o?.snapshot(null));return r.impl.register(l),l}var gA=new Xe("",{factory:()=>{let i=Z(Mi),e=new Set;return i.onDestroy(()=>e.clear()),{queue:e,isScheduled:!1,scheduler:null,injector:i}}});function vA(i,e,t){let n=i.get(gA);if(Array.isArray(e))for(let r of e)n.queue.add(r),t?.detachedLeaveAnimationFns?.push(r);else n.queue.add(e),t?.detachedLeaveAnimationFns?.push(e);n.scheduler&&n.scheduler(i)}function pV(i,e){let t=i.get(gA);if(e.detachedLeaveAnimationFns){for(let n of e.detachedLeaveAnimationFns)t.queue.delete(n);e.detachedLeaveAnimationFns=void 0}}function mV(i,e){for(let[t,n]of e)vA(i,n.animateFns)}function wP(i,e,t,n){let r=i?.[fs]?.enter;e!==null&&r&&r.has(t.index)&&mV(n,r)}function EP(i,e,t,n){try{t.get(Ch)}catch{return n(!1)}let r=i?.[fs],o=gV(i,e,r);if(o.size===0){let s=!1;if(i){let a=[];O0(i,e,a),s=a.length>0}if(!s)return n(!1)}i&&Ka.add(i[us]),vA(t,()=>vV(i,e,r||void 0,o,n),r||void 0)}function gV(i,e,t){let n=new Map,r=t?.leave;if(r&&r.has(e.index)&&n.set(e.index,r.get(e.index)),i&&r)for(let[o,s]of r){if(n.has(o))continue;let l=i[qe].data[o].parent;for(;l;){if(l===e){n.set(o,s);break}l=l.parent}}return n}function vV(i,e,t,n,r){let o=[];if(t&&t.leave)for(let[s]of n){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(i&&O0(i,e,o),o.length>0){let s=t||i?.[fs];if(s){let a=s.running;a&&o.push(a),s.running=Promise.allSettled(o),bV(i,s.running,r)}else Promise.allSettled(o).then(()=>{i&&Ka.delete(i[us]),r(!0)})}else i&&Ka.delete(i[us]),r(!1)}function O0(i,e,t){if(ps(e)){let r=wr(e.index,i);MP(r,t)}else if(e.type&12){let r=i[e.index];if(sr(r))for(let o=Tn;o<r.length;o++){let s=r[o];MP(s,t)}}let n=e.child;for(;n;)O0(i,n,t),n=n.next}function MP(i,e){let t=i[fs];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 n=i[qe].firstChild;for(;n;)O0(i,n,e),n=n.next}function bV(i,e,t){e.then(()=>{i[fs]?.running===e&&(i[fs].running=void 0,Ka.delete(i[us])),t(!0)})}function au(i,e,t,n,r,o,s,a){if(r!=null){let l,c=!1;sr(r)?l=r:Sr(r)&&(c=!0,r=r[Vi]);let d=Cr(r);i===0&&n!==null?(wP(a,n,o,t),s==null?rA(e,n,d):f0(e,n,d,s||null,!0)):i===1&&n!==null?(wP(a,n,o,t),f0(e,n,d,s||null,!0),dV(o,d)):i===2?(a?.[fs]?.leave?.has(o.index)&&uV(o,d),EP(a,o,t,u=>{CC(e,d,c,u)})):i===3&&EP(a,o,t,()=>{e.destroyNode(d)}),l!=null&&DV(e,i,t,l,o,n,s)}}function yV(i,e){bA(i,e),e[Vi]=null,e[Gi]=null}function xV(i,e,t,n,r,o){n[Vi]=r,n[Gi]=e,k0(i,n,t,1,r,o)}function bA(i,e){e[cs].changeDetectionScheduler?.notify(9),k0(i,e,e[qt],2,null,null)}function _V(i){let e=i[tu];if(!e)return l1(i[qe],i);for(;e;){let t=null;if(Sr(e))t=e[tu];else{let n=e[Tn];n&&(t=n)}if(!t){for(;e&&!e[eo]&&e!==i;)Sr(e)&&l1(e[qe],e),e=e[Vn];e===null&&(e=i),Sr(e)&&l1(e[qe],e),t=e&&e[eo]}e=t}}function OC(i,e){let t=i[xc],n=t.indexOf(e);t.splice(n,1)}function R0(i,e){if(Wa(e))return;let t=e[qt];t.destroyNode&&k0(i,e,t,3,null,null),_V(e)}function l1(i,e){if(Wa(e))return;let t=at(null);try{e[Ct]&=-129,e[Ct]|=256,e[_r]&&oc(e[_r]),CV(i,e),SV(i,e),e[qe].type===1&&e[qt].destroy();let n=e[ja];if(n!==null&&sr(e[Vn])){n!==e[Vn]&&OC(n,e);let r=e[ds];r!==null&&r.detachView(i)}S1(e)}finally{at(t)}}function SV(i,e){let t=i.cleanup,n=e[eu];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?n[a]():n[-a].unsubscribe(),s+=2}else{let a=n[t[s+1]];t[s].call(a)}n!==null&&(e[eu]=null);let r=e[qs];if(r!==null){e[qs]=null;for(let s=0;s<r.length;s++){let a=r[s];a()}}let o=e[Va];if(o!==null){e[Va]=null;for(let s of o)s.destroy()}}function CV(i,e){let t;if(i!=null&&(t=i.destroyHooks)!=null)for(let n=0;n<t.length;n+=2){let r=e[t[n]];if(!(r instanceof Mc)){let o=t[n+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){let a=r[o[s]],l=o[s+1];en(Ht.LifecycleHookStart,a,l);try{l.call(a)}finally{en(Ht.LifecycleHookEnd,a,l)}}else{en(Ht.LifecycleHookStart,r,o);try{o.call(r)}finally{en(Ht.LifecycleHookEnd,r,o)}}}}}function yA(i,e,t){return wV(i,e.parent,t)}function wV(i,e,t){let n=e;for(;n!==null&&n.type&168;)e=n,n=e.parent;if(n===null)return t[Vi];if(ps(n)){let{encapsulation:r}=i.data[n.directiveStart+n.componentOffset];if(r===Do.None||r===Do.Emulated)return null}return to(n,t)}function xA(i,e,t){return MV(i,e,t)}function EV(i,e,t){return i.type&40?to(i,t):null}var MV=EV,TP;function RC(i,e,t,n){let r=yA(i,n,e),o=e[qt],s=n.parent||e[Gi],a=xA(s,n,e);if(r!=null)if(Array.isArray(t))for(let l=0;l<t.length;l++)_P(o,r,t[l],a,!1);else _P(o,r,t,a,!1);TP!==void 0&&TP(o,n,e,t,r)}function Ah(i,e){if(e!==null){let t=e.type;if(t&3)return to(e,i);if(t&4)return L1(-1,i[e.index]);if(t&8){let n=e.child;if(n!==null)return Ah(i,n);{let r=i[e.index];return sr(r)?L1(-1,r):Cr(r)}}else{if(t&128)return Ah(i,e.next);if(t&32)return PC(e,i)()||Cr(i[e.index]);{let n=_A(i,e);if(n!==null){if(Array.isArray(n))return n[0];let r=Ga(i[li]);return Ah(r,n)}else return Ah(i,e.next)}}}return null}function _A(i,e){if(e!==null){let n=i[li][Gi],r=e.projection;return n.projection[r]}return null}function L1(i,e){let t=Tn+i+1;if(t<e.length){let n=e[t],r=n[qe].firstChild;if(r!==null)return Ah(n,r)}return e[hs]}function kC(i,e,t,n,r,o,s){for(;t!=null;){let a=n[xr];if(t.type===128){t=t.next;continue}let l=n[t.index],c=t.type;if(s&&e===0&&(l&&fu(Cr(l),n),t.flags|=2),!$h(t))if(c&8)kC(i,e,t.child,n,r,o,!1),au(e,i,a,r,l,t,o,n);else if(c&32){let d=PC(t,n),u;for(;u=d();)au(e,i,a,r,u,t,o,n);au(e,i,a,r,l,t,o,n)}else c&16?SA(i,e,n,t,r,o):au(e,i,a,r,l,t,o,n);t=s?t.projectionNext:t.next}}function k0(i,e,t,n,r,o){kC(t,n,i.firstChild,e,r,o,!1)}function TV(i,e,t){let n=e[qt],r=yA(i,t,e),o=t.parent||e[Gi],s=xA(o,t,e);SA(n,0,e,t,r,s)}function SA(i,e,t,n,r,o){let s=t[li],l=s[Gi].projection[n.projection];if(Array.isArray(l))for(let c=0;c<l.length;c++){let d=l[c];au(e,i,t[xr],r,d,n,o,t)}else{let c=l,d=s[Vn];u0(n)&&(c.flags|=128),kC(i,e,c,d,r,o,!0)}}function DV(i,e,t,n,r,o,s){let a=n[hs],l=Cr(n);a!==l&&au(e,i,t,o,a,r,s);for(let c=Tn;c<n.length;c++){let d=n[c];k0(d[qe],d,i,e,o,a)}}function IV(i,e,t,n,r){if(e)r?i.addClass(t,n):i.removeClass(t,n);else{let o=n.indexOf("-")===-1?void 0:vs.DashCase;r==null?i.removeStyle(t,n,o):(typeof r=="string"&&r.endsWith("!important")&&(r=r.slice(0,-10),o|=vs.Important),i.setStyle(t,n,r,o))}}function CA(i,e,t,n,r){let o=ea(),s=n&2;try{Xa(-1),s&&e.length>$t&&hA(i,e,$t,!1);let a=s?Ht.TemplateUpdateStart:Ht.TemplateCreateStart;en(a,r,t),t(n,r)}finally{Xa(o);let a=s?Ht.TemplateUpdateEnd:Ht.TemplateCreateEnd;en(a,r,t)}}function F0(i,e,t){FV(i,e,t),(t.flags&64)===64&&NV(i,e,t)}function qh(i,e,t=to){let n=e.localNames;if(n!==null){let r=e.index+1;for(let o=0;o<n.length;o+=2){let s=n[o+1],a=s===-1?t(e,i):i[s];i[r++]=a}}}function PV(i,e,t,n){let o=n.get(dC,D2)||t===Do.ShadowDom||t===Do.ExperimentalIsolatedShadowDom,s=i.selectRootElement(e,o);return AV(s),s}function AV(i){wA(i)}var wA=()=>null;function OV(i){h2(i)?oA(i):yz(i)}function EA(){wA=OV}function RV(i){return i==="class"?"className":i==="for"?"htmlFor":i==="formaction"?"formAction":i==="innerHtml"?"innerHTML":i==="readonly"?"readOnly":i==="tabindex"?"tabIndex":i}function MA(i,e,t,n,r,o){let s=e[qe];if(UC(i,s,e,t,n)){ps(i)&&kV(e,i.index);return}i.type&3&&(t=RV(t)),TA(i,e,t,n,r,o)}function TA(i,e,t,n,r,o){if(i.type&3){let s=to(i,e);n=o!=null?o(n,i.value||"",t):n,r.setProperty(s,t,n)}else i.type&12}function kV(i,e){let t=wr(e,i);t[Ct]&16||(t[Ct]|=64)}function FV(i,e,t){let n=t.directiveStart,r=t.directiveEnd;ps(t)&&lV(e,t,i.data[n+t.componentOffset]),i.firstCreatePass||c0(t,e);let o=t.initialInputs;for(let s=n;s<r;s++){let a=i.data[s],l=Rh(e,i,s,t);if(fu(l,e),o!==null&&zV(e,s-n,l,a,t,o),ms(a)){let c=wr(t.index,e);c[kn]=Rh(e,i,s,t)}}}function NV(i,e,t){let n=t.directiveStart,r=t.directiveEnd,o=t.index,s=$I();try{Xa(o);for(let a=n;a<r;a++){let l=i.data[a],c=e[a];zg(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&LV(l,c)}}finally{Xa(-1),zg(s)}}function LV(i,e){i.hostBindings!==null&&i.hostBindings(1,e)}function FC(i,e){let t=i.directiveRegistry,n=null;if(t)for(let r=0;r<t.length;r++){let o=t[r];dA(e,o.selectors,!1)&&(n??=[],ms(o)?n.unshift(o):n.push(o))}return n}function BV(i,e,t,n,r,o){let s=to(i,e);UV(e[qt],s,o,i.value,t,n,r)}function UV(i,e,t,n,r,o,s){if(o==null)i.removeAttribute(e,r,t);else{let a=s==null?_h(o):s(o,n||"",r);i.setAttribute(e,r,a,t)}}function zV(i,e,t,n,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];F1(n,t,l,c)}}function NC(i,e,t,n,r){let o=$t+t,s=e[qe],a=r(s,e,i,n,t);e[o]=a,iu(i,!0);let l=i.type===2;return l?(sA(e[qt],a,i),(BI()===0||nu(i))&&fu(a,e),UI()):fu(a,e),jg()&&(!l||!$h(i))&&RC(s,e,a,i),i}function LC(i){let e=i;return XS()?YS():(e=e.parent,iu(e,!1)),e}function BC(i,e){let t=i[xr];if(!t)return;let n;try{n=t.get(na,null)}catch{n=null}n?.(e)}function UC(i,e,t,n,r){let o=i.inputs?.[n],s=i.hostDirectiveInputs?.[n],a=!1;if(s)for(let l=0;l<s.length;l+=2){let c=s[l],d=s[l+1],u=e.data[c];F1(u,t[c],d,r),a=!0}if(o)for(let l of o){let c=t[l],d=e.data[l];F1(d,c,n,r),a=!0}return a}function VV(i,e){let t=wr(e,i),n=t[qe];GV(n,t);let r=t[Vi];r!==null&&t[Hi]===null&&(t[Hi]=H2(r,t[xr])),en(Ht.ComponentStart);try{zC(n,t,t[kn])}finally{en(Ht.ComponentEnd,t[kn])}}function GV(i,e){for(let t=e.length;t<i.blueprint.length;t++)e.push(i.blueprint[t])}function zC(i,e,t){Gg(e);try{let n=i.viewQuery;n!==null&&M1(1,n,t);let r=i.template;r!==null&&CA(i,e,r,1,t),i.firstCreatePass&&(i.firstCreatePass=!1),e[ds]?.finishViewCreation(i),i.staticContentQueries&&q2(i,e),i.staticViewQueries&&M1(2,i.viewQuery,t);let o=i.components;o!==null&&HV(e,o)}catch(n){throw i.firstCreatePass&&(i.incompleteFirstPass=!0,i.firstCreatePass=!1),n}finally{e[Ct]&=-5,Hg()}}function HV(i,e){for(let t=0;t<e.length;t++)VV(i,e[t])}function yu(i,e,t,n){let r=at(null);try{let o=e.tView,a=i[Ct]&4096?4096:16,l=DC(i,o,t,a,null,e,null,null,n?.injector??null,n?.embeddedViewInjector??null,n?.dehydratedView??null),c=i[e.index];l[ja]=c;let d=i[ds];return d!==null&&(l[ds]=d.createEmbeddedView(o)),zC(o,l,t),l}finally{at(r)}}function Tc(i,e){return!e||e.firstChild===null||u0(i)}function Fh(i,e,t,n,r=!1){for(;t!==null;){if(t.type===128){t=r?t.projectionNext:t.next;continue}let o=e[t.index];o!==null&&n.push(Cr(o)),sr(o)&&DA(o,n);let s=t.type;if(s&8)Fh(i,e,t.child,n);else if(s&32){let a=PC(t,e),l;for(;l=a();)n.push(l)}else if(s&16){let a=_A(e,t);if(Array.isArray(a))n.push(...a);else{let l=Ga(e[li]);Fh(l[qe],l,a,n,!0)}}t=r?t.projectionNext:t.next}return n}function DA(i,e){for(let t=Tn;t<i.length;t++){let n=i[t],r=n[qe].firstChild;r!==null&&Fh(n[qe],n,r,e)}i[hs]!==i[Vi]&&e.push(i[hs])}function IA(i){if(i[yc]!==null){for(let e of i[yc])e.impl.addSequence(e);i[yc].length=0}}var PA=[];function jV(i){return i[_r]??WV(i)}function WV(i){let e=PA.pop()??Object.create(XV);return e.lView=i,e}function $V(i){i.lView[_r]!==i&&(i.lView=null,PA.push(i))}var XV=fe(R({},nc),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:i=>{Cc(i.lView)},consumerOnSignalRead(){this.lView[_r]=this}});function YV(i){let e=i[_r]??Object.create(qV);return e.lView=i,e}var qV=fe(R({},nc),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:i=>{let e=Ga(i.lView);for(;e&&!AA(e[qe]);)e=Ga(e);e&&US(e)},consumerOnSignalRead(){this.lView[_r]=this}});function AA(i){return i.type!==2}function OA(i){if(i[Va]===null)return;let e=!0;for(;e;){let t=!1;for(let n of i[Va])n.dirty&&(t=!0,n.zone===null||Zone.current===n.zone?n.run():n.zone.run(()=>n.run()));e=t&&!!(i[Ct]&8192)}}var KV=100;function RA(i,e=0){let n=i[cs].rendererFactory,r=!1;r||n.begin?.();try{ZV(i,e)}finally{r||n.end?.()}}function ZV(i,e){let t=qS();try{bh(!0),B1(i,e);let n=0;for(;Mh(i);){if(n===KV)throw new Ye(103,!1);n++,B1(i,1)}}finally{bh(t)}}function JV(i,e,t,n){if(Wa(e))return;let r=e[Ct],o=!1,s=!1;Gg(e);let a=!0,l=null,c=null;o||(AA(i)?(c=jV(e),l=rc(c)):$m()===null?(a=!1,c=YV(e),l=rc(c)):e[_r]&&(oc(e[_r]),e[_r]=null));try{BS(e),HI(i.bindingStartIndex),t!==null&&CA(i,e,t,2,n);let d=(r&3)===3;if(!o)if(d){let h=i.preOrderCheckHooks;h!==null&&Jg(e,h,null)}else{let h=i.preOrderHooks;h!==null&&Qg(e,h,0,null),o1(e,0)}if(s||QV(e),OA(e),kA(e,0),i.contentQueries!==null&&q2(i,e),!o)if(d){let h=i.contentCheckHooks;h!==null&&Jg(e,h)}else{let h=i.contentHooks;h!==null&&Qg(e,h,1),o1(e,1)}tG(i,e);let u=i.components;u!==null&&NA(e,u,0);let f=i.viewQuery;if(f!==null&&M1(2,f,n),!o)if(d){let h=i.viewCheckHooks;h!==null&&Jg(e,h)}else{let h=i.viewHooks;h!==null&&Qg(e,h,2),o1(e,2)}if(i.firstUpdatePass===!0&&(i.firstUpdatePass=!1),e[kg]){for(let h of e[kg])h();e[kg]=null}o||(IA(e),e[Ct]&=-73)}catch(d){throw o||Cc(e),d}finally{c!==null&&(Hd(c,l),a&&$V(c)),Hg()}}function kA(i,e){for(let t=g2(i);t!==null;t=v2(t))for(let n=Tn;n<t.length;n++){let r=t[n];FA(r,e)}}function QV(i){for(let e=g2(i);e!==null;e=v2(e)){if(!(e[Ct]&2))continue;let t=e[xc];for(let n=0;n<t.length;n++){let r=t[n];US(r)}}}function eG(i,e,t){en(Ht.ComponentStart);let n=wr(e,i);try{FA(n,t)}finally{en(Ht.ComponentEnd,n[kn])}}function FA(i,e){Ng(i)&&B1(i,e)}function B1(i,e){let n=i[qe],r=i[Ct],o=i[_r],s=!!(e===0&&r&16);if(s||=!!(r&64&&e===0),s||=!!(r&1024),s||=!!(o?.dirty&&ch(o)),s||=!1,o&&(o.dirty=!1),i[Ct]&=-9217,s)JV(n,i,n.template,i[kn]);else if(r&8192){let a=at(null);try{OA(i),kA(i,1);let l=n.components;l!==null&&NA(i,l,1),IA(i)}finally{at(a)}}}function NA(i,e,t){for(let n=0;n<e.length;n++)eG(i,e[n],t)}function tG(i,e){let t=i.hostBindingOpCodes;if(t!==null)try{for(let n=0;n<t.length;n++){let r=t[n];if(r<0)Xa(~r);else{let o=r,s=t[++n],a=t[++n];WI(s,o);let l=e[o];en(Ht.HostBindingsUpdateStart,l);try{a(2,l)}finally{en(Ht.HostBindingsUpdateEnd,l)}}}}finally{Xa(-1)}}function N0(i,e){let t=qS()?64:1088;for(i[cs].changeDetectionScheduler?.notify(e);i;){i[Ct]|=t;let n=Ga(i);if(_c(i)&&!n)return i;i=n}return null}function LA(i,e,t,n){return[i,!0,0,e,null,n,null,t,null,null]}function BA(i,e){let t=Tn+e;if(t<i.length)return i[t]}function xu(i,e,t,n=!0){let r=e[qe];if(nG(r,e,i,t),n){let s=L1(t,i),a=e[qt],l=a.parentNode(i[hs]);l!==null&&xV(r,i[Gi],a,e,l,s)}let o=e[Hi];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function VC(i,e){let t=Nh(i,e);return t!==void 0&&R0(t[qe],t),t}function Nh(i,e){if(i.length<=Tn)return;let t=Tn+e,n=i[t];if(n){let r=n[ja];r!==null&&r!==i&&OC(r,n),e>0&&(i[t-1][eo]=n[eo]);let o=Sh(i,Tn+e);yV(n[qe],n);let s=o[ds];s!==null&&s.detachView(o[qe]),n[Vn]=null,n[eo]=null,n[Ct]&=-129}return n}function nG(i,e,t,n){let r=Tn+n,o=t.length;n>0&&(t[r-1][eo]=e),n<o-Tn?(e[eo]=t[r],DS(t,Tn+n,e)):(t.push(e),e[eo]=null),e[Vn]=t;let s=e[ja];s!==null&&t!==s&&UA(s,e);let a=e[ds];a!==null&&a.insertView(i),Lg(e),e[Ct]|=128}function UA(i,e){let t=i[xc],n=e[Vn];if(Sr(n))i[Ct]|=2;else{let r=n[Vn][li];e[li]!==r&&(i[Ct]|=2)}t===null?i[xc]=[e]:t.push(e)}var Za=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let e=this._lView,t=e[qe];return Fh(t,e,t.firstChild,[])}constructor(e,t){this._lView=e,this._cdRefInjectingView=t}get context(){return this._lView[kn]}set context(e){this._lView[kn]=e}get destroyed(){return Wa(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Vn];if(sr(e)){let t=e[Eh],n=t?t.indexOf(this):-1;n>-1&&(Nh(e,n),Sh(t,n))}this._attachedToViewContainer=!1}R0(this._lView[qe],this._lView)}onDestroy(e){zS(this._lView,e)}markForCheck(){N0(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[Ct]&=-129}reattach(){Lg(this._lView),this._lView[Ct]|=128}detectChanges(){this._lView[Ct]|=1024,RA(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Ye(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=_c(this._lView),t=this._lView[ja];t!==null&&!e&&OC(t,this._lView),bA(this._lView[qe],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Ye(902,!1);this._appRef=e;let t=_c(this._lView),n=this._lView[ja];n!==null&&!t&&UA(n,this._lView),Lg(this._lView)}};var hu=(()=>{class i{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=iG;constructor(t,n,r){this._declarationLView=t,this._declarationTContainer=n,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,n){return this.createEmbeddedViewImpl(t,n)}createEmbeddedViewImpl(t,n,r){let o=yu(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:n,dehydratedView:r});return new Za(o)}}return i})();function iG(){return L0(yi(),ht())}function L0(i,e){return i.type&4?new hu(e,i,vu(i,e)):null}function _u(i,e,t,n,r){let o=i.data[e];if(o===null)o=rG(i,e,t,n,r),jI()&&(o.flags|=32);else if(o.type&64){o.type=t,o.value=n,o.attrs=r;let s=VI();o.injectorIndex=s===null?-1:s.injectorIndex}return iu(o,!0),o}function rG(i,e,t,n,r){let o=$S(),s=XS(),a=s?o:o&&o.parent,l=i.data[e]=sG(i,a,t,e,n,r);return oG(i,l,o,s),l}function oG(i,e,t,n){i.firstChild===null&&(i.firstChild=e),t!==null&&(n?t.child==null&&e.parent!==null&&(t.child=e):t.next===null&&(t.next=e,e.prev=t))}function sG(i,e,t,n,r,o){let s=e?e.injectorIndex:-1,a=0;return Ug()&&(a|=128),{type:t,index:n,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 aG=new RegExp(`^(\\d+)*(${x2}|${y2})*(.*)`);function lG(i){let e=i.match(aG),[t,n,r,o]=e,s=n?parseInt(n,10):r,a=[];for(let[l,c,d]of o.matchAll(/(f|n)(\d*)/g)){let u=parseInt(d,10)||1;a.push(c,u)}return[s,...a]}function cG(i){return!i.prev&&i.parent?.type===8}function c1(i){return i.index-$t}function dG(i,e){let t=i.i18nNodes;if(t)return t.get(e)}function B0(i,e,t,n){let r=c1(n),o=dG(i,r);if(o===void 0){let s=i.data[w2];if(s?.[r])o=fG(s[r],t);else if(e.firstChild===n)o=i.firstChild;else{let a=n.prev===null,l=n.prev??n.parent;if(cG(n)){let c=c1(n.parent);o=E1(i,c)}else{let c=to(l,t);if(a)o=c.firstChild;else{let d=c1(l),u=E1(i,d);if(l.type===2&&u){let h=mC(i,d)+1;o=U0(h,u)}else o=c.nextSibling}}}}return o}function U0(i,e){let t=e;for(let n=0;n<i;n++)t=t.nextSibling;return t}function uG(i,e){let t=i;for(let n=0;n<e.length;n+=2){let r=e[n],o=e[n+1];for(let s=0;s<o;s++)switch(r){case fz:t=t.firstChild;break;case hz:t=t.nextSibling;break}}return t}function fG(i,e){let[t,...n]=lG(i),r;if(t===y2)r=e[li][Vi];else if(t===x2)r=lA(e[li][Vi]);else{let o=Number(t);r=Cr(e[o+$t])}return uG(r,n)}var hG=!1;function zA(i){hG=i}function pG(i){let e=i[Hi];if(e){let{i18nNodes:t,dehydratedIcuData:n}=e;if(t&&n){let r=i[qt];for(let o of n.values())mG(r,t,o)}e.i18nNodes=void 0,e.dehydratedIcuData=void 0}}function mG(i,e,t){for(let n of t.node.cases[t.case]){let r=e.get(n.index-$t);r&&CC(i,r,!1)}}function z0(i){let e=i[Eo]??[],n=i[Vn][qt],r=[];for(let o of e)o.data[E2]!==void 0?r.push(o):VA(o,n);i[Eo]=r}function gG(i){let{lContainer:e}=i,t=e[Eo];if(t===null)return;let r=e[Vn][qt];for(let o of t)VA(o,r)}function VA(i,e){let t=0,n=i.firstChild;if(n){let r=i.data[kh];for(;t<r;){let o=n.nextSibling;CC(e,n,!1),n=o,t++}}}function V0(i){z0(i);let e=i[Vi];Sr(e)&&p0(e);for(let t=Tn;t<i.length;t++)p0(i[t])}function p0(i){pG(i);let e=i[qe];for(let t=$t;t<e.bindingStartIndex;t++)if(sr(i[t])){let n=i[t];V0(n)}else Sr(i[t])&&p0(i[t])}function GC(i){let e=i._views;for(let t of e){let n=j2(t);n!==null&&n[Vi]!==null&&(Sr(n)?p0(n):V0(n))}}function vG(i,e,t,n){i!==null&&(t.cleanup(e),V0(i.lContainer),GC(n))}function bG(i,e){let t=[];for(let n of e)for(let r=0;r<(n[lC]??1);r++){let o={data:n,firstChild:null};n[kh]>0&&(o.firstChild=i,i=U0(n[kh],i)),t.push(o)}return[i,t]}var GA=()=>null,HA=()=>null;function jA(){GA=yG,HA=xG}function yG(i,e){return $A(i,e)?i[Eo].shift():(z0(i),null)}function Lh(i,e){return GA(i,e)}function xG(i,e,t){if(e.tView.ssrId===null)return null;let n=Lh(i,e.tView.ssrId);return t[qe].firstUpdatePass&&n===null&&_G(t,e),n}function WA(i,e,t){return HA(i,e,t)}function _G(i,e){let t=e;for(;t;){if(DP(i,t))return;if((t.flags&256)===256)break;t=t.prev}for(t=e.next;t&&(t.flags&512)===512;){if(DP(i,t))return;t=t.next}}function $A(i,e){let t=i[Eo];return!e||t===null||t.length===0?!1:t[0].data[C2]===e}function DP(i,e){let t=e.tView?.ssrId;if(t==null)return!1;let n=i[e.index];return sr(n)&&$A(n,t)?(z0(n),!0):!1}var XA=class{},G0=class{},U1=class{resolveComponentFactory(e){throw new Ye(917,!1)}},H0=class{static NULL=new U1},Dc=class{},la=(()=>{class i{destroyNode=null;static __NG_ELEMENT_ID__=()=>SG()}return i})();function SG(){let i=ht(),e=yi(),t=wr(e.index,i);return(Sr(t)?t:i)[qt]}var YA=(()=>{class i{static \u0275prov=_e({token:i,providedIn:"root",factory:()=>null})}return i})();var n0={},cu=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,n0,n);return r!==n0||t===n0?r:this.parentInjector.get(e,t,n)}};function m0(i,e,t){let n=t?i.styles:null,r=t?i.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=Eg(r,a);else if(o==2){let l=a,c=e[++s];n=Eg(n,l+": "+c+";")}}t?i.styles=n:i.stylesWithoutHost=n,t?i.classes=r:i.classesWithoutHost=r}function jt(i,e=0){let t=ht();if(t===null)return We(i,e);let n=yi();return l2(n,t,bi(i),e)}function qA(i,e,t,n,r){let o=n===null?null:{"":-1},s=r(i,t);if(s!==null){let a=s,l=null,c=null;for(let d of s)if(d.resolveHostDirectives!==null){[a,l,c]=d.resolveHostDirectives(s);break}EG(i,e,t,a,o,l,c)}o!==null&&n!==null&&CG(t,n,o)}function CG(i,e,t){let n=i.localNames=[];for(let r=0;r<e.length;r+=2){let o=t[e[r+1]];if(o==null)throw new Ye(-301,!1);n.push(e[r],o)}}function wG(i,e,t){e.componentOffset=t,(i.components??=[]).push(e.index)}function EG(i,e,t,n,r,o,s){let a=n.length,l=null;for(let f=0;f<a;f++){let h=n[f];l===null&&ms(h)&&(l=h,wG(i,t,f)),x1(c0(t,e),i,h.type)}AG(t,i.data.length,a),l?.viewProvidersResolver&&l.viewProvidersResolver(l);for(let f=0;f<a;f++){let h=n[f];h.providersResolver&&h.providersResolver(h)}let c=!1,d=!1,u=fA(i,e,a,null);a>0&&(t.directiveToIndex=new Map);for(let f=0;f<a;f++){let h=n[f];if(t.mergedAttrs=uu(t.mergedAttrs,h.hostAttrs),TG(i,t,e,u,h),PG(u,h,r),s!==null&&s.has(h)){let[v,g]=s.get(h);t.directiveToIndex.set(h.type,[u,v+t.directiveStart,g+t.directiveStart])}else(o===null||!o.has(h))&&t.directiveToIndex.set(h.type,u);h.contentQueries!==null&&(t.flags|=4),(h.hostBindings!==null||h.hostAttrs!==null||h.hostVars!==0)&&(t.flags|=64);let p=h.type.prototype;!c&&(p.ngOnChanges||p.ngOnInit||p.ngDoCheck)&&((i.preOrderHooks??=[]).push(t.index),c=!0),!d&&(p.ngOnChanges||p.ngDoCheck)&&((i.preOrderCheckHooks??=[]).push(t.index),d=!0),u++}MG(i,t,o)}function MG(i,e,t){for(let n=e.directiveStart;n<e.directiveEnd;n++){let r=i.data[n];if(t===null||!t.has(r))IP(0,e,r,n),IP(1,e,r,n),AP(e,n,!1);else{let o=t.get(r);PP(0,e,o,n),PP(1,e,o,n),AP(e,n,!0)}}}function IP(i,e,t,n){let r=i===0?t.inputs:t.outputs;for(let o in r)if(r.hasOwnProperty(o)){let s;i===0?s=e.inputs??={}:s=e.outputs??={},s[o]??=[],s[o].push(n),KA(e,o)}}function PP(i,e,t,n){let r=i===0?t.inputs:t.outputs;for(let o in r)if(r.hasOwnProperty(o)){let s=r[o],a;i===0?a=e.hostDirectiveInputs??={}:a=e.hostDirectiveOutputs??={},a[s]??=[],a[s].push(n,o),KA(e,s)}}function KA(i,e){e==="class"?i.flags|=8:e==="style"&&(i.flags|=16)}function AP(i,e,t){let{attrs:n,inputs:r,hostDirectiveInputs:o}=i;if(n===null||!t&&r===null||t&&o===null||MC(i)){i.initialInputs??=[],i.initialInputs.push(null);return}let s=null,a=0;for(;a<n.length;){let l=n[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 d of c)if(d===e){s??=[],s.push(l,n[a+1]);break}}else if(t&&o.hasOwnProperty(l)){let c=o[l];for(let d=0;d<c.length;d+=2)if(c[d]===e){s??=[],s.push(c[d+1],n[a+1]);break}}a+=2}i.initialInputs??=[],i.initialInputs.push(s)}function TG(i,e,t,n,r){i.data[n]=r;let o=r.factory||(r.factory=za(r.type,!0)),s=new Mc(o,ms(r),jt,null);i.blueprint[n]=s,t[n]=s,DG(i,e,n,fA(i,t,r.hostVars,Dr),r)}function DG(i,e,t,n,r){let o=r.hostBindings;if(o){let s=i.hostBindingOpCodes;s===null&&(s=i.hostBindingOpCodes=[]);let a=~e.index;IG(s)!=a&&s.push(a),s.push(t,n,o)}}function IG(i){let e=i.length;for(;e>0;){let t=i[--e];if(typeof t=="number"&&t<0)return t}return 0}function PG(i,e,t){if(t){if(e.exportAs)for(let n=0;n<e.exportAs.length;n++)t[e.exportAs[n]]=i;ms(e)&&(t[""]=i)}}function AG(i,e,t){i.flags|=1,i.directiveStart=e,i.directiveEnd=e+t,i.providerIndexes=e}function HC(i,e,t,n,r,o,s,a){let l=e[qe],c=l.consts,d=no(c,s),u=_u(l,i,t,n,d);return o&&qA(l,e,u,no(c,a),r),u.mergedAttrs=uu(u.mergedAttrs,u.attrs),u.attrs!==null&&m0(u,u.attrs,!1),u.mergedAttrs!==null&&m0(u,u.mergedAttrs,!0),l.queries!==null&&l.queries.elementStart(l,u),u}function jC(i,e){e2(i,e),kS(e)&&i.queries.elementEnd(e)}function OG(i,e,t,n,r,o){let s=e.consts,a=no(s,r),l=_u(e,i,t,n,a);if(l.mergedAttrs=uu(l.mergedAttrs,l.attrs),o!=null){let c=no(s,o);l.localNames=[];for(let d=0;d<c.length;d+=2)l.localNames.push(c[d],-1)}return l.attrs!==null&&m0(l,l.attrs,!1),l.mergedAttrs!==null&&m0(l,l.mergedAttrs,!0),e.queries!==null&&e.queries.elementStart(e,l),l}function j0(i,e,t){return i[e]=t}function RG(i,e){return i[e]}function Mr(i,e,t){if(t===Dr)return!1;let n=i[e];return Object.is(n,t)?!1:(i[e]=t,!0)}function ZA(i,e,t,n){let r=Mr(i,e,t);return Mr(i,e+1,n)||r}function kG(i,e,t,n,r){let o=ZA(i,e,t,n);return Mr(i,e+2,r)||o}function i0(i,e,t){return function n(r){let o=ps(i)?wr(i.index,e):e;N0(o,5);let s=e[kn],a=OP(e,s,t,r),l=n.__ngNextListenerFn__;for(;l;)a=OP(e,s,l,r)&&a,l=l.__ngNextListenerFn__;return a}}function OP(i,e,t,n){let r=at(null);try{return en(Ht.OutputStart,e,t),t(n)!==!1}catch(o){return BC(i,o),!1}finally{en(Ht.OutputEnd,e,t),at(r)}}function JA(i,e,t,n,r,o,s,a){let l=nu(i),c=!1,d=null;if(!n&&l&&(d=NG(e,t,o,i.index)),d!==null){let u=d.__ngLastListenerFn__||d;u.__ngNextListenerFn__=s,d.__ngLastListenerFn__=s,c=!0}else{let u=to(i,t),f=n?n(u):u;pz(t,f,o,a);let h=r.listen(f,o,a);if(!FG(o)){let p=n?v=>n(Cr(v[i.index])):i.index;QA(p,e,t,o,a,h,!1)}}return c}function FG(i){return i.startsWith("animation")||i.startsWith("transition")}function NG(i,e,t,n){let r=i.cleanup;if(r!=null)for(let o=0;o<r.length-1;o+=2){let s=r[o];if(s===t&&r[o+1]===n){let a=e[eu],l=r[o+2];return a&&a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function QA(i,e,t,n,r,o,s){let a=e.firstCreatePass?GS(e):null,l=VS(t),c=l.length;l.push(r,o),a&&a.push(n,i,c,(c+1)*(s?-1:1))}function RP(i,e,t,n,r,o){let s=e[t],a=e[qe],c=a.data[t].outputs[n],u=s[c].subscribe(o);QA(i.index,a,e,r,o,u,!0)}var z1=Symbol("BINDING");var V1=class extends H0{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=Zs(e);return new pu(t,this.ngModule)}};function LG(i){return Object.keys(i).map(e=>{let[t,n,r]=i[e],o={propName:t,templateName:e,isSignal:(n&I0.SignalBased)!==0};return r&&(o.transform=r),o})}function BG(i){return Object.keys(i).map(e=>({propName:i[e],templateName:e}))}function UG(i,e,t){let n=e instanceof Mi?e:e?.injector;return n&&i.getStandaloneInjector!==null&&(n=i.getStandaloneInjector(n)||n),n?new cu(t,n):t}function zG(i){let e=i.get(Dc,null);if(e===null)throw new Ye(407,!1);let t=i.get(YA,null),n=i.get(as,null);return{rendererFactory:e,sanitizer:t,changeDetectionScheduler:n,ngReflect:!1}}function VG(i,e){let t=eO(i);return SC(e,t,t==="svg"?FS:t==="math"?RI:null)}function eO(i){return(i.selectors[0][0]||"div").toLowerCase()}var pu=class extends G0{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=LG(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=BG(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=rV(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,o,s){en(Ht.DynamicComponentStart);let a=at(null);try{let l=this.componentDef,c=GG(n,l,s,o),d=UG(l,r||this.ngModule,e),u=zG(d),f=u.rendererFactory.createRenderer(null,l),h=n?PV(f,n,l.encapsulation,d):VG(l,f),p=s?.some(kP)||o?.some(m=>typeof m!="function"&&m.bindings.some(kP)),v=DC(null,c,null,512|uA(l),null,null,u,f,d,null,H2(h,d,!0));v[$t]=h,Gg(v);let g=null;try{let m=HC($t,v,2,"#host",()=>c.directiveRegistry,!0,0);sA(f,h,m),fu(h,v),F0(c,v,m),gC(c,m,v),jC(c,m),t!==void 0&&jG(m,this.ngContentSelectors,t),g=wr(m.index,v),v[kn]=g[kn],zC(c,v,null)}catch(m){throw g!==null&&S1(g),S1(v),m}finally{en(Ht.DynamicComponentEnd),Hg()}return new g0(this.componentType,v,!!p)}finally{at(a)}}};function GG(i,e,t,n){let r=i?["ng-version","21.2.0"]:oV(e.selectors[0]),o=null,s=null,a=0;if(t)for(let d of t)a+=d[z1].requiredVars,d.create&&(d.targetIdx=0,(o??=[]).push(d)),d.update&&(d.targetIdx=0,(s??=[]).push(d));if(n)for(let d=0;d<n.length;d++){let u=n[d];if(typeof u!="function")for(let f of u.bindings){a+=f[z1].requiredVars;let h=d+1;f.create&&(f.targetIdx=h,(o??=[]).push(f)),f.update&&(f.targetIdx=h,(s??=[]).push(f))}}let l=[e];if(n)for(let d of n){let u=typeof d=="function"?d:d.type,f=Dg(u);l.push(f)}return TC(0,null,HG(o,s),1,a,l,null,null,null,[r],null)}function HG(i,e){return!i&&!e?null:t=>{if(t&1&&i)for(let n of i)n.create();if(t&2&&e)for(let n of e)n.update()}}function kP(i){let e=i[z1].kind;return e==="input"||e==="twoWay"}var g0=class extends XA{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=Sc(t[qe],$t),this.location=vu(this._tNode,t),this.instance=wr(this._tNode.index,t)[kn],this.hostView=this.changeDetectorRef=new Za(t,void 0),this.componentType=e}setInput(e,t){this._hasInputBindings;let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView,o=UC(n,r[qe],r,e,t);this.previousInputValues.set(e,t);let s=wr(n.index,r);N0(s,1)}get injector(){return new Ec(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function jG(i,e,t){let n=i.projection=[];for(let r=0;r<e.length;r++){let o=t[r];n.push(o!=null&&o.length?Array.from(o):null)}}var Su=(()=>{class i{static __NG_ELEMENT_ID__=WG}return i})();function WG(){let i=yi();return nO(i,ht())}var $G=Su,tO=class extends $G{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return vu(this._hostTNode,this._hostLView)}get injector(){return new Ec(this._hostTNode,this._hostLView)}get parentInjector(){let e=rC(this._hostTNode,this._hostLView);if(n2(e)){let t=a0(e,this._hostLView),n=s0(e),r=t[qe].data[n+8];return new Ec(r,t)}else return new Ec(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=FP(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-Tn}createEmbeddedView(e,t,n){let r,o;typeof n=="number"?r=n:n!=null&&(r=n.index,o=n.injector);let s=Lh(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(t||{},o,s);return this.insertImpl(a,r,Tc(this._hostTNode,s)),a}createComponent(e,t,n,r,o,s,a){let l=e&&!B5(e),c;if(l)c=t;else{let g=t||{};c=g.index,n=g.injector,r=g.projectableNodes,o=g.environmentInjector||g.ngModuleRef,s=g.directives,a=g.bindings}let d=l?e:new pu(Zs(e)),u=n||this.parentInjector;if(!o&&d.ngModule==null){let m=(l?u:this.parentInjector).get(Mi,null);m&&(o=m)}let f=Zs(d.componentType??{}),h=Lh(this._lContainer,f?.id??null),p=h?.firstChild??null,v=d.create(u,r,p,o,s,a);return this.insertImpl(v.hostView,c,Tc(this._hostTNode,h)),v}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,n){let r=e._lView;if(kI(r)){let a=this.indexOf(e);if(a!==-1)this.detach(a);else{let l=r[Vn],c=new tO(l,l[Gi],l[Vn]);c.detach(c.indexOf(e))}}let o=this._adjustIndex(t),s=this._lContainer;return xu(s,r,o,n),e.attachToViewContainerRef(),DS(d1(s),o,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=FP(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),n=Nh(this._lContainer,t);n&&(Sh(d1(this._lContainer),t),R0(n[qe],n))}detach(e){let t=this._adjustIndex(e,-1),n=Nh(this._lContainer,t);return n&&Sh(d1(this._lContainer),t)!=null?new Za(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function FP(i){return i[Eh]}function d1(i){return i[Eh]||(i[Eh]=[])}function nO(i,e){let t,n=e[i.index];return sr(n)?t=n:(t=LA(n,e,null,i),e[i.index]=t,IC(e,t)),iO(t,e,i,n),new tO(t,i,e)}function XG(i,e){let t=i[qt],n=t.createComment(""),r=to(e,i),o=t.parentNode(r);return f0(t,o,n,t.nextSibling(r),!1),n}var iO=rO,WC=()=>!1;function YG(i,e,t){return WC(i,e,t)}function rO(i,e,t,n){if(i[hs])return;let r;t.type&8?r=Cr(n):r=XG(e,t),i[hs]=r}function qG(i,e,t){if(i[hs]&&i[Eo])return!0;let n=t[Hi],r=e.index-$t;if(!n||p2(e)||X2(n,r))return!1;let s=E1(n,r),a=n.data[S0]?.[r],[l,c]=bG(s,a);return i[hs]=l,i[Eo]=c,!0}function KG(i,e,t,n){WC(i,t,e)||rO(i,e,t,n)}function oO(){iO=KG,WC=qG}var G1=class i{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new i(this.queryList)}setDirty(){this.queryList.setDirty()}},H1=class i{queries;constructor(e=[]){this.queries=e}createEmbeddedView(e){let t=e.queries;if(t!==null){let n=e.contentQueries!==null?e.contentQueries[0]:t.length,r=[];for(let o=0;o<n;o++){let s=t.getByIndex(o),a=this.queries[s.indexInDeclarationView];r.push(a.clone())}return new i(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++)lO(e,t).matches!==null&&this.queries[t].setDirty()}},j1=class{flags;read;predicate;constructor(e,t,n=null){this.flags=t,this.read=n,typeof e=="string"?this.predicate=i6(e):this.predicate=e}},W1=class i{queries;constructor(e=[]){this.queries=e}elementStart(e,t){for(let n=0;n<this.queries.length;n++)this.queries[n].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 n=0;n<this.length;n++){let r=t!==null?t.length:0,o=this.getByIndex(n).embeddedTView(e,r);o&&(o.indexInDeclarationView=n,t!==null?t.push(o):t=[o])}return t!==null?new i(t):null}template(e,t){for(let n=0;n<this.queries.length;n++)this.queries[n].template(e,t)}getByIndex(e){return this.queries[e]}get length(){return this.queries.length}track(e){this.queries.push(e)}},$1=class i{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 i(this.metadata)):null}isApplyingToNode(e){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let t=this._declarationNodeIndex,n=e.parent;for(;n!==null&&n.type&8&&n.index!==t;)n=n.parent;return t===(n!==null?n.index:-1)}return this._appliesToNextNode}matchTNode(e,t){let n=this.metadata.predicate;if(Array.isArray(n))for(let r=0;r<n.length;r++){let o=n[r];this.matchTNodeWithReadOption(e,t,ZG(t,o)),this.matchTNodeWithReadOption(e,t,e0(t,e,o,!1,!1))}else n===hu?t.type&4&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,e0(t,e,n,!1,!1))}matchTNodeWithReadOption(e,t,n){if(n!==null){let r=this.metadata.read;if(r!==null)if(r===Tr||r===Su||r===hu&&t.type&4)this.addMatch(t.index,-2);else{let o=e0(t,e,r,!1,!1);o!==null&&this.addMatch(t.index,o)}else this.addMatch(t.index,n)}}addMatch(e,t){this.matches===null?this.matches=[e,t]:this.matches.push(e,t)}};function ZG(i,e){let t=i.localNames;if(t!==null){for(let n=0;n<t.length;n+=2)if(t[n]===e)return t[n+1]}return null}function JG(i,e){return i.type&11?vu(i,e):i.type&4?L0(i,e):null}function QG(i,e,t,n){return t===-1?JG(e,i):t===-2?e6(i,e,n):Rh(i,i[qe],t,e)}function e6(i,e,t){if(t===Tr)return vu(e,i);if(t===hu)return L0(e,i);if(t===Su)return nO(e,i)}function sO(i,e,t,n){let r=e[ds].queries[n];if(r.matches===null){let o=i.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 d=o[c];a.push(QG(e,d,s[l+1],t.metadata.read))}}r.matches=a}return r.matches}function X1(i,e,t,n){let r=i.queries.getByIndex(t),o=r.matches;if(o!==null){let s=sO(i,e,r,t);for(let a=0;a<o.length;a+=2){let l=o[a];if(l>0)n.push(s[a/2]);else{let c=o[a+1],d=e[-l];for(let u=Tn;u<d.length;u++){let f=d[u];f[ja]===f[Vn]&&X1(f[qe],f,c,n)}if(d[xc]!==null){let u=d[xc];for(let f=0;f<u.length;f++){let h=u[f];X1(h[qe],h,c,n)}}}}}return n}function aO(i,e){return i[ds].queries[e].queryList}function t6(i,e,t){let n=new d0((t&4)===4);return LI(i,e,n,n.destroy),(e[ds]??=new H1).queries.push(new G1(n))-1}function n6(i,e,t){let n=In();return n.firstCreatePass&&(r6(n,new j1(i,e,t),-1),(e&2)===2&&(n.staticViewQueries=!0)),t6(n,ht(),e)}function i6(i){return i.split(",").map(e=>e.trim())}function r6(i,e,t){i.queries===null&&(i.queries=new W1),i.queries.track(new $1(e,t))}function lO(i,e){return i.queries.getByIndex(e)}function o6(i,e){let t=i[qe],n=lO(t,e);return n.crossesNgTemplate?X1(t,i,e,[]):sO(t,i,n,e)}function cO(i,e,t){let n,r=dh(()=>{n._dirtyCounter();let o=a6(n,i);if(e&&o===void 0)throw new Ye(-951,!1);return o});return n=r[Qn],n._dirtyCounter=N(0),n._flatValue=void 0,r}function dO(i){return cO(!0,!1,i)}function uO(i){return cO(!0,!0,i)}function s6(i,e){let t=i[Qn];t._lView=ht(),t._queryIndex=e,t._queryList=aO(t._lView,e),t._queryList.onDirty(()=>t._dirtyCounter.update(n=>n+1))}function a6(i,e){let t=i._lView,n=i._queryIndex;if(t===void 0||n===void 0||t[Ct]&4)return e?void 0:Ei;let r=aO(t,n),o=o6(t,n);return r.reset(o,rz),e?r.first:r._changesDetected||i._flatValue===void 0?i._flatValue=r.toArray():i._flatValue}var Bh=class{};var Uh=class extends Bh{injector;componentFactoryResolver=new V1(this);instance=null;constructor(e){super();let t=new mc([...e.providers,{provide:Bh,useValue:this},{provide:H0,useValue:this.componentFactoryResolver}],e.parent||Jd(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function $C(i,e,t=null){return new Uh({providers:i,parent:e,debugName:t,runEnvironmentInitializers:!0}).injector}var l6=(()=>{class i{_injector;cachedInjectors=new Map;constructor(t){this._injector=t}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t)){let n=Rg(!1,t.type),r=n.length>0?$C([n],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=_e({token:i,providedIn:"environment",factory:()=>new i(We(Mi))})}return i})();function st(i){return Gh(()=>{let e=fO(i),t=fe(R({},e),{decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===oC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&i.dependencies||null,getStandaloneInjector:e.standalone?r=>r.get(l6).getOrCreateStandaloneInjector(t):null,getExternalStyles:null,signals:i.signals??!1,data:i.data||{},encapsulation:i.encapsulation||Do.Emulated,styles:i.styles||Ei,_:null,schemas:i.schemas||null,tView:null,id:""});e.standalone&&Ao("NgStandalone"),hO(t);let n=i.dependencies;return t.directiveDefs=NP(n,c6),t.pipeDefs=NP(n,wS),t.id=f6(t),t})}function c6(i){return Zs(i)||Dg(i)}function ca(i){return Gh(()=>({type:i.type,bootstrap:i.bootstrap||Ei,declarations:i.declarations||Ei,imports:i.imports||Ei,exports:i.exports||Ei,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function d6(i,e){if(i==null)return Ha;let t={};for(let n in i)if(i.hasOwnProperty(n)){let r=i[n],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=I0.None,l=null),t[o]=[n,a,l],e[o]=s}return t}function u6(i){if(i==null)return Ha;let e={};for(let t in i)i.hasOwnProperty(t)&&(e[i[t]]=t);return e}function Zn(i){return Gh(()=>{let e=fO(i);return hO(e),e})}function W0(i){return{type:i.type,name:i.name,factory:null,pure:i.pure!==!1,standalone:i.standalone??!0,onDestroy:i.type.prototype.ngOnDestroy||null}}function fO(i){let e={};return{type:i.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:i.hostBindings||null,hostVars:i.hostVars||0,hostAttrs:i.hostAttrs||null,contentQueries:i.contentQueries||null,declaredInputs:e,inputConfig:i.inputs||Ha,exportAs:i.exportAs||null,standalone:i.standalone??!0,signals:i.signals===!0,selectors:i.selectors||Ei,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,inputs:d6(i.inputs,e),outputs:u6(i.outputs),debugInfo:null}}function hO(i){i.features?.forEach(e=>e(i))}function NP(i,e){return i?()=>{let t=typeof i=="function"?i():i,n=[];for(let r of t){let o=e(r);o!==null&&n.push(o)}return n}:null}function f6(i){let e=0,t=typeof i.consts=="function"?"":i.consts,n=[i.selectors,i.ngContentSelectors,i.hostVars,i.hostAttrs,t,i.vars,i.decls,i.encapsulation,i.standalone,i.signals,i.exportAs,JSON.stringify(i.inputs),JSON.stringify(i.outputs),Object.getOwnPropertyNames(i.type.prototype),!!i.contentQueries,!!i.viewQuery];for(let o of n.join("|"))e=Math.imul(31,e)+o.charCodeAt(0)<<0;return e+=2147483648,"c"+e}function h6(i){return Object.getPrototypeOf(i.prototype).constructor}function Ir(i){let e=h6(i.type),t=!0,n=[i];for(;e;){let r;if(ms(i))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Ye(903,!1);r=e.\u0275dir}if(r){if(t){n.push(r);let s=i;s.inputs=u1(i.inputs),s.declaredInputs=u1(i.declaredInputs),s.outputs=u1(i.outputs);let a=r.hostBindings;a&&b6(i,a);let l=r.viewQuery,c=r.contentQueries;if(l&&g6(i,l),c&&v6(i,c),p6(i,r),bI(i.outputs,r.outputs),ms(r)&&r.data.animation){let d=i.data;d.animation=(d.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(i),a===Ir&&(t=!1)}}e=Object.getPrototypeOf(e)}m6(n)}function p6(i,e){for(let t in e.inputs){if(!e.inputs.hasOwnProperty(t)||i.inputs.hasOwnProperty(t))continue;let n=e.inputs[t];n!==void 0&&(i.inputs[t]=n,i.declaredInputs[t]=e.declaredInputs[t])}}function m6(i){let e=0,t=null;for(let n=i.length-1;n>=0;n--){let r=i[n];r.hostVars=e+=r.hostVars,r.hostAttrs=uu(r.hostAttrs,t=uu(t,r.hostAttrs))}}function u1(i){return i===Ha?{}:i===Ei?[]:i}function g6(i,e){let t=i.viewQuery;t?i.viewQuery=(n,r)=>{e(n,r),t(n,r)}:i.viewQuery=e}function v6(i,e){let t=i.contentQueries;t?i.contentQueries=(n,r,o)=>{e(n,r,o),t(n,r,o)}:i.contentQueries=e}function b6(i,e){let t=i.hostBindings;t?i.hostBindings=(n,r)=>{e(n,r),t(n,r)}:i.hostBindings=e}function pO(i,e,t,n,r,o,s,a){if(t.firstCreatePass){i.mergedAttrs=uu(i.mergedAttrs,i.attrs);let d=i.tView=TC(2,i,r,o,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,t.consts,null);t.queries!==null&&(t.queries.template(t,i),d.queries=t.queries.embeddedTView(i))}a&&(i.flags|=a),iu(i,!1);let l=mO(t,e,i,n);jg()&&RC(t,e,l,i),fu(l,e);let c=LA(l,e,l,i);e[n+$t]=c,IC(e,c),YG(c,i,e)}function y6(i,e,t,n,r,o,s,a,l,c,d){let u=t+$t,f;return e.firstCreatePass?(f=_u(e,u,4,s||null,a||null),Bg()&&qA(e,i,f,no(e.consts,c),FC),e2(e,f)):f=e.data[u],pO(f,i,e,t,n,r,o,l),nu(f)&&F0(e,i,f),c!=null&&qh(i,f,d),f}function zh(i,e,t,n,r,o,s,a,l,c,d){let u=t+$t,f;if(e.firstCreatePass){if(f=_u(e,u,4,s||null,a||null),c!=null){let h=no(e.consts,c);f.localNames=[];for(let p=0;p<h.length;p+=2)f.localNames.push(h[p],-1)}}else f=e.data[u];return pO(f,i,e,t,n,r,o,l),c!=null&&qh(i,f,d),f}function Ja(i,e,t,n,r,o,s,a){let l=ht(),c=In(),d=no(c.consts,o);return y6(l,c,i,e,t,n,r,d,void 0,s,a),Ja}var mO=gO;function gO(i,e,t,n){return ta(!0),e[qt].createComment("")}function x6(i,e,t,n){let r=!E0(e,t);ta(r);let o=e[Hi]?.data[S2]?.[n]??null;if(o!==null&&t.tView!==null&&t.tView.ssrId===null&&(t.tView.ssrId=o),r)return gO(i,e);let s=e[Hi],a=B0(s,i,e,t);w0(s,n,a);let l=mC(s,n);return U0(l,a)}function vO(){mO=x6}var Er=(function(i){return i[i.NOT_STARTED=0]="NOT_STARTED",i[i.IN_PROGRESS=1]="IN_PROGRESS",i[i.COMPLETE=2]="COMPLETE",i[i.FAILED=3]="FAILED",i})(Er||{}),LP=0,_6=1,Kn=(function(i){return i[i.Placeholder=0]="Placeholder",i[i.Loading=1]="Loading",i[i.Complete=2]="Complete",i[i.Error=3]="Error",i})(Kn||{});var S6=0,Kh=1;var C6=4,w6=5;var E6=7,du=8,M6=9,XC=(function(i){return i[i.Manual=0]="Manual",i[i.Playthrough=1]="Playthrough",i})(XC||{});function r0(i,e){let t=D6(i),n=e[t];if(n!==null){for(let r of n)r();e[t]=null}}function T6(i){r0(1,i),r0(0,i),r0(2,i)}function D6(i){let e=C6;return i===1?e=w6:i===2&&(e=M6),e}function bO(i){return i+1}function Cu(i,e){let t=i[qe],n=bO(e.index);return i[n]}function Zh(i,e){let t=bO(e.index);return i.data[t]}function I6(i,e,t){let n=e[qe],r=Zh(n,t);switch(i){case Kn.Complete:return r.primaryTmplIndex;case Kn.Loading:return r.loadingTmplIndex;case Kn.Error:return r.errorTmplIndex;case Kn.Placeholder:return r.placeholderTmplIndex;default:return null}}function BP(i,e){return e===Kn.Placeholder?i.placeholderBlockConfig?.[LP]??null:e===Kn.Loading?i.loadingBlockConfig?.[LP]??null:null}function P6(i){return i.loadingBlockConfig?.[_6]??null}function UP(i,e){if(!i||i.length===0)return e;let t=new Set(i);for(let n of e)t.add(n);return i.length===t.size?i:Array.from(t)}function A6(i,e){let t=e.primaryTmplIndex+$t;return Sc(i,t)}var O6=(()=>{class i{cachedInjectors=new Map;getOrCreateInjector(t,n,r,o){if(!this.cachedInjectors.has(t)){let s=r.length>0?$C(r,n,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=_e({token:i,providedIn:"environment",factory:()=>new i})}return i})();var yO=new Xe("");function f1(i,e,t){return i.get(O6).getOrCreateInjector(e,i,t,"")}function R6(i,e,t){if(i instanceof cu){let r=i.injector,o=i.parentInjector,s=f1(o,e,t);return new cu(r,s)}let n=i.get(Mi);if(n!==i){let r=f1(n,e,t);return new cu(i,r)}return f1(i,e,t)}function wc(i,e,t,n=!1){let r=t[Vn],o=r[qe];if(Wa(r))return;let s=Cu(r,e),a=s[Kh],l=s[E6];if(!(l!==null&&i<l)&&zP(a,i)&&zP(s[S6]??-1,i)){let c=Zh(o,e),u=!n&&!0&&(P6(c)!==null||BP(c,Kn.Loading)!==null||BP(c,Kn.Placeholder))?N6:F6;try{u(i,s,t,e,r)}catch(f){BC(r,f)}}}function k6(i,e){let t=i[Eo]?.findIndex(r=>r.data[M2]===e[Kh])??-1;return{dehydratedView:t>-1?i[Eo][t]:null,dehydratedViewIx:t}}function F6(i,e,t,n,r){en(Ht.DeferBlockStateStart);let o=I6(i,r,n);if(o!==null){e[Kh]=i;let s=r[qe],a=o+$t,l=Sc(s,a),c=0;VC(t,c);let d;if(i===Kn.Complete){let p=Zh(s,n),v=p.providers;v&&v.length>0&&(d=R6(r[xr],p,v))}let{dehydratedView:u,dehydratedViewIx:f}=k6(t,e),h=yu(r,l,null,{injector:d,dehydratedView:u});if(xu(t,h,c,Tc(l,u)),N0(h,2),f>-1&&t[Eo]?.splice(f,1),(i===Kn.Complete||i===Kn.Error)&&Array.isArray(e[du])){for(let p of e[du])p();e[du]=null}}en(Ht.DeferBlockStateEnd)}function zP(i,e){return i<e}function VP(i,e,t){i.loadingPromise.then(()=>{i.loadingState===Er.COMPLETE?wc(Kn.Complete,e,t):i.loadingState===Er.FAILED&&wc(Kn.Error,e,t)})}var N6=null;function YC(i){return typeof i=="function"&&i[Qn]!==void 0}function qC(i){return YC(i)&&typeof i.set=="function"}var KC=new Xe("");function wu(i){return!!i&&typeof i.then=="function"}function ZC(i){return!!i&&typeof i.subscribe=="function"}var xO=new Xe("");var JC=(()=>{class i{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((t,n)=>{this.resolve=t,this.reject=n});appInits=Z(xO,{optional:!0})??[];injector=Z(Ti);constructor(){}runInitializers(){if(this.initialized)return;let t=[];for(let r of this.appInits){let o=Qd(this.injector,r);if(wu(o))t.push(o);else if(ZC(o)){let s=new Promise((a,l)=>{o.subscribe({complete:a,error:l})});t.push(s)}}let n=()=>{this.done=!0,this.resolve()};Promise.all(t).then(()=>{n()}).catch(r=>{this.reject(r)}),t.length===0&&n(),this.initialized=!0}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Eu=new Xe("");function _O(){H_(()=>{let i="";throw new Ye(600,i)})}function SO(i){return i.isBoundToModule}var L6=10;var Pr=(()=>{class i{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=Z(na);afterRenderManager=Z(AC);zonelessEnabled=Z(Ih);rootEffectScheduler=Z($g);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new wo;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=Z(qa);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(rr(t=>!t))}constructor(){Z(aa,{optional:!0})}whenStable(){let t;return new Promise(n=>{t=this.isStable.subscribe({next:r=>{r&&n()}})}).finally(()=>{t.unsubscribe()})}_injector=Z(Mi);_rendererFactory=null;get injector(){return this._injector}bootstrap(t,n){return this.bootstrapImpl(t,n)}bootstrapImpl(t,n,r=Ti.NULL){return this._injector.get(or).run(()=>{en(Ht.BootstrapComponentStart);let s=t instanceof G0;if(!this._injector.get(JC).done){let p="";throw new Ye(405,p)}let l;s?l=t:l=this._injector.get(H0).resolveComponentFactory(t),this.componentTypes.push(l.componentType);let c=SO(l)?void 0:this._injector.get(Bh),d=n||l.selector,u=l.create(r,[],d,c),f=u.location.nativeElement,h=u.injector.get(KC,null);return h?.registerApplication(f),u.onDestroy(()=>{this.detachView(u.hostView),Oh(this.components,u),h?.unregisterApplication(f)}),this._loadComponent(u),en(Ht.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){en(Ht.ChangeDetectionStart),this.tracingSnapshot!==null?this.tracingSnapshot.run(P0.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw en(Ht.ChangeDetectionEnd),new Ye(101,!1);let t=at(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,at(t),this.afterTick.next(),en(Ht.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Dc,null,{optional:!0}));let t=0;for(;this.dirtyFlags!==0&&t++<L6;){en(Ht.ChangeDetectionSyncStart);try{this.synchronizeOnce()}finally{en(Ht.ChangeDetectionSyncEnd)}}}synchronizeOnce(){this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush());let t=!1;if(this.dirtyFlags&7){let n=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:r}of this.allViews){if(!n&&!Mh(r))continue;let o=n&&!this.zonelessEnabled?0:1;RA(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})=>Mh(t))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(t){let n=t;this._views.push(n),n.attachToAppRef(this)}detachView(t){let n=t;Oh(this._views,n),n.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView);try{this.tick()}catch(r){this.internalErrorHandler(r)}this.components.push(t),this._injector.get(Eu,[]).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),()=>Oh(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new Ye(406,!1);let t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Oh(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function CO(){let i,e;return{promise:new Promise((n,r)=>{i=n,e=r}),resolve:i,reject:e}}function wO(i,e,t){let n=e[xr],r=e[qe];if(i.loadingState!==Er.NOT_STARTED)return i.loadingPromise??Promise.resolve();let o=Cu(e,t),s=A6(r,i);i.loadingState=Er.IN_PROGRESS,r0(1,o);let a=i.dependencyResolverFn,l=n.get(su).add();return a?(i.loadingPromise=Promise.allSettled(a()).then(c=>{let d=!1,u=[],f=[];for(let h of c)if(h.status==="fulfilled"){let p=h.value,v=Zs(p)||Dg(p);if(v)u.push(v);else{let g=wS(p);g&&f.push(g)}}else{d=!0;break}if(d){if(i.loadingState=Er.FAILED,i.errorTmplIndex===null){let p=new Ye(-750,!1);BC(e,p)}}else{i.loadingState=Er.COMPLETE;let h=s.tView;if(u.length>0){h.directiveRegistry=UP(h.directiveRegistry,u);let p=u.map(g=>g.type),v=Rg(!1,...p);i.providers=v}f.length>0&&(h.pipeRegistry=UP(h.pipeRegistry,f))}}),i.loadingPromise.finally(()=>{i.loadingPromise=null,l()})):(i.loadingPromise=Promise.resolve().then(()=>{i.loadingPromise=null,i.loadingState=Er.COMPLETE,l()}),i.loadingPromise)}function B6(i,e){return e[xr].get(yO,null,{optional:!0})?.behavior!==XC.Manual}function U6(i,e,t){let n=e[qe],r=e[t.index];if(!B6(i,e))return;let o=Cu(e,t),s=Zh(n,t);switch(T6(o),s.loadingState){case Er.NOT_STARTED:wc(Kn.Loading,t,r),wO(s,e,t),s.loadingState===Er.IN_PROGRESS&&VP(s,t,r);break;case Er.IN_PROGRESS:wc(Kn.Loading,t,r),VP(s,t,r);break;case Er.COMPLETE:wc(Kn.Complete,t,r);break;case Er.FAILED:wc(Kn.Error,t,r);break;default:}}async function EO(i,e,t){let n=i.get(C0);if(n.hydrating.has(e))return;let{parentBlockPromise:o,hydrationQueue:s}=Sz(e,i);if(s.length===0)return;o!==null&&s.shift(),G6(n,s),o!==null&&await o;let a=s[0];n.has(a)?await GP(i,s,t):n.awaitParentBlock(a,async()=>await GP(i,s,t))}async function GP(i,e,t){let n=i.get(C0),r=n.hydrating,o=i.get(qa),s=o.add();for(let l=0;l<e.length;l++){let c=e[l],d=n.get(c);if(d!=null){if(await j6(d),await H6(i),z6(d)){gG(d),HP(e.slice(l),n);break}r.get(c).resolve()}else{V6(l,e,n),HP(e.slice(l),n);break}}let a=e[e.length-1];await r.get(a)?.promise,o.remove(s),t&&t(e),vG(n.get(a),e,n,i.get(Pr))}function z6(i){return Cu(i.lView,i.tNode)[Kh]===Kn.Error}function V6(i,e,t){let n=i-1,r=n>-1?t.get(e[n]):null;r&&V0(r.lContainer)}function HP(i,e){let t=e.hydrating;for(let n in i)t.get(n)?.reject();e.cleanup(i)}function G6(i,e){for(let t of e)i.hydrating.set(t,CO())}function H6(i){return new Promise(e=>A0(e,{injector:i}))}async function j6(i){let{tNode:e,lView:t}=i,n=Cu(t,e);return new Promise(r=>{W6(n,r),U6(2,t,e)})}function W6(i,e){Array.isArray(i[du])||(i[du]=[]),i[du].push(e)}function Pn(i,e,t,n){let r=ht(),o=$a();if(Mr(r,o,e)){let s=In(),a=Th();BV(a,r,i,e,t,n)}return Pn}function Qa(){return ht()[li][kn]}var Y1=class{destroy(e){}updateValue(e,t){}swap(e,t){let n=Math.min(e,t),r=Math.max(e,t),o=this.detach(r);if(r-n>1){let s=this.detach(n);this.attach(n,o),this.attach(r,s)}else this.attach(n,o)}move(e,t){this.attach(t,this.detach(e))}};function h1(i,e,t,n,r){return i===t&&Object.is(e,n)?1:Object.is(r(i,e),r(t,n))?-1:0}function $6(i,e,t,n){let r,o,s=0,a=i.length-1,l=void 0;if(Array.isArray(e)){at(n);let c=e.length-1;for(at(null);s<=a&&s<=c;){let d=i.at(s),u=e[s],f=h1(s,d,s,u,t);if(f!==0){f<0&&i.updateValue(s,u),s++;continue}let h=i.at(a),p=e[c],v=h1(a,h,c,p,t);if(v!==0){v<0&&i.updateValue(a,p),a--,c--;continue}let g=t(s,d),m=t(a,h),b=t(s,u);if(Object.is(b,m)){let y=t(c,p);Object.is(y,g)?(i.swap(s,a),i.updateValue(a,p),c--,a--):i.move(a,s),i.updateValue(s,u),s++;continue}if(r??=new v0,o??=WP(i,s,a,t),q1(i,r,s,b))i.updateValue(s,u),s++,a++;else if(o.has(b))r.set(g,i.detach(s)),a--;else{let y=i.create(s,e[s]);i.attach(s,y),s++,a++}}for(;s<=c;)jP(i,r,t,s,e[s]),s++}else if(e!=null){at(n);let c=e[Symbol.iterator]();at(null);let d=c.next();for(;!d.done&&s<=a;){let u=i.at(s),f=d.value,h=h1(s,u,s,f,t);if(h!==0)h<0&&i.updateValue(s,f),s++,d=c.next();else{r??=new v0,o??=WP(i,s,a,t);let p=t(s,f);if(q1(i,r,s,p))i.updateValue(s,f),s++,a++,d=c.next();else if(!o.has(p))i.attach(s,i.create(s,f)),s++,a++,d=c.next();else{let v=t(s,u);r.set(v,i.detach(s)),a--}}}for(;!d.done;)jP(i,r,t,i.length,d.value),d=c.next()}for(;s<=a;)i.destroy(i.detach(a--));r?.forEach(c=>{i.destroy(c)})}function q1(i,e,t,n){return e!==void 0&&e.has(n)?(i.attach(t,e.get(n)),e.delete(n),!0):!1}function jP(i,e,t,n,r){if(q1(i,e,n,t(n,r)))i.updateValue(n,r);else{let o=i.create(n,r);i.attach(n,o)}}function WP(i,e,t,n){let r=new Set;for(let o=e;o<=t;o++)r.add(n(o,i.at(o)));return r}var v0=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 n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function pe(i,e,t,n,r,o,s,a){Ao("NgControlFlow");let l=ht(),c=In(),d=no(c.consts,o);return zh(l,c,i,e,t,n,r,d,256,s,a),QC}function QC(i,e,t,n,r,o,s,a){Ao("NgControlFlow");let l=ht(),c=In(),d=no(c.consts,o);return zh(l,c,i,e,t,n,r,d,512,s,a),QC}function me(i,e){Ao("NgControlFlow");let t=ht(),n=$a(),r=t[n]!==Dr?t[n]:-1,o=r!==-1?b0(t,$t+r):void 0,s=0;if(Mr(t,n,i)){let a=at(null);try{if(o!==void 0&&VC(o,s),i!==-1){let l=$t+i,c=b0(t,l),d=Q1(t[qe],l),u=WA(c,d,t),f=yu(t,d,e,{dehydratedView:u});xu(c,f,s,Tc(d,u))}}finally{at(a)}}else if(o!==void 0){let a=BA(o,s);a!==void 0&&(a[kn]=e)}}var K1=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-Tn}};function Mu(i){return i}function ew(i,e){return e}var Z1=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function Tt(i,e,t,n,r,o,s,a,l,c,d,u,f){Ao("NgControlFlow");let h=ht(),p=In(),v=l!==void 0,g=ht(),m=a?s.bind(g[li][kn]):s,b=new Z1(v,m);g[$t+i]=b,zh(h,p,i+1,e,t,n,r,no(p.consts,o),256),v&&zh(h,p,i+2,l,c,d,u,no(p.consts,f),512)}var J1=class extends Y1{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n}get length(){return this.lContainer.length-Tn}at(e){return this.getLView(e)[kn].$implicit}attach(e,t){let n=t[Hi];this.needsIndexUpdate||=e!==this.length,xu(this.lContainer,t,e,Tc(this.templateTNode,n)),X6(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,Y6(this.lContainer,e),q6(this.lContainer,e)}create(e,t){let n=Lh(this.lContainer,this.templateTNode.tView.ssrId);return yu(this.hostLView,this.templateTNode,new K1(this.lContainer,t,e),{dehydratedView:n})}destroy(e){R0(e[qe],e)}updateValue(e,t){this.getLView(e)[kn].$implicit=t}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[kn].$index=e}getLView(e){return K6(this.lContainer,e)}};function Dt(i){let e=at(null),t=ea();try{let n=ht(),r=n[qe],o=n[t],s=t+1,a=b0(n,s);if(o.liveCollection===void 0){let c=Q1(r,s);o.liveCollection=new J1(a,n,c)}else o.liveCollection.reset();let l=o.liveCollection;if($6(l,i,o.trackByFn,e),l.updateIndexes(),o.hasEmptyBlock){let c=$a(),d=l.length===0;if(Mr(n,c,d)){let u=t+2,f=b0(n,u);if(d){let h=Q1(r,u),p=WA(f,h,n),v=yu(n,h,void 0,{dehydratedView:p});xu(f,v,0,Tc(h,p))}else r.firstUpdatePass&&z0(f),VC(f,0)}}}finally{at(e)}}function b0(i,e){return i[e]}function X6(i,e){if(i.length<=Tn)return;let t=Tn+e,n=i[t],r=n?n[fs]:void 0;if(n&&r&&r.detachedLeaveAnimationFns&&r.detachedLeaveAnimationFns.length>0){let o=n[xr];pV(o,r),Ka.delete(n[us]),r.detachedLeaveAnimationFns=void 0}}function Y6(i,e){if(i.length<=Tn)return;let t=Tn+e,n=i[t],r=n?n[fs]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function q6(i,e){return Nh(i,e)}function K6(i,e){return BA(i,e)}function Q1(i,e){return Sc(i,e)}function te(i,e,t){let n=ht(),r=$a();if(Mr(n,r,e)){let o=In(),s=Th();MA(s,n,i,e,n[qt],t)}return te}function eC(i,e,t,n,r){UC(e,i,t,r?"class":"style",n)}function M(i,e,t,n){let r=ht(),o=r[qe],s=i+$t,a=o.firstCreatePass?HC(s,r,2,e,FC,Bg(),t,n):o.data[s];if(NC(a,r,i,e,tw),nu(a)){let l=r[qe];F0(l,r,a),gC(l,a,r)}return n!=null&&qh(r,a),M}function I(){let i=In(),e=yi(),t=LC(e);return i.firstCreatePass&&jC(i,t),jS(t)&&WS(),HS(),t.classesWithoutHost!=null&&j5(t)&&eC(i,t,ht(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&W5(t)&&eC(i,t,ht(),t.stylesWithoutHost,!1),I}function K(i,e,t,n){return M(i,e,t,n),I(),K}function ie(i,e,t,n){let r=ht(),o=r[qe],s=i+$t,a=o.firstCreatePass?OG(s,o,2,e,t,n):o.data[s];return NC(a,r,i,e,tw),n!=null&&qh(r,a),ie}function de(){let i=yi(),e=LC(i);return jS(e)&&WS(),HS(),de}function mt(i,e,t,n){return ie(i,e,t,n),de(),mt}var tw=(i,e,t,n,r)=>(ta(!0),SC(e[qt],n,QS()));function Z6(i,e,t,n,r){let o=!E0(e,t);if(ta(o),o)return SC(e[qt],n,QS());let s=e[Hi],a=B0(s,i,e,t);return $2(s,r)&&w0(s,r,a.nextSibling),s&&(f2(t)||h2(a))&&ps(t)&&(zI(t),oA(a)),a}function MO(){tw=Z6}function nw(i,e,t){let n=ht(),r=n[qe],o=i+$t,s=r.firstCreatePass?HC(o,n,8,"ng-container",FC,Bg(),e,t):r.data[o];if(NC(s,n,i,"ng-container",TO),nu(s)){let a=n[qe];F0(a,n,s),gC(a,s,n)}return t!=null&&qh(n,s),nw}function iw(){let i=In(),e=yi(),t=LC(e);return i.firstCreatePass&&jC(i,t),iw}function Ar(i,e,t){return nw(i,e,t),iw(),Ar}var TO=(i,e,t,n,r)=>(ta(!0),iA(e[qt],""));function J6(i,e,t,n,r){let o,s=!E0(e,t);if(ta(s),s)return iA(e[qt],"");let a=e[Hi],l=B0(a,i,e,t),c=xz(a,r);return w0(a,r,l),o=U0(c,l),o}function DO(){TO=J6}function Be(){return ht()}function ci(i,e,t){let n=ht(),r=$a();if(Mr(n,r,e)){let o=In(),s=Th();TA(s,n,i,e,n[qt],t)}return ci}var Ph=void 0;function Q6(i){let e=Math.floor(Math.abs(i)),t=i.toString().replace(/^[^.]*\.?/,"").length;return e===1&&t===0?1:5}var e8=["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"]],Ph,[["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"]],Ph,[["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}",Ph,Ph,Ph],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",Q6],p1={};function $0(i){let e=t8(i),t=$P(e);if(t)return t;let n=e.split("-")[0];if(t=$P(n),t)return t;if(n==="en")return e8;throw new Ye(701,!1)}function $P(i){return i in p1||(p1[i]=Qr.ng&&Qr.ng.common&&Qr.ng.common.locales&&Qr.ng.common.locales[i]),p1[i]}var Pc=(function(i){return i[i.LocaleId=0]="LocaleId",i[i.DayPeriodsFormat=1]="DayPeriodsFormat",i[i.DayPeriodsStandalone=2]="DayPeriodsStandalone",i[i.DaysFormat=3]="DaysFormat",i[i.DaysStandalone=4]="DaysStandalone",i[i.MonthsFormat=5]="MonthsFormat",i[i.MonthsStandalone=6]="MonthsStandalone",i[i.Eras=7]="Eras",i[i.FirstDayOfWeek=8]="FirstDayOfWeek",i[i.WeekendRange=9]="WeekendRange",i[i.DateFormat=10]="DateFormat",i[i.TimeFormat=11]="TimeFormat",i[i.DateTimeFormat=12]="DateTimeFormat",i[i.NumberSymbols=13]="NumberSymbols",i[i.NumberFormats=14]="NumberFormats",i[i.CurrencyCode=15]="CurrencyCode",i[i.CurrencySymbol=16]="CurrencySymbol",i[i.CurrencyName=17]="CurrencyName",i[i.Currencies=18]="Currencies",i[i.Directionality=19]="Directionality",i[i.PluralCase=20]="PluralCase",i[i.ExtraData=21]="ExtraData",i})(Pc||{});function t8(i){return i.toLowerCase().replace(/_/g,"-")}var Jh="en-US";var n8=Jh;function IO(i){typeof i=="string"&&(n8=i.toLowerCase().replace(/_/g,"-"))}function oe(i,e,t){let n=ht(),r=In(),o=yi();return PO(r,n,n[qt],o,i,e,t),oe}function Gn(i,e,t){let n=ht(),r=In(),o=yi();return(o.type&3||t)&&JA(o,r,n,t,n[qt],i,e,i0(o,n,e)),Gn}function PO(i,e,t,n,r,o,s){let a=!0,l=null;if((n.type&3||s)&&(l??=i0(n,e,o),JA(n,i,e,s,t,r,o,l)&&(a=!1)),a){let c=n.outputs?.[r],d=n.hostDirectiveOutputs?.[r];if(d&&d.length)for(let u=0;u<d.length;u+=2){let f=d[u],h=d[u+1];l??=i0(n,e,o),RP(n,e,f,h,r,l)}if(c&&c.length)for(let u of c)l??=i0(n,e,o),RP(n,e,u,r,r,l)}}function E(i=1){return JI(i)}function i8(i,e){let t=null,n=Qz(i);for(let r=0;r<e.length;r++){let o=e[r];if(o==="*"){t=r;continue}if(n===null?dA(i,o,!0):nV(n,o))return r}return t}function xi(i){let e=ht()[li][Gi];if(!e.projection){let t=i?i.length:1,n=e.projection=wI(t,null),r=n.slice(),o=e.child;for(;o!==null;){if(o.type!==128){let s=i?i8(o,i):0;s!==null&&(r[s]?r[s].projectionNext=o:n[s]=o,r[s]=o)}o=o.next}}}function _i(i,e=0,t,n,r,o){let s=ht(),a=In(),l=n?i+1:null;l!==null&&zh(s,a,l,n,r,o,null,t);let c=_u(a,$t+i,16,null,t||null);c.projection===null&&(c.projection=e),YS();let u=!s[Hi]||Ug();s[li][Gi].projection[c.projection]===null&&l!==null?r8(s,a,l):u&&!$h(c)&&TV(a,s,c)}function r8(i,e,t){let n=$t+t,r=e.data[n],o=i[n],s=Lh(o,r.tView.ssrId),a=yu(i,r,void 0,{dehydratedView:s});xu(o,a,0,Tc(r,s))}function el(i,e,t,n){return s6(i,n6(e,t,n)),el}function Ac(i=1){Vg(YI()+i)}function io(i){let e=GI();return Fg(e,$t+i)}function Zg(i,e){return i<<17|e<<2}function Ic(i){return i>>17&32767}function o8(i){return(i&2)==2}function s8(i,e){return i&131071|e<<17}function tC(i){return i|2}function mu(i){return(i&131068)>>2}function m1(i,e){return i&-131069|e<<2}function a8(i){return(i&1)===1}function nC(i){return i|1}function l8(i,e,t,n,r,o){let s=o?e.classBindings:e.styleBindings,a=Ic(s),l=mu(s);i[n]=t;let c=!1,d;if(Array.isArray(t)){let u=t;d=u[1],(d===null||Zd(u,d)>0)&&(c=!0)}else d=t;if(r)if(l!==0){let f=Ic(i[a+1]);i[n+1]=Zg(f,a),f!==0&&(i[f+1]=m1(i[f+1],n)),i[a+1]=s8(i[a+1],n)}else i[n+1]=Zg(a,0),a!==0&&(i[a+1]=m1(i[a+1],n)),a=n;else i[n+1]=Zg(l,0),a===0?a=n:i[l+1]=m1(i[l+1],n),l=n;c&&(i[n+1]=tC(i[n+1])),XP(i,d,n,!0),XP(i,d,n,!1),c8(e,d,i,n,o),s=Zg(a,l),o?e.classBindings=s:e.styleBindings=s}function c8(i,e,t,n,r){let o=r?i.residualClasses:i.residualStyles;o!=null&&typeof e=="string"&&Zd(o,e)>=0&&(t[n+1]=nC(t[n+1]))}function XP(i,e,t,n){let r=i[t+1],o=e===null,s=n?Ic(r):mu(r),a=!1;for(;s!==0&&(a===!1||o);){let l=i[s],c=i[s+1];d8(l,e)&&(a=!0,i[s+1]=n?nC(c):tC(c)),s=n?Ic(c):mu(c)}a&&(i[t+1]=n?tC(r):nC(r))}function d8(i,e){return i===null||e==null||(Array.isArray(i)?i[1]:i)===e?!0:Array.isArray(i)&&typeof e=="string"?Zd(i,e)>=0:!1}var To={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function u8(i){return i.substring(To.key,To.keyEnd)}function f8(i){return h8(i),AO(i,OO(i,0,To.textEnd))}function AO(i,e){let t=To.textEnd;return t===e?-1:(e=To.keyEnd=p8(i,To.key=e,t),OO(i,e,t))}function h8(i){To.key=0,To.keyEnd=0,To.value=0,To.valueEnd=0,To.textEnd=i.length}function OO(i,e,t){for(;e<t&&i.charCodeAt(e)<=32;)e++;return e}function p8(i,e,t){for(;e<t&&i.charCodeAt(e)>32;)e++;return e}function ro(i,e,t){return RO(i,e,t,!1),ro}function ft(i,e){return RO(i,e,null,!0),ft}function oo(i){g8(S8,m8,i,!0)}function m8(i,e){for(let t=f8(e);t>=0;t=AO(e,t))Ag(i,u8(e),!0)}function RO(i,e,t,n){let r=ht(),o=In(),s=KS(2);if(o.firstUpdatePass&&FO(o,i,s,n),e!==Dr&&Mr(r,s,e)){let a=o.data[ea()];NO(o,a,r,r[qt],i,r[s+1]=w8(e,t),n,s)}}function g8(i,e,t,n){let r=In(),o=KS(2);r.firstUpdatePass&&FO(r,null,o,n);let s=ht();if(t!==Dr&&Mr(s,o,t)){let a=r.data[ea()];if(LO(a,n)&&!kO(r,o)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;l!==null&&(t=Eg(l,t||"")),eC(r,a,s,t,n)}else C8(r,a,s,s[qt],s[o+1],s[o+1]=_8(i,e,t),n,o)}}function kO(i,e){return e>=i.expandoStartIndex}function FO(i,e,t,n){let r=i.data;if(r[t+1]===null){let o=r[ea()],s=kO(i,t);LO(o,n)&&e===null&&!s&&(e=!1),e=v8(r,o,e,n),l8(r,o,e,t,s,n)}}function v8(i,e,t,n){let r=XI(i),o=n?e.residualClasses:e.residualStyles;if(r===null)(n?e.classBindings:e.styleBindings)===0&&(t=g1(null,i,e,t,n),t=Vh(t,e.attrs,n),o=null);else{let s=e.directiveStylingLast;if(s===-1||i[s]!==r)if(t=g1(r,i,e,t,n),o===null){let l=b8(i,e,n);l!==void 0&&Array.isArray(l)&&(l=g1(null,i,e,l[1],n),l=Vh(l,e.attrs,n),y8(i,e,n,l))}else o=x8(i,e,n)}return o!==void 0&&(n?e.residualClasses=o:e.residualStyles=o),t}function b8(i,e,t){let n=t?e.classBindings:e.styleBindings;if(mu(n)!==0)return i[Ic(n)]}function y8(i,e,t,n){let r=t?e.classBindings:e.styleBindings;i[Ic(r)]=n}function x8(i,e,t){let n,r=e.directiveEnd;for(let o=1+e.directiveStylingLast;o<r;o++){let s=i[o].hostAttrs;n=Vh(n,s,t)}return Vh(n,e.attrs,t)}function g1(i,e,t,n,r){let o=null,s=t.directiveEnd,a=t.directiveStylingLast;for(a===-1?a=t.directiveStart:a++;a<s&&(o=e[a],n=Vh(n,o.hostAttrs,r),o!==i);)a++;return i!==null&&(t.directiveStylingLast=a),n}function Vh(i,e,t){let n=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===n&&(Array.isArray(i)||(i=i===void 0?[]:["",i]),Ag(i,s,t?!0:e[++o]))}return i===void 0?null:i}function _8(i,e,t){if(t==null||t==="")return Ei;let n=[],r=Io(t);if(Array.isArray(r))for(let o=0;o<r.length;o++)i(n,r[o],!0);else if(r instanceof Set)for(let o of r)i(n,o,!0);else if(typeof r=="object")for(let o in r)r.hasOwnProperty(o)&&i(n,o,r[o]);else typeof r=="string"&&e(n,r);return n}function S8(i,e,t){let n=String(e);n!==""&&!n.includes(" ")&&Ag(i,n,t)}function C8(i,e,t,n,r,o,s,a){r===Dr&&(r=Ei);let l=0,c=0,d=0<r.length?r[0]:null,u=0<o.length?o[0]:null;for(;d!==null||u!==null;){let f=l<r.length?r[l+1]:void 0,h=c<o.length?o[c+1]:void 0,p=null,v;d===u?(l+=2,c+=2,f!==h&&(p=u,v=h)):u===null||d!==null&&d<u?(l+=2,p=d):(c+=2,p=u,v=h),p!==null&&NO(i,e,t,n,p,v,s,a),d=l<r.length?r[l]:null,u=c<o.length?o[c]:null}}function NO(i,e,t,n,r,o,s,a){if(!(e.type&3))return;let l=i.data,c=l[a+1],d=a8(c)?YP(l,e,t,r,mu(c),s):void 0;if(!y0(d)){y0(o)||o8(c)&&(o=YP(l,null,t,r,a,s));let u=NS(ea(),t);IV(n,s,u,r,o)}}function YP(i,e,t,n,r,o){let s=e===null,a;for(;r>0;){let l=i[r],c=Array.isArray(l),d=c?l[1]:l,u=d===null,f=t[r+1];f===Dr&&(f=u?Ei:void 0);let h=u?Og(f,n):d===n?f:void 0;if(c&&!y0(h)&&(h=Og(l,n)),y0(h)&&(a=h,s))return a;let p=i[r+1];r=s?Ic(p):mu(p)}if(e!==null){let l=o?e.residualClasses:e.residualStyles;l!=null&&(a=Og(l,n))}return a}function y0(i){return i!==void 0}function w8(i,e){return i==null||i===""||(typeof e=="string"?i=i+e:typeof i=="object"&&(i=wg(Io(i)))),i}function LO(i,e){return(i.flags&(e?8:16))!==0}function F(i,e=""){let t=ht(),n=In(),r=i+$t,o=n.firstCreatePass?_u(n,r,1,e,null):n.data[r],s=BO(n,t,o,e);t[r]=s,jg()&&RC(n,t,s,o),iu(o,!1)}var BO=(i,e,t,n)=>(ta(!0),nA(e[qt],n));function E8(i,e,t,n){let r=!E0(e,t);if(ta(r),r)return nA(e[qt],n);let o=e[Hi];return B0(o,i,e,t)}function UO(){BO=E8}function zO(i,e,t,n=""){return Mr(i,$a(),t)?e+_h(t)+n:Dr}function $e(i){return Bt("",i),$e}function Bt(i,e,t){let n=ht(),r=zO(n,i,e,t);return r!==Dr&&M8(n,ea(),r),Bt}function M8(i,e,t){let n=NS(e,i);Wz(i[qt],n,t)}function Oc(i,e,t){qC(e)&&(e=e());let n=ht(),r=$a();if(Mr(n,r,e)){let o=In(),s=Th();MA(s,n,i,e,n[qt],t)}return Oc}function ys(i,e){let t=qC(i);return t&&i.set(e),t}function Qh(i,e){let t=ht(),n=In(),r=yi();return PO(n,t,t[qt],r,i,e),Qh}function X0(i,e,t=""){return zO(ht(),i,e,t)}function qP(i,e,t){let n=In();n.firstCreatePass&&VO(e,n.data,n.blueprint,ms(i),t)}function VO(i,e,t,n,r){if(i=bi(i),Array.isArray(i))for(let o=0;o<i.length;o++)VO(i[o],e,t,n,r);else{let o=In(),s=ht(),a=yi(),l=pc(i)?i:bi(i.provide),c=AS(i),d=a.providerIndexes&1048575,u=a.directiveStart,f=a.providerIndexes>>20;if(pc(i)||!i.multi){let h=new Mc(c,r,jt,null),p=b1(l,e,r?d:d+f,u);p===-1?(x1(c0(a,s),o,l),v1(o,i,e.length),e.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),t.push(h),s.push(h)):(t[p]=h,s[p]=h)}else{let h=b1(l,e,d+f,u),p=b1(l,e,d,d+f),v=h>=0&&t[h],g=p>=0&&t[p];if(r&&!g||!r&&!v){x1(c0(a,s),o,l);let m=I8(r?D8:T8,t.length,r,n,c,i);!r&&g&&(t[p].providerFactory=m),v1(o,i,e.length,0),e.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),t.push(m),s.push(m)}else{let m=GO(t[r?p:h],c,!r&&n);v1(o,i,h>-1?h:p,m)}!r&&n&&g&&t[p].componentProviders++}}}function v1(i,e,t,n){let r=pc(e),o=PI(e);if(r||o){let l=(o?bi(e.useClass):e).prototype.ngOnDestroy;if(l){let c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&e.multi){let d=c.indexOf(t);d===-1?c.push(t,[n,l]):c[d+1].push(n,l)}else c.push(t,l)}}}function GO(i,e,t){return t&&i.componentProviders++,i.multi.push(e)-1}function b1(i,e,t,n){for(let r=t;r<n;r++)if(e[r]===i)return r;return-1}function T8(i,e,t,n,r){return iC(this.multi,[])}function D8(i,e,t,n,r){let o=this.multi,s;if(this.providerFactory){let a=this.providerFactory.componentProviders,l=Rh(n,n[qe],this.providerFactory.index,r);s=l.slice(0,a),iC(o,s);for(let c=a;c<l.length;c++)s.push(l[c])}else s=[],iC(o,s);return s}function iC(i,e){for(let t=0;t<i.length;t++){let n=i[t];e.push(n())}return e}function I8(i,e,t,n,r,o){let s=new Mc(i,t,jt,null);return s.multi=[],s.index=e,s.componentProviders=0,GO(s,r,n&&!t),s}function so(i,e){return t=>{t.providersResolver=(n,r)=>qP(n,r?r(i):i,!1),e&&(t.viewProvidersResolver=(n,r)=>qP(n,r?r(e):e,!0))}}function rw(i,e){let t=ru()+i,n=ht();return n[t]===Dr?j0(n,t,e()):RG(n,t)}function xs(i,e,t){return P8(ht(),ru(),i,e,t)}function Y0(i,e,t,n){return HO(ht(),ru(),i,e,t,n)}function ow(i,e){let t=i[e];return t===Dr?void 0:t}function P8(i,e,t,n,r,o){let s=e+t;return Mr(i,s,r)?j0(i,s+1,o?n.call(o,r):n(r)):ow(i,s+1)}function HO(i,e,t,n,r,o,s){let a=e+t;return ZA(i,a,r,o)?j0(i,a+2,s?n.call(s,r,o):n(r,o)):ow(i,a+2)}function A8(i,e,t,n,r,o,s,a){let l=e+t;return kG(i,l,r,o,s)?j0(i,l+3,a?n.call(a,r,o,s):n(r,o,s)):ow(i,l+3)}function Di(i,e){let t=In(),n,r=i+$t;t.firstCreatePass?(n=O8(e,t.pipeRegistry),t.data[r]=n,n.onDestroy&&(t.destroyHooks??=[]).push(r,n.onDestroy)):n=t.data[r];let o=n.factory||(n.factory=za(n.type,!0)),s,a=Ui(jt);try{let l=l0(!1),c=o();return l0(l),LS(t,ht(),r,c),c}finally{Ui(a)}}function O8(i,e){if(e)for(let t=e.length-1;t>=0;t--){let n=e[t];if(i===n.name)return n}}function Wi(i,e,t,n){let r=i+$t,o=ht(),s=Fg(o,r);return jO(o,r)?HO(o,ru(),e,s.transform,t,n,s):s.transform(t,n)}function sw(i,e,t,n,r){let o=i+$t,s=ht(),a=Fg(s,o);return jO(s,o)?A8(s,ru(),e,a.transform,t,n,r,a):a.transform(t,n,r)}function jO(i,e){return i[qe].data[e].pure}function tl(i,e){return L0(i,e)}var WO=(()=>{class i{applicationErrorHandler=Z(na);appRef=Z(Pr);taskService=Z(qa);ngZone=Z(or);zonelessEnabled=Z(Ih);tracing=Z(aa,{optional:!0});zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Bi;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(yh):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(Z(r1,{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 n=this.useMicrotaskScheduler?iP:e1;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>n(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>n(()=>this.tick()))}shouldScheduleTick(){return!(this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(yh+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(n){this.applicationErrorHandler(n)}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(n){return new(n||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function $O(){return[{provide:as,useExisting:WO},{provide:or,useClass:xh},{provide:Ih,useValue:!0}]}function R8(){return typeof $localize<"u"&&$localize.locale||Jh}var ep=new Xe("",{factory:()=>Z(ep,{optional:!0,skipSelf:!0})||R8()});var tp=class{destroyed=!1;listeners=null;errorHandler=Z(Jr,{optional:!0});destroyRef=Z(ar);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new Ye(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=at(null);try{for(let n of this.listeners)try{n(e)}catch(r){this.errorHandler?.handleError(r)}}finally{at(t)}}};function En(i){return hI(i)}function Pe(i,e){return dh(i,e?.equal)}var uw={JSACTION:"__jsaction",OWNER:"__owner"},KO={};function k8(i){return i[uw.JSACTION]}function XO(i,e){i[uw.JSACTION]=e}function F8(i){return KO[i]}function N8(i,e){KO[i]=e}var dt={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"},L8=[dt.MOUSEENTER,dt.MOUSELEAVE,"pointerenter","pointerleave"],que=[dt.CLICK,dt.DBLCLICK,dt.FOCUSIN,dt.FOCUSOUT,dt.KEYDOWN,dt.KEYUP,dt.KEYPRESS,dt.MOUSEOVER,dt.MOUSEOUT,dt.SUBMIT,dt.TOUCHSTART,dt.TOUCHEND,dt.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"],B8=[dt.FOCUS,dt.BLUR,dt.ERROR,dt.LOAD,dt.TOGGLE],fw=i=>B8.indexOf(i)>=0;function U8(i){return i===dt.MOUSEENTER?dt.MOUSEOVER:i===dt.MOUSELEAVE?dt.MOUSEOUT:i===dt.POINTERENTER?dt.POINTEROVER:i===dt.POINTERLEAVE?dt.POINTEROUT:i}function z8(i,e,t,n){let r=!1;fw(e)&&(r=!0);let o=typeof n=="boolean"?{capture:r,passive:n}:r;return i.addEventListener(e,t,o),{eventType:e,handler:t,capture:r,passive:n}}function V8(i,e){if(i.removeEventListener){let t=typeof e.passive=="boolean"?{capture:e.capture}:e.capture;i.removeEventListener(e.eventType,e.handler,t)}else i.detachEvent&&i.detachEvent(`on${e.eventType}`,e.handler)}function G8(i){i.preventDefault?i.preventDefault():i.returnValue=!1}var YO=typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);function H8(i){return i.which===2||i.which==null&&i.button===4}function j8(i){return YO&&i.metaKey||!YO&&i.ctrlKey||H8(i)||i.shiftKey}function W8(i,e,t){let n=i.relatedTarget;return(i.type===dt.MOUSEOVER&&e===dt.MOUSEENTER||i.type===dt.MOUSEOUT&&e===dt.MOUSELEAVE||i.type===dt.POINTEROVER&&e===dt.POINTERENTER||i.type===dt.POINTEROUT&&e===dt.POINTERLEAVE)&&(!n||n!==t&&!t.contains(n))}function $8(i,e){let t={};for(let n in i){if(n==="srcElement"||n==="target")continue;let r=n,o=i[r];typeof o!="function"&&(t[r]=o)}return i.type===dt.MOUSEOVER?t.type=dt.MOUSEENTER:i.type===dt.MOUSEOUT?t.type=dt.MOUSELEAVE:i.type===dt.POINTEROVER?t.type=dt.POINTERENTER:t.type=dt.POINTERLEAVE,t.target=t.srcElement=e,t.bubbles=!1,t._originalEvent=i,t}var X8=typeof navigator<"u"&&/iPhone|iPad|iPod/.test(navigator.userAgent),J0=class{element;handlerInfos=[];constructor(e){this.element=e}addEventListener(e,t,n){X8&&(this.element.style.cursor="pointer"),this.handlerInfos.push(z8(this.element,e,t(this.element),n))}cleanUp(){for(let e=0;e<this.handlerInfos.length;e++)V8(this.element,this.handlerInfos[e]);this.handlerInfos=[]}},Y8={NAMESPACE_ACTION_SEPARATOR:".",EVENT_ACTION_SEPARATOR:":"};function nl(i){return i.eventType}function hw(i,e){i.eventType=e}function K0(i){return i.event}function ZO(i,e){i.event=e}function JO(i){return i.targetElement}function QO(i,e){i.targetElement=e}function eR(i){return i.eic}function q8(i,e){i.eic=e}function K8(i){return i.timeStamp}function Z8(i,e){i.timeStamp=e}function Z0(i){return i.eia}function tR(i,e,t){i.eia=[e,t]}function aw(i){i.eia=void 0}function q0(i){return i[1]}function J8(i){return i.eirp}function nR(i,e){i.eirp=e}function iR(i){return i.eir}function rR(i,e){i.eir=e}function oR(i){return{eventType:i.eventType,event:i.event,targetElement:i.targetElement,eic:i.eic,eia:i.eia,timeStamp:i.timeStamp,eirp:i.eirp,eiack:i.eiack,eir:i.eir}}function Q8(i,e,t,n,r,o,s,a){return{eventType:i,event:e,targetElement:t,eic:n,timeStamp:r,eia:o,eirp:s,eiack:a}}var lw=class i{eventInfo;constructor(e){this.eventInfo=e}getEventType(){return nl(this.eventInfo)}setEventType(e){hw(this.eventInfo,e)}getEvent(){return K0(this.eventInfo)}setEvent(e){ZO(this.eventInfo,e)}getTargetElement(){return JO(this.eventInfo)}setTargetElement(e){QO(this.eventInfo,e)}getContainer(){return eR(this.eventInfo)}setContainer(e){q8(this.eventInfo,e)}getTimestamp(){return K8(this.eventInfo)}setTimestamp(e){Z8(this.eventInfo,e)}getAction(){let e=Z0(this.eventInfo);if(e)return{name:e[0],element:e[1]}}setAction(e){if(!e){aw(this.eventInfo);return}tR(this.eventInfo,e.name,e.element)}getIsReplay(){return J8(this.eventInfo)}setIsReplay(e){nR(this.eventInfo,e)}getResolved(){return iR(this.eventInfo)}setResolved(e){rR(this.eventInfo,e)}clone(){return new i(oR(this.eventInfo))}},eH={},tH=/\s*;\s*/,nH=dt.CLICK,cw=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&&nl(e)===dt.CLICK&&j8(K0(e))?hw(e,dt.CLICKMOD):this.a11yClickSupport&&this.updateEventInfoForA11yClick(e)}resolveAction(e){iR(e)||(this.populateAction(e,JO(e)),rR(e,!0))}resolveParentAction(e){let t=Z0(e),n=t&&q0(t);aw(e);let r=n&&this.getParentNode(n);r&&this.populateAction(e,r)}populateAction(e,t){let n=t;for(;n&&n!==eR(e)&&(n.nodeType===Node.ELEMENT_NODE&&this.populateActionOnElement(n,e),!Z0(e));)n=this.getParentNode(n);let r=Z0(e);if(r&&(this.a11yClickSupport&&this.preventDefaultForA11yClick(e),this.syntheticMouseEventSupport&&(nl(e)===dt.MOUSEENTER||nl(e)===dt.MOUSELEAVE||nl(e)===dt.POINTERENTER||nl(e)===dt.POINTERLEAVE)))if(W8(K0(e),nl(e),q0(r))){let o=$8(K0(e),q0(r));ZO(e,o),QO(e,q0(r))}else aw(e)}getParentNode(e){let t=e[uw.OWNER];if(t)return t;let n=e.parentNode;return n?.nodeName==="#document-fragment"?n?.host??null:n}populateActionOnElement(e,t){let n=this.parseActions(e),r=n[nl(t)];r!==void 0&&tR(t,r,e),this.a11yClickSupport&&this.populateClickOnlyAction(e,t,n)}parseActions(e){let t=k8(e);if(!t){let n=e.getAttribute(Xg.JSACTION);if(!n)t=eH,XO(e,t);else{if(t=F8(n),!t){t={};let r=n.split(tH);for(let o=0;o<r.length;o++){let s=r[o];if(!s)continue;let a=s.indexOf(Y8.EVENT_ACTION_SEPARATOR),l=a!==-1,c=l?s.substr(0,a).trim():nH,d=l?s.substr(a+1).trim():s;t[c]=d}N8(n,t)}XO(e,t)}}return t}addA11yClickSupport(e,t,n){this.a11yClickSupport=!0,this.updateEventInfoForA11yClick=e,this.preventDefaultForA11yClick=t,this.populateClickOnlyAction=n}},sR=(function(i){return i[i.I_AM_THE_JSACTION_FRAMEWORK=0]="I_AM_THE_JSACTION_FRAMEWORK",i})(sR||{}),dw=class{dispatchDelegate;actionResolver;eventReplayer;eventReplayScheduled=!1;replayEventInfoWrappers=[];constructor(e,{actionResolver:t,eventReplayer:n}={}){this.dispatchDelegate=e,this.actionResolver=t,this.eventReplayer=n}dispatch(e){let t=new lw(e);this.actionResolver?.resolveEventType(e),this.actionResolver?.resolveAction(e);let n=t.getAction();if(n&&iH(n.element,t)&&G8(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 iH(i,e){return i.tagName==="A"&&(e.getEventType()===dt.CLICK||e.getEventType()===dt.CLICKMOD)}var aR=Symbol.for("propagationStopped"),pw={REPLAY:101};var rH="`preventDefault` called during event replay.";var oH="`composedPath` called during event replay.",Q0=class{dispatchDelegate;clickModSupport;actionResolver;dispatcher;constructor(e,t=!0){this.dispatchDelegate=e,this.clickModSupport=t,this.actionResolver=new cw({clickModSupport:t}),this.dispatcher=new dw(n=>{this.dispatchToDelegate(n)},{actionResolver:this.actionResolver})}dispatch(e){this.dispatcher.dispatch(e)}dispatchToDelegate(e){for(e.getIsReplay()&&lH(e),sH(e);e.getAction();){if(cH(e),fw(e.getEventType())&&e.getAction().element!==e.getTargetElement()||(this.dispatchDelegate(e.getEvent(),e.getAction().name),aH(e)))return;this.actionResolver.resolveParentAction(e.eventInfo)}}};function sH(i){let e=i.getEvent(),t=i.getEvent().stopPropagation.bind(e),n=()=>{e[aR]=!0,t()};Rc(e,"stopPropagation",n),Rc(e,"stopImmediatePropagation",n)}function aH(i){return!!i.getEvent()[aR]}function lH(i){let e=i.getEvent(),t=i.getTargetElement(),n=e.preventDefault.bind(e);Rc(e,"target",t),Rc(e,"eventPhase",pw.REPLAY),Rc(e,"preventDefault",()=>{throw n(),new Error(rH+"")}),Rc(e,"composedPath",()=>{throw new Error(oH+"")})}function cH(i){let e=i.getEvent(),t=i.getAction()?.element;t&&Rc(e,"currentTarget",t,{configurable:!0})}function Rc(i,e,t,{configurable:n=!1}={}){Object.defineProperty(i,e,{value:t,configurable:n})}function lR(i,e){i.ecrd(t=>{e.dispatch(t)},sR.I_AM_THE_JSACTION_FRAMEWORK)}function dH(i){return i?.q??[]}function uH(i){i&&(qO(i.c,i.et,i.h),qO(i.c,i.etc,i.h,!0))}function qO(i,e,t,n){for(let r=0;r<e.length;r++)i.removeEventListener(e[r],t,n)}var fH=!1,cR=(()=>{class i{static MOUSE_SPECIAL_SUPPORT=fH;containerManager;eventHandlers={};browserEventTypeToExtraEventTypes={};dispatcher=null;queuedEventInfos=[];constructor(t){this.containerManager=t}handleEvent(t,n,r){let o=Q8(t,n,n.target,r,Date.now());this.handleEventInfo(o)}handleEventInfo(t){if(!this.dispatcher){nR(t,!0),this.queuedEventInfos?.push(t);return}this.dispatcher(t)}addEvent(t,n,r){if(t in this.eventHandlers||!this.containerManager||!i.MOUSE_SPECIAL_SUPPORT&&L8.indexOf(t)>=0)return;let o=(a,l,c)=>{this.handleEvent(a,l,c)};this.eventHandlers[t]=o;let s=U8(n||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),uH(t),delete window._ejsa)}replayEarlyEventInfos(t){for(let n=0;n<t.length;n++){let r=t[n],o=this.getEventTypesForBrowserEventType(r.eventType);for(let s=0;s<o.length;s++){let a=oR(r);hw(a,o[s]),this.handleEventInfo(a)}}}getEventTypesForBrowserEventType(t){let n=[];return this.eventHandlers[t]&&n.push(t),this.browserEventTypeToExtraEventTypes[t]&&n.push(...this.browserEventTypeToExtraEventTypes[t]),n}handler(t){return this.eventHandlers[t]}cleanUp(){this.containerManager?.cleanUp(),this.containerManager=null,this.eventHandlers={},this.browserEventTypeToExtraEventTypes={},this.dispatcher=null,this.queuedEventInfos=[]}registerDispatcher(t,n){this.ecrd(t,n)}ecrd(t,n){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 i})();function dR(i,e=window){return dH(e._ejsas?.[i])}function mw(i,e=window){e._ejsas&&(e._ejsas[i]=void 0)}var nv=Symbol("InputSignalNode#UNSET"),yR=fe(R({},Km),{transformFn:void 0,applyValueToInputSignal(i,e){sc(i,e)}});function xR(i,e){let t=Object.create(yR);t.value=i,t.transformFn=e?.transform;function n(){if(ic(t),t.value===nv){let r=null;throw new Ye(-950,r)}return t.value}return n[Qn]=t,n}function Pt(i){return new tp}function uR(i,e){return xR(i,e)}function AH(i){return xR(nv,i)}var Me=(uR.required=AH,uR);function fR(i,e){return dO(e)}function OH(i,e){return uO(e)}var Tu=(fR.required=OH,fR);function _R(i,e){let t=Object.create(yR),n=new tp;t.value=i;function r(){return ic(t),hR(t.value),t.value}return r[Qn]=t,r.asReadonly=Wg.bind(r),r.set=o=>{t.equal(t.value,o)||(sc(t,o),n.emit(o))},r.update=o=>{hR(t.value),r.set(o(t.value))},r.subscribe=n.subscribe.bind(n),r.destroyRef=n.destroyRef,r}function hR(i){if(i===nv)throw new Ye(952,!1)}function pR(i,e){return _R(i,e)}function RH(i){return _R(nv,i)}var _s=(pR.required=RH,pR);var gw=new Xe(""),kH=new Xe("");function np(i){return!i.moduleRef}function FH(i){let e=np(i)?i.r3Injector:i.moduleRef.injector,t=e.get(or);return t.run(()=>{np(i)?i.r3Injector.resolveInjectorInitializers():i.moduleRef.resolveInjectorInitializers();let n=e.get(na),r;if(t.runOutsideAngular(()=>{r=t.onError.subscribe({next:n})}),np(i)){let o=()=>e.destroy(),s=i.platformInjector.get(gw);s.add(o),e.onDestroy(()=>{r.unsubscribe(),s.delete(o)})}else{let o=()=>i.moduleRef.destroy(),s=i.platformInjector.get(gw);s.add(o),i.moduleRef.onDestroy(()=>{Oh(i.allPlatformModules,i.moduleRef),r.unsubscribe(),s.delete(o)})}return LH(n,t,()=>{let o=e.get(qa),s=o.add(),a=e.get(JC);return a.runInitializers(),a.donePromise.then(()=>{let l=e.get(ep,Jh);if(IO(l||Jh),!e.get(kH,!0))return np(i)?e.get(Pr):(i.allPlatformModules.push(i.moduleRef),i.moduleRef);if(np(i)){let d=e.get(Pr);return i.rootComponent!==void 0&&d.bootstrap(i.rootComponent),d}else return NH?.(i.moduleRef,i.allPlatformModules),i.moduleRef}).finally(()=>{o.remove(s)})})})}var NH;function LH(i,e,t){try{let n=t();return wu(n)?n.catch(r=>{throw e.runOutsideAngular(()=>i(r)),r}):n}catch(n){throw e.runOutsideAngular(()=>i(n)),n}}var tv=null;function BH(i=[],e){return Ti.create({name:e,providers:[{provide:wh,useValue:"platform"},{provide:gw,useValue:new Set([()=>tv=null])},...i]})}function UH(i=[]){if(tv)return tv;let e=BH(i);return tv=e,_O(),zH(e),e}function zH(i){let e=i.get(x0,null);Qd(i,()=>{e?.forEach(t=>t())})}var ev=new WeakSet,mR="";function gR(i){return i.get(uC,I2)}function SR(){let i=[{provide:uC,useFactory:()=>{let e=!0;{let t=Z(bs);e=!!window._ejsas?.[t]}return e&&Ao("NgEventReplay"),e}}];return i.push({provide:Js,useValue:()=>{let e=Z(Pr),{injector:t}=e;if(!ev.has(e)){let n=Z(fC);if(gR(t)){B2();let r=t.get(bs),o=N2(r,(s,a,l)=>{s.nodeType===Node.ELEMENT_NODE&&(O2(s,a,l),R2(s,n))});e.onDestroy(o)}}},multi:!0},{provide:Eu,useFactory:()=>{let e=Z(Pr),{injector:t}=e;return()=>{if(!gR(t)||ev.has(e))return;ev.add(e);let n=t.get(bs);e.onDestroy(()=>{ev.delete(e),mw(n)}),e.whenStable().then(()=>{if(e.destroyed)return;let r=t.get(F2);VH(r,t);let o=t.get(fC);o.get(mR)?.forEach(k2),o.delete(mR);let s=r.instance;W2(t)?e.onDestroy(()=>s.cleanUp()):s.cleanUp()})}},multi:!0}),i}var VH=(i,e)=>{let t=e.get(bs),n=window._ejsas[t],r=i.instance=new cR(new J0(n.c));for(let a of n.et)r.addEvent(a);for(let a of n.etc)r.addEvent(a);let o=dR(t);r.replayEarlyEventInfos(o),mw(t);let s=new Q0(a=>{GH(e,a,a.currentTarget)});lR(r,s)};function GH(i,e,t){let n=(t&&t.getAttribute(Wh))??"";/d\d+/.test(n)?HH(n,i,e,t):e.eventPhase===pw.REPLAY&&hC(e,t)}function HH(i,e,t,n){let r=e.get(P2);r.push({event:t,currentTarget:n}),EO(e,i,jH(r))}function jH(i){return e=>{let t=new Set(e),n=[];for(let{event:r,currentTarget:o}of i){let s=o.getAttribute(Wh);t.has(s)?hC(r,o):n.push({event:r,currentTarget:o})}i.length=0,i.push(...n)}}var vR=!1;var WH=1e4;function $H(){vR||(vR=!0,G2(),MO(),UO(),DO(),vO(),oO(),jA(),EA())}function XH(i){return i.whenStable()}function CR(){let i=[{provide:jh,useFactory:()=>{let e=!0;return e=!!Z(bu,{optional:!0})?.get(pC,null),e&&Ao("NgHydration"),e}},{provide:Js,useValue:()=>{zA(!1);let e=Z(Cn);Z(jh)&&(Y2(e),$H())},multi:!0}];return i.push({provide:dC,useFactory:()=>Z(jh)},{provide:Eu,useFactory:()=>{let e=Z(as);if(Z(jh)){let t=Z(Pr);return()=>{XH(t).then(()=>{t.destroyed||(GC(t),e.notify(7))})}}return()=>{}},multi:!0}),Qs(i)}var Vge=WH-1e3;var iv=(()=>{class i{static __NG_ELEMENT_ID__=YH}return i})();function YH(i){return qH(yi(),ht(),(i&16)===16)}function qH(i,e,t){if(ps(i)&&!t){let n=wr(i.index,e);return new Za(n,n)}else if(i.type&175){let n=e[li];return new Za(n,e)}return null}function wR(i){let{rootComponent:e,appProviders:t,platformProviders:n,platformRef:r}=i;en(Ht.BootstrapApplicationStart);try{let o=r?.injector??UH(n),s=[$O(),oP,...t||[]],a=new Uh({providers:s,parent:o,debugName:"",runEnvironmentInitializers:!1});return FH({r3Injector:a.injector,platformInjector:o,rootComponent:e})}catch(o){return Promise.reject(o)}finally{en(Ht.BootstrapApplicationEnd)}}function rv(i){return typeof i=="boolean"?i:i!=null&&i!=="false"}function ER(i,e){let t=Zs(i),n=e.elementInjector||Jd();return new pu(t).create(n,e.projectableNodes,e.hostElement,e.environmentInjector,e.directives,e.bindings)}var MR=null;function ao(){return MR}function vw(i){MR??=i}var ip=class{},ov=(()=>{class i{historyGo(t){throw new Error("")}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:()=>Z(TR),providedIn:"platform"})}return i})();var TR=(()=>{class i extends ov{_location;_history;_doc=Z(Cn);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return ao().getBaseHref(this._doc)}onPopState(t){let n=ao().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",t,!1),()=>n.removeEventListener("popstate",t)}onHashChange(t){let n=ao().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",t,!1),()=>n.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,n,r){this._history.pushState(t,n,r)}replaceState(t,n,r){this._history.replaceState(t,n,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:()=>new i,providedIn:"platform"})}return i})();var xw=(function(i){return i[i.Decimal=0]="Decimal",i[i.Percent=1]="Percent",i[i.Currency=2]="Currency",i[i.Scientific=3]="Scientific",i})(xw||{});var Ss={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 Du(i,e){let t=$0(i),n=t[Pc.NumberSymbols][e];if(typeof n>"u"){if(e===Ss.CurrencyDecimal)return t[Pc.NumberSymbols][Ss.Decimal];if(e===Ss.CurrencyGroup)return t[Pc.NumberSymbols][Ss.Group]}return n}function IR(i,e){return $0(i)[Pc.NumberFormats][e]}var KH=/^(\d+)?\.((\d+)(-(\d+))?)?$/,DR=22,sv=".",rp="0",ZH=";",JH=",",bw="#";function QH(i,e,t,n,r,o,s=!1){let a="",l=!1;if(!isFinite(i))a=Du(t,Ss.Infinity);else{let c=nj(i);s&&(c=tj(c));let d=e.minInt,u=e.minFrac,f=e.maxFrac;if(o){let b=o.match(KH);if(b===null)throw new Ye(2306,!1);let y=b[1],x=b[3],_=b[5];y!=null&&(d=yw(y)),x!=null&&(u=yw(x)),_!=null?f=yw(_):x!=null&&u>f&&(f=u)}ij(c,u,f);let h=c.digits,p=c.integerLen,v=c.exponent,g=[];for(l=h.every(b=>!b);p<d;p++)h.unshift(0);for(;p<0;p++)h.unshift(0);p>0?g=h.splice(p,h.length):(g=h,h=[0]);let m=[];for(h.length>=e.lgSize&&m.unshift(h.splice(-e.lgSize,h.length).join(""));h.length>e.gSize;)m.unshift(h.splice(-e.gSize,h.length).join(""));h.length&&m.unshift(h.join("")),a=m.join(Du(t,n)),g.length&&(a+=Du(t,r)+g.join("")),v&&(a+=Du(t,Ss.Exponential)+"+"+v)}return i<0&&!l?a=e.negPre+a+e.negSuf:a=e.posPre+a+e.posSuf,a}function PR(i,e,t){let n=IR(e,xw.Decimal),r=ej(n,Du(e,Ss.MinusSign));return QH(i,r,e,Ss.Group,Ss.Decimal,t)}function ej(i,e="-"){let t={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(ZH),r=n[0],o=n[1],s=r.indexOf(sv)!==-1?r.split(sv):[r.substring(0,r.lastIndexOf(rp)+1),r.substring(r.lastIndexOf(rp)+1)],a=s[0],l=s[1]||"";t.posPre=a.substring(0,a.indexOf(bw));for(let d=0;d<l.length;d++){let u=l.charAt(d);u===rp?t.minFrac=t.maxFrac=d+1:u===bw?t.maxFrac=d+1:t.posSuf+=u}let c=a.split(JH);if(t.gSize=c[1]?c[1].length:0,t.lgSize=c[2]||c[1]?(c[2]||c[1]).length:0,o){let d=r.length-t.posPre.length-t.posSuf.length,u=o.indexOf(bw);t.negPre=o.substring(0,u).replace(/'/g,""),t.negSuf=o.slice(u+d).replace(/'/g,"")}else t.negPre=e+t.posPre,t.negSuf=t.posSuf;return t}function tj(i){if(i.digits[0]===0)return i;let e=i.digits.length-i.integerLen;return i.exponent?i.exponent+=2:(e===0?i.digits.push(0,0):e===1&&i.digits.push(0),i.integerLen+=2),i}function nj(i){let e=Math.abs(i)+"",t=0,n,r,o,s,a;for((r=e.indexOf(sv))>-1&&(e=e.replace(sv,"")),(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)===rp;o++);if(o===(a=e.length))n=[0],r=1;else{for(a--;e.charAt(a)===rp;)a--;for(r-=o,n=[],s=0;o<=a;o++,s++)n[s]=Number(e.charAt(o))}return r>DR&&(n=n.splice(0,DR-1),t=r-1,r=1),{digits:n,exponent:t,integerLen:r}}function ij(i,e,t){if(e>t)throw new Ye(2307,!1);let n=i.digits,r=n.length-i.integerLen,o=Math.min(Math.max(e,r),t),s=o+i.integerLen,a=n[s];if(s>0){n.splice(Math.max(i.integerLen,s));for(let u=s;u<n.length;u++)n[u]=0}else{r=Math.max(0,r),i.integerLen=1,n.length=Math.max(1,s=o+1),n[0]=0;for(let u=1;u<s;u++)n[u]=0}if(a>=5)if(s-1<0){for(let u=0;u>s;u--)n.unshift(0),i.integerLen++;n.unshift(1),i.integerLen++}else n[s-1]++;for(;r<Math.max(0,o);r++)n.push(0);let l=o!==0,c=e+i.integerLen,d=n.reduceRight(function(u,f,h,p){return f=f+u,p[h]=f<10?f:f-10,l&&(p[h]===0&&h>=c?p.pop():l=!1),f>=10?1:0},0);d&&(n.unshift(d),i.integerLen++)}function yw(i){let e=parseInt(i);if(isNaN(e))throw new Ye(2305,!1);return e}var kc=(()=>{class i{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=Z(Ti);constructor(t){this._viewContainerRef=t}ngOnChanges(t){if(this._shouldRecreateView(t)){let n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let r=this._createContextForwardProxy();this._viewRef=n.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,n,r)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,n,r):!1,get:(t,n,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,r)}})}static \u0275fac=function(n){return new(n||i)(jt(Su))};static \u0275dir=Zn({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[gu]})}return i})();function AR(i,e){return new Ye(2100,!1)}var Fc=(()=>{class i{_locale;constructor(t){this._locale=t}transform(t,n,r){if(!rj(t))return null;r||=this._locale;try{let o=oj(t);return PR(o,r,n)}catch(o){throw AR(i,o.message)}}static \u0275fac=function(n){return new(n||i)(jt(ep,16))};static \u0275pipe=W0({name:"number",type:i,pure:!0})}return i})();function rj(i){return!(i==null||i===""||i!==i)}function oj(i){if(typeof i=="string"&&!isNaN(Number(i)-parseFloat(i)))return Number(i);if(typeof i!="number")throw new Ye(2309,!1);return i}var _w=(()=>{class i{transform(t,n,r){if(t==null)return null;if(!(typeof t=="string"||Array.isArray(t)))throw AR(i,t);return t.slice(n,r)}static \u0275fac=function(n){return new(n||i)};static \u0275pipe=W0({name:"slice",type:i,pure:!1})}return i})();var Xt=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=ca({type:i});static \u0275inj=ls({})}return i})();function op(i,e){e=encodeURIComponent(e);for(let t of i.split(";")){let n=t.indexOf("="),[r,o]=n==-1?[t,""]:[t.slice(0,n),t.slice(n+1)];if(r.trim()===e)return decodeURIComponent(o)}return null}var Nc=class{};var OR="browser";var sp=class{_doc;constructor(e){this._doc=e}manager},lv=(()=>{class i extends sp{constructor(t){super(t)}supports(t){return!0}addEventListener(t,n,r,o){return t.addEventListener(n,r,o),()=>this.removeEventListener(t,n,r,o)}removeEventListener(t,n,r,o){return t.removeEventListener(n,r,o)}static \u0275fac=function(n){return new(n||i)(We(Cn))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),uv=new Xe(""),Ew=(()=>{class i{_zone;_plugins;_eventNameToPlugin=new Map;constructor(t,n){this._zone=n,t.forEach(s=>{s.manager=this});let r=t.filter(s=>!(s instanceof lv));this._plugins=r.slice().reverse();let o=t.find(s=>s instanceof lv);o&&this._plugins.push(o)}addEventListener(t,n,r,o){return this._findPluginFor(n).addEventListener(t,n,r,o)}getZone(){return this._zone}_findPluginFor(t){let n=this._eventNameToPlugin.get(t);if(n)return n;if(n=this._plugins.find(o=>o.supports(t)),!n)throw new Ye(5101,!1);return this._eventNameToPlugin.set(t,n),n}static \u0275fac=function(n){return new(n||i)(We(uv),We(or))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),Sw="ng-app-id";function RR(i){for(let e of i)e.remove()}function kR(i,e){let t=e.createElement("style");return t.textContent=i,t}function aj(i,e,t,n){let r=i.head?.querySelectorAll(`style[${Sw}="${e}"],link[${Sw}="${e}"]`);if(r)for(let o of r)o.removeAttribute(Sw),o instanceof HTMLLinkElement?n.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&t.set(o.textContent,{usage:0,elements:[o]})}function ww(i,e){let t=e.createElement("link");return t.setAttribute("rel","stylesheet"),t.setAttribute("href",i),t}var Mw=(()=>{class i{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(t,n,r,o={}){this.doc=t,this.appId=n,this.nonce=r,aj(t,n,this.inline,this.external),this.hosts.add(t.head)}addStyles(t,n){for(let r of t)this.addUsage(r,this.inline,kR);n?.forEach(r=>this.addUsage(r,this.external,ww))}removeStyles(t,n){for(let r of t)this.removeUsage(r,this.inline);n?.forEach(r=>this.removeUsage(r,this.external))}addUsage(t,n,r){let o=n.get(t);o?o.usage++:n.set(t,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,r(t,this.doc)))})}removeUsage(t,n){let r=n.get(t);r&&(r.usage--,r.usage<=0&&(RR(r.elements),n.delete(t)))}ngOnDestroy(){for(let[,{elements:t}]of[...this.inline,...this.external])RR(t);this.hosts.clear()}addHost(t){this.hosts.add(t);for(let[n,{elements:r}]of this.inline)r.push(this.addElement(t,kR(n,this.doc)));for(let[n,{elements:r}]of this.external)r.push(this.addElement(t,ww(n,this.doc)))}removeHost(t){this.hosts.delete(t)}addElement(t,n){return this.nonce&&n.setAttribute("nonce",this.nonce),t.appendChild(n)}static \u0275fac=function(n){return new(n||i)(We(Cn),We(bs),We(_0,8),We(Hh))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),Cw={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"},Tw=/%COMP%/g;var NR="%COMP%",lj=`_nghost-${NR}`,cj=`_ngcontent-${NR}`,dj=!0,uj=new Xe("",{factory:()=>dj});function fj(i){return cj.replace(Tw,i)}function hj(i){return lj.replace(Tw,i)}function LR(i,e){return e.map(t=>t.replace(Tw,i))}var Dw=(()=>{class i{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(t,n,r,o,s,a,l=null,c=null){this.eventManager=t,this.sharedStylesHost=n,this.appId=r,this.removeStylesOnCompDestroy=o,this.doc=s,this.ngZone=a,this.nonce=l,this.tracingService=c,this.defaultRenderer=new ap(t,s,a,this.tracingService)}createRenderer(t,n){if(!t||!n)return this.defaultRenderer;let r=this.getOrCreateRenderer(t,n);return r instanceof dv?r.applyToHost(t):r instanceof lp&&r.applyStyles(),r}getOrCreateRenderer(t,n){let r=this.rendererByCompId,o=r.get(n.id);if(!o){let s=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,u=this.tracingService;switch(n.encapsulation){case Do.Emulated:o=new dv(l,c,n,this.appId,d,s,a,u);break;case Do.ShadowDom:return new cv(l,t,n,s,a,this.nonce,u,c);case Do.ExperimentalIsolatedShadowDom:return new cv(l,t,n,s,a,this.nonce,u);default:o=new lp(l,c,n,d,s,a,u);break}r.set(n.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(t){this.rendererByCompId.delete(t)}static \u0275fac=function(n){return new(n||i)(We(Ew),We(Mw),We(bs),We(uj),We(Cn),We(or),We(_0),We(aa,8))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),ap=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r){this.eventManager=e,this.doc=t,this.ngZone=n,this.tracingService=r}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(Cw[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(FR(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){e&&(FR(e)?e.content:e).insertBefore(t,n)}removeChild(e,t){t.remove()}selectRootElement(e,t){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new Ye(-5104,!1);return t||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+":"+t;let o=Cw[r];o?e.setAttributeNS(o,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Cw[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){r&(vs.DashCase|vs.Important)?e.style.setProperty(t,n,r&vs.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&vs.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n,r){if(typeof e=="string"&&(e=ao().getGlobalEventTarget(this.doc,e),!e))throw new Ye(5102,!1);let o=this.decoratePreventDefault(n);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 FR(i){return i.tagName==="TEMPLATE"&&i.content!==void 0}var cv=class extends ap{hostEl;sharedStylesHost;shadowRoot;constructor(e,t,n,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=n.styles;c=LR(n.id,c);for(let u of c){let f=document.createElement("style");s&&f.setAttribute("nonce",s),f.textContent=u,this.shadowRoot.appendChild(f)}let d=n.getExternalStyles?.();if(d)for(let u of d){let f=ww(u,r);s&&f.setAttribute("nonce",s),this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}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)}},lp=class extends ap{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,o,s,a,l){super(e,o,s,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let c=n.styles;this.styles=l?LR(l,c):c,this.styleUrls=n.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Ka.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},dv=class extends lp{contentAttr;hostAttr;constructor(e,t,n,r,o,s,a,l){let c=r+"-"+n.id;super(e,t,n,o,s,a,l,c),this.contentAttr=fj(c),this.hostAttr=hj(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,""),n}};var fv=class i extends ip{supportsDOMEvents=!0;static makeCurrent(){vw(new i)}onAndCancel(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,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=pj();return t==null?null:mj(t)}resetBaseElement(){cp=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return op(document.cookie,e)}},cp=null;function pj(){return cp=cp||document.head.querySelector("base"),cp?cp.getAttribute("href"):null}function mj(i){return new URL(i,document.baseURI).pathname}var gj=(()=>{class i{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),BR=["alt","control","meta","shift"],vj={"\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"},bj={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey},UR=(()=>{class i extends sp{constructor(t){super(t)}supports(t){return i.parseEventName(t)!=null}addEventListener(t,n,r,o){let s=i.parseEventName(n),a=i.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ao().onAndCancel(t,s.domEventName,a,o))}static parseEventName(t){let n=t.toLowerCase().split("."),r=n.shift();if(n.length===0||!(r==="keydown"||r==="keyup"))return null;let o=i._normalizeKey(n.pop()),s="",a=n.indexOf("code");if(a>-1&&(n.splice(a,1),s="code."),BR.forEach(c=>{let d=n.indexOf(c);d>-1&&(n.splice(d,1),s+=c+".")}),s+=o,n.length!=0||o.length===0)return null;let l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(t,n){let r=vj[t.key]||t.key,o="";return n.indexOf("code.")>-1&&(r=t.code,o="code."),r==null||!r?!1:(r=r.toLowerCase(),r===" "?r="space":r==="."&&(r="dot"),BR.forEach(s=>{if(s!==r){let a=bj[s];a(t)&&(o+=s+".")}}),o+=r,o===n)}static eventCallback(t,n,r){return o=>{i.matchEventFullKeyCode(o,t)&&r.runGuarded(()=>n(o))}}static _normalizeKey(t){return t==="esc"?"escape":t}static \u0275fac=function(n){return new(n||i)(We(Cn))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})();async function Iw(i,e){return wR(yj(i,e))}function yj(i,e){return{platformRef:e?.platformRef,appProviders:[...wj,...i?.providers??[]],platformProviders:Cj}}function xj(){fv.makeCurrent()}function _j(){return new Jr}function Sj(){return sC(document),document}var Cj=[{provide:Hh,useValue:OR},{provide:x0,useValue:xj,multi:!0},{provide:Cn,useFactory:Sj}];var wj=[{provide:wh,useValue:"root"},{provide:Jr,useFactory:_j},{provide:uv,useClass:lv,multi:!0},{provide:uv,useClass:UR,multi:!0},Dw,Mw,Ew,{provide:Dc,useExisting:Dw},{provide:Nc,useClass:gj},[]];var co=class i{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 n=t.indexOf(":");if(n>0){let r=t.slice(0,n),o=t.slice(n+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,n)=>{this.addHeaderEntry(n,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,n])=>{this.setHeaderEntries(t,n)})}: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 i?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 i;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof i?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 n=e.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(e.name,t);let r=(e.op==="a"?this.headers.get(t):void 0)||[];r.push(...n),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 n=e.toLowerCase();this.maybeSetNormalizedName(e,n),this.headers.has(n)?this.headers.get(n).push(t):this.headers.set(n,[t])}setHeaderEntries(e,t){let n=(Array.isArray(t)?t:[t]).map(o=>o.toString()),r=e.toLowerCase();this.headers.set(r,n),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 pv=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()}},mv=class{encodeKey(e){return zR(e)}encodeValue(e){return zR(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Ej(i,e){let t=new Map;return i.length>0&&i.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 Mj=/%(\d[a-f0-9])/gi,Tj={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function zR(i){return encodeURIComponent(i).replace(Mj,(e,t)=>Tj[t]??e)}function hv(i){return`${i}`}var lo=class i{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new mv,e.fromString){if(e.fromObject)throw new Ye(2805,!1);this.map=Ej(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let n=e.fromObject[t],r=Array.isArray(n)?n.map(hv):[hv(n)];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(n=>{let r=e[n];Array.isArray(r)?r.forEach(o=>{t.push({param:n,value:o,op:"a"})}):t.push({param:n,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(n=>t+"="+this.encoder.encodeValue(n)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new i({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(hv(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let n=this.map.get(e.param)||[],r=n.indexOf(hv(e.value));r!==-1&&n.splice(r,1),n.length>0?this.map.set(e.param,n):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};function Dj(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function VR(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function GR(i){return typeof Blob<"u"&&i instanceof Blob}function HR(i){return typeof FormData<"u"&&i instanceof FormData}function Ij(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var jR="Content-Type",WR="Accept",$R="text/plain",XR="application/json",Pj=`${XR}, ${$R}, */*`,Iu=class i{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,n,r){this.url=t,this.method=e.toUpperCase();let o;if(Dj(this.method)||r?(this.body=n!==void 0?n:null,o=r):o=n,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 Ye(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 co,this.context??=new pv,!this.params)this.params=new lo,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"||VR(this.body)||GR(this.body)||HR(this.body)||Ij(this.body)?this.body:this.body instanceof lo?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||HR(this.body)?null:GR(this.body)?this.body.type||null:VR(this.body)?null:typeof this.body=="string"?$R:this.body instanceof lo?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?XR:null}clone(e={}){let t=e.method||this.method,n=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,d=e.credentials||this.credentials,u=e.referrer||this.referrer,f=e.integrity||this.integrity,h=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,b=e.reportProgress??this.reportProgress,y=e.headers||this.headers,x=e.params||this.params,_=e.context??this.context;return e.setHeaders!==void 0&&(y=Object.keys(e.setHeaders).reduce((w,T)=>w.set(T,e.setHeaders[T]),y)),e.setParams&&(x=Object.keys(e.setParams).reduce((w,T)=>w.set(T,e.setParams[T]),x)),new i(t,n,g,{params:x,headers:y,context:_,reportProgress:b,responseType:r,withCredentials:m,transferCache:p,keepalive:o,cache:a,priority:s,timeout:v,mode:l,redirect:c,credentials:d,referrer:u,integrity:f,referrerPolicy:h})}},Lc=(function(i){return i[i.Sent=0]="Sent",i[i.UploadProgress=1]="UploadProgress",i[i.ResponseHeader=2]="ResponseHeader",i[i.DownloadProgress=3]="DownloadProgress",i[i.Response=4]="Response",i[i.User=5]="User",i})(Lc||{}),Pu=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(e,t=200,n="OK"){this.headers=e.headers||new co,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||n,this.url=e.url||null,this.redirected=e.redirected,this.responseType=e.responseType,this.ok=this.status>=200&&this.status<300}},gv=class i extends Pu{constructor(e={}){super(e)}type=Lc.ResponseHeader;clone(e={}){return new i({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})}},Au=class i extends Pu{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=Lc.Response;clone(e={}){return new i({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})}},il=class extends Pu{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}},Aj=200,Oj=204;var Rj=new Xe("");var kj=/^\)\]\}',?\n/;var Aw=(()=>{class i{xhrFactory;tracingService=Z(aa,{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 Ye(-2800,!1);let n=this.xhrFactory;return os(null).pipe(rS(()=>new wn(o=>{let s=n.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(WR)||s.setRequestHeader(WR,Pj),!t.headers.has(jR)){let g=t.detectContentTypeHeader();g!==null&&s.setRequestHeader(jR,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 co(s.getAllResponseHeaders()),b=s.responseURL||t.url;return l=new gv({headers:m,status:s.status,statusText:g,url:b}),l},d=this.maybePropagateTrace(()=>{let{headers:g,status:m,statusText:b,url:y}=c(),x=null;m!==Oj&&(x=typeof s.response>"u"?s.responseText:s.response),m===0&&(m=x?Aj:0);let _=m>=200&&m<300;if(t.responseType==="json"&&typeof x=="string"){let w=x;x=x.replace(kj,"");try{x=x!==""?JSON.parse(x):null}catch(T){x=w,_&&(_=!1,x={error:T,text:x})}}_?(o.next(new Au({body:x,headers:g,status:m,statusText:b,url:y||void 0})),o.complete()):o.error(new il({error:x,headers:g,status:m,statusText:b,url:y||void 0}))}),u=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new il({error:g,status:s.status||0,statusText:s.statusText||"Unknown Error",url:m||void 0});o.error(b)}),f=u;t.timeout&&(f=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new il({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:m||void 0});o.error(b)}));let h=!1,p=this.maybePropagateTrace(g=>{h||(o.next(c()),h=!0);let m={type:Lc.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:Lc.UploadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),o.next(m)});return s.addEventListener("load",d),s.addEventListener("error",u),s.addEventListener("timeout",f),s.addEventListener("abort",u),t.reportProgress&&(s.addEventListener("progress",p),a!==null&&s.upload&&s.upload.addEventListener("progress",v)),s.send(a),o.next({type:Lc.Sent}),()=>{s.removeEventListener("error",u),s.removeEventListener("abort",u),s.removeEventListener("load",d),s.removeEventListener("timeout",f),t.reportProgress&&(s.removeEventListener("progress",p),a!==null&&s.upload&&s.upload.removeEventListener("progress",v)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(n){return new(n||i)(We(Nc))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Fj(i,e){return e(i)}function Nj(i,e,t){return(n,r)=>Qd(t,()=>e(n,o=>i(o,r)))}var Ow=new Xe("",{factory:()=>[]}),Rw=new Xe(""),YR=new Xe("",{factory:()=>!0});var kw=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=We(Aw),r},providedIn:"root"})}return i})();var vv=(()=>{class i{backend;injector;chain=null;pendingTasks=Z(su);contributeToStability=Z(YR);constructor(t,n){this.backend=t,this.injector=n}handle(t){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(Ow),...this.injector.get(Rw,[])]));this.chain=n.reduceRight((r,o)=>Nj(r,o,this.injector),Fj)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(ph(n))}else return this.chain(t,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||i)(We(kw),We(Mi))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Fw=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=We(vv),r},providedIn:"root"})}return i})();function Pw(i,e){return{body:e,headers:i.headers,context:i.context,observe:i.observe,params:i.params,reportProgress:i.reportProgress,responseType:i.responseType,withCredentials:i.withCredentials,credentials:i.credentials,transferCache:i.transferCache,timeout:i.timeout,keepalive:i.keepalive,priority:i.priority,cache:i.cache,mode:i.mode,redirect:i.redirect,integrity:i.integrity,referrer:i.referrer,referrerPolicy:i.referrerPolicy}}var bv=(()=>{class i{handler;constructor(t){this.handler=t}request(t,n,r={}){let o;if(t instanceof Iu)o=t;else{let l;r.headers instanceof co?l=r.headers:l=new co(r.headers);let c;r.params&&(r.params instanceof lo?c=r.params:c=new lo({fromObject:r.params})),o=new Iu(t,n,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=os(o).pipe(iS(l=>this.handler.handle(l)));if(t instanceof Iu||r.observe==="events")return s;let a=s.pipe(nS(l=>l instanceof Au));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(rr(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new Ye(2806,!1);return l.body}));case"blob":return a.pipe(rr(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Ye(2807,!1);return l.body}));case"text":return a.pipe(rr(l=>{if(l.body!==null&&typeof l.body!="string")throw new Ye(2808,!1);return l.body}));default:return a.pipe(rr(l=>l.body))}case"response":return a;default:throw new Ye(2809,!1)}}delete(t,n={}){return this.request("DELETE",t,n)}get(t,n={}){return this.request("GET",t,n)}head(t,n={}){return this.request("HEAD",t,n)}jsonp(t,n){return this.request("JSONP",t,{params:new lo().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,n={}){return this.request("OPTIONS",t,n)}patch(t,n,r={}){return this.request("PATCH",t,Pw(r,n))}post(t,n,r={}){return this.request("POST",t,Pw(r,n))}put(t,n,r={}){return this.request("PUT",t,Pw(r,n))}static \u0275fac=function(n){return new(n||i)(We(Fw))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Lj=new Xe("",{factory:()=>!0}),Bj="XSRF-TOKEN",Uj=new Xe("",{factory:()=>Bj}),zj="X-XSRF-TOKEN",Vj=new Xe("",{factory:()=>zj}),Gj=(()=>{class i{cookieName=Z(Uj);doc=Z(Cn);lastCookieString="";lastToken=null;parseCount=0;getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=op(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),qR=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=We(Gj),r},providedIn:"root"})}return i})();function Hj(i,e){if(!Z(Lj)||i.method==="GET"||i.method==="HEAD")return e(i);try{let r=Z(ov).href,{origin:o}=new URL(r),{origin:s}=new URL(i.url,o);if(o!==s)return e(i)}catch{return e(i)}let t=Z(qR).getToken(),n=Z(Vj);return t!=null&&!i.headers.has(n)&&(i=i.clone({headers:i.headers.set(n,t)})),e(i)}var Nw=(function(i){return i[i.Interceptors=0]="Interceptors",i[i.LegacyInterceptors=1]="LegacyInterceptors",i[i.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",i[i.NoXsrfProtection=3]="NoXsrfProtection",i[i.JsonpSupport=4]="JsonpSupport",i[i.RequestsMadeViaParent=5]="RequestsMadeViaParent",i[i.Fetch=6]="Fetch",i})(Nw||{});function jj(i,e){return{\u0275kind:i,\u0275providers:e}}function Lw(...i){let e=[bv,vv,{provide:Fw,useExisting:vv},{provide:kw,useFactory:()=>Z(Rj,{optional:!0})??Z(Aw)},{provide:Ow,useValue:Hj,multi:!0}];for(let t of i)e.push(...t.\u0275providers);return Qs(e)}function Bw(i){return jj(Nw.Interceptors,i.map(e=>({provide:Ow,useValue:e,multi:!0})))}var Wj=new Xe(""),$j="b",Xj="h",Yj="s",qj="st",Kj="u",Zj="rt",Uw=new Xe(""),Jj=["GET","HEAD"];function Qj(i,e){let h=Z(Uw),{isCacheActive:t}=h,n=Qt(h,["isCacheActive"]),{transferCache:r,method:o}=i;if(!t||r===!1||o==="POST"&&!n.includePostRequests&&!r||o!=="POST"&&!Jj.includes(o)||!n.includeRequestsWithAuthHeaders&&e9(i)||n.filter?.(i)===!1)return e(i);let s=Z(bu);if(Z(Wj,{optional:!0}))throw new Ye(2803,!1);let l=i.url,c=t9(i,l),d=s.get(c,null),u=n.includeHeaders;if(typeof r=="object"&&r.includeHeaders&&(u=r.includeHeaders),d){let{[$j]:p,[Zj]:v,[Xj]:g,[Yj]:m,[qj]:b,[Kj]:y}=d,x=p;switch(v){case"arraybuffer":x=ZR(p);break;case"blob":x=new Blob([ZR(p)]);break}let _=new co(g);return os(new Au({body:x,headers:_,status:m,statusText:b,url:y}))}return e(i)}function e9(i){return i.headers.has("authorization")||i.headers.has("proxy-authorization")}function KR(i){return[...i.keys()].sort().map(e=>`${e}=${i.getAll(e)}`).join("&")}function t9(i,e){let{params:t,method:n,responseType:r}=i,o=KR(t),s=i.serializeBody();s instanceof URLSearchParams?s=KR(s):typeof s!="string"&&(s="");let a=[n,r,e,s,o].join("|"),l=n9(a);return l}function n9(i){let e=0;for(let t of i)e=Math.imul(31,e)+t.charCodeAt(0)<<0;return e+=2147483648,e.toString()}function ZR(i){let e=atob(i);return Uint8Array.from(e,n=>n.charCodeAt(0)).buffer}function JR(i){return[{provide:Uw,useFactory:()=>(Ao("NgHttpTransferCache"),R({isCacheActive:!0},i))},{provide:Rw,useValue:Qj,multi:!0},{provide:Eu,multi:!0,useFactory:()=>{let e=Z(Pr),t=Z(Uw);return()=>{e.whenStable().then(()=>{t.isCacheActive=!1})}}}]}var dp=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=We(i9),r},providedIn:"root"})}return i})(),i9=(()=>{class i extends dp{_doc;constructor(t){super(),this._doc=t}sanitize(t,n){if(n==null)return null;switch(t){case Po.NONE:return n;case Po.HTML:return oa(n,"HTML")?Io(n):T0(this._doc,String(n)).toString();case Po.STYLE:return oa(n,"Style")?Io(n):n;case Po.SCRIPT:if(oa(n,"Script"))return Io(n);throw new Ye(5200,!1);case Po.URL:return oa(n,"URL")?Io(n):Xh(String(n));case Po.RESOURCE_URL:if(oa(n,"ResourceURL"))return Io(n);throw new Ye(5201,!1);default:throw new Ye(5202,!1)}}bypassSecurityTrustHtml(t){return vC(t)}bypassSecurityTrustStyle(t){return bC(t)}bypassSecurityTrustScript(t){return yC(t)}bypassSecurityTrustUrl(t){return xC(t)}bypassSecurityTrustResourceUrl(t){return _C(t)}static \u0275fac=function(n){return new(n||i)(We(Cn))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),yv=(function(i){return i[i.NoHttpTransferCache=0]="NoHttpTransferCache",i[i.HttpTransferCacheOptions=1]="HttpTransferCacheOptions",i[i.I18nSupport=2]="I18nSupport",i[i.EventReplay=3]="EventReplay",i[i.IncrementalHydration=4]="IncrementalHydration",i})(yv||{});function r9(i,e=[],t={}){return{\u0275kind:i,\u0275providers:e}}function QR(){return r9(yv.EventReplay,SR())}function ek(...i){let e=[],t=new Set;for(let{\u0275providers:r,\u0275kind:o}of i)t.add(o),r.length&&e.push(r);let n=t.has(yv.HttpTransferCacheOptions);return Qs([[],[],CR(),t.has(yv.NoHttpTransferCache)||n?[]:JR({}),e])}var Ou=class i{loadingCount=N(0);isLoading=Pe(()=>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||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};function xv(i){let e=s=>Array.isArray(s)?s.filter(a=>typeof a=="string").join(", "):"";if(!i)return"Unhandled error";let t=i?.error,n=e(t?.errors);if(n)return n;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(i)&&i.length>0)return e(i)||"Unhandled error";let o=e(i?.messages);if(o)return o;if(typeof i?.messages=="string"&&i.messages.trim())return i.messages;if(typeof i?.message=="string"&&i.message.trim())return i.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 i?.status===401?"Unauthorized: Please verify your credentials and try again":"Unhandled error"}var da=class i{toastsSignal=N([]);toasts=Pe(()=>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(n=>n.id!==e))}pushToast(e,t,n){let r={id:Date.now()+Math.floor(Math.random()*1e3),type:e,title:t,message:n,timeout:this.defaultTimeoutMs};this.toastsSignal.update(s=>[...s,r]),(e==="error"?console.error:e==="warning"?console.warn:console.info)(`[${t}] ${n}`),setTimeout(()=>{this.dismissToast(r.id)},r.timeout)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var up=class i{constructor(e){this.toasterService=e}handleError(e){e instanceof il&&this.showError(e)}showError(e){return this.toasterService.showError(xv(e)),Ua(()=>e)}static \u0275fac=function(t){return new(t||i)(We(da))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var tk=(i,e)=>{let t=Z(up),n=Z(Ou),r=i.headers.has("skipHandleError"),o=i.headers.get("Loader")==="true";return o&&n.show(),e(i).pipe(uc(s=>(r||t.handleError(s),r?os(null):Ua(()=>s))),ph(()=>{o&&n.hide()}))};var nk=[tk];var ik={apiUrl:"https://pixeasy-stage-api-htapefcta9c3arfd.westus3-01.azurewebsites.net/api/"};var _v=new Xe("ENV"),eye=new Xe("LOADER_DELAY");var rk={provide:_v,useValue:ik};function ok(){return[i1(),ek(QR()),Lw(Bw(nk)),rk,Ou]}var mk=(()=>{class i{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,n){this._renderer=t,this._elementRef=n}setProperty(t,n){this._renderer.setProperty(this._elementRef.nativeElement,t,n)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(n){return new(n||i)(jt(la),jt(Tr))};static \u0275dir=Zn({type:i})}return i})(),vp=(()=>{class i extends mk{static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,features:[Ir]})}return i})(),rl=new Xe(""),a9={provide:rl,useExisting:zi(()=>Ww),multi:!0},Ww=(()=>{class i extends vp{writeValue(t){this.setProperty("checked",t)}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(n,r){n&1&&oe("change",function(s){return r.onChange(s.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[so([a9]),Ir]})}return i})(),l9={provide:rl,useExisting:zi(()=>Fu),multi:!0};function c9(){let i=ao()?ao().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var d9=new Xe(""),Fu=(()=>{class i extends mk{_compositionMode;_composing=!1;constructor(t,n,r){super(t,n),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!c9())}writeValue(t){let n=t??"";this.setProperty("value",n)}_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(n){return new(n||i)(jt(la),jt(Tr),jt(d9,8))};static \u0275dir=Zn({type:i,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(n,r){n&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:[so([l9]),Ir]})}return i})();var $w=new Xe(""),u9=new Xe("");function f9(i){return e=>{if(e.value==null||i==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t<i?{min:{min:i,actual:e.value}}:null}}function h9(i){return e=>{if(e.value==null||i==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t>i?{max:{max:i,actual:e.value}}:null}}function sk(i){return null}function gk(i){return i!=null}function vk(i){return wu(i)?hh(i):i}function bk(i){let e={};return i.forEach(t=>{e=t!=null?R(R({},e),t):e}),Object.keys(e).length===0?null:e}function yk(i,e){return e.map(t=>t(i))}function p9(i){return!i.validate}function xk(i){return i.map(e=>p9(e)?e:t=>e.validate(t))}function m9(i){if(!i)return null;let e=i.filter(gk);return e.length==0?null:function(t){return bk(yk(t,e))}}function _k(i){return i!=null?m9(xk(i)):null}function g9(i){if(!i)return null;let e=i.filter(gk);return e.length==0?null:function(t){let n=yk(t,e).map(vk);return tS(n).pipe(rr(bk))}}function Sk(i){return i!=null?g9(xk(i)):null}function ak(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function v9(i){return i._rawValidators}function b9(i){return i._rawAsyncValidators}function zw(i){return i?Array.isArray(i)?i:[i]:[]}function Cv(i,e){return Array.isArray(i)?i.includes(e):i===e}function lk(i,e){let t=zw(e);return zw(i).forEach(r=>{Cv(t,r)||t.push(r)}),t}function ck(i,e){return zw(e).filter(t=>!Cv(i,t))}var wv=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=_k(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Sk(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}},Vw=class extends wv{name;get formDirective(){return null}get path(){return null}},gp=class extends wv{_parent=null;name=null;valueAccessor=null},Gw=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 ol=(()=>{class i extends Gw{constructor(t){super(t)}static \u0275fac=function(n){return new(n||i)(jt(gp,2))};static \u0275dir=Zn({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&ft("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:[Ir]})}return i})();var fp="VALID",Sv="INVALID",Ru="PENDING",hp="DISABLED",Bc=class{},Ev=class extends Bc{value;source;constructor(e,t){super(),this.value=e,this.source=t}},pp=class extends Bc{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},mp=class extends Bc{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},ku=class extends Bc{status;source;constructor(e,t){super(),this.status=e,this.source=t}};var Hw=class extends Bc{source;constructor(e){super(),this.source=e}};function y9(i){return(Mv(i)?i.validators:i)||null}function x9(i){return Array.isArray(i)?_k(i):i||null}function _9(i,e){return(Mv(e)?e.asyncValidators:i)||null}function S9(i){return Array.isArray(i)?Sk(i):i||null}function Mv(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}var jw=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 En(this.statusReactive)}set status(e){En(()=>this.statusReactive.set(e))}_status=Pe(()=>this.statusReactive());statusReactive=N(void 0);get valid(){return this.status===fp}get invalid(){return this.status===Sv}get pending(){return this.status==Ru}get disabled(){return this.status===hp}get enabled(){return this.status!==hp}errors;get pristine(){return En(this.pristineReactive)}set pristine(e){En(()=>this.pristineReactive.set(e))}_pristine=Pe(()=>this.pristineReactive());pristineReactive=N(!0);get dirty(){return!this.pristine}get touched(){return En(this.touchedReactive)}set touched(e){En(()=>this.touchedReactive.set(e))}_touched=Pe(()=>this.touchedReactive());touchedReactive=N(!1);get untouched(){return!this.touched}_events=new wo;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(lk(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(lk(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(ck(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(ck(e,this._rawAsyncValidators))}hasValidator(e){return Cv(this._rawValidators,e)}hasAsyncValidator(e){return Cv(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsTouched(fe(R({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new mp(!0,n))}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 n=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),e.onlySelf||this._parent?._updateTouched(e,n),t&&e.emitEvent!==!1&&this._events.next(new mp(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty(fe(R({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new pp(!1,n))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),e.onlySelf||this._parent?._updatePristine(e,n),t&&e.emitEvent!==!1&&this._events.next(new pp(!0,n))}markAsPending(e={}){this.status=Ru;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new ku(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending(fe(R({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=hp,this.errors=null,this._forEachChild(r=>{r.disable(fe(R({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Ev(this.value,n)),this._events.next(new ku(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(fe(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=fp,this._forEachChild(n=>{n.enable(fe(R({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(fe(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(n=>n(!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 n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===fp||this.status===Ru)&&this._runAsyncValidator(n,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Ev(this.value,t)),this._events.next(new ku(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity(fe(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()?hp:fp}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=Ru,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let n=vk(this.asyncValidator(this));this._asyncValidationSubscription=n.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((n,r)=>n&&n._find(r),this)}getError(e,t){let n=t?this.get(t):this;return n?.errors?n.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,n){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||n)&&this._events.next(new ku(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new yr,this.statusChanges=new yr}_calculateStatus(){return this._allControlsDisabled()?hp:this.errors?Sv:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Ru)?Ru:this._anyControlsHaveStatus(Sv)?Sv:fp}_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 n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,e.onlySelf||this._parent?._updatePristine(e,t),r&&this._events.next(new pp(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new mp(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Mv(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=x9(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=S9(this._rawAsyncValidators)}};var Ck=new Xe("",{factory:()=>Xw}),Xw="always";function C9(i,e){return[...e.path,i]}function w9(i,e,t=Xw){M9(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),T9(i,e),I9(i,e),D9(i,e),E9(i,e)}function dk(i,e){i.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function E9(i,e){if(e.valueAccessor.setDisabledState){let t=n=>{e.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(t),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(t)})}}function M9(i,e){let t=v9(i);e.validator!==null?i.setValidators(ak(t,e.validator)):typeof t=="function"&&i.setValidators([t]);let n=b9(i);e.asyncValidator!==null?i.setAsyncValidators(ak(n,e.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();dk(e._rawValidators,r),dk(e._rawAsyncValidators,r)}function T9(i,e){e.valueAccessor.registerOnChange(t=>{i._pendingValue=t,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&wk(i,e)})}function D9(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&wk(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function wk(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function I9(i,e){let t=(n,r)=>{e.valueAccessor.writeValue(n),r&&e.viewToModelUpdate(n)};i.registerOnChange(t),e._registerOnDestroy(()=>{i._unregisterOnChange(t)})}function P9(i,e){if(!i.hasOwnProperty("model"))return!1;let t=i.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function A9(i){return Object.getPrototypeOf(i.constructor)===vp}function O9(i,e){if(!e)return null;Array.isArray(e);let t,n,r;return e.forEach(o=>{o.constructor===Fu?t=o:A9(o)?n=o:r=o}),r||n||t||null}function uk(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function fk(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var R9=class extends jw{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,n){super(y9(t),_9(n,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Mv(t)&&(t.nonNullable||t.initialValueIsDefault)&&(fk(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(n=>n(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 Hw(this))}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){uk(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){uk(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){fk(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 k9={provide:gp,useExisting:zi(()=>ua)},hk=Promise.resolve(),ua=(()=>{class i extends gp{_changeDetectorRef;callSetDisabledState;control=new R9;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new yr;constructor(t,n,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this._parent=t,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=O9(this,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let n=t.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),P9(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(){w9(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){hk.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let n=t.isDisabled.currentValue,r=n!==0&&rv(n);hk.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?C9(t,this._parent):[t]}static \u0275fac=function(n){return new(n||i)(jt(Vw,9),jt($w,10),jt(u9,10),jt(rl,10),jt(iv,8),jt(Ck,8))};static \u0275dir=Zn({type:i,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:[so([k9]),Ir,gu]})}return i})();var F9={provide:rl,useExisting:zi(()=>bp),multi:!0},bp=(()=>{class i extends vp{writeValue(t){let n=t??"";this.setProperty("value",n)}registerOnChange(t){this.onChange=n=>{t(n==""?null:parseFloat(n))}}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,r){n&1&&oe("input",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[so([F9]),Ir]})}return i})();var N9={provide:rl,useExisting:zi(()=>Tv),multi:!0};function Ek(i,e){return i==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function L9(i){return i.split(":")[0]}var Tv=(()=>{class i extends vp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=Z(Pr).injector;destroyRef=Z(ar);cdr=Z(iv);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,A0({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(t){this.cdr.markForCheck(),this.value=t;let n=this._getOptionId(t),r=Ek(n,t);this.setProperty("value",r)}registerOnChange(t){this.onChange=n=>{this.value=this._getOptionValue(n),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n),t))return n;return null}_getOptionValue(t){let n=L9(t);return this._optionMap.has(n)?this._optionMap.get(n):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,r){n&1&&oe("change",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[so([N9]),Ir]})}return i})(),Mk=(()=>{class i{_element;_renderer;_select;id;constructor(t,n,r){this._element=t,this._renderer=n,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(Ek(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(n){return new(n||i)(jt(Tr),jt(la),jt(Tv,9))};static \u0275dir=Zn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})(),B9={provide:rl,useExisting:zi(()=>Tk),multi:!0};function pk(i,e){return i==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function U9(i){return i.split(":")[0]}var Tk=(()=>{class i extends vp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let n;if(Array.isArray(t)){let r=t.map(o=>this._getOptionId(o));n=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else n=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(t){this.onChange=n=>{let r=[],o=n.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=n.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 n=(this._idCounter++).toString();return this._optionMap.set(n,t),n}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n)._value,t))return n;return null}_getOptionValue(t){let n=U9(t);return this._optionMap.has(n)?this._optionMap.get(n)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,r){n&1&&oe("change",function(s){return r.onChange(s.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[so([B9]),Ir]})}return i})(),Dk=(()=>{class i{_element;_renderer;_select;id;_value;constructor(t,n,r){this._element=t,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(pk(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(pk(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(n){return new(n||i)(jt(Tr),jt(la),jt(Tk,9))};static \u0275dir=Zn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})();function Ik(i){return typeof i=="number"?i:parseFloat(i)}var Pk=(()=>{class i{_validator=sk;_onChange;_enabled;ngOnChanges(t){if(this.inputName in t){let n=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):sk,this._onChange?.()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}static \u0275fac=function(n){return new(n||i)};static \u0275dir=Zn({type:i,features:[gu]})}return i})(),z9={provide:$w,useExisting:zi(()=>yp),multi:!0},yp=(()=>{class i extends Pk{max;inputName="max";normalizeInput=t=>Ik(t);createValidator=t=>h9(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&Pn("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[so([z9]),Ir]})}return i})(),V9={provide:$w,useExisting:zi(()=>xp),multi:!0},xp=(()=>{class i extends Pk{min;inputName="min";normalizeInput=t=>Ik(t);createValidator=t=>f9(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&Pn("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[so([V9]),Ir]})}return i})();var G9=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=ca({type:i});static \u0275inj=ls({})}return i})();var uo=(()=>{class i{static withConfig(t){return{ngModule:i,providers:[{provide:Ck,useValue:t.callSetDisabledState??Xw}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=ca({type:i});static \u0275inj=ls({imports:[G9]})}return i})();var _l={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Sl={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},oF=0,IE=1,sF=2;var Wp=1,aF=2,hf=3,Xi=0,Ki=1,Es=2,Ms=0,jc=1,PE=2,AE=3,OE=4,lF=5,hl=100,cF=101,dF=102,uF=103,fF=104,hF=200,pF=201,mF=202,gF=203,Jv=204,Qv=205,vF=206,bF=207,yF=208,xF=209,_F=210,SF=211,CF=212,wF=213,EF=214,wb=0,Eb=1,Mb=2,Wc=3,Tb=4,Db=5,Ib=6,Pb=7,Ab=0,MF=1,TF=2,Lo=0,RE=1,kE=2,FE=3,ed=4,NE=5,LE=6,BE=7;var vE=300,Cl=301,td=302,Ob=303,Rb=304,$p=306,Ju=1e3,Ai=1001,eb=1002,fi=1003,DF=1004;var Xp=1005;var jn=1006,kb=1007;var mo=1008;var lr=1009,UE=1010,zE=1011,pf=1012,Fb=1013,Bo=1014,Uo=1015,Ts=1016,Nb=1017,Lb=1018,mf=1020,VE=35902,GE=35899,HE=1021,jE=1022,go=1023,Cs=1026,wl=1027,WE=1028,Bb=1029,nd=1030,Ub=1031;var zb=1033,Yp=33776,qp=33777,Kp=33778,Zp=33779,Vb=35840,Gb=35841,Hb=35842,jb=35843,Wb=36196,$b=37492,Xb=37496,Yb=37488,qb=37489,Kb=37490,Zb=37491,Jb=37808,Qb=37809,ey=37810,ty=37811,ny=37812,iy=37813,ry=37814,oy=37815,sy=37816,ay=37817,ly=37818,cy=37819,dy=37820,uy=37821,fy=36492,hy=36494,py=36495,my=36283,gy=36284,vy=36285,by=36286;var Dp=2300,tb=2301,Zv=2302,bE=2400,yE=2401,xE=2402;var IF=3200;var $E=0,PF=1,Sa="",vn="srgb",$c="srgb-linear",Ip="linear",on="srgb";var Hc=7680;var _E=519,AF=512,OF=513,RF=514,yy=515,kF=516,FF=517,xy=518,NF=519,SE=35044;var XE="300 es",Fo=2e3,Pp=2001;function YE(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}function H9(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function Qu(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function LF(){let i=Qu("canvas");return i.style.display="block",i}var Ak={},ef=null;function qE(...i){let e="THREE."+i.shift();ef?ef("log",e,...i):console.log(e,...i)}function ut(...i){let e="THREE."+i.shift();ef?ef("warn",e,...i):console.warn(e,...i)}function gt(...i){let e="THREE."+i.shift();ef?ef("error",e,...i):console.error(e,...i)}function tf(...i){let e=i.join(" ");e in Ak||(Ak[e]=!0,ut(...i))}function BF(i,e,t){return new Promise(function(n,r){function o(){switch(i.clientWaitSync(e,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(o,t);break;default:n()}}setTimeout(o,t)})}var ws=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){let n=this._listeners;if(n===void 0)return;let r=n[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 n=t[e.type];if(n!==void 0){e.target=this;let r=n.slice(0);for(let o=0,s=r.length;o<s;o++)r[o].call(this,e);e.target=null}}},Ii=["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"],Ok=1234567,Mp=Math.PI/180,nf=180/Math.PI;function gf(){let i=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Ii[i&255]+Ii[i>>8&255]+Ii[i>>16&255]+Ii[i>>24&255]+"-"+Ii[e&255]+Ii[e>>8&255]+"-"+Ii[e>>16&15|64]+Ii[e>>24&255]+"-"+Ii[t&63|128]+Ii[t>>8&255]+"-"+Ii[t>>16&255]+Ii[t>>24&255]+Ii[n&255]+Ii[n>>8&255]+Ii[n>>16&255]+Ii[n>>24&255]).toLowerCase()}function Vt(i,e,t){return Math.max(e,Math.min(t,i))}function KE(i,e){return(i%e+e)%e}function j9(i,e,t,n,r){return n+(i-e)*(r-n)/(t-e)}function W9(i,e,t){return i!==e?(t-i)/(e-i):0}function Tp(i,e,t){return(1-t)*i+t*e}function $9(i,e,t,n){return Tp(i,e,1-Math.exp(-t*n))}function X9(i,e=1){return e-Math.abs(KE(i,e*2)-e)}function Y9(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function q9(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function K9(i,e){return i+Math.floor(Math.random()*(e-i+1))}function Z9(i,e){return i+Math.random()*(e-i)}function J9(i){return i*(.5-Math.random())}function Q9(i){i!==void 0&&(Ok=i);let e=Ok+=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 eW(i){return i*Mp}function tW(i){return i*nf}function nW(i){return(i&i-1)===0&&i!==0}function iW(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function rW(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function oW(i,e,t,n,r){let o=Math.cos,s=Math.sin,a=o(t/2),l=s(t/2),c=o((e+n)/2),d=s((e+n)/2),u=o((e-n)/2),f=s((e-n)/2),h=o((n-e)/2),p=s((n-e)/2);switch(r){case"XYX":i.set(a*d,l*u,l*f,a*c);break;case"YZY":i.set(l*f,a*d,l*u,a*c);break;case"ZXZ":i.set(l*u,l*f,a*d,a*c);break;case"XZX":i.set(a*d,l*p,l*h,a*c);break;case"YXY":i.set(l*h,a*d,l*p,a*c);break;case"ZYZ":i.set(l*p,l*h,a*d,a*c);break;default:ut("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function qu(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function $i(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return Math.round(i*4294967295);case Uint16Array:return Math.round(i*65535);case Uint8Array:return Math.round(i*255);case Int32Array:return Math.round(i*2147483647);case Int16Array:return Math.round(i*32767);case Int8Array:return Math.round(i*127);default:throw new Error("Invalid component type.")}}var tn={DEG2RAD:Mp,RAD2DEG:nf,generateUUID:gf,clamp:Vt,euclideanModulo:KE,mapLinear:j9,inverseLerp:W9,lerp:Tp,damp:$9,pingpong:X9,smoothstep:Y9,smootherstep:q9,randInt:K9,randFloat:Z9,randFloatSpread:J9,seededRandom:Q9,degToRad:eW,radToDeg:tW,isPowerOfTwo:nW,ceilPowerOfTwo:iW,floorPowerOfTwo:rW,setQuaternionFromProperEuler:oW,normalize:$i,denormalize:qu},vt=class i{constructor(e=0,t=0){i.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,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+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=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Vt(n,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 n=this.dot(e)/t;return Math.acos(Vt(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}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,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,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 n=Math.cos(t),r=Math.sin(t),o=this.x-e.x,s=this.y-e.y;return this.x=o*n-s*r+e.x,this.y=o*r+s*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},po=class{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,o,s,a){let l=n[r+0],c=n[r+1],d=n[r+2],u=n[r+3],f=o[s+0],h=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]=d,e[t+3]=u;return}if(a>=1){e[t+0]=f,e[t+1]=h,e[t+2]=p,e[t+3]=v;return}if(u!==v||l!==f||c!==h||d!==p){let g=l*f+c*h+d*p+u*v;g<0&&(f=-f,h=-h,p=-p,v=-v,g=-g);let m=1-a;if(g<.9995){let b=Math.acos(g),y=Math.sin(b);m=Math.sin(m*b)/y,a=Math.sin(a*b)/y,l=l*m+f*a,c=c*m+h*a,d=d*m+p*a,u=u*m+v*a}else{l=l*m+f*a,c=c*m+h*a,d=d*m+p*a,u=u*m+v*a;let b=1/Math.sqrt(l*l+c*c+d*d+u*u);l*=b,c*=b,d*=b,u*=b}}e[t]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,o,s){let a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],u=o[s],f=o[s+1],h=o[s+2],p=o[s+3];return e[t]=a*p+d*u+l*h-c*f,e[t+1]=l*p+d*f+c*u-a*h,e[t+2]=c*p+d*h+a*f-l*u,e[t+3]=d*p-a*u-l*f-c*h,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,n,r){return this._x=e,this._y=t,this._z=n,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 n=e._x,r=e._y,o=e._z,s=e._order,a=Math.cos,l=Math.sin,c=a(n/2),d=a(r/2),u=a(o/2),f=l(n/2),h=l(r/2),p=l(o/2);switch(s){case"XYZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"YXZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"ZXY":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"ZYX":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"YZX":this._x=f*d*u+c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u-f*h*p;break;case"XZY":this._x=f*d*u-c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u+f*h*p;break;default:ut("Quaternion: .setFromEuler() encountered an unknown order: "+s)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],r=t[4],o=t[8],s=t[1],a=t[5],l=t[9],c=t[2],d=t[6],u=t[10],f=n+a+u;if(f>0){let h=.5/Math.sqrt(f+1);this._w=.25/h,this._x=(d-l)*h,this._y=(o-c)*h,this._z=(s-r)*h}else if(n>a&&n>u){let h=2*Math.sqrt(1+n-a-u);this._w=(d-l)/h,this._x=.25*h,this._y=(r+s)/h,this._z=(o+c)/h}else if(a>u){let h=2*Math.sqrt(1+a-n-u);this._w=(o-c)/h,this._x=(r+s)/h,this._y=.25*h,this._z=(l+d)/h}else{let h=2*Math.sqrt(1+u-n-a);this._w=(s-r)/h,this._x=(o+c)/h,this._y=(l+d)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(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=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Vt(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(n===0)return this;let r=Math.min(1,t/n);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 n=e._x,r=e._y,o=e._z,s=e._w,a=t._x,l=t._y,c=t._z,d=t._w;return this._x=n*d+s*a+r*c-o*l,this._y=r*d+s*l+o*a-n*c,this._z=o*d+s*c+n*l-r*a,this._w=s*d-n*a-r*l-o*c,this._onChangeCallback(),this}slerp(e,t){if(t<=0)return this;if(t>=1)return this.copy(e);let n=e._x,r=e._y,o=e._z,s=e._w,a=this.dot(e);a<0&&(n=-n,r=-r,o=-o,s=-s,a=-a);let l=1-t;if(a<.9995){let c=Math.acos(a),d=Math.sin(c);l=Math.sin(l*c)/d,t=Math.sin(t*c)/d,this._x=this._x*l+n*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+n*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,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),o=Math.sqrt(n);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}},G=class i{constructor(e=0,t=0,n=0){i.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,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(Rk.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Rk.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[3]*n+o[6]*r,this.y=o[1]*t+o[4]*n+o[7]*r,this.z=o[2]*t+o[5]*n+o[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,o=e.elements,s=1/(o[3]*t+o[7]*n+o[11]*r+o[15]);return this.x=(o[0]*t+o[4]*n+o[8]*r+o[12])*s,this.y=(o[1]*t+o[5]*n+o[9]*r+o[13])*s,this.z=(o[2]*t+o[6]*n+o[10]*r+o[14])*s,this}applyQuaternion(e){let t=this.x,n=this.y,r=this.z,o=e.x,s=e.y,a=e.z,l=e.w,c=2*(s*r-a*n),d=2*(a*t-o*r),u=2*(o*n-s*t);return this.x=t+l*c+s*u-a*d,this.y=n+l*d+a*c-o*u,this.z=r+l*u+o*d-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,n=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r,this.y=o[1]*t+o[5]*n+o[9]*r,this.z=o[2]*t+o[6]*n+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=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this.z=Vt(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this.z=Vt(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Vt(n,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,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let n=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-n*l,this.z=n*a-r*s,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return Yw.copy(this).projectOnVector(e),this.sub(Yw)}reflect(e){return this.sub(Yw.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 n=this.dot(e)/t;return Math.acos(Vt(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+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,n){let r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,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(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,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,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},Yw=new G,Rk=new po,At=class i{constructor(e,t,n,r,o,s,a,l,c){i.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,r,o,s,a,l,c)}set(e,t,n,r,o,s,a,l,c){let d=this.elements;return d[0]=e,d[1]=r,d[2]=a,d[3]=t,d[4]=o,d[5]=l,d[6]=n,d[7]=s,d[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.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 n=e.elements,r=t.elements,o=this.elements,s=n[0],a=n[3],l=n[6],c=n[1],d=n[4],u=n[7],f=n[2],h=n[5],p=n[8],v=r[0],g=r[3],m=r[6],b=r[1],y=r[4],x=r[7],_=r[2],w=r[5],T=r[8];return o[0]=s*v+a*b+l*_,o[3]=s*g+a*y+l*w,o[6]=s*m+a*x+l*T,o[1]=c*v+d*b+u*_,o[4]=c*g+d*y+u*w,o[7]=c*m+d*x+u*T,o[2]=f*v+h*b+p*_,o[5]=f*g+h*y+p*w,o[8]=f*m+h*x+p*T,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],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8];return t*s*d-t*a*c-n*o*d+n*a*l+r*o*c-r*s*l}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8],u=d*s-a*c,f=a*l-d*o,h=c*o-s*l,p=t*u+n*f+r*h;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);let v=1/p;return e[0]=u*v,e[1]=(r*c-d*n)*v,e[2]=(a*n-r*s)*v,e[3]=f*v,e[4]=(d*t-r*l)*v,e[5]=(r*o-a*t)*v,e[6]=h*v,e[7]=(n*l-c*t)*v,e[8]=(s*t-n*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,n,r,o,s,a){let l=Math.cos(o),c=Math.sin(o);return this.set(n*l,n*c,-n*(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(qw.makeScale(e,t)),this}rotate(e){return this.premultiply(qw.makeRotation(-e)),this}translate(e,t){return this.premultiply(qw.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),n=Math.sin(e);return this.set(t,-n,0,n,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,n=e.elements;for(let r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}},qw=new At,kk=new At().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Fk=new At().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function sW(){let i={enabled:!0,workingColorSpace:$c,spaces:{},convert:function(r,o,s){return this.enabled===!1||o===s||!o||!s||(this.spaces[o].transfer===on&&(r.r=ya(r.r),r.g=ya(r.g),r.b=ya(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===on&&(r.r=Ku(r.r),r.g=Ku(r.g),r.b=Ku(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===Sa?Ip: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 tf("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),i.workingToColorSpace(r,o)},toWorkingColorSpace:function(r,o){return tf("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),i.colorSpaceToWorking(r,o)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return i.define({[$c]:{primaries:e,whitePoint:n,transfer:Ip,toXYZ:kk,fromXYZ:Fk,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:vn},outputColorSpaceConfig:{drawingBufferColorSpace:vn}},[vn]:{primaries:e,whitePoint:n,transfer:on,toXYZ:kk,fromXYZ:Fk,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:vn}}}),i}var zt=sW();function ya(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function Ku(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}var Nu,nb=class{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{Nu===void 0&&(Nu=Qu("canvas")),Nu.width=e.width,Nu.height=e.height;let r=Nu.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=Nu}return n.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=Qu("canvas");t.width=e.width,t.height=e.height;let n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);let r=n.getImageData(0,0,e.width,e.height),o=r.data;for(let s=0;s<o.length;s++)o[s]=ya(o[s]/255)*255;return n.putImageData(r,0,0),t}else if(e.data){let t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(ya(t[n]/255)*255):t[n]=ya(t[n]);return{data:t,width:e.width,height:e.height}}else return ut("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},aW=0,rf=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:aW++}),this.uuid=gf(),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 n={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(Kw(r[s].image)):o.push(Kw(r[s]))}else o=Kw(r);n.url=o}return t||(e.images[this.uuid]=n),n}};function Kw(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?nb.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(ut("Texture: Unable to serialize Texture."),{})}var lW=0,Zw=new G,zo=(()=>{class i extends ws{constructor(t=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Ai,o=Ai,s=jn,a=mo,l=go,c=lr,d=i.DEFAULT_ANISOTROPY,u=Sa){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:lW++}),this.uuid=gf(),this.name="",this.source=new rf(t),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=o,this.magFilter=s,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new vt(0,0),this.repeat=new vt(1,1),this.center=new vt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new At,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,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(Zw).x}get height(){return this.source.getSize(Zw).y}get depth(){return this.source.getSize(Zw).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,n){this.updateRanges.push({start:t,count:n})}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 n in t){let r=t[n];if(r===void 0){ut(`Texture.setValues(): parameter '${n}' has value of undefined.`);continue}let o=this[n];if(o===void 0){ut(`Texture.setValues(): property '${n}' 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[n]=r}}toJSON(t){let n=t===void 0||typeof t=="string";if(!n&&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),n||(t.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==vE)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Ju:t.x=t.x-Math.floor(t.x);break;case Ai:t.x=t.x<0?0:1;break;case eb: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 Ju:t.y=t.y-Math.floor(t.y);break;case Ai:t.y=t.y<0?0:1;break;case eb: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 i.DEFAULT_IMAGE=null,i.DEFAULT_MAPPING=vE,i.DEFAULT_ANISOTROPY=1,i})(),An=class i{constructor(e=0,t=0,n=0,r=1){i.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,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,n,r){return this.x=e,this.y=t,this.z=n,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,n=this.y,r=this.z,o=this.w,s=e.elements;return this.x=s[0]*t+s[4]*n+s[8]*r+s[12]*o,this.y=s[1]*t+s[5]*n+s[9]*r+s[13]*o,this.z=s[2]*t+s[6]*n+s[10]*r+s[14]*o,this.w=s[3]*t+s[7]*n+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,n,r,o,l=e.elements,c=l[0],d=l[4],u=l[8],f=l[1],h=l[5],p=l[9],v=l[2],g=l[6],m=l[10];if(Math.abs(d-f)<.01&&Math.abs(u-v)<.01&&Math.abs(p-g)<.01){if(Math.abs(d+f)<.1&&Math.abs(u+v)<.1&&Math.abs(p+g)<.1&&Math.abs(c+h+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let y=(c+1)/2,x=(h+1)/2,_=(m+1)/2,w=(d+f)/4,T=(u+v)/4,P=(p+g)/4;return y>x&&y>_?y<.01?(n=0,r=.707106781,o=.707106781):(n=Math.sqrt(y),r=w/n,o=T/n):x>_?x<.01?(n=.707106781,r=0,o=.707106781):(r=Math.sqrt(x),n=w/r,o=P/r):_<.01?(n=.707106781,r=.707106781,o=0):(o=Math.sqrt(_),n=T/o,r=P/o),this.set(n,r,o,t),this}let b=Math.sqrt((g-p)*(g-p)+(u-v)*(u-v)+(f-d)*(f-d));return Math.abs(b)<.001&&(b=1),this.x=(g-p)/b,this.y=(u-v)/b,this.z=(f-d)/b,this.w=Math.acos((c+h+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=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this.z=Vt(this.z,e.z,t.z),this.w=Vt(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this.z=Vt(this.z,e,t),this.w=Vt(this.w,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Vt(n,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,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,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}},ib=class extends ws{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:jn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new An(0,0,e,t),this.scissorTest=!1,this.viewport=new An(0,0,e,t);let r={width:e,height:t,depth:n.depth},o=new zo(r);this.textures=[];let s=n.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(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){let t={minFilter:jn,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 n=0;n<this.textures.length;n++)this.textures[n].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,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;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=n,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,n=e.textures.length;t<n;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 rf(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"})}},Fr=class extends ib{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}},Ap=class extends zo{constructor(e=null,t=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=fi,this.minFilter=fi,this.wrapR=Ai,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var rb=class extends zo{constructor(e=null,t=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=fi,this.minFilter=fi,this.wrapR=Ai,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Yi=class{constructor(e=new G(1/0,1/0,1/0),t=new G(-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,n=e.length;t<n;t+=3)this.expandByPoint(Oo.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(Oo.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let n=Oo.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),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 n=e.geometry;if(n!==void 0){let o=n.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,Oo):Oo.fromBufferAttribute(o,s),Oo.applyMatrix4(e.matrixWorld),this.expandByPoint(Oo);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Iv.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Iv.copy(n.boundingBox)),Iv.applyMatrix4(e.matrixWorld),this.union(Iv)}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,Oo),Oo.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(_p),Pv.subVectors(this.max,_p),Lu.subVectors(e.a,_p),Bu.subVectors(e.b,_p),Uu.subVectors(e.c,_p),sl.subVectors(Bu,Lu),al.subVectors(Uu,Bu),Uc.subVectors(Lu,Uu);let t=[0,-sl.z,sl.y,0,-al.z,al.y,0,-Uc.z,Uc.y,sl.z,0,-sl.x,al.z,0,-al.x,Uc.z,0,-Uc.x,-sl.y,sl.x,0,-al.y,al.x,0,-Uc.y,Uc.x,0];return!Jw(t,Lu,Bu,Uu,Pv)||(t=[1,0,0,0,1,0,0,0,1],!Jw(t,Lu,Bu,Uu,Pv))?!1:(Av.crossVectors(sl,al),t=[Av.x,Av.y,Av.z],Jw(t,Lu,Bu,Uu,Pv))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Oo).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Oo).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:(fa[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),fa[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),fa[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),fa[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),fa[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),fa[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),fa[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),fa[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(fa),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}},fa=[new G,new G,new G,new G,new G,new G,new G,new G],Oo=new G,Iv=new Yi,Lu=new G,Bu=new G,Uu=new G,sl=new G,al=new G,Uc=new G,_p=new G,Pv=new G,Av=new G,zc=new G;function Jw(i,e,t,n,r){for(let o=0,s=i.length-3;o<=s;o+=3){zc.fromArray(i,o);let a=r.x*Math.abs(zc.x)+r.y*Math.abs(zc.y)+r.z*Math.abs(zc.z),l=e.dot(zc),c=t.dot(zc),d=n.dot(zc);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}var cW=new Yi,Sp=new G,Qw=new G,pl=class{constructor(e=new G,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 n=this.center;t!==void 0?n.copy(t):cW.setFromPoints(e).getCenter(n);let r=0;for(let o=0,s=e.length;o<s;o++)r=Math.max(r,n.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 n=this.center.distanceToSquared(e);return t.copy(e),n>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;Sp.subVectors(e,this.center);let t=Sp.lengthSq();if(t>this.radius*this.radius){let n=Math.sqrt(t),r=(n-this.radius)*.5;this.center.addScaledVector(Sp,r/n),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):(Qw.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Sp.copy(e.center).add(Qw)),this.expandByPoint(Sp.copy(e.center).sub(Qw))),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}},ha=new G,eE=new G,Ov=new G,ll=new G,tE=new G,Rv=new G,nE=new G,xa=class{constructor(e=new G,t=new G(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,ha)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=ha.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ha.copy(this.origin).addScaledVector(this.direction,t),ha.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){eE.copy(e).add(t).multiplyScalar(.5),Ov.copy(t).sub(e).normalize(),ll.copy(this.origin).sub(eE);let o=e.distanceTo(t)*.5,s=-this.direction.dot(Ov),a=ll.dot(this.direction),l=-ll.dot(Ov),c=ll.lengthSq(),d=Math.abs(1-s*s),u,f,h,p;if(d>0)if(u=s*l-a,f=s*a-l,p=o*d,u>=0)if(f>=-p)if(f<=p){let v=1/d;u*=v,f*=v,h=u*(u+s*f+2*a)+f*(s*u+f+2*l)+c}else f=o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;else f=-o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;else f<=-p?(u=Math.max(0,-(-s*o+a)),f=u>0?-o:Math.min(Math.max(-o,-l),o),h=-u*u+f*(f+2*l)+c):f<=p?(u=0,f=Math.min(Math.max(-o,-l),o),h=f*(f+2*l)+c):(u=Math.max(0,-(s*o+a)),f=u>0?o:Math.min(Math.max(-o,-l),o),h=-u*u+f*(f+2*l)+c);else f=s>0?-o:o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,u),r&&r.copy(eE).addScaledVector(Ov,f),h}intersectSphere(e,t){ha.subVectors(e.center,this.origin);let n=ha.dot(this.direction),r=ha.dot(ha)-n*n,o=e.radius*e.radius;if(r>o)return null;let s=Math.sqrt(o-r),a=n-s,l=n+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 n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,o,s,a,l,c=1/this.direction.x,d=1/this.direction.y,u=1/this.direction.z,f=this.origin;return c>=0?(n=(e.min.x-f.x)*c,r=(e.max.x-f.x)*c):(n=(e.max.x-f.x)*c,r=(e.min.x-f.x)*c),d>=0?(o=(e.min.y-f.y)*d,s=(e.max.y-f.y)*d):(o=(e.max.y-f.y)*d,s=(e.min.y-f.y)*d),n>s||o>r||((o>n||isNaN(n))&&(n=o),(s<r||isNaN(r))&&(r=s),u>=0?(a=(e.min.z-f.z)*u,l=(e.max.z-f.z)*u):(a=(e.max.z-f.z)*u,l=(e.min.z-f.z)*u),n>l||a>r)||((a>n||n!==n)&&(n=a),(l<r||r!==r)&&(r=l),r<0)?null:this.at(n>=0?n:r,t)}intersectsBox(e){return this.intersectBox(e,ha)!==null}intersectTriangle(e,t,n,r,o){tE.subVectors(t,e),Rv.subVectors(n,e),nE.crossVectors(tE,Rv);let s=this.direction.dot(nE),a;if(s>0){if(r)return null;a=1}else if(s<0)a=-1,s=-s;else return null;ll.subVectors(this.origin,e);let l=a*this.direction.dot(Rv.crossVectors(ll,Rv));if(l<0)return null;let c=a*this.direction.dot(tE.cross(ll));if(c<0||l+c>s)return null;let d=-a*ll.dot(nE);return d<0?null:this.at(d/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)}},Mn=class i{constructor(e,t,n,r,o,s,a,l,c,d,u,f,h,p,v,g){i.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,n,r,o,s,a,l,c,d,u,f,h,p,v,g)}set(e,t,n,r,o,s,a,l,c,d,u,f,h,p,v,g){let m=this.elements;return m[0]=e,m[4]=t,m[8]=n,m[12]=r,m[1]=o,m[5]=s,m[9]=a,m[13]=l,m[2]=c,m[6]=d,m[10]=u,m[14]=f,m[3]=h,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 i().fromArray(this.elements)}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){let t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[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,n){return this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),n.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this)}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();let t=this.elements,n=e.elements,r=1/zu.setFromMatrixColumn(e,0).length(),o=1/zu.setFromMatrixColumn(e,1).length(),s=1/zu.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*o,t[5]=n[5]*o,t[6]=n[6]*o,t[7]=0,t[8]=n[8]*s,t[9]=n[9]*s,t[10]=n[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,n=e.x,r=e.y,o=e.z,s=Math.cos(n),a=Math.sin(n),l=Math.cos(r),c=Math.sin(r),d=Math.cos(o),u=Math.sin(o);if(e.order==="XYZ"){let f=s*d,h=s*u,p=a*d,v=a*u;t[0]=l*d,t[4]=-l*u,t[8]=c,t[1]=h+p*c,t[5]=f-v*c,t[9]=-a*l,t[2]=v-f*c,t[6]=p+h*c,t[10]=s*l}else if(e.order==="YXZ"){let f=l*d,h=l*u,p=c*d,v=c*u;t[0]=f+v*a,t[4]=p*a-h,t[8]=s*c,t[1]=s*u,t[5]=s*d,t[9]=-a,t[2]=h*a-p,t[6]=v+f*a,t[10]=s*l}else if(e.order==="ZXY"){let f=l*d,h=l*u,p=c*d,v=c*u;t[0]=f-v*a,t[4]=-s*u,t[8]=p+h*a,t[1]=h+p*a,t[5]=s*d,t[9]=v-f*a,t[2]=-s*c,t[6]=a,t[10]=s*l}else if(e.order==="ZYX"){let f=s*d,h=s*u,p=a*d,v=a*u;t[0]=l*d,t[4]=p*c-h,t[8]=f*c+v,t[1]=l*u,t[5]=v*c+f,t[9]=h*c-p,t[2]=-c,t[6]=a*l,t[10]=s*l}else if(e.order==="YZX"){let f=s*l,h=s*c,p=a*l,v=a*c;t[0]=l*d,t[4]=v-f*u,t[8]=p*u+h,t[1]=u,t[5]=s*d,t[9]=-a*d,t[2]=-c*d,t[6]=h*u+p,t[10]=f-v*u}else if(e.order==="XZY"){let f=s*l,h=s*c,p=a*l,v=a*c;t[0]=l*d,t[4]=-u,t[8]=c*d,t[1]=f*u+v,t[5]=s*d,t[9]=h*u-p,t[2]=p*u-h,t[6]=a*d,t[10]=v*u+f}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(dW,e,uW)}lookAt(e,t,n){let r=this.elements;return Or.subVectors(e,t),Or.lengthSq()===0&&(Or.z=1),Or.normalize(),cl.crossVectors(n,Or),cl.lengthSq()===0&&(Math.abs(n.z)===1?Or.x+=1e-4:Or.z+=1e-4,Or.normalize(),cl.crossVectors(n,Or)),cl.normalize(),kv.crossVectors(Or,cl),r[0]=cl.x,r[4]=kv.x,r[8]=Or.x,r[1]=cl.y,r[5]=kv.y,r[9]=Or.y,r[2]=cl.z,r[6]=kv.z,r[10]=Or.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,o=this.elements,s=n[0],a=n[4],l=n[8],c=n[12],d=n[1],u=n[5],f=n[9],h=n[13],p=n[2],v=n[6],g=n[10],m=n[14],b=n[3],y=n[7],x=n[11],_=n[15],w=r[0],T=r[4],P=r[8],S=r[12],D=r[1],L=r[5],H=r[9],V=r[13],X=r[2],Y=r[6],q=r[10],j=r[14],ne=r[3],ye=r[7],xe=r[11],Se=r[15];return o[0]=s*w+a*D+l*X+c*ne,o[4]=s*T+a*L+l*Y+c*ye,o[8]=s*P+a*H+l*q+c*xe,o[12]=s*S+a*V+l*j+c*Se,o[1]=d*w+u*D+f*X+h*ne,o[5]=d*T+u*L+f*Y+h*ye,o[9]=d*P+u*H+f*q+h*xe,o[13]=d*S+u*V+f*j+h*Se,o[2]=p*w+v*D+g*X+m*ne,o[6]=p*T+v*L+g*Y+m*ye,o[10]=p*P+v*H+g*q+m*xe,o[14]=p*S+v*V+g*j+m*Se,o[3]=b*w+y*D+x*X+_*ne,o[7]=b*T+y*L+x*Y+_*ye,o[11]=b*P+y*H+x*q+_*xe,o[15]=b*S+y*V+x*j+_*Se,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],n=e[4],r=e[8],o=e[12],s=e[1],a=e[5],l=e[9],c=e[13],d=e[2],u=e[6],f=e[10],h=e[14],p=e[3],v=e[7],g=e[11],m=e[15],b=l*h-c*f,y=a*h-c*u,x=a*f-l*u,_=s*h-c*d,w=s*f-l*d,T=s*u-a*d;return t*(v*b-g*y+m*x)-n*(p*b-g*_+m*w)+r*(p*y-v*_+m*T)-o*(p*x-v*w+g*T)}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,n){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]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8],u=e[9],f=e[10],h=e[11],p=e[12],v=e[13],g=e[14],m=e[15],b=u*g*c-v*f*c+v*l*h-a*g*h-u*l*m+a*f*m,y=p*f*c-d*g*c-p*l*h+s*g*h+d*l*m-s*f*m,x=d*v*c-p*u*c+p*a*h-s*v*h-d*a*m+s*u*m,_=p*u*l-d*v*l-p*a*f+s*v*f+d*a*g-s*u*g,w=t*b+n*y+r*x+o*_;if(w===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let T=1/w;return e[0]=b*T,e[1]=(v*f*o-u*g*o-v*r*h+n*g*h+u*r*m-n*f*m)*T,e[2]=(a*g*o-v*l*o+v*r*c-n*g*c-a*r*m+n*l*m)*T,e[3]=(u*l*o-a*f*o-u*r*c+n*f*c+a*r*h-n*l*h)*T,e[4]=y*T,e[5]=(d*g*o-p*f*o+p*r*h-t*g*h-d*r*m+t*f*m)*T,e[6]=(p*l*o-s*g*o-p*r*c+t*g*c+s*r*m-t*l*m)*T,e[7]=(s*f*o-d*l*o+d*r*c-t*f*c-s*r*h+t*l*h)*T,e[8]=x*T,e[9]=(p*u*o-d*v*o-p*n*h+t*v*h+d*n*m-t*u*m)*T,e[10]=(s*v*o-p*a*o+p*n*c-t*v*c-s*n*m+t*a*m)*T,e[11]=(d*a*o-s*u*o-d*n*c+t*u*c+s*n*h-t*a*h)*T,e[12]=_*T,e[13]=(d*v*r-p*u*r+p*n*f-t*v*f-d*n*g+t*u*g)*T,e[14]=(p*a*r-s*v*r-p*n*l+t*v*l+s*n*g-t*a*g)*T,e[15]=(s*u*r-d*a*r+d*n*l-t*u*l-s*n*f+t*a*f)*T,this}scale(e){let t=this.elements,n=e.x,r=e.y,o=e.z;return t[0]*=n,t[4]*=r,t[8]*=o,t[1]*=n,t[5]*=r,t[9]*=o,t[2]*=n,t[6]*=r,t[10]*=o,t[3]*=n,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],n=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,n,r))}makeTranslation(e,t,n){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,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),r=Math.sin(t),o=1-n,s=e.x,a=e.y,l=e.z,c=o*s,d=o*a;return this.set(c*s+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*s,0,c*l-r*a,d*l+r*s,o*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,o,s){return this.set(1,n,o,0,e,1,s,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){let r=this.elements,o=t._x,s=t._y,a=t._z,l=t._w,c=o+o,d=s+s,u=a+a,f=o*c,h=o*d,p=o*u,v=s*d,g=s*u,m=a*u,b=l*c,y=l*d,x=l*u,_=n.x,w=n.y,T=n.z;return r[0]=(1-(v+m))*_,r[1]=(h+x)*_,r[2]=(p-y)*_,r[3]=0,r[4]=(h-x)*w,r[5]=(1-(f+m))*w,r[6]=(g+b)*w,r[7]=0,r[8]=(p+y)*T,r[9]=(g-b)*T,r[10]=(1-(f+v))*T,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){let r=this.elements;if(e.x=r[12],e.y=r[13],e.z=r[14],this.determinant()===0)return n.set(1,1,1),t.identity(),this;let o=zu.set(r[0],r[1],r[2]).length(),s=zu.set(r[4],r[5],r[6]).length(),a=zu.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),Ro.copy(this);let c=1/o,d=1/s,u=1/a;return Ro.elements[0]*=c,Ro.elements[1]*=c,Ro.elements[2]*=c,Ro.elements[4]*=d,Ro.elements[5]*=d,Ro.elements[6]*=d,Ro.elements[8]*=u,Ro.elements[9]*=u,Ro.elements[10]*=u,t.setFromRotationMatrix(Ro),n.x=o,n.y=s,n.z=a,this}makePerspective(e,t,n,r,o,s,a=Fo,l=!1){let c=this.elements,d=2*o/(t-e),u=2*o/(n-r),f=(t+e)/(t-e),h=(n+r)/(n-r),p,v;if(l)p=o/(s-o),v=s*o/(s-o);else if(a===Fo)p=-(s+o)/(s-o),v=-2*s*o/(s-o);else if(a===Pp)p=-s/(s-o),v=-s*o/(s-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=d,c[4]=0,c[8]=f,c[12]=0,c[1]=0,c[5]=u,c[9]=h,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,n,r,o,s,a=Fo,l=!1){let c=this.elements,d=2/(t-e),u=2/(n-r),f=-(t+e)/(t-e),h=-(n+r)/(n-r),p,v;if(l)p=1/(s-o),v=s/(s-o);else if(a===Fo)p=-2/(s-o),v=-(s+o)/(s-o);else if(a===Pp)p=-1/(s-o),v=-o/(s-o);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=d,c[4]=0,c[8]=0,c[12]=f,c[1]=0,c[5]=u,c[9]=0,c[13]=h,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,n=e.elements;for(let r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}},zu=new G,Ro=new Mn,dW=new G(0,0,0),uW=new G(1,1,1),cl=new G,kv=new G,Or=new G,Nk=new Mn,Lk=new po,ml=(()=>{class i{constructor(t=0,n=0,r=0,o=i.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=n,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,n,r,o=this._order){return this._x=t,this._y=n,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,n=this._order,r=!0){let o=t.elements,s=o[0],a=o[4],l=o[8],c=o[1],d=o[5],u=o[9],f=o[2],h=o[6],p=o[10];switch(n){case"XYZ":this._y=Math.asin(Vt(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,p),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(h,d),this._z=0);break;case"YXZ":this._x=Math.asin(-Vt(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(l,p),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(Vt(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,p),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,s));break;case"ZYX":this._y=Math.asin(-Vt(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(c,s)):(this._x=0,this._z=Math.atan2(-a,d));break;case"YZX":this._z=Math.asin(Vt(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-u,d),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(l,p));break;case"XZY":this._z=Math.asin(-Vt(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(h,d),this._y=Math.atan2(l,s)):(this._x=Math.atan2(-u,p),this._y=0);break;default:ut("Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(t,n,r){return Nk.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Nk,n,r)}setFromVector3(t,n=this._order){return this.set(t.x,t.y,t.z,n)}reorder(t){return Lk.setFromEuler(this),this.setFromQuaternion(Lk,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=[],n=0){return t[n]=this._x,t[n+1]=this._y,t[n+2]=this._z,t[n+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 i.DEFAULT_ORDER="XYZ",i})(),of=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}},fW=0,Bk=new G,Vu=new po,pa=new Mn,Fv=new G,Cp=new G,hW=new G,pW=new po,Uk=new G(1,0,0),zk=new G(0,1,0),Vk=new G(0,0,1),Gk={type:"added"},mW={type:"removed"},Gu={type:"childadded",child:null},iE={type:"childremoved",child:null},Nr=(()=>{class i extends ws{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:fW++}),this.uuid=gf(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();let t=new G,n=new ml,r=new po,o=new G(1,1,1);function s(){r.setFromEuler(n,!1)}function a(){n.setFromQuaternion(r,void 0,!1)}n._onChange(s),r._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:o},modelViewMatrix:{value:new Mn},normalMatrix:{value:new At}}),this.matrix=new Mn,this.matrixWorld=new Mn,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new of,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,n){this.quaternion.setFromAxisAngle(t,n)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,n){return Vu.setFromAxisAngle(t,n),this.quaternion.multiply(Vu),this}rotateOnWorldAxis(t,n){return Vu.setFromAxisAngle(t,n),this.quaternion.premultiply(Vu),this}rotateX(t){return this.rotateOnAxis(Uk,t)}rotateY(t){return this.rotateOnAxis(zk,t)}rotateZ(t){return this.rotateOnAxis(Vk,t)}translateOnAxis(t,n){return Bk.copy(t).applyQuaternion(this.quaternion),this.position.add(Bk.multiplyScalar(n)),this}translateX(t){return this.translateOnAxis(Uk,t)}translateY(t){return this.translateOnAxis(zk,t)}translateZ(t){return this.translateOnAxis(Vk,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(pa.copy(this.matrixWorld).invert())}lookAt(t,n,r){t.isVector3?Fv.copy(t):Fv.set(t,n,r);let o=this.parent;this.updateWorldMatrix(!0,!1),Cp.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?pa.lookAt(Cp,Fv,this.up):pa.lookAt(Fv,Cp,this.up),this.quaternion.setFromRotationMatrix(pa),o&&(pa.extractRotation(o.matrixWorld),Vu.setFromRotationMatrix(pa),this.quaternion.premultiply(Vu.invert()))}add(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return t===this?(gt("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(Gk),Gu.child=t,this.dispatchEvent(Gu),Gu.child=null):gt("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 n=this.children.indexOf(t);return n!==-1&&(t.parent=null,this.children.splice(n,1),t.dispatchEvent(mW),iE.child=t,this.dispatchEvent(iE),iE.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),pa.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),pa.multiply(t.parent.matrixWorld)),t.applyMatrix4(pa),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(Gk),Gu.child=t,this.dispatchEvent(Gu),Gu.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,n){if(this[t]===n)return this;for(let r=0,o=this.children.length;r<o;r++){let a=this.children[r].getObjectByProperty(t,n);if(a!==void 0)return a}}getObjectsByProperty(t,n,r=[]){this[t]===n&&r.push(this);let o=this.children;for(let s=0,a=o.length;s<a;s++)o[s].getObjectsByProperty(t,n,r);return r}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Cp,t,hW),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Cp,pW,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let n=this.matrixWorld.elements;return t.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(t){t(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverseVisible(t)}traverseAncestors(t){let n=this.parent;n!==null&&(t(n),n.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 n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].updateMatrixWorld(t)}updateWorldMatrix(t,n){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)),n===!0){let o=this.children;for(let s=0,a=o.length;s<a;s++)o[s].updateWorldMatrix(!1,!0)}}toJSON(t){let n=t===void 0||typeof t=="string",r={};n&&(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=>fe(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 d=0,u=c.length;d<u;d++){let f=c[d];s(t.shapes,f)}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,d=this.material.length;c<d;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(n){let l=a(t.geometries),c=a(t.materials),d=a(t.textures),u=a(t.images),f=a(t.shapes),h=a(t.skeletons),p=a(t.animations),v=a(t.nodes);l.length>0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),u.length>0&&(r.images=u),f.length>0&&(r.shapes=f),h.length>0&&(r.skeletons=h),p.length>0&&(r.animations=p),v.length>0&&(r.nodes=v)}return r.object=o,r;function a(l){let c=[];for(let d in l){let u=l[d];delete u.metadata,c.push(u)}return c}}clone(t){return new this.constructor().copy(this,t)}copy(t,n=!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)),n===!0)for(let r=0;r<t.children.length;r++){let o=t.children[r];this.add(o.clone())}return this}}return i.DEFAULT_UP=new G(0,1,0),i.DEFAULT_MATRIX_AUTO_UPDATE=!0,i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0,i})(),ko=new G,ma=new G,rE=new G,ga=new G,Hu=new G,ju=new G,Hk=new G,oE=new G,sE=new G,aE=new G,lE=new An,cE=new An,dE=new An,fl=class i{constructor(e=new G,t=new G,n=new G){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),ko.subVectors(e,t),r.cross(ko);let o=r.lengthSq();return o>0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(e,t,n,r,o){ko.subVectors(r,t),ma.subVectors(n,t),rE.subVectors(e,t);let s=ko.dot(ko),a=ko.dot(ma),l=ko.dot(rE),c=ma.dot(ma),d=ma.dot(rE),u=s*c-a*a;if(u===0)return o.set(0,0,0),null;let f=1/u,h=(c*l-a*d)*f,p=(s*d-a*l)*f;return o.set(1-h-p,p,h)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,ga)===null?!1:ga.x>=0&&ga.y>=0&&ga.x+ga.y<=1}static getInterpolation(e,t,n,r,o,s,a,l){return this.getBarycoord(e,t,n,r,ga)===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,ga.x),l.addScaledVector(s,ga.y),l.addScaledVector(a,ga.z),l)}static getInterpolatedAttribute(e,t,n,r,o,s){return lE.setScalar(0),cE.setScalar(0),dE.setScalar(0),lE.fromBufferAttribute(e,t),cE.fromBufferAttribute(e,n),dE.fromBufferAttribute(e,r),s.setScalar(0),s.addScaledVector(lE,o.x),s.addScaledVector(cE,o.y),s.addScaledVector(dE,o.z),s}static isFrontFacing(e,t,n,r){return ko.subVectors(n,t),ma.subVectors(e,t),ko.cross(ma).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),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 ko.subVectors(this.c,this.b),ma.subVectors(this.a,this.b),ko.cross(ma).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return i.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return i.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,r,o){return i.getInterpolation(e,this.a,this.b,this.c,t,n,r,o)}containsPoint(e){return i.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return i.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n=this.a,r=this.b,o=this.c,s,a;Hu.subVectors(r,n),ju.subVectors(o,n),oE.subVectors(e,n);let l=Hu.dot(oE),c=ju.dot(oE);if(l<=0&&c<=0)return t.copy(n);sE.subVectors(e,r);let d=Hu.dot(sE),u=ju.dot(sE);if(d>=0&&u<=d)return t.copy(r);let f=l*u-d*c;if(f<=0&&l>=0&&d<=0)return s=l/(l-d),t.copy(n).addScaledVector(Hu,s);aE.subVectors(e,o);let h=Hu.dot(aE),p=ju.dot(aE);if(p>=0&&h<=p)return t.copy(o);let v=h*c-l*p;if(v<=0&&c>=0&&p<=0)return a=c/(c-p),t.copy(n).addScaledVector(ju,a);let g=d*p-h*u;if(g<=0&&u-d>=0&&h-p>=0)return Hk.subVectors(o,r),a=(u-d)/(u-d+(h-p)),t.copy(r).addScaledVector(Hk,a);let m=1/(g+v+f);return s=v*m,a=f*m,t.copy(n).addScaledVector(Hu,s).addScaledVector(ju,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},UF={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},dl={h:0,s:0,l:0},Nv={h:0,s:0,l:0};function uE(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*6*(2/3-t):i}var _t=class{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===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,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=vn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,zt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=zt.workingColorSpace){return this.r=e,this.g=t,this.b=n,zt.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=zt.workingColorSpace){if(e=KE(e,1),t=Vt(t,0,1),n=Vt(n,0,1),t===0)this.r=this.g=this.b=n;else{let o=n<=.5?n*(1+t):n+t-n*t,s=2*n-o;this.r=uE(s,o,e+1/3),this.g=uE(s,o,e),this.b=uE(s,o,e-1/3)}return zt.colorSpaceToWorking(this,r),this}setStyle(e,t=vn){function n(o){o!==void 0&&parseFloat(o)<1&&ut("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 n(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 n(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 n(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,t);break;default:ut("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);ut("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=vn){let n=UF[e.toLowerCase()];return n!==void 0?this.setHex(n,t):ut("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=ya(e.r),this.g=ya(e.g),this.b=ya(e.b),this}copyLinearToSRGB(e){return this.r=Ku(e.r),this.g=Ku(e.g),this.b=Ku(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=vn){return zt.workingToColorSpace(Pi.copy(this),e),Math.round(Vt(Pi.r*255,0,255))*65536+Math.round(Vt(Pi.g*255,0,255))*256+Math.round(Vt(Pi.b*255,0,255))}getHexString(e=vn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=zt.workingColorSpace){zt.workingToColorSpace(Pi.copy(this),t);let n=Pi.r,r=Pi.g,o=Pi.b,s=Math.max(n,r,o),a=Math.min(n,r,o),l,c,d=(a+s)/2;if(a===s)l=0,c=0;else{let u=s-a;switch(c=d<=.5?u/(s+a):u/(2-s-a),s){case n:l=(r-o)/u+(r<o?6:0);break;case r:l=(o-n)/u+2;break;case o:l=(n-r)/u+4;break}l/=6}return e.h=l,e.s=c,e.l=d,e}getRGB(e,t=zt.workingColorSpace){return zt.workingToColorSpace(Pi.copy(this),t),e.r=Pi.r,e.g=Pi.g,e.b=Pi.b,e}getStyle(e=vn){zt.workingToColorSpace(Pi.copy(this),e);let t=Pi.r,n=Pi.g,r=Pi.b;return e!==vn?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(r*255)})`}offsetHSL(e,t,n){return this.getHSL(dl),this.setHSL(dl.h+e,dl.s+t,dl.l+n)}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,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(dl),e.getHSL(Nv);let n=Tp(dl.h,Nv.h,t),r=Tp(dl.s,Nv.s,t),o=Tp(dl.l,Nv.l,t);return this.setHSL(n,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,n=this.g,r=this.b,o=e.elements;return this.r=o[0]*t+o[3]*n+o[6]*r,this.g=o[1]*t+o[4]*n+o[7]*r,this.b=o[2]*t+o[5]*n+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}},Pi=new _t;_t.NAMES=UF;var gW=0,Lr=class extends ws{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:gW++}),this.uuid=gf(),this.name="",this.type="Material",this.blending=jc,this.side=Xi,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Jv,this.blendDst=Qv,this.blendEquation=hl,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new _t(0,0,0),this.blendAlpha=0,this.depthFunc=Wc,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=_E,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Hc,this.stencilZFail=Hc,this.stencilZPass=Hc,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 n=e[t];if(n===void 0){ut(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){ut(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});let n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==jc&&(n.blending=this.blending),this.side!==Xi&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==Jv&&(n.blendSrc=this.blendSrc),this.blendDst!==Qv&&(n.blendDst=this.blendDst),this.blendEquation!==hl&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==Wc&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==_E&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Hc&&(n.stencilFail=this.stencilFail),this.stencilZFail!==Hc&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==Hc&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.allowOverride===!1&&(n.allowOverride=!1),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.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&&(n.textures=o),s.length>0&&(n.images=s)}return n}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,n=null;if(t!==null){let r=t.length;n=new Array(r);for(let o=0;o!==r;++o)n[o]=t[o].clone()}return this.clippingPlanes=n,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++}},Op=class extends Lr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new _t(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 ml,this.combine=Ab,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 Jn=new G,Lv=new vt,vW=0,kr=class{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:vW++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=SE,this.updateRanges=[],this.gpuType=Uo,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,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,o=this.itemSize;r<o;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)Lv.fromBufferAttribute(this,t),Lv.applyMatrix3(e),this.setXY(t,Lv.x,Lv.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.applyMatrix3(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.applyMatrix4(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.applyNormalMatrix(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.transformDirection(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=qu(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=$i(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=qu(t,this.array)),t}setX(e,t){return this.normalized&&(t=$i(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=qu(t,this.array)),t}setY(e,t){return this.normalized&&(t=$i(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=qu(t,this.array)),t}setZ(e,t){return this.normalized&&(t=$i(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=qu(t,this.array)),t}setW(e,t){return this.normalized&&(t=$i(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=$i(t,this.array),n=$i(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=$i(t,this.array),n=$i(n,this.array),r=$i(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,o){return e*=this.itemSize,this.normalized&&(t=$i(t,this.array),n=$i(n,this.array),r=$i(r,this.array),o=$i(o,this.array)),this.array[e+0]=t,this.array[e+1]=n,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!==SE&&(e.usage=this.usage),e}};var Rp=class extends kr{constructor(e,t,n){super(new Uint16Array(e),t,n)}};var kp=class extends kr{constructor(e,t,n){super(new Uint32Array(e),t,n)}};var Hn=class extends kr{constructor(e,t,n){super(new Float32Array(e),t,n)}},bW=0,fo=new Mn,fE=new Nr,Wu=new G,Rr=new Yi,wp=new Yi,di=new G,ei=class i extends ws{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:bW++}),this.uuid=gf(),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(YE(e)?kp:Rp)(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,n=0){this.groups.push({start:e,count:t,materialIndex:n})}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 n=this.attributes.normal;if(n!==void 0){let o=new At().getNormalMatrix(e);n.applyNormalMatrix(o),n.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 fo.makeRotationFromQuaternion(e),this.applyMatrix4(fo),this}rotateX(e){return fo.makeRotationX(e),this.applyMatrix4(fo),this}rotateY(e){return fo.makeRotationY(e),this.applyMatrix4(fo),this}rotateZ(e){return fo.makeRotationZ(e),this.applyMatrix4(fo),this}translate(e,t,n){return fo.makeTranslation(e,t,n),this.applyMatrix4(fo),this}scale(e,t,n){return fo.makeScale(e,t,n),this.applyMatrix4(fo),this}lookAt(e){return fE.lookAt(e),fE.updateMatrix(),this.applyMatrix4(fE.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Wu).negate(),this.translate(Wu.x,Wu.y,Wu.z),this}setFromPoints(e){let t=this.getAttribute("position");if(t===void 0){let n=[];for(let r=0,o=e.length;r<o;r++){let s=e[r];n.push(s.x,s.y,s.z||0)}this.setAttribute("position",new Hn(n,3))}else{let n=Math.min(e.length,t.count);for(let r=0;r<n;r++){let o=e[r];t.setXYZ(r,o.x,o.y,o.z||0)}e.length>t.count&&ut("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 Yi);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){gt("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new G(-1/0,-1/0,-1/0),new G(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,r=t.length;n<r;n++){let o=t[n];Rr.setFromBufferAttribute(o),this.morphTargetsRelative?(di.addVectors(this.boundingBox.min,Rr.min),this.boundingBox.expandByPoint(di),di.addVectors(this.boundingBox.max,Rr.max),this.boundingBox.expandByPoint(di)):(this.boundingBox.expandByPoint(Rr.min),this.boundingBox.expandByPoint(Rr.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&gt('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 pl);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){gt("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new G,1/0);return}if(e){let n=this.boundingSphere.center;if(Rr.setFromBufferAttribute(e),t)for(let o=0,s=t.length;o<s;o++){let a=t[o];wp.setFromBufferAttribute(a),this.morphTargetsRelative?(di.addVectors(Rr.min,wp.min),Rr.expandByPoint(di),di.addVectors(Rr.max,wp.max),Rr.expandByPoint(di)):(Rr.expandByPoint(wp.min),Rr.expandByPoint(wp.max))}Rr.getCenter(n);let r=0;for(let o=0,s=e.count;o<s;o++)di.fromBufferAttribute(e,o),r=Math.max(r,n.distanceToSquared(di));if(t)for(let o=0,s=t.length;o<s;o++){let a=t[o],l=this.morphTargetsRelative;for(let c=0,d=a.count;c<d;c++)di.fromBufferAttribute(a,c),l&&(Wu.fromBufferAttribute(e,c),di.add(Wu)),r=Math.max(r,n.distanceToSquared(di))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&gt('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){gt("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let n=t.position,r=t.normal,o=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new kr(new Float32Array(4*n.count),4));let s=this.getAttribute("tangent"),a=[],l=[];for(let P=0;P<n.count;P++)a[P]=new G,l[P]=new G;let c=new G,d=new G,u=new G,f=new vt,h=new vt,p=new vt,v=new G,g=new G;function m(P,S,D){c.fromBufferAttribute(n,P),d.fromBufferAttribute(n,S),u.fromBufferAttribute(n,D),f.fromBufferAttribute(o,P),h.fromBufferAttribute(o,S),p.fromBufferAttribute(o,D),d.sub(c),u.sub(c),h.sub(f),p.sub(f);let L=1/(h.x*p.y-p.x*h.y);isFinite(L)&&(v.copy(d).multiplyScalar(p.y).addScaledVector(u,-h.y).multiplyScalar(L),g.copy(u).multiplyScalar(h.x).addScaledVector(d,-p.x).multiplyScalar(L),a[P].add(v),a[S].add(v),a[D].add(v),l[P].add(g),l[S].add(g),l[D].add(g))}let b=this.groups;b.length===0&&(b=[{start:0,count:e.count}]);for(let P=0,S=b.length;P<S;++P){let D=b[P],L=D.start,H=D.count;for(let V=L,X=L+H;V<X;V+=3)m(e.getX(V+0),e.getX(V+1),e.getX(V+2))}let y=new G,x=new G,_=new G,w=new G;function T(P){_.fromBufferAttribute(r,P),w.copy(_);let S=a[P];y.copy(S),y.sub(_.multiplyScalar(_.dot(S))).normalize(),x.crossVectors(w,S);let L=x.dot(l[P])<0?-1:1;s.setXYZW(P,y.x,y.y,y.z,L)}for(let P=0,S=b.length;P<S;++P){let D=b[P],L=D.start,H=D.count;for(let V=L,X=L+H;V<X;V+=3)T(e.getX(V+0)),T(e.getX(V+1)),T(e.getX(V+2))}}computeVertexNormals(){let e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new kr(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let f=0,h=n.count;f<h;f++)n.setXYZ(f,0,0,0);let r=new G,o=new G,s=new G,a=new G,l=new G,c=new G,d=new G,u=new G;if(e)for(let f=0,h=e.count;f<h;f+=3){let p=e.getX(f+0),v=e.getX(f+1),g=e.getX(f+2);r.fromBufferAttribute(t,p),o.fromBufferAttribute(t,v),s.fromBufferAttribute(t,g),d.subVectors(s,o),u.subVectors(r,o),d.cross(u),a.fromBufferAttribute(n,p),l.fromBufferAttribute(n,v),c.fromBufferAttribute(n,g),a.add(d),l.add(d),c.add(d),n.setXYZ(p,a.x,a.y,a.z),n.setXYZ(v,l.x,l.y,l.z),n.setXYZ(g,c.x,c.y,c.z)}else for(let f=0,h=t.count;f<h;f+=3)r.fromBufferAttribute(t,f+0),o.fromBufferAttribute(t,f+1),s.fromBufferAttribute(t,f+2),d.subVectors(s,o),u.subVectors(r,o),d.cross(u),n.setXYZ(f+0,d.x,d.y,d.z),n.setXYZ(f+1,d.x,d.y,d.z),n.setXYZ(f+2,d.x,d.y,d.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)di.fromBufferAttribute(e,t),di.normalize(),e.setXYZ(t,di.x,di.y,di.z)}toNonIndexed(){function e(a,l){let c=a.array,d=a.itemSize,u=a.normalized,f=new c.constructor(l.length*d),h=0,p=0;for(let v=0,g=l.length;v<g;v++){a.isInterleavedBufferAttribute?h=l[v]*a.data.stride+a.offset:h=l[v]*d;for(let m=0;m<d;m++)f[p++]=c[h++]}return new kr(f,d,u)}if(this.index===null)return ut("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let t=new i,n=this.index.array,r=this.attributes;for(let a in r){let l=r[a],c=e(l,n);t.setAttribute(a,c)}let o=this.morphAttributes;for(let a in o){let l=[],c=o[a];for(let d=0,u=c.length;d<u;d++){let f=c[d],h=e(f,n);l.push(h)}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 n=this.attributes;for(let l in n){let c=n[l];e.data.attributes[l]=c.toJSON(e.data)}let r={},o=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],d=[];for(let u=0,f=c.length;u<f;u++){let h=c[u];d.push(h.toJSON(e.data))}d.length>0&&(r[l]=d,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 n=e.index;n!==null&&this.setIndex(n.clone());let r=e.attributes;for(let c in r){let d=r[c];this.setAttribute(c,d.clone(t))}let o=e.morphAttributes;for(let c in o){let d=[],u=o[c];for(let f=0,h=u.length;f<h;f++)d.push(u[f].clone(t));this.morphAttributes[c]=d}this.morphTargetsRelative=e.morphTargetsRelative;let s=e.groups;for(let c=0,d=s.length;c<d;c++){let u=s[c];this.addGroup(u.start,u.count,u.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"})}},jk=new Mn,Vc=new xa,Bv=new pl,Wk=new G,Uv=new G,zv=new G,Vv=new G,hE=new G,Gv=new G,$k=new G,Hv=new G,qi=class extends Nr{constructor(e=new ei,t=new Op){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,n=Object.keys(t);if(n.length>0){let r=t[n[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 n=this.geometry,r=n.attributes.position,o=n.morphAttributes.position,s=n.morphTargetsRelative;t.fromBufferAttribute(r,e);let a=this.morphTargetInfluences;if(o&&a){Gv.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let d=a[l],u=o[l];d!==0&&(hE.fromBufferAttribute(u,e),s?Gv.addScaledVector(hE,d):Gv.addScaledVector(hE.sub(t),d))}t.add(Gv)}return t}raycast(e,t){let n=this.geometry,r=this.material,o=this.matrixWorld;r!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Bv.copy(n.boundingSphere),Bv.applyMatrix4(o),Vc.copy(e.ray).recast(e.near),!(Bv.containsPoint(Vc.origin)===!1&&(Vc.intersectSphere(Bv,Wk)===null||Vc.origin.distanceToSquared(Wk)>(e.far-e.near)**2))&&(jk.copy(o).invert(),Vc.copy(e.ray).applyMatrix4(jk),!(n.boundingBox!==null&&Vc.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Vc)))}_computeIntersections(e,t,n){let r,o=this.geometry,s=this.material,a=o.index,l=o.attributes.position,c=o.attributes.uv,d=o.attributes.uv1,u=o.attributes.normal,f=o.groups,h=o.drawRange;if(a!==null)if(Array.isArray(s))for(let p=0,v=f.length;p<v;p++){let g=f[p],m=s[g.materialIndex],b=Math.max(g.start,h.start),y=Math.min(a.count,Math.min(g.start+g.count,h.start+h.count));for(let x=b,_=y;x<_;x+=3){let w=a.getX(x),T=a.getX(x+1),P=a.getX(x+2);r=jv(this,m,e,n,c,d,u,w,T,P),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),v=Math.min(a.count,h.start+h.count);for(let g=p,m=v;g<m;g+=3){let b=a.getX(g),y=a.getX(g+1),x=a.getX(g+2);r=jv(this,s,e,n,c,d,u,b,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=f.length;p<v;p++){let g=f[p],m=s[g.materialIndex],b=Math.max(g.start,h.start),y=Math.min(l.count,Math.min(g.start+g.count,h.start+h.count));for(let x=b,_=y;x<_;x+=3){let w=x,T=x+1,P=x+2;r=jv(this,m,e,n,c,d,u,w,T,P),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),v=Math.min(l.count,h.start+h.count);for(let g=p,m=v;g<m;g+=3){let b=g,y=g+1,x=g+2;r=jv(this,s,e,n,c,d,u,b,y,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}}};function yW(i,e,t,n,r,o,s,a){let l;if(e.side===Ki?l=n.intersectTriangle(s,o,r,!0,a):l=n.intersectTriangle(r,o,s,e.side===Xi,a),l===null)return null;Hv.copy(a),Hv.applyMatrix4(i.matrixWorld);let c=t.ray.origin.distanceTo(Hv);return c<t.near||c>t.far?null:{distance:c,point:Hv.clone(),object:i}}function jv(i,e,t,n,r,o,s,a,l,c){i.getVertexPosition(a,Uv),i.getVertexPosition(l,zv),i.getVertexPosition(c,Vv);let d=yW(i,e,t,n,Uv,zv,Vv,$k);if(d){let u=new G;fl.getBarycoord($k,Uv,zv,Vv,u),r&&(d.uv=fl.getInterpolatedAttribute(r,a,l,c,u,new vt)),o&&(d.uv1=fl.getInterpolatedAttribute(o,a,l,c,u,new vt)),s&&(d.normal=fl.getInterpolatedAttribute(s,a,l,c,u,new G),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));let f={a,b:l,c,normal:new G,materialIndex:0};fl.getNormal(Uv,zv,Vv,f.normal),d.face=f,d.barycoord=u}return d}var sf=class i extends ei{constructor(e=1,t=1,n=1,r=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:o,depthSegments:s};let a=this;r=Math.floor(r),o=Math.floor(o),s=Math.floor(s);let l=[],c=[],d=[],u=[],f=0,h=0;p("z","y","x",-1,-1,n,t,e,s,o,0),p("z","y","x",1,-1,n,t,-e,s,o,1),p("x","z","y",1,1,e,n,t,r,s,2),p("x","z","y",1,-1,e,n,-t,r,s,3),p("x","y","z",1,-1,e,t,n,r,o,4),p("x","y","z",-1,-1,e,t,-n,r,o,5),this.setIndex(l),this.setAttribute("position",new Hn(c,3)),this.setAttribute("normal",new Hn(d,3)),this.setAttribute("uv",new Hn(u,2));function p(v,g,m,b,y,x,_,w,T,P,S){let D=x/T,L=_/P,H=x/2,V=_/2,X=w/2,Y=T+1,q=P+1,j=0,ne=0,ye=new G;for(let xe=0;xe<q;xe++){let Se=xe*L-V;for(let et=0;et<Y;et++){let pt=et*D-H;ye[v]=pt*b,ye[g]=Se*y,ye[m]=X,c.push(ye.x,ye.y,ye.z),ye[v]=0,ye[g]=0,ye[m]=w>0?1:-1,d.push(ye.x,ye.y,ye.z),u.push(et/T),u.push(1-xe/P),j+=1}}for(let xe=0;xe<P;xe++)for(let Se=0;Se<T;Se++){let et=f+Se+Y*xe,pt=f+Se+Y*(xe+1),Wt=f+(Se+1)+Y*(xe+1),Kt=f+(Se+1)+Y*xe;l.push(et,pt,Kt),l.push(pt,Wt,Kt),ne+=6}a.addGroup(h,ne,S),h+=ne,f+=j}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new i(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}};function id(i){let e={};for(let t in i){e[t]={};for(let n in i[t]){let r=i[t][n];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(ut("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=r.clone():Array.isArray(r)?e[t][n]=r.slice():e[t][n]=r}}return e}function Oi(i){let e={};for(let t=0;t<i.length;t++){let n=id(i[t]);for(let r in n)e[r]=n[r]}return e}function xW(i){let e=[];for(let t=0;t<i.length;t++)e.push(i[t].clone());return e}function ZE(i){let e=i.getRenderTarget();return e===null?i.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:zt.workingColorSpace}var zF={clone:id,merge:Oi},_W=`void main() {
5
+ `).forEach(t=>{let n=t.indexOf(":");if(n>0){let r=t.slice(0,n),o=t.slice(n+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,n)=>{this.addHeaderEntry(n,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,n])=>{this.setHeaderEntries(t,n)})}: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 i?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 i;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof i?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 n=e.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(e.name,t);let r=(e.op==="a"?this.headers.get(t):void 0)||[];r.push(...n),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 n=e.toLowerCase();this.maybeSetNormalizedName(e,n),this.headers.has(n)?this.headers.get(n).push(t):this.headers.set(n,[t])}setHeaderEntries(e,t){let n=(Array.isArray(t)?t:[t]).map(o=>o.toString()),r=e.toLowerCase();this.headers.set(r,n),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 pv=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()}},mv=class{encodeKey(e){return zR(e)}encodeValue(e){return zR(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Ej(i,e){let t=new Map;return i.length>0&&i.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 Mj=/%(\d[a-f0-9])/gi,Tj={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function zR(i){return encodeURIComponent(i).replace(Mj,(e,t)=>Tj[t]??e)}function hv(i){return`${i}`}var lo=class i{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new mv,e.fromString){if(e.fromObject)throw new Ye(2805,!1);this.map=Ej(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let n=e.fromObject[t],r=Array.isArray(n)?n.map(hv):[hv(n)];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(n=>{let r=e[n];Array.isArray(r)?r.forEach(o=>{t.push({param:n,value:o,op:"a"})}):t.push({param:n,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(n=>t+"="+this.encoder.encodeValue(n)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new i({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(hv(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let n=this.map.get(e.param)||[],r=n.indexOf(hv(e.value));r!==-1&&n.splice(r,1),n.length>0?this.map.set(e.param,n):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};function Dj(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function VR(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function GR(i){return typeof Blob<"u"&&i instanceof Blob}function HR(i){return typeof FormData<"u"&&i instanceof FormData}function Ij(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var jR="Content-Type",WR="Accept",$R="text/plain",XR="application/json",Pj=`${XR}, ${$R}, */*`,Iu=class i{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,n,r){this.url=t,this.method=e.toUpperCase();let o;if(Dj(this.method)||r?(this.body=n!==void 0?n:null,o=r):o=n,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 Ye(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 co,this.context??=new pv,!this.params)this.params=new lo,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"||VR(this.body)||GR(this.body)||HR(this.body)||Ij(this.body)?this.body:this.body instanceof lo?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||HR(this.body)?null:GR(this.body)?this.body.type||null:VR(this.body)?null:typeof this.body=="string"?$R:this.body instanceof lo?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?XR:null}clone(e={}){let t=e.method||this.method,n=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,d=e.credentials||this.credentials,u=e.referrer||this.referrer,f=e.integrity||this.integrity,h=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,b=e.reportProgress??this.reportProgress,y=e.headers||this.headers,x=e.params||this.params,_=e.context??this.context;return e.setHeaders!==void 0&&(y=Object.keys(e.setHeaders).reduce((w,T)=>w.set(T,e.setHeaders[T]),y)),e.setParams&&(x=Object.keys(e.setParams).reduce((w,T)=>w.set(T,e.setParams[T]),x)),new i(t,n,g,{params:x,headers:y,context:_,reportProgress:b,responseType:r,withCredentials:m,transferCache:p,keepalive:o,cache:a,priority:s,timeout:v,mode:l,redirect:c,credentials:d,referrer:u,integrity:f,referrerPolicy:h})}},Lc=(function(i){return i[i.Sent=0]="Sent",i[i.UploadProgress=1]="UploadProgress",i[i.ResponseHeader=2]="ResponseHeader",i[i.DownloadProgress=3]="DownloadProgress",i[i.Response=4]="Response",i[i.User=5]="User",i})(Lc||{}),Pu=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(e,t=200,n="OK"){this.headers=e.headers||new co,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||n,this.url=e.url||null,this.redirected=e.redirected,this.responseType=e.responseType,this.ok=this.status>=200&&this.status<300}},gv=class i extends Pu{constructor(e={}){super(e)}type=Lc.ResponseHeader;clone(e={}){return new i({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})}},Au=class i extends Pu{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=Lc.Response;clone(e={}){return new i({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})}},il=class extends Pu{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}},Aj=200,Oj=204;var Rj=new Xe("");var kj=/^\)\]\}',?\n/;var Aw=(()=>{class i{xhrFactory;tracingService=Z(aa,{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 Ye(-2800,!1);let n=this.xhrFactory;return os(null).pipe(rS(()=>new wn(o=>{let s=n.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(WR)||s.setRequestHeader(WR,Pj),!t.headers.has(jR)){let g=t.detectContentTypeHeader();g!==null&&s.setRequestHeader(jR,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 co(s.getAllResponseHeaders()),b=s.responseURL||t.url;return l=new gv({headers:m,status:s.status,statusText:g,url:b}),l},d=this.maybePropagateTrace(()=>{let{headers:g,status:m,statusText:b,url:y}=c(),x=null;m!==Oj&&(x=typeof s.response>"u"?s.responseText:s.response),m===0&&(m=x?Aj:0);let _=m>=200&&m<300;if(t.responseType==="json"&&typeof x=="string"){let w=x;x=x.replace(kj,"");try{x=x!==""?JSON.parse(x):null}catch(T){x=w,_&&(_=!1,x={error:T,text:x})}}_?(o.next(new Au({body:x,headers:g,status:m,statusText:b,url:y||void 0})),o.complete()):o.error(new il({error:x,headers:g,status:m,statusText:b,url:y||void 0}))}),u=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new il({error:g,status:s.status||0,statusText:s.statusText||"Unknown Error",url:m||void 0});o.error(b)}),f=u;t.timeout&&(f=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new il({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:m||void 0});o.error(b)}));let h=!1,p=this.maybePropagateTrace(g=>{h||(o.next(c()),h=!0);let m={type:Lc.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:Lc.UploadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),o.next(m)});return s.addEventListener("load",d),s.addEventListener("error",u),s.addEventListener("timeout",f),s.addEventListener("abort",u),t.reportProgress&&(s.addEventListener("progress",p),a!==null&&s.upload&&s.upload.addEventListener("progress",v)),s.send(a),o.next({type:Lc.Sent}),()=>{s.removeEventListener("error",u),s.removeEventListener("abort",u),s.removeEventListener("load",d),s.removeEventListener("timeout",f),t.reportProgress&&(s.removeEventListener("progress",p),a!==null&&s.upload&&s.upload.removeEventListener("progress",v)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(n){return new(n||i)(We(Nc))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Fj(i,e){return e(i)}function Nj(i,e,t){return(n,r)=>Qd(t,()=>e(n,o=>i(o,r)))}var Ow=new Xe("",{factory:()=>[]}),Rw=new Xe(""),YR=new Xe("",{factory:()=>!0});var kw=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=We(Aw),r},providedIn:"root"})}return i})();var vv=(()=>{class i{backend;injector;chain=null;pendingTasks=Z(su);contributeToStability=Z(YR);constructor(t,n){this.backend=t,this.injector=n}handle(t){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(Ow),...this.injector.get(Rw,[])]));this.chain=n.reduceRight((r,o)=>Nj(r,o,this.injector),Fj)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(ph(n))}else return this.chain(t,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||i)(We(kw),We(Mi))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Fw=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=We(vv),r},providedIn:"root"})}return i})();function Pw(i,e){return{body:e,headers:i.headers,context:i.context,observe:i.observe,params:i.params,reportProgress:i.reportProgress,responseType:i.responseType,withCredentials:i.withCredentials,credentials:i.credentials,transferCache:i.transferCache,timeout:i.timeout,keepalive:i.keepalive,priority:i.priority,cache:i.cache,mode:i.mode,redirect:i.redirect,integrity:i.integrity,referrer:i.referrer,referrerPolicy:i.referrerPolicy}}var bv=(()=>{class i{handler;constructor(t){this.handler=t}request(t,n,r={}){let o;if(t instanceof Iu)o=t;else{let l;r.headers instanceof co?l=r.headers:l=new co(r.headers);let c;r.params&&(r.params instanceof lo?c=r.params:c=new lo({fromObject:r.params})),o=new Iu(t,n,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=os(o).pipe(iS(l=>this.handler.handle(l)));if(t instanceof Iu||r.observe==="events")return s;let a=s.pipe(nS(l=>l instanceof Au));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(rr(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new Ye(2806,!1);return l.body}));case"blob":return a.pipe(rr(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Ye(2807,!1);return l.body}));case"text":return a.pipe(rr(l=>{if(l.body!==null&&typeof l.body!="string")throw new Ye(2808,!1);return l.body}));default:return a.pipe(rr(l=>l.body))}case"response":return a;default:throw new Ye(2809,!1)}}delete(t,n={}){return this.request("DELETE",t,n)}get(t,n={}){return this.request("GET",t,n)}head(t,n={}){return this.request("HEAD",t,n)}jsonp(t,n){return this.request("JSONP",t,{params:new lo().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,n={}){return this.request("OPTIONS",t,n)}patch(t,n,r={}){return this.request("PATCH",t,Pw(r,n))}post(t,n,r={}){return this.request("POST",t,Pw(r,n))}put(t,n,r={}){return this.request("PUT",t,Pw(r,n))}static \u0275fac=function(n){return new(n||i)(We(Fw))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Lj=new Xe("",{factory:()=>!0}),Bj="XSRF-TOKEN",Uj=new Xe("",{factory:()=>Bj}),zj="X-XSRF-TOKEN",Vj=new Xe("",{factory:()=>zj}),Gj=(()=>{class i{cookieName=Z(Uj);doc=Z(Cn);lastCookieString="";lastToken=null;parseCount=0;getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=op(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),qR=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=We(Gj),r},providedIn:"root"})}return i})();function Hj(i,e){if(!Z(Lj)||i.method==="GET"||i.method==="HEAD")return e(i);try{let r=Z(ov).href,{origin:o}=new URL(r),{origin:s}=new URL(i.url,o);if(o!==s)return e(i)}catch{return e(i)}let t=Z(qR).getToken(),n=Z(Vj);return t!=null&&!i.headers.has(n)&&(i=i.clone({headers:i.headers.set(n,t)})),e(i)}var Nw=(function(i){return i[i.Interceptors=0]="Interceptors",i[i.LegacyInterceptors=1]="LegacyInterceptors",i[i.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",i[i.NoXsrfProtection=3]="NoXsrfProtection",i[i.JsonpSupport=4]="JsonpSupport",i[i.RequestsMadeViaParent=5]="RequestsMadeViaParent",i[i.Fetch=6]="Fetch",i})(Nw||{});function jj(i,e){return{\u0275kind:i,\u0275providers:e}}function Lw(...i){let e=[bv,vv,{provide:Fw,useExisting:vv},{provide:kw,useFactory:()=>Z(Rj,{optional:!0})??Z(Aw)},{provide:Ow,useValue:Hj,multi:!0}];for(let t of i)e.push(...t.\u0275providers);return Qs(e)}function Bw(i){return jj(Nw.Interceptors,i.map(e=>({provide:Ow,useValue:e,multi:!0})))}var Wj=new Xe(""),$j="b",Xj="h",Yj="s",qj="st",Kj="u",Zj="rt",Uw=new Xe(""),Jj=["GET","HEAD"];function Qj(i,e){let h=Z(Uw),{isCacheActive:t}=h,n=Qt(h,["isCacheActive"]),{transferCache:r,method:o}=i;if(!t||r===!1||o==="POST"&&!n.includePostRequests&&!r||o!=="POST"&&!Jj.includes(o)||!n.includeRequestsWithAuthHeaders&&e9(i)||n.filter?.(i)===!1)return e(i);let s=Z(bu);if(Z(Wj,{optional:!0}))throw new Ye(2803,!1);let l=i.url,c=t9(i,l),d=s.get(c,null),u=n.includeHeaders;if(typeof r=="object"&&r.includeHeaders&&(u=r.includeHeaders),d){let{[$j]:p,[Zj]:v,[Xj]:g,[Yj]:m,[qj]:b,[Kj]:y}=d,x=p;switch(v){case"arraybuffer":x=ZR(p);break;case"blob":x=new Blob([ZR(p)]);break}let _=new co(g);return os(new Au({body:x,headers:_,status:m,statusText:b,url:y}))}return e(i)}function e9(i){return i.headers.has("authorization")||i.headers.has("proxy-authorization")}function KR(i){return[...i.keys()].sort().map(e=>`${e}=${i.getAll(e)}`).join("&")}function t9(i,e){let{params:t,method:n,responseType:r}=i,o=KR(t),s=i.serializeBody();s instanceof URLSearchParams?s=KR(s):typeof s!="string"&&(s="");let a=[n,r,e,s,o].join("|"),l=n9(a);return l}function n9(i){let e=0;for(let t of i)e=Math.imul(31,e)+t.charCodeAt(0)<<0;return e+=2147483648,e.toString()}function ZR(i){let e=atob(i);return Uint8Array.from(e,n=>n.charCodeAt(0)).buffer}function JR(i){return[{provide:Uw,useFactory:()=>(Ao("NgHttpTransferCache"),R({isCacheActive:!0},i))},{provide:Rw,useValue:Qj,multi:!0},{provide:Eu,multi:!0,useFactory:()=>{let e=Z(Pr),t=Z(Uw);return()=>{e.whenStable().then(()=>{t.isCacheActive=!1})}}}]}var dp=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=We(i9),r},providedIn:"root"})}return i})(),i9=(()=>{class i extends dp{_doc;constructor(t){super(),this._doc=t}sanitize(t,n){if(n==null)return null;switch(t){case Po.NONE:return n;case Po.HTML:return oa(n,"HTML")?Io(n):T0(this._doc,String(n)).toString();case Po.STYLE:return oa(n,"Style")?Io(n):n;case Po.SCRIPT:if(oa(n,"Script"))return Io(n);throw new Ye(5200,!1);case Po.URL:return oa(n,"URL")?Io(n):Xh(String(n));case Po.RESOURCE_URL:if(oa(n,"ResourceURL"))return Io(n);throw new Ye(5201,!1);default:throw new Ye(5202,!1)}}bypassSecurityTrustHtml(t){return vC(t)}bypassSecurityTrustStyle(t){return bC(t)}bypassSecurityTrustScript(t){return yC(t)}bypassSecurityTrustUrl(t){return xC(t)}bypassSecurityTrustResourceUrl(t){return _C(t)}static \u0275fac=function(n){return new(n||i)(We(Cn))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),yv=(function(i){return i[i.NoHttpTransferCache=0]="NoHttpTransferCache",i[i.HttpTransferCacheOptions=1]="HttpTransferCacheOptions",i[i.I18nSupport=2]="I18nSupport",i[i.EventReplay=3]="EventReplay",i[i.IncrementalHydration=4]="IncrementalHydration",i})(yv||{});function r9(i,e=[],t={}){return{\u0275kind:i,\u0275providers:e}}function QR(){return r9(yv.EventReplay,SR())}function ek(...i){let e=[],t=new Set;for(let{\u0275providers:r,\u0275kind:o}of i)t.add(o),r.length&&e.push(r);let n=t.has(yv.HttpTransferCacheOptions);return Qs([[],[],CR(),t.has(yv.NoHttpTransferCache)||n?[]:JR({}),e])}var Ou=class i{loadingCount=N(0);isLoading=Pe(()=>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||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};function xv(i){let e=s=>Array.isArray(s)?s.filter(a=>typeof a=="string").join(", "):"";if(!i)return"Unhandled error";let t=i?.error,n=e(t?.errors);if(n)return n;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(i)&&i.length>0)return e(i)||"Unhandled error";let o=e(i?.messages);if(o)return o;if(typeof i?.messages=="string"&&i.messages.trim())return i.messages;if(typeof i?.message=="string"&&i.message.trim())return i.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 i?.status===401?"Unauthorized: Please verify your credentials and try again":"Unhandled error"}var da=class i{toastsSignal=N([]);toasts=Pe(()=>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(n=>n.id!==e))}pushToast(e,t,n){let r={id:Date.now()+Math.floor(Math.random()*1e3),type:e,title:t,message:n,timeout:this.defaultTimeoutMs};this.toastsSignal.update(s=>[...s,r]),(e==="error"?console.error:e==="warning"?console.warn:console.info)(`[${t}] ${n}`),setTimeout(()=>{this.dismissToast(r.id)},r.timeout)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var up=class i{constructor(e){this.toasterService=e}handleError(e){e instanceof il&&this.showError(e)}showError(e){return this.toasterService.showError(xv(e)),Ua(()=>e)}static \u0275fac=function(t){return new(t||i)(We(da))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var tk=(i,e)=>{let t=Z(up),n=Z(Ou),r=i.headers.has("skipHandleError"),o=i.headers.get("Loader")==="true";return o&&n.show(),e(i).pipe(uc(s=>(r||t.handleError(s),r?os(null):Ua(()=>s))),ph(()=>{o&&n.hide()}))};var nk=[tk];var ik={apiUrl:"https://pixeasy-api-esaca7hvgdfxgmcn.westus3-01.azurewebsites.net/api/"};var _v=new Xe("ENV"),eye=new Xe("LOADER_DELAY");var rk={provide:_v,useValue:ik};function ok(){return[i1(),ek(QR()),Lw(Bw(nk)),rk,Ou]}var mk=(()=>{class i{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,n){this._renderer=t,this._elementRef=n}setProperty(t,n){this._renderer.setProperty(this._elementRef.nativeElement,t,n)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(n){return new(n||i)(jt(la),jt(Tr))};static \u0275dir=Zn({type:i})}return i})(),vp=(()=>{class i extends mk{static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,features:[Ir]})}return i})(),rl=new Xe(""),a9={provide:rl,useExisting:zi(()=>Ww),multi:!0},Ww=(()=>{class i extends vp{writeValue(t){this.setProperty("checked",t)}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(n,r){n&1&&oe("change",function(s){return r.onChange(s.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[so([a9]),Ir]})}return i})(),l9={provide:rl,useExisting:zi(()=>Fu),multi:!0};function c9(){let i=ao()?ao().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var d9=new Xe(""),Fu=(()=>{class i extends mk{_compositionMode;_composing=!1;constructor(t,n,r){super(t,n),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!c9())}writeValue(t){let n=t??"";this.setProperty("value",n)}_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(n){return new(n||i)(jt(la),jt(Tr),jt(d9,8))};static \u0275dir=Zn({type:i,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(n,r){n&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:[so([l9]),Ir]})}return i})();var $w=new Xe(""),u9=new Xe("");function f9(i){return e=>{if(e.value==null||i==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t<i?{min:{min:i,actual:e.value}}:null}}function h9(i){return e=>{if(e.value==null||i==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t>i?{max:{max:i,actual:e.value}}:null}}function sk(i){return null}function gk(i){return i!=null}function vk(i){return wu(i)?hh(i):i}function bk(i){let e={};return i.forEach(t=>{e=t!=null?R(R({},e),t):e}),Object.keys(e).length===0?null:e}function yk(i,e){return e.map(t=>t(i))}function p9(i){return!i.validate}function xk(i){return i.map(e=>p9(e)?e:t=>e.validate(t))}function m9(i){if(!i)return null;let e=i.filter(gk);return e.length==0?null:function(t){return bk(yk(t,e))}}function _k(i){return i!=null?m9(xk(i)):null}function g9(i){if(!i)return null;let e=i.filter(gk);return e.length==0?null:function(t){let n=yk(t,e).map(vk);return tS(n).pipe(rr(bk))}}function Sk(i){return i!=null?g9(xk(i)):null}function ak(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function v9(i){return i._rawValidators}function b9(i){return i._rawAsyncValidators}function zw(i){return i?Array.isArray(i)?i:[i]:[]}function Cv(i,e){return Array.isArray(i)?i.includes(e):i===e}function lk(i,e){let t=zw(e);return zw(i).forEach(r=>{Cv(t,r)||t.push(r)}),t}function ck(i,e){return zw(e).filter(t=>!Cv(i,t))}var wv=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=_k(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Sk(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}},Vw=class extends wv{name;get formDirective(){return null}get path(){return null}},gp=class extends wv{_parent=null;name=null;valueAccessor=null},Gw=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 ol=(()=>{class i extends Gw{constructor(t){super(t)}static \u0275fac=function(n){return new(n||i)(jt(gp,2))};static \u0275dir=Zn({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&ft("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:[Ir]})}return i})();var fp="VALID",Sv="INVALID",Ru="PENDING",hp="DISABLED",Bc=class{},Ev=class extends Bc{value;source;constructor(e,t){super(),this.value=e,this.source=t}},pp=class extends Bc{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},mp=class extends Bc{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},ku=class extends Bc{status;source;constructor(e,t){super(),this.status=e,this.source=t}};var Hw=class extends Bc{source;constructor(e){super(),this.source=e}};function y9(i){return(Mv(i)?i.validators:i)||null}function x9(i){return Array.isArray(i)?_k(i):i||null}function _9(i,e){return(Mv(e)?e.asyncValidators:i)||null}function S9(i){return Array.isArray(i)?Sk(i):i||null}function Mv(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}var jw=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 En(this.statusReactive)}set status(e){En(()=>this.statusReactive.set(e))}_status=Pe(()=>this.statusReactive());statusReactive=N(void 0);get valid(){return this.status===fp}get invalid(){return this.status===Sv}get pending(){return this.status==Ru}get disabled(){return this.status===hp}get enabled(){return this.status!==hp}errors;get pristine(){return En(this.pristineReactive)}set pristine(e){En(()=>this.pristineReactive.set(e))}_pristine=Pe(()=>this.pristineReactive());pristineReactive=N(!0);get dirty(){return!this.pristine}get touched(){return En(this.touchedReactive)}set touched(e){En(()=>this.touchedReactive.set(e))}_touched=Pe(()=>this.touchedReactive());touchedReactive=N(!1);get untouched(){return!this.touched}_events=new wo;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(lk(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(lk(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(ck(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(ck(e,this._rawAsyncValidators))}hasValidator(e){return Cv(this._rawValidators,e)}hasAsyncValidator(e){return Cv(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsTouched(fe(R({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new mp(!0,n))}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 n=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),e.onlySelf||this._parent?._updateTouched(e,n),t&&e.emitEvent!==!1&&this._events.next(new mp(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty(fe(R({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new pp(!1,n))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),e.onlySelf||this._parent?._updatePristine(e,n),t&&e.emitEvent!==!1&&this._events.next(new pp(!0,n))}markAsPending(e={}){this.status=Ru;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new ku(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending(fe(R({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=hp,this.errors=null,this._forEachChild(r=>{r.disable(fe(R({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Ev(this.value,n)),this._events.next(new ku(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(fe(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=fp,this._forEachChild(n=>{n.enable(fe(R({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(fe(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(n=>n(!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 n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===fp||this.status===Ru)&&this._runAsyncValidator(n,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Ev(this.value,t)),this._events.next(new ku(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity(fe(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()?hp:fp}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=Ru,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let n=vk(this.asyncValidator(this));this._asyncValidationSubscription=n.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((n,r)=>n&&n._find(r),this)}getError(e,t){let n=t?this.get(t):this;return n?.errors?n.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,n){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||n)&&this._events.next(new ku(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new yr,this.statusChanges=new yr}_calculateStatus(){return this._allControlsDisabled()?hp:this.errors?Sv:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Ru)?Ru:this._anyControlsHaveStatus(Sv)?Sv:fp}_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 n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,e.onlySelf||this._parent?._updatePristine(e,t),r&&this._events.next(new pp(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new mp(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Mv(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=x9(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=S9(this._rawAsyncValidators)}};var Ck=new Xe("",{factory:()=>Xw}),Xw="always";function C9(i,e){return[...e.path,i]}function w9(i,e,t=Xw){M9(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),T9(i,e),I9(i,e),D9(i,e),E9(i,e)}function dk(i,e){i.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function E9(i,e){if(e.valueAccessor.setDisabledState){let t=n=>{e.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(t),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(t)})}}function M9(i,e){let t=v9(i);e.validator!==null?i.setValidators(ak(t,e.validator)):typeof t=="function"&&i.setValidators([t]);let n=b9(i);e.asyncValidator!==null?i.setAsyncValidators(ak(n,e.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();dk(e._rawValidators,r),dk(e._rawAsyncValidators,r)}function T9(i,e){e.valueAccessor.registerOnChange(t=>{i._pendingValue=t,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&wk(i,e)})}function D9(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&wk(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function wk(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function I9(i,e){let t=(n,r)=>{e.valueAccessor.writeValue(n),r&&e.viewToModelUpdate(n)};i.registerOnChange(t),e._registerOnDestroy(()=>{i._unregisterOnChange(t)})}function P9(i,e){if(!i.hasOwnProperty("model"))return!1;let t=i.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function A9(i){return Object.getPrototypeOf(i.constructor)===vp}function O9(i,e){if(!e)return null;Array.isArray(e);let t,n,r;return e.forEach(o=>{o.constructor===Fu?t=o:A9(o)?n=o:r=o}),r||n||t||null}function uk(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function fk(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var R9=class extends jw{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,n){super(y9(t),_9(n,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Mv(t)&&(t.nonNullable||t.initialValueIsDefault)&&(fk(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(n=>n(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 Hw(this))}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){uk(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){uk(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){fk(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 k9={provide:gp,useExisting:zi(()=>ua)},hk=Promise.resolve(),ua=(()=>{class i extends gp{_changeDetectorRef;callSetDisabledState;control=new R9;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new yr;constructor(t,n,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this._parent=t,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=O9(this,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let n=t.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),P9(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(){w9(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){hk.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let n=t.isDisabled.currentValue,r=n!==0&&rv(n);hk.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?C9(t,this._parent):[t]}static \u0275fac=function(n){return new(n||i)(jt(Vw,9),jt($w,10),jt(u9,10),jt(rl,10),jt(iv,8),jt(Ck,8))};static \u0275dir=Zn({type:i,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:[so([k9]),Ir,gu]})}return i})();var F9={provide:rl,useExisting:zi(()=>bp),multi:!0},bp=(()=>{class i extends vp{writeValue(t){let n=t??"";this.setProperty("value",n)}registerOnChange(t){this.onChange=n=>{t(n==""?null:parseFloat(n))}}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,r){n&1&&oe("input",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[so([F9]),Ir]})}return i})();var N9={provide:rl,useExisting:zi(()=>Tv),multi:!0};function Ek(i,e){return i==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function L9(i){return i.split(":")[0]}var Tv=(()=>{class i extends vp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=Z(Pr).injector;destroyRef=Z(ar);cdr=Z(iv);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,A0({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(t){this.cdr.markForCheck(),this.value=t;let n=this._getOptionId(t),r=Ek(n,t);this.setProperty("value",r)}registerOnChange(t){this.onChange=n=>{this.value=this._getOptionValue(n),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n),t))return n;return null}_getOptionValue(t){let n=L9(t);return this._optionMap.has(n)?this._optionMap.get(n):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,r){n&1&&oe("change",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[so([N9]),Ir]})}return i})(),Mk=(()=>{class i{_element;_renderer;_select;id;constructor(t,n,r){this._element=t,this._renderer=n,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(Ek(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(n){return new(n||i)(jt(Tr),jt(la),jt(Tv,9))};static \u0275dir=Zn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})(),B9={provide:rl,useExisting:zi(()=>Tk),multi:!0};function pk(i,e){return i==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function U9(i){return i.split(":")[0]}var Tk=(()=>{class i extends vp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let n;if(Array.isArray(t)){let r=t.map(o=>this._getOptionId(o));n=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else n=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(t){this.onChange=n=>{let r=[],o=n.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=n.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 n=(this._idCounter++).toString();return this._optionMap.set(n,t),n}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n)._value,t))return n;return null}_getOptionValue(t){let n=U9(t);return this._optionMap.has(n)?this._optionMap.get(n)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,r){n&1&&oe("change",function(s){return r.onChange(s.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[so([B9]),Ir]})}return i})(),Dk=(()=>{class i{_element;_renderer;_select;id;_value;constructor(t,n,r){this._element=t,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(pk(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(pk(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(n){return new(n||i)(jt(Tr),jt(la),jt(Tk,9))};static \u0275dir=Zn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})();function Ik(i){return typeof i=="number"?i:parseFloat(i)}var Pk=(()=>{class i{_validator=sk;_onChange;_enabled;ngOnChanges(t){if(this.inputName in t){let n=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):sk,this._onChange?.()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}static \u0275fac=function(n){return new(n||i)};static \u0275dir=Zn({type:i,features:[gu]})}return i})(),z9={provide:$w,useExisting:zi(()=>yp),multi:!0},yp=(()=>{class i extends Pk{max;inputName="max";normalizeInput=t=>Ik(t);createValidator=t=>h9(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&Pn("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[so([z9]),Ir]})}return i})(),V9={provide:$w,useExisting:zi(()=>xp),multi:!0},xp=(()=>{class i extends Pk{min;inputName="min";normalizeInput=t=>Ik(t);createValidator=t=>f9(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&Pn("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[so([V9]),Ir]})}return i})();var G9=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=ca({type:i});static \u0275inj=ls({})}return i})();var uo=(()=>{class i{static withConfig(t){return{ngModule:i,providers:[{provide:Ck,useValue:t.callSetDisabledState??Xw}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=ca({type:i});static \u0275inj=ls({imports:[G9]})}return i})();var _l={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Sl={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},oF=0,IE=1,sF=2;var Wp=1,aF=2,hf=3,Xi=0,Ki=1,Es=2,Ms=0,jc=1,PE=2,AE=3,OE=4,lF=5,hl=100,cF=101,dF=102,uF=103,fF=104,hF=200,pF=201,mF=202,gF=203,Jv=204,Qv=205,vF=206,bF=207,yF=208,xF=209,_F=210,SF=211,CF=212,wF=213,EF=214,wb=0,Eb=1,Mb=2,Wc=3,Tb=4,Db=5,Ib=6,Pb=7,Ab=0,MF=1,TF=2,Lo=0,RE=1,kE=2,FE=3,ed=4,NE=5,LE=6,BE=7;var vE=300,Cl=301,td=302,Ob=303,Rb=304,$p=306,Ju=1e3,Ai=1001,eb=1002,fi=1003,DF=1004;var Xp=1005;var jn=1006,kb=1007;var mo=1008;var lr=1009,UE=1010,zE=1011,pf=1012,Fb=1013,Bo=1014,Uo=1015,Ts=1016,Nb=1017,Lb=1018,mf=1020,VE=35902,GE=35899,HE=1021,jE=1022,go=1023,Cs=1026,wl=1027,WE=1028,Bb=1029,nd=1030,Ub=1031;var zb=1033,Yp=33776,qp=33777,Kp=33778,Zp=33779,Vb=35840,Gb=35841,Hb=35842,jb=35843,Wb=36196,$b=37492,Xb=37496,Yb=37488,qb=37489,Kb=37490,Zb=37491,Jb=37808,Qb=37809,ey=37810,ty=37811,ny=37812,iy=37813,ry=37814,oy=37815,sy=37816,ay=37817,ly=37818,cy=37819,dy=37820,uy=37821,fy=36492,hy=36494,py=36495,my=36283,gy=36284,vy=36285,by=36286;var Dp=2300,tb=2301,Zv=2302,bE=2400,yE=2401,xE=2402;var IF=3200;var $E=0,PF=1,Sa="",vn="srgb",$c="srgb-linear",Ip="linear",on="srgb";var Hc=7680;var _E=519,AF=512,OF=513,RF=514,yy=515,kF=516,FF=517,xy=518,NF=519,SE=35044;var XE="300 es",Fo=2e3,Pp=2001;function YE(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}function H9(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function Qu(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function LF(){let i=Qu("canvas");return i.style.display="block",i}var Ak={},ef=null;function qE(...i){let e="THREE."+i.shift();ef?ef("log",e,...i):console.log(e,...i)}function ut(...i){let e="THREE."+i.shift();ef?ef("warn",e,...i):console.warn(e,...i)}function gt(...i){let e="THREE."+i.shift();ef?ef("error",e,...i):console.error(e,...i)}function tf(...i){let e=i.join(" ");e in Ak||(Ak[e]=!0,ut(...i))}function BF(i,e,t){return new Promise(function(n,r){function o(){switch(i.clientWaitSync(e,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(o,t);break;default:n()}}setTimeout(o,t)})}var ws=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){let n=this._listeners;if(n===void 0)return;let r=n[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 n=t[e.type];if(n!==void 0){e.target=this;let r=n.slice(0);for(let o=0,s=r.length;o<s;o++)r[o].call(this,e);e.target=null}}},Ii=["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"],Ok=1234567,Mp=Math.PI/180,nf=180/Math.PI;function gf(){let i=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Ii[i&255]+Ii[i>>8&255]+Ii[i>>16&255]+Ii[i>>24&255]+"-"+Ii[e&255]+Ii[e>>8&255]+"-"+Ii[e>>16&15|64]+Ii[e>>24&255]+"-"+Ii[t&63|128]+Ii[t>>8&255]+"-"+Ii[t>>16&255]+Ii[t>>24&255]+Ii[n&255]+Ii[n>>8&255]+Ii[n>>16&255]+Ii[n>>24&255]).toLowerCase()}function Vt(i,e,t){return Math.max(e,Math.min(t,i))}function KE(i,e){return(i%e+e)%e}function j9(i,e,t,n,r){return n+(i-e)*(r-n)/(t-e)}function W9(i,e,t){return i!==e?(t-i)/(e-i):0}function Tp(i,e,t){return(1-t)*i+t*e}function $9(i,e,t,n){return Tp(i,e,1-Math.exp(-t*n))}function X9(i,e=1){return e-Math.abs(KE(i,e*2)-e)}function Y9(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function q9(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function K9(i,e){return i+Math.floor(Math.random()*(e-i+1))}function Z9(i,e){return i+Math.random()*(e-i)}function J9(i){return i*(.5-Math.random())}function Q9(i){i!==void 0&&(Ok=i);let e=Ok+=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 eW(i){return i*Mp}function tW(i){return i*nf}function nW(i){return(i&i-1)===0&&i!==0}function iW(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function rW(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function oW(i,e,t,n,r){let o=Math.cos,s=Math.sin,a=o(t/2),l=s(t/2),c=o((e+n)/2),d=s((e+n)/2),u=o((e-n)/2),f=s((e-n)/2),h=o((n-e)/2),p=s((n-e)/2);switch(r){case"XYX":i.set(a*d,l*u,l*f,a*c);break;case"YZY":i.set(l*f,a*d,l*u,a*c);break;case"ZXZ":i.set(l*u,l*f,a*d,a*c);break;case"XZX":i.set(a*d,l*p,l*h,a*c);break;case"YXY":i.set(l*h,a*d,l*p,a*c);break;case"ZYZ":i.set(l*p,l*h,a*d,a*c);break;default:ut("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function qu(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function $i(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return Math.round(i*4294967295);case Uint16Array:return Math.round(i*65535);case Uint8Array:return Math.round(i*255);case Int32Array:return Math.round(i*2147483647);case Int16Array:return Math.round(i*32767);case Int8Array:return Math.round(i*127);default:throw new Error("Invalid component type.")}}var tn={DEG2RAD:Mp,RAD2DEG:nf,generateUUID:gf,clamp:Vt,euclideanModulo:KE,mapLinear:j9,inverseLerp:W9,lerp:Tp,damp:$9,pingpong:X9,smoothstep:Y9,smootherstep:q9,randInt:K9,randFloat:Z9,randFloatSpread:J9,seededRandom:Q9,degToRad:eW,radToDeg:tW,isPowerOfTwo:nW,ceilPowerOfTwo:iW,floorPowerOfTwo:rW,setQuaternionFromProperEuler:oW,normalize:$i,denormalize:qu},vt=class i{constructor(e=0,t=0){i.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,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+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=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Vt(n,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 n=this.dot(e)/t;return Math.acos(Vt(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}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,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,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 n=Math.cos(t),r=Math.sin(t),o=this.x-e.x,s=this.y-e.y;return this.x=o*n-s*r+e.x,this.y=o*r+s*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},po=class{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,o,s,a){let l=n[r+0],c=n[r+1],d=n[r+2],u=n[r+3],f=o[s+0],h=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]=d,e[t+3]=u;return}if(a>=1){e[t+0]=f,e[t+1]=h,e[t+2]=p,e[t+3]=v;return}if(u!==v||l!==f||c!==h||d!==p){let g=l*f+c*h+d*p+u*v;g<0&&(f=-f,h=-h,p=-p,v=-v,g=-g);let m=1-a;if(g<.9995){let b=Math.acos(g),y=Math.sin(b);m=Math.sin(m*b)/y,a=Math.sin(a*b)/y,l=l*m+f*a,c=c*m+h*a,d=d*m+p*a,u=u*m+v*a}else{l=l*m+f*a,c=c*m+h*a,d=d*m+p*a,u=u*m+v*a;let b=1/Math.sqrt(l*l+c*c+d*d+u*u);l*=b,c*=b,d*=b,u*=b}}e[t]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,o,s){let a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],u=o[s],f=o[s+1],h=o[s+2],p=o[s+3];return e[t]=a*p+d*u+l*h-c*f,e[t+1]=l*p+d*f+c*u-a*h,e[t+2]=c*p+d*h+a*f-l*u,e[t+3]=d*p-a*u-l*f-c*h,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,n,r){return this._x=e,this._y=t,this._z=n,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 n=e._x,r=e._y,o=e._z,s=e._order,a=Math.cos,l=Math.sin,c=a(n/2),d=a(r/2),u=a(o/2),f=l(n/2),h=l(r/2),p=l(o/2);switch(s){case"XYZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"YXZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"ZXY":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"ZYX":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"YZX":this._x=f*d*u+c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u-f*h*p;break;case"XZY":this._x=f*d*u-c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u+f*h*p;break;default:ut("Quaternion: .setFromEuler() encountered an unknown order: "+s)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],r=t[4],o=t[8],s=t[1],a=t[5],l=t[9],c=t[2],d=t[6],u=t[10],f=n+a+u;if(f>0){let h=.5/Math.sqrt(f+1);this._w=.25/h,this._x=(d-l)*h,this._y=(o-c)*h,this._z=(s-r)*h}else if(n>a&&n>u){let h=2*Math.sqrt(1+n-a-u);this._w=(d-l)/h,this._x=.25*h,this._y=(r+s)/h,this._z=(o+c)/h}else if(a>u){let h=2*Math.sqrt(1+a-n-u);this._w=(o-c)/h,this._x=(r+s)/h,this._y=.25*h,this._z=(l+d)/h}else{let h=2*Math.sqrt(1+u-n-a);this._w=(s-r)/h,this._x=(o+c)/h,this._y=(l+d)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(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=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Vt(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(n===0)return this;let r=Math.min(1,t/n);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 n=e._x,r=e._y,o=e._z,s=e._w,a=t._x,l=t._y,c=t._z,d=t._w;return this._x=n*d+s*a+r*c-o*l,this._y=r*d+s*l+o*a-n*c,this._z=o*d+s*c+n*l-r*a,this._w=s*d-n*a-r*l-o*c,this._onChangeCallback(),this}slerp(e,t){if(t<=0)return this;if(t>=1)return this.copy(e);let n=e._x,r=e._y,o=e._z,s=e._w,a=this.dot(e);a<0&&(n=-n,r=-r,o=-o,s=-s,a=-a);let l=1-t;if(a<.9995){let c=Math.acos(a),d=Math.sin(c);l=Math.sin(l*c)/d,t=Math.sin(t*c)/d,this._x=this._x*l+n*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+n*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,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),o=Math.sqrt(n);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}},G=class i{constructor(e=0,t=0,n=0){i.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,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(Rk.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Rk.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[3]*n+o[6]*r,this.y=o[1]*t+o[4]*n+o[7]*r,this.z=o[2]*t+o[5]*n+o[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,o=e.elements,s=1/(o[3]*t+o[7]*n+o[11]*r+o[15]);return this.x=(o[0]*t+o[4]*n+o[8]*r+o[12])*s,this.y=(o[1]*t+o[5]*n+o[9]*r+o[13])*s,this.z=(o[2]*t+o[6]*n+o[10]*r+o[14])*s,this}applyQuaternion(e){let t=this.x,n=this.y,r=this.z,o=e.x,s=e.y,a=e.z,l=e.w,c=2*(s*r-a*n),d=2*(a*t-o*r),u=2*(o*n-s*t);return this.x=t+l*c+s*u-a*d,this.y=n+l*d+a*c-o*u,this.z=r+l*u+o*d-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,n=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r,this.y=o[1]*t+o[5]*n+o[9]*r,this.z=o[2]*t+o[6]*n+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=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this.z=Vt(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this.z=Vt(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Vt(n,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,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let n=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-n*l,this.z=n*a-r*s,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return Yw.copy(this).projectOnVector(e),this.sub(Yw)}reflect(e){return this.sub(Yw.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 n=this.dot(e)/t;return Math.acos(Vt(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+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,n){let r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,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(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,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,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},Yw=new G,Rk=new po,At=class i{constructor(e,t,n,r,o,s,a,l,c){i.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,r,o,s,a,l,c)}set(e,t,n,r,o,s,a,l,c){let d=this.elements;return d[0]=e,d[1]=r,d[2]=a,d[3]=t,d[4]=o,d[5]=l,d[6]=n,d[7]=s,d[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.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 n=e.elements,r=t.elements,o=this.elements,s=n[0],a=n[3],l=n[6],c=n[1],d=n[4],u=n[7],f=n[2],h=n[5],p=n[8],v=r[0],g=r[3],m=r[6],b=r[1],y=r[4],x=r[7],_=r[2],w=r[5],T=r[8];return o[0]=s*v+a*b+l*_,o[3]=s*g+a*y+l*w,o[6]=s*m+a*x+l*T,o[1]=c*v+d*b+u*_,o[4]=c*g+d*y+u*w,o[7]=c*m+d*x+u*T,o[2]=f*v+h*b+p*_,o[5]=f*g+h*y+p*w,o[8]=f*m+h*x+p*T,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],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8];return t*s*d-t*a*c-n*o*d+n*a*l+r*o*c-r*s*l}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8],u=d*s-a*c,f=a*l-d*o,h=c*o-s*l,p=t*u+n*f+r*h;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);let v=1/p;return e[0]=u*v,e[1]=(r*c-d*n)*v,e[2]=(a*n-r*s)*v,e[3]=f*v,e[4]=(d*t-r*l)*v,e[5]=(r*o-a*t)*v,e[6]=h*v,e[7]=(n*l-c*t)*v,e[8]=(s*t-n*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,n,r,o,s,a){let l=Math.cos(o),c=Math.sin(o);return this.set(n*l,n*c,-n*(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(qw.makeScale(e,t)),this}rotate(e){return this.premultiply(qw.makeRotation(-e)),this}translate(e,t){return this.premultiply(qw.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),n=Math.sin(e);return this.set(t,-n,0,n,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,n=e.elements;for(let r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}},qw=new At,kk=new At().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Fk=new At().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function sW(){let i={enabled:!0,workingColorSpace:$c,spaces:{},convert:function(r,o,s){return this.enabled===!1||o===s||!o||!s||(this.spaces[o].transfer===on&&(r.r=ya(r.r),r.g=ya(r.g),r.b=ya(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===on&&(r.r=Ku(r.r),r.g=Ku(r.g),r.b=Ku(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===Sa?Ip: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 tf("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),i.workingToColorSpace(r,o)},toWorkingColorSpace:function(r,o){return tf("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),i.colorSpaceToWorking(r,o)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return i.define({[$c]:{primaries:e,whitePoint:n,transfer:Ip,toXYZ:kk,fromXYZ:Fk,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:vn},outputColorSpaceConfig:{drawingBufferColorSpace:vn}},[vn]:{primaries:e,whitePoint:n,transfer:on,toXYZ:kk,fromXYZ:Fk,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:vn}}}),i}var zt=sW();function ya(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function Ku(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}var Nu,nb=class{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{Nu===void 0&&(Nu=Qu("canvas")),Nu.width=e.width,Nu.height=e.height;let r=Nu.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=Nu}return n.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=Qu("canvas");t.width=e.width,t.height=e.height;let n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);let r=n.getImageData(0,0,e.width,e.height),o=r.data;for(let s=0;s<o.length;s++)o[s]=ya(o[s]/255)*255;return n.putImageData(r,0,0),t}else if(e.data){let t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(ya(t[n]/255)*255):t[n]=ya(t[n]);return{data:t,width:e.width,height:e.height}}else return ut("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},aW=0,rf=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:aW++}),this.uuid=gf(),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 n={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(Kw(r[s].image)):o.push(Kw(r[s]))}else o=Kw(r);n.url=o}return t||(e.images[this.uuid]=n),n}};function Kw(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?nb.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(ut("Texture: Unable to serialize Texture."),{})}var lW=0,Zw=new G,zo=(()=>{class i extends ws{constructor(t=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Ai,o=Ai,s=jn,a=mo,l=go,c=lr,d=i.DEFAULT_ANISOTROPY,u=Sa){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:lW++}),this.uuid=gf(),this.name="",this.source=new rf(t),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=o,this.magFilter=s,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new vt(0,0),this.repeat=new vt(1,1),this.center=new vt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new At,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,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(Zw).x}get height(){return this.source.getSize(Zw).y}get depth(){return this.source.getSize(Zw).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,n){this.updateRanges.push({start:t,count:n})}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 n in t){let r=t[n];if(r===void 0){ut(`Texture.setValues(): parameter '${n}' has value of undefined.`);continue}let o=this[n];if(o===void 0){ut(`Texture.setValues(): property '${n}' 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[n]=r}}toJSON(t){let n=t===void 0||typeof t=="string";if(!n&&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),n||(t.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==vE)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Ju:t.x=t.x-Math.floor(t.x);break;case Ai:t.x=t.x<0?0:1;break;case eb: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 Ju:t.y=t.y-Math.floor(t.y);break;case Ai:t.y=t.y<0?0:1;break;case eb: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 i.DEFAULT_IMAGE=null,i.DEFAULT_MAPPING=vE,i.DEFAULT_ANISOTROPY=1,i})(),An=class i{constructor(e=0,t=0,n=0,r=1){i.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,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,n,r){return this.x=e,this.y=t,this.z=n,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,n=this.y,r=this.z,o=this.w,s=e.elements;return this.x=s[0]*t+s[4]*n+s[8]*r+s[12]*o,this.y=s[1]*t+s[5]*n+s[9]*r+s[13]*o,this.z=s[2]*t+s[6]*n+s[10]*r+s[14]*o,this.w=s[3]*t+s[7]*n+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,n,r,o,l=e.elements,c=l[0],d=l[4],u=l[8],f=l[1],h=l[5],p=l[9],v=l[2],g=l[6],m=l[10];if(Math.abs(d-f)<.01&&Math.abs(u-v)<.01&&Math.abs(p-g)<.01){if(Math.abs(d+f)<.1&&Math.abs(u+v)<.1&&Math.abs(p+g)<.1&&Math.abs(c+h+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let y=(c+1)/2,x=(h+1)/2,_=(m+1)/2,w=(d+f)/4,T=(u+v)/4,P=(p+g)/4;return y>x&&y>_?y<.01?(n=0,r=.707106781,o=.707106781):(n=Math.sqrt(y),r=w/n,o=T/n):x>_?x<.01?(n=.707106781,r=0,o=.707106781):(r=Math.sqrt(x),n=w/r,o=P/r):_<.01?(n=.707106781,r=.707106781,o=0):(o=Math.sqrt(_),n=T/o,r=P/o),this.set(n,r,o,t),this}let b=Math.sqrt((g-p)*(g-p)+(u-v)*(u-v)+(f-d)*(f-d));return Math.abs(b)<.001&&(b=1),this.x=(g-p)/b,this.y=(u-v)/b,this.z=(f-d)/b,this.w=Math.acos((c+h+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=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this.z=Vt(this.z,e.z,t.z),this.w=Vt(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this.z=Vt(this.z,e,t),this.w=Vt(this.w,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Vt(n,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,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,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}},ib=class extends ws{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:jn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new An(0,0,e,t),this.scissorTest=!1,this.viewport=new An(0,0,e,t);let r={width:e,height:t,depth:n.depth},o=new zo(r);this.textures=[];let s=n.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(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){let t={minFilter:jn,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 n=0;n<this.textures.length;n++)this.textures[n].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,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;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=n,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,n=e.textures.length;t<n;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 rf(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"})}},Fr=class extends ib{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}},Ap=class extends zo{constructor(e=null,t=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=fi,this.minFilter=fi,this.wrapR=Ai,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var rb=class extends zo{constructor(e=null,t=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=fi,this.minFilter=fi,this.wrapR=Ai,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Yi=class{constructor(e=new G(1/0,1/0,1/0),t=new G(-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,n=e.length;t<n;t+=3)this.expandByPoint(Oo.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(Oo.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let n=Oo.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),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 n=e.geometry;if(n!==void 0){let o=n.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,Oo):Oo.fromBufferAttribute(o,s),Oo.applyMatrix4(e.matrixWorld),this.expandByPoint(Oo);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Iv.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Iv.copy(n.boundingBox)),Iv.applyMatrix4(e.matrixWorld),this.union(Iv)}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,Oo),Oo.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(_p),Pv.subVectors(this.max,_p),Lu.subVectors(e.a,_p),Bu.subVectors(e.b,_p),Uu.subVectors(e.c,_p),sl.subVectors(Bu,Lu),al.subVectors(Uu,Bu),Uc.subVectors(Lu,Uu);let t=[0,-sl.z,sl.y,0,-al.z,al.y,0,-Uc.z,Uc.y,sl.z,0,-sl.x,al.z,0,-al.x,Uc.z,0,-Uc.x,-sl.y,sl.x,0,-al.y,al.x,0,-Uc.y,Uc.x,0];return!Jw(t,Lu,Bu,Uu,Pv)||(t=[1,0,0,0,1,0,0,0,1],!Jw(t,Lu,Bu,Uu,Pv))?!1:(Av.crossVectors(sl,al),t=[Av.x,Av.y,Av.z],Jw(t,Lu,Bu,Uu,Pv))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Oo).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Oo).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:(fa[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),fa[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),fa[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),fa[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),fa[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),fa[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),fa[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),fa[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(fa),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}},fa=[new G,new G,new G,new G,new G,new G,new G,new G],Oo=new G,Iv=new Yi,Lu=new G,Bu=new G,Uu=new G,sl=new G,al=new G,Uc=new G,_p=new G,Pv=new G,Av=new G,zc=new G;function Jw(i,e,t,n,r){for(let o=0,s=i.length-3;o<=s;o+=3){zc.fromArray(i,o);let a=r.x*Math.abs(zc.x)+r.y*Math.abs(zc.y)+r.z*Math.abs(zc.z),l=e.dot(zc),c=t.dot(zc),d=n.dot(zc);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}var cW=new Yi,Sp=new G,Qw=new G,pl=class{constructor(e=new G,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 n=this.center;t!==void 0?n.copy(t):cW.setFromPoints(e).getCenter(n);let r=0;for(let o=0,s=e.length;o<s;o++)r=Math.max(r,n.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 n=this.center.distanceToSquared(e);return t.copy(e),n>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;Sp.subVectors(e,this.center);let t=Sp.lengthSq();if(t>this.radius*this.radius){let n=Math.sqrt(t),r=(n-this.radius)*.5;this.center.addScaledVector(Sp,r/n),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):(Qw.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Sp.copy(e.center).add(Qw)),this.expandByPoint(Sp.copy(e.center).sub(Qw))),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}},ha=new G,eE=new G,Ov=new G,ll=new G,tE=new G,Rv=new G,nE=new G,xa=class{constructor(e=new G,t=new G(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,ha)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=ha.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ha.copy(this.origin).addScaledVector(this.direction,t),ha.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){eE.copy(e).add(t).multiplyScalar(.5),Ov.copy(t).sub(e).normalize(),ll.copy(this.origin).sub(eE);let o=e.distanceTo(t)*.5,s=-this.direction.dot(Ov),a=ll.dot(this.direction),l=-ll.dot(Ov),c=ll.lengthSq(),d=Math.abs(1-s*s),u,f,h,p;if(d>0)if(u=s*l-a,f=s*a-l,p=o*d,u>=0)if(f>=-p)if(f<=p){let v=1/d;u*=v,f*=v,h=u*(u+s*f+2*a)+f*(s*u+f+2*l)+c}else f=o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;else f=-o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;else f<=-p?(u=Math.max(0,-(-s*o+a)),f=u>0?-o:Math.min(Math.max(-o,-l),o),h=-u*u+f*(f+2*l)+c):f<=p?(u=0,f=Math.min(Math.max(-o,-l),o),h=f*(f+2*l)+c):(u=Math.max(0,-(s*o+a)),f=u>0?o:Math.min(Math.max(-o,-l),o),h=-u*u+f*(f+2*l)+c);else f=s>0?-o:o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,u),r&&r.copy(eE).addScaledVector(Ov,f),h}intersectSphere(e,t){ha.subVectors(e.center,this.origin);let n=ha.dot(this.direction),r=ha.dot(ha)-n*n,o=e.radius*e.radius;if(r>o)return null;let s=Math.sqrt(o-r),a=n-s,l=n+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 n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,o,s,a,l,c=1/this.direction.x,d=1/this.direction.y,u=1/this.direction.z,f=this.origin;return c>=0?(n=(e.min.x-f.x)*c,r=(e.max.x-f.x)*c):(n=(e.max.x-f.x)*c,r=(e.min.x-f.x)*c),d>=0?(o=(e.min.y-f.y)*d,s=(e.max.y-f.y)*d):(o=(e.max.y-f.y)*d,s=(e.min.y-f.y)*d),n>s||o>r||((o>n||isNaN(n))&&(n=o),(s<r||isNaN(r))&&(r=s),u>=0?(a=(e.min.z-f.z)*u,l=(e.max.z-f.z)*u):(a=(e.max.z-f.z)*u,l=(e.min.z-f.z)*u),n>l||a>r)||((a>n||n!==n)&&(n=a),(l<r||r!==r)&&(r=l),r<0)?null:this.at(n>=0?n:r,t)}intersectsBox(e){return this.intersectBox(e,ha)!==null}intersectTriangle(e,t,n,r,o){tE.subVectors(t,e),Rv.subVectors(n,e),nE.crossVectors(tE,Rv);let s=this.direction.dot(nE),a;if(s>0){if(r)return null;a=1}else if(s<0)a=-1,s=-s;else return null;ll.subVectors(this.origin,e);let l=a*this.direction.dot(Rv.crossVectors(ll,Rv));if(l<0)return null;let c=a*this.direction.dot(tE.cross(ll));if(c<0||l+c>s)return null;let d=-a*ll.dot(nE);return d<0?null:this.at(d/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)}},Mn=class i{constructor(e,t,n,r,o,s,a,l,c,d,u,f,h,p,v,g){i.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,n,r,o,s,a,l,c,d,u,f,h,p,v,g)}set(e,t,n,r,o,s,a,l,c,d,u,f,h,p,v,g){let m=this.elements;return m[0]=e,m[4]=t,m[8]=n,m[12]=r,m[1]=o,m[5]=s,m[9]=a,m[13]=l,m[2]=c,m[6]=d,m[10]=u,m[14]=f,m[3]=h,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 i().fromArray(this.elements)}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){let t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[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,n){return this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),n.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this)}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();let t=this.elements,n=e.elements,r=1/zu.setFromMatrixColumn(e,0).length(),o=1/zu.setFromMatrixColumn(e,1).length(),s=1/zu.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*o,t[5]=n[5]*o,t[6]=n[6]*o,t[7]=0,t[8]=n[8]*s,t[9]=n[9]*s,t[10]=n[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,n=e.x,r=e.y,o=e.z,s=Math.cos(n),a=Math.sin(n),l=Math.cos(r),c=Math.sin(r),d=Math.cos(o),u=Math.sin(o);if(e.order==="XYZ"){let f=s*d,h=s*u,p=a*d,v=a*u;t[0]=l*d,t[4]=-l*u,t[8]=c,t[1]=h+p*c,t[5]=f-v*c,t[9]=-a*l,t[2]=v-f*c,t[6]=p+h*c,t[10]=s*l}else if(e.order==="YXZ"){let f=l*d,h=l*u,p=c*d,v=c*u;t[0]=f+v*a,t[4]=p*a-h,t[8]=s*c,t[1]=s*u,t[5]=s*d,t[9]=-a,t[2]=h*a-p,t[6]=v+f*a,t[10]=s*l}else if(e.order==="ZXY"){let f=l*d,h=l*u,p=c*d,v=c*u;t[0]=f-v*a,t[4]=-s*u,t[8]=p+h*a,t[1]=h+p*a,t[5]=s*d,t[9]=v-f*a,t[2]=-s*c,t[6]=a,t[10]=s*l}else if(e.order==="ZYX"){let f=s*d,h=s*u,p=a*d,v=a*u;t[0]=l*d,t[4]=p*c-h,t[8]=f*c+v,t[1]=l*u,t[5]=v*c+f,t[9]=h*c-p,t[2]=-c,t[6]=a*l,t[10]=s*l}else if(e.order==="YZX"){let f=s*l,h=s*c,p=a*l,v=a*c;t[0]=l*d,t[4]=v-f*u,t[8]=p*u+h,t[1]=u,t[5]=s*d,t[9]=-a*d,t[2]=-c*d,t[6]=h*u+p,t[10]=f-v*u}else if(e.order==="XZY"){let f=s*l,h=s*c,p=a*l,v=a*c;t[0]=l*d,t[4]=-u,t[8]=c*d,t[1]=f*u+v,t[5]=s*d,t[9]=h*u-p,t[2]=p*u-h,t[6]=a*d,t[10]=v*u+f}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(dW,e,uW)}lookAt(e,t,n){let r=this.elements;return Or.subVectors(e,t),Or.lengthSq()===0&&(Or.z=1),Or.normalize(),cl.crossVectors(n,Or),cl.lengthSq()===0&&(Math.abs(n.z)===1?Or.x+=1e-4:Or.z+=1e-4,Or.normalize(),cl.crossVectors(n,Or)),cl.normalize(),kv.crossVectors(Or,cl),r[0]=cl.x,r[4]=kv.x,r[8]=Or.x,r[1]=cl.y,r[5]=kv.y,r[9]=Or.y,r[2]=cl.z,r[6]=kv.z,r[10]=Or.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,o=this.elements,s=n[0],a=n[4],l=n[8],c=n[12],d=n[1],u=n[5],f=n[9],h=n[13],p=n[2],v=n[6],g=n[10],m=n[14],b=n[3],y=n[7],x=n[11],_=n[15],w=r[0],T=r[4],P=r[8],S=r[12],D=r[1],L=r[5],H=r[9],V=r[13],X=r[2],Y=r[6],q=r[10],j=r[14],ne=r[3],ye=r[7],xe=r[11],Se=r[15];return o[0]=s*w+a*D+l*X+c*ne,o[4]=s*T+a*L+l*Y+c*ye,o[8]=s*P+a*H+l*q+c*xe,o[12]=s*S+a*V+l*j+c*Se,o[1]=d*w+u*D+f*X+h*ne,o[5]=d*T+u*L+f*Y+h*ye,o[9]=d*P+u*H+f*q+h*xe,o[13]=d*S+u*V+f*j+h*Se,o[2]=p*w+v*D+g*X+m*ne,o[6]=p*T+v*L+g*Y+m*ye,o[10]=p*P+v*H+g*q+m*xe,o[14]=p*S+v*V+g*j+m*Se,o[3]=b*w+y*D+x*X+_*ne,o[7]=b*T+y*L+x*Y+_*ye,o[11]=b*P+y*H+x*q+_*xe,o[15]=b*S+y*V+x*j+_*Se,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],n=e[4],r=e[8],o=e[12],s=e[1],a=e[5],l=e[9],c=e[13],d=e[2],u=e[6],f=e[10],h=e[14],p=e[3],v=e[7],g=e[11],m=e[15],b=l*h-c*f,y=a*h-c*u,x=a*f-l*u,_=s*h-c*d,w=s*f-l*d,T=s*u-a*d;return t*(v*b-g*y+m*x)-n*(p*b-g*_+m*w)+r*(p*y-v*_+m*T)-o*(p*x-v*w+g*T)}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,n){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]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8],u=e[9],f=e[10],h=e[11],p=e[12],v=e[13],g=e[14],m=e[15],b=u*g*c-v*f*c+v*l*h-a*g*h-u*l*m+a*f*m,y=p*f*c-d*g*c-p*l*h+s*g*h+d*l*m-s*f*m,x=d*v*c-p*u*c+p*a*h-s*v*h-d*a*m+s*u*m,_=p*u*l-d*v*l-p*a*f+s*v*f+d*a*g-s*u*g,w=t*b+n*y+r*x+o*_;if(w===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let T=1/w;return e[0]=b*T,e[1]=(v*f*o-u*g*o-v*r*h+n*g*h+u*r*m-n*f*m)*T,e[2]=(a*g*o-v*l*o+v*r*c-n*g*c-a*r*m+n*l*m)*T,e[3]=(u*l*o-a*f*o-u*r*c+n*f*c+a*r*h-n*l*h)*T,e[4]=y*T,e[5]=(d*g*o-p*f*o+p*r*h-t*g*h-d*r*m+t*f*m)*T,e[6]=(p*l*o-s*g*o-p*r*c+t*g*c+s*r*m-t*l*m)*T,e[7]=(s*f*o-d*l*o+d*r*c-t*f*c-s*r*h+t*l*h)*T,e[8]=x*T,e[9]=(p*u*o-d*v*o-p*n*h+t*v*h+d*n*m-t*u*m)*T,e[10]=(s*v*o-p*a*o+p*n*c-t*v*c-s*n*m+t*a*m)*T,e[11]=(d*a*o-s*u*o-d*n*c+t*u*c+s*n*h-t*a*h)*T,e[12]=_*T,e[13]=(d*v*r-p*u*r+p*n*f-t*v*f-d*n*g+t*u*g)*T,e[14]=(p*a*r-s*v*r-p*n*l+t*v*l+s*n*g-t*a*g)*T,e[15]=(s*u*r-d*a*r+d*n*l-t*u*l-s*n*f+t*a*f)*T,this}scale(e){let t=this.elements,n=e.x,r=e.y,o=e.z;return t[0]*=n,t[4]*=r,t[8]*=o,t[1]*=n,t[5]*=r,t[9]*=o,t[2]*=n,t[6]*=r,t[10]*=o,t[3]*=n,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],n=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,n,r))}makeTranslation(e,t,n){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,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),r=Math.sin(t),o=1-n,s=e.x,a=e.y,l=e.z,c=o*s,d=o*a;return this.set(c*s+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*s,0,c*l-r*a,d*l+r*s,o*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,o,s){return this.set(1,n,o,0,e,1,s,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){let r=this.elements,o=t._x,s=t._y,a=t._z,l=t._w,c=o+o,d=s+s,u=a+a,f=o*c,h=o*d,p=o*u,v=s*d,g=s*u,m=a*u,b=l*c,y=l*d,x=l*u,_=n.x,w=n.y,T=n.z;return r[0]=(1-(v+m))*_,r[1]=(h+x)*_,r[2]=(p-y)*_,r[3]=0,r[4]=(h-x)*w,r[5]=(1-(f+m))*w,r[6]=(g+b)*w,r[7]=0,r[8]=(p+y)*T,r[9]=(g-b)*T,r[10]=(1-(f+v))*T,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){let r=this.elements;if(e.x=r[12],e.y=r[13],e.z=r[14],this.determinant()===0)return n.set(1,1,1),t.identity(),this;let o=zu.set(r[0],r[1],r[2]).length(),s=zu.set(r[4],r[5],r[6]).length(),a=zu.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),Ro.copy(this);let c=1/o,d=1/s,u=1/a;return Ro.elements[0]*=c,Ro.elements[1]*=c,Ro.elements[2]*=c,Ro.elements[4]*=d,Ro.elements[5]*=d,Ro.elements[6]*=d,Ro.elements[8]*=u,Ro.elements[9]*=u,Ro.elements[10]*=u,t.setFromRotationMatrix(Ro),n.x=o,n.y=s,n.z=a,this}makePerspective(e,t,n,r,o,s,a=Fo,l=!1){let c=this.elements,d=2*o/(t-e),u=2*o/(n-r),f=(t+e)/(t-e),h=(n+r)/(n-r),p,v;if(l)p=o/(s-o),v=s*o/(s-o);else if(a===Fo)p=-(s+o)/(s-o),v=-2*s*o/(s-o);else if(a===Pp)p=-s/(s-o),v=-s*o/(s-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=d,c[4]=0,c[8]=f,c[12]=0,c[1]=0,c[5]=u,c[9]=h,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,n,r,o,s,a=Fo,l=!1){let c=this.elements,d=2/(t-e),u=2/(n-r),f=-(t+e)/(t-e),h=-(n+r)/(n-r),p,v;if(l)p=1/(s-o),v=s/(s-o);else if(a===Fo)p=-2/(s-o),v=-(s+o)/(s-o);else if(a===Pp)p=-1/(s-o),v=-o/(s-o);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=d,c[4]=0,c[8]=0,c[12]=f,c[1]=0,c[5]=u,c[9]=0,c[13]=h,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,n=e.elements;for(let r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}},zu=new G,Ro=new Mn,dW=new G(0,0,0),uW=new G(1,1,1),cl=new G,kv=new G,Or=new G,Nk=new Mn,Lk=new po,ml=(()=>{class i{constructor(t=0,n=0,r=0,o=i.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=n,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,n,r,o=this._order){return this._x=t,this._y=n,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,n=this._order,r=!0){let o=t.elements,s=o[0],a=o[4],l=o[8],c=o[1],d=o[5],u=o[9],f=o[2],h=o[6],p=o[10];switch(n){case"XYZ":this._y=Math.asin(Vt(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,p),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(h,d),this._z=0);break;case"YXZ":this._x=Math.asin(-Vt(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(l,p),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(Vt(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,p),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,s));break;case"ZYX":this._y=Math.asin(-Vt(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(c,s)):(this._x=0,this._z=Math.atan2(-a,d));break;case"YZX":this._z=Math.asin(Vt(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-u,d),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(l,p));break;case"XZY":this._z=Math.asin(-Vt(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(h,d),this._y=Math.atan2(l,s)):(this._x=Math.atan2(-u,p),this._y=0);break;default:ut("Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(t,n,r){return Nk.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Nk,n,r)}setFromVector3(t,n=this._order){return this.set(t.x,t.y,t.z,n)}reorder(t){return Lk.setFromEuler(this),this.setFromQuaternion(Lk,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=[],n=0){return t[n]=this._x,t[n+1]=this._y,t[n+2]=this._z,t[n+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 i.DEFAULT_ORDER="XYZ",i})(),of=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}},fW=0,Bk=new G,Vu=new po,pa=new Mn,Fv=new G,Cp=new G,hW=new G,pW=new po,Uk=new G(1,0,0),zk=new G(0,1,0),Vk=new G(0,0,1),Gk={type:"added"},mW={type:"removed"},Gu={type:"childadded",child:null},iE={type:"childremoved",child:null},Nr=(()=>{class i extends ws{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:fW++}),this.uuid=gf(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();let t=new G,n=new ml,r=new po,o=new G(1,1,1);function s(){r.setFromEuler(n,!1)}function a(){n.setFromQuaternion(r,void 0,!1)}n._onChange(s),r._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:o},modelViewMatrix:{value:new Mn},normalMatrix:{value:new At}}),this.matrix=new Mn,this.matrixWorld=new Mn,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new of,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,n){this.quaternion.setFromAxisAngle(t,n)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,n){return Vu.setFromAxisAngle(t,n),this.quaternion.multiply(Vu),this}rotateOnWorldAxis(t,n){return Vu.setFromAxisAngle(t,n),this.quaternion.premultiply(Vu),this}rotateX(t){return this.rotateOnAxis(Uk,t)}rotateY(t){return this.rotateOnAxis(zk,t)}rotateZ(t){return this.rotateOnAxis(Vk,t)}translateOnAxis(t,n){return Bk.copy(t).applyQuaternion(this.quaternion),this.position.add(Bk.multiplyScalar(n)),this}translateX(t){return this.translateOnAxis(Uk,t)}translateY(t){return this.translateOnAxis(zk,t)}translateZ(t){return this.translateOnAxis(Vk,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(pa.copy(this.matrixWorld).invert())}lookAt(t,n,r){t.isVector3?Fv.copy(t):Fv.set(t,n,r);let o=this.parent;this.updateWorldMatrix(!0,!1),Cp.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?pa.lookAt(Cp,Fv,this.up):pa.lookAt(Fv,Cp,this.up),this.quaternion.setFromRotationMatrix(pa),o&&(pa.extractRotation(o.matrixWorld),Vu.setFromRotationMatrix(pa),this.quaternion.premultiply(Vu.invert()))}add(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return t===this?(gt("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(Gk),Gu.child=t,this.dispatchEvent(Gu),Gu.child=null):gt("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 n=this.children.indexOf(t);return n!==-1&&(t.parent=null,this.children.splice(n,1),t.dispatchEvent(mW),iE.child=t,this.dispatchEvent(iE),iE.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),pa.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),pa.multiply(t.parent.matrixWorld)),t.applyMatrix4(pa),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(Gk),Gu.child=t,this.dispatchEvent(Gu),Gu.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,n){if(this[t]===n)return this;for(let r=0,o=this.children.length;r<o;r++){let a=this.children[r].getObjectByProperty(t,n);if(a!==void 0)return a}}getObjectsByProperty(t,n,r=[]){this[t]===n&&r.push(this);let o=this.children;for(let s=0,a=o.length;s<a;s++)o[s].getObjectsByProperty(t,n,r);return r}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Cp,t,hW),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Cp,pW,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let n=this.matrixWorld.elements;return t.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(t){t(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverseVisible(t)}traverseAncestors(t){let n=this.parent;n!==null&&(t(n),n.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 n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].updateMatrixWorld(t)}updateWorldMatrix(t,n){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)),n===!0){let o=this.children;for(let s=0,a=o.length;s<a;s++)o[s].updateWorldMatrix(!1,!0)}}toJSON(t){let n=t===void 0||typeof t=="string",r={};n&&(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=>fe(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 d=0,u=c.length;d<u;d++){let f=c[d];s(t.shapes,f)}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,d=this.material.length;c<d;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(n){let l=a(t.geometries),c=a(t.materials),d=a(t.textures),u=a(t.images),f=a(t.shapes),h=a(t.skeletons),p=a(t.animations),v=a(t.nodes);l.length>0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),u.length>0&&(r.images=u),f.length>0&&(r.shapes=f),h.length>0&&(r.skeletons=h),p.length>0&&(r.animations=p),v.length>0&&(r.nodes=v)}return r.object=o,r;function a(l){let c=[];for(let d in l){let u=l[d];delete u.metadata,c.push(u)}return c}}clone(t){return new this.constructor().copy(this,t)}copy(t,n=!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)),n===!0)for(let r=0;r<t.children.length;r++){let o=t.children[r];this.add(o.clone())}return this}}return i.DEFAULT_UP=new G(0,1,0),i.DEFAULT_MATRIX_AUTO_UPDATE=!0,i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0,i})(),ko=new G,ma=new G,rE=new G,ga=new G,Hu=new G,ju=new G,Hk=new G,oE=new G,sE=new G,aE=new G,lE=new An,cE=new An,dE=new An,fl=class i{constructor(e=new G,t=new G,n=new G){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),ko.subVectors(e,t),r.cross(ko);let o=r.lengthSq();return o>0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(e,t,n,r,o){ko.subVectors(r,t),ma.subVectors(n,t),rE.subVectors(e,t);let s=ko.dot(ko),a=ko.dot(ma),l=ko.dot(rE),c=ma.dot(ma),d=ma.dot(rE),u=s*c-a*a;if(u===0)return o.set(0,0,0),null;let f=1/u,h=(c*l-a*d)*f,p=(s*d-a*l)*f;return o.set(1-h-p,p,h)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,ga)===null?!1:ga.x>=0&&ga.y>=0&&ga.x+ga.y<=1}static getInterpolation(e,t,n,r,o,s,a,l){return this.getBarycoord(e,t,n,r,ga)===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,ga.x),l.addScaledVector(s,ga.y),l.addScaledVector(a,ga.z),l)}static getInterpolatedAttribute(e,t,n,r,o,s){return lE.setScalar(0),cE.setScalar(0),dE.setScalar(0),lE.fromBufferAttribute(e,t),cE.fromBufferAttribute(e,n),dE.fromBufferAttribute(e,r),s.setScalar(0),s.addScaledVector(lE,o.x),s.addScaledVector(cE,o.y),s.addScaledVector(dE,o.z),s}static isFrontFacing(e,t,n,r){return ko.subVectors(n,t),ma.subVectors(e,t),ko.cross(ma).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),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 ko.subVectors(this.c,this.b),ma.subVectors(this.a,this.b),ko.cross(ma).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return i.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return i.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,r,o){return i.getInterpolation(e,this.a,this.b,this.c,t,n,r,o)}containsPoint(e){return i.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return i.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n=this.a,r=this.b,o=this.c,s,a;Hu.subVectors(r,n),ju.subVectors(o,n),oE.subVectors(e,n);let l=Hu.dot(oE),c=ju.dot(oE);if(l<=0&&c<=0)return t.copy(n);sE.subVectors(e,r);let d=Hu.dot(sE),u=ju.dot(sE);if(d>=0&&u<=d)return t.copy(r);let f=l*u-d*c;if(f<=0&&l>=0&&d<=0)return s=l/(l-d),t.copy(n).addScaledVector(Hu,s);aE.subVectors(e,o);let h=Hu.dot(aE),p=ju.dot(aE);if(p>=0&&h<=p)return t.copy(o);let v=h*c-l*p;if(v<=0&&c>=0&&p<=0)return a=c/(c-p),t.copy(n).addScaledVector(ju,a);let g=d*p-h*u;if(g<=0&&u-d>=0&&h-p>=0)return Hk.subVectors(o,r),a=(u-d)/(u-d+(h-p)),t.copy(r).addScaledVector(Hk,a);let m=1/(g+v+f);return s=v*m,a=f*m,t.copy(n).addScaledVector(Hu,s).addScaledVector(ju,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},UF={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},dl={h:0,s:0,l:0},Nv={h:0,s:0,l:0};function uE(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*6*(2/3-t):i}var _t=class{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===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,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=vn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,zt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=zt.workingColorSpace){return this.r=e,this.g=t,this.b=n,zt.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=zt.workingColorSpace){if(e=KE(e,1),t=Vt(t,0,1),n=Vt(n,0,1),t===0)this.r=this.g=this.b=n;else{let o=n<=.5?n*(1+t):n+t-n*t,s=2*n-o;this.r=uE(s,o,e+1/3),this.g=uE(s,o,e),this.b=uE(s,o,e-1/3)}return zt.colorSpaceToWorking(this,r),this}setStyle(e,t=vn){function n(o){o!==void 0&&parseFloat(o)<1&&ut("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 n(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 n(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 n(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,t);break;default:ut("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);ut("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=vn){let n=UF[e.toLowerCase()];return n!==void 0?this.setHex(n,t):ut("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=ya(e.r),this.g=ya(e.g),this.b=ya(e.b),this}copyLinearToSRGB(e){return this.r=Ku(e.r),this.g=Ku(e.g),this.b=Ku(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=vn){return zt.workingToColorSpace(Pi.copy(this),e),Math.round(Vt(Pi.r*255,0,255))*65536+Math.round(Vt(Pi.g*255,0,255))*256+Math.round(Vt(Pi.b*255,0,255))}getHexString(e=vn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=zt.workingColorSpace){zt.workingToColorSpace(Pi.copy(this),t);let n=Pi.r,r=Pi.g,o=Pi.b,s=Math.max(n,r,o),a=Math.min(n,r,o),l,c,d=(a+s)/2;if(a===s)l=0,c=0;else{let u=s-a;switch(c=d<=.5?u/(s+a):u/(2-s-a),s){case n:l=(r-o)/u+(r<o?6:0);break;case r:l=(o-n)/u+2;break;case o:l=(n-r)/u+4;break}l/=6}return e.h=l,e.s=c,e.l=d,e}getRGB(e,t=zt.workingColorSpace){return zt.workingToColorSpace(Pi.copy(this),t),e.r=Pi.r,e.g=Pi.g,e.b=Pi.b,e}getStyle(e=vn){zt.workingToColorSpace(Pi.copy(this),e);let t=Pi.r,n=Pi.g,r=Pi.b;return e!==vn?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(r*255)})`}offsetHSL(e,t,n){return this.getHSL(dl),this.setHSL(dl.h+e,dl.s+t,dl.l+n)}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,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(dl),e.getHSL(Nv);let n=Tp(dl.h,Nv.h,t),r=Tp(dl.s,Nv.s,t),o=Tp(dl.l,Nv.l,t);return this.setHSL(n,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,n=this.g,r=this.b,o=e.elements;return this.r=o[0]*t+o[3]*n+o[6]*r,this.g=o[1]*t+o[4]*n+o[7]*r,this.b=o[2]*t+o[5]*n+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}},Pi=new _t;_t.NAMES=UF;var gW=0,Lr=class extends ws{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:gW++}),this.uuid=gf(),this.name="",this.type="Material",this.blending=jc,this.side=Xi,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Jv,this.blendDst=Qv,this.blendEquation=hl,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new _t(0,0,0),this.blendAlpha=0,this.depthFunc=Wc,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=_E,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Hc,this.stencilZFail=Hc,this.stencilZPass=Hc,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 n=e[t];if(n===void 0){ut(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){ut(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});let n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==jc&&(n.blending=this.blending),this.side!==Xi&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==Jv&&(n.blendSrc=this.blendSrc),this.blendDst!==Qv&&(n.blendDst=this.blendDst),this.blendEquation!==hl&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==Wc&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==_E&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Hc&&(n.stencilFail=this.stencilFail),this.stencilZFail!==Hc&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==Hc&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.allowOverride===!1&&(n.allowOverride=!1),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.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&&(n.textures=o),s.length>0&&(n.images=s)}return n}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,n=null;if(t!==null){let r=t.length;n=new Array(r);for(let o=0;o!==r;++o)n[o]=t[o].clone()}return this.clippingPlanes=n,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++}},Op=class extends Lr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new _t(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 ml,this.combine=Ab,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 Jn=new G,Lv=new vt,vW=0,kr=class{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:vW++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=SE,this.updateRanges=[],this.gpuType=Uo,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,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,o=this.itemSize;r<o;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)Lv.fromBufferAttribute(this,t),Lv.applyMatrix3(e),this.setXY(t,Lv.x,Lv.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.applyMatrix3(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.applyMatrix4(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.applyNormalMatrix(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.transformDirection(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=qu(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=$i(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=qu(t,this.array)),t}setX(e,t){return this.normalized&&(t=$i(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=qu(t,this.array)),t}setY(e,t){return this.normalized&&(t=$i(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=qu(t,this.array)),t}setZ(e,t){return this.normalized&&(t=$i(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=qu(t,this.array)),t}setW(e,t){return this.normalized&&(t=$i(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=$i(t,this.array),n=$i(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=$i(t,this.array),n=$i(n,this.array),r=$i(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,o){return e*=this.itemSize,this.normalized&&(t=$i(t,this.array),n=$i(n,this.array),r=$i(r,this.array),o=$i(o,this.array)),this.array[e+0]=t,this.array[e+1]=n,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!==SE&&(e.usage=this.usage),e}};var Rp=class extends kr{constructor(e,t,n){super(new Uint16Array(e),t,n)}};var kp=class extends kr{constructor(e,t,n){super(new Uint32Array(e),t,n)}};var Hn=class extends kr{constructor(e,t,n){super(new Float32Array(e),t,n)}},bW=0,fo=new Mn,fE=new Nr,Wu=new G,Rr=new Yi,wp=new Yi,di=new G,ei=class i extends ws{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:bW++}),this.uuid=gf(),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(YE(e)?kp:Rp)(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,n=0){this.groups.push({start:e,count:t,materialIndex:n})}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 n=this.attributes.normal;if(n!==void 0){let o=new At().getNormalMatrix(e);n.applyNormalMatrix(o),n.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 fo.makeRotationFromQuaternion(e),this.applyMatrix4(fo),this}rotateX(e){return fo.makeRotationX(e),this.applyMatrix4(fo),this}rotateY(e){return fo.makeRotationY(e),this.applyMatrix4(fo),this}rotateZ(e){return fo.makeRotationZ(e),this.applyMatrix4(fo),this}translate(e,t,n){return fo.makeTranslation(e,t,n),this.applyMatrix4(fo),this}scale(e,t,n){return fo.makeScale(e,t,n),this.applyMatrix4(fo),this}lookAt(e){return fE.lookAt(e),fE.updateMatrix(),this.applyMatrix4(fE.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Wu).negate(),this.translate(Wu.x,Wu.y,Wu.z),this}setFromPoints(e){let t=this.getAttribute("position");if(t===void 0){let n=[];for(let r=0,o=e.length;r<o;r++){let s=e[r];n.push(s.x,s.y,s.z||0)}this.setAttribute("position",new Hn(n,3))}else{let n=Math.min(e.length,t.count);for(let r=0;r<n;r++){let o=e[r];t.setXYZ(r,o.x,o.y,o.z||0)}e.length>t.count&&ut("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 Yi);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){gt("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new G(-1/0,-1/0,-1/0),new G(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,r=t.length;n<r;n++){let o=t[n];Rr.setFromBufferAttribute(o),this.morphTargetsRelative?(di.addVectors(this.boundingBox.min,Rr.min),this.boundingBox.expandByPoint(di),di.addVectors(this.boundingBox.max,Rr.max),this.boundingBox.expandByPoint(di)):(this.boundingBox.expandByPoint(Rr.min),this.boundingBox.expandByPoint(Rr.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&gt('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 pl);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){gt("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new G,1/0);return}if(e){let n=this.boundingSphere.center;if(Rr.setFromBufferAttribute(e),t)for(let o=0,s=t.length;o<s;o++){let a=t[o];wp.setFromBufferAttribute(a),this.morphTargetsRelative?(di.addVectors(Rr.min,wp.min),Rr.expandByPoint(di),di.addVectors(Rr.max,wp.max),Rr.expandByPoint(di)):(Rr.expandByPoint(wp.min),Rr.expandByPoint(wp.max))}Rr.getCenter(n);let r=0;for(let o=0,s=e.count;o<s;o++)di.fromBufferAttribute(e,o),r=Math.max(r,n.distanceToSquared(di));if(t)for(let o=0,s=t.length;o<s;o++){let a=t[o],l=this.morphTargetsRelative;for(let c=0,d=a.count;c<d;c++)di.fromBufferAttribute(a,c),l&&(Wu.fromBufferAttribute(e,c),di.add(Wu)),r=Math.max(r,n.distanceToSquared(di))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&gt('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){gt("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let n=t.position,r=t.normal,o=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new kr(new Float32Array(4*n.count),4));let s=this.getAttribute("tangent"),a=[],l=[];for(let P=0;P<n.count;P++)a[P]=new G,l[P]=new G;let c=new G,d=new G,u=new G,f=new vt,h=new vt,p=new vt,v=new G,g=new G;function m(P,S,D){c.fromBufferAttribute(n,P),d.fromBufferAttribute(n,S),u.fromBufferAttribute(n,D),f.fromBufferAttribute(o,P),h.fromBufferAttribute(o,S),p.fromBufferAttribute(o,D),d.sub(c),u.sub(c),h.sub(f),p.sub(f);let L=1/(h.x*p.y-p.x*h.y);isFinite(L)&&(v.copy(d).multiplyScalar(p.y).addScaledVector(u,-h.y).multiplyScalar(L),g.copy(u).multiplyScalar(h.x).addScaledVector(d,-p.x).multiplyScalar(L),a[P].add(v),a[S].add(v),a[D].add(v),l[P].add(g),l[S].add(g),l[D].add(g))}let b=this.groups;b.length===0&&(b=[{start:0,count:e.count}]);for(let P=0,S=b.length;P<S;++P){let D=b[P],L=D.start,H=D.count;for(let V=L,X=L+H;V<X;V+=3)m(e.getX(V+0),e.getX(V+1),e.getX(V+2))}let y=new G,x=new G,_=new G,w=new G;function T(P){_.fromBufferAttribute(r,P),w.copy(_);let S=a[P];y.copy(S),y.sub(_.multiplyScalar(_.dot(S))).normalize(),x.crossVectors(w,S);let L=x.dot(l[P])<0?-1:1;s.setXYZW(P,y.x,y.y,y.z,L)}for(let P=0,S=b.length;P<S;++P){let D=b[P],L=D.start,H=D.count;for(let V=L,X=L+H;V<X;V+=3)T(e.getX(V+0)),T(e.getX(V+1)),T(e.getX(V+2))}}computeVertexNormals(){let e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new kr(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let f=0,h=n.count;f<h;f++)n.setXYZ(f,0,0,0);let r=new G,o=new G,s=new G,a=new G,l=new G,c=new G,d=new G,u=new G;if(e)for(let f=0,h=e.count;f<h;f+=3){let p=e.getX(f+0),v=e.getX(f+1),g=e.getX(f+2);r.fromBufferAttribute(t,p),o.fromBufferAttribute(t,v),s.fromBufferAttribute(t,g),d.subVectors(s,o),u.subVectors(r,o),d.cross(u),a.fromBufferAttribute(n,p),l.fromBufferAttribute(n,v),c.fromBufferAttribute(n,g),a.add(d),l.add(d),c.add(d),n.setXYZ(p,a.x,a.y,a.z),n.setXYZ(v,l.x,l.y,l.z),n.setXYZ(g,c.x,c.y,c.z)}else for(let f=0,h=t.count;f<h;f+=3)r.fromBufferAttribute(t,f+0),o.fromBufferAttribute(t,f+1),s.fromBufferAttribute(t,f+2),d.subVectors(s,o),u.subVectors(r,o),d.cross(u),n.setXYZ(f+0,d.x,d.y,d.z),n.setXYZ(f+1,d.x,d.y,d.z),n.setXYZ(f+2,d.x,d.y,d.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)di.fromBufferAttribute(e,t),di.normalize(),e.setXYZ(t,di.x,di.y,di.z)}toNonIndexed(){function e(a,l){let c=a.array,d=a.itemSize,u=a.normalized,f=new c.constructor(l.length*d),h=0,p=0;for(let v=0,g=l.length;v<g;v++){a.isInterleavedBufferAttribute?h=l[v]*a.data.stride+a.offset:h=l[v]*d;for(let m=0;m<d;m++)f[p++]=c[h++]}return new kr(f,d,u)}if(this.index===null)return ut("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let t=new i,n=this.index.array,r=this.attributes;for(let a in r){let l=r[a],c=e(l,n);t.setAttribute(a,c)}let o=this.morphAttributes;for(let a in o){let l=[],c=o[a];for(let d=0,u=c.length;d<u;d++){let f=c[d],h=e(f,n);l.push(h)}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 n=this.attributes;for(let l in n){let c=n[l];e.data.attributes[l]=c.toJSON(e.data)}let r={},o=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],d=[];for(let u=0,f=c.length;u<f;u++){let h=c[u];d.push(h.toJSON(e.data))}d.length>0&&(r[l]=d,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 n=e.index;n!==null&&this.setIndex(n.clone());let r=e.attributes;for(let c in r){let d=r[c];this.setAttribute(c,d.clone(t))}let o=e.morphAttributes;for(let c in o){let d=[],u=o[c];for(let f=0,h=u.length;f<h;f++)d.push(u[f].clone(t));this.morphAttributes[c]=d}this.morphTargetsRelative=e.morphTargetsRelative;let s=e.groups;for(let c=0,d=s.length;c<d;c++){let u=s[c];this.addGroup(u.start,u.count,u.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"})}},jk=new Mn,Vc=new xa,Bv=new pl,Wk=new G,Uv=new G,zv=new G,Vv=new G,hE=new G,Gv=new G,$k=new G,Hv=new G,qi=class extends Nr{constructor(e=new ei,t=new Op){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,n=Object.keys(t);if(n.length>0){let r=t[n[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 n=this.geometry,r=n.attributes.position,o=n.morphAttributes.position,s=n.morphTargetsRelative;t.fromBufferAttribute(r,e);let a=this.morphTargetInfluences;if(o&&a){Gv.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let d=a[l],u=o[l];d!==0&&(hE.fromBufferAttribute(u,e),s?Gv.addScaledVector(hE,d):Gv.addScaledVector(hE.sub(t),d))}t.add(Gv)}return t}raycast(e,t){let n=this.geometry,r=this.material,o=this.matrixWorld;r!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Bv.copy(n.boundingSphere),Bv.applyMatrix4(o),Vc.copy(e.ray).recast(e.near),!(Bv.containsPoint(Vc.origin)===!1&&(Vc.intersectSphere(Bv,Wk)===null||Vc.origin.distanceToSquared(Wk)>(e.far-e.near)**2))&&(jk.copy(o).invert(),Vc.copy(e.ray).applyMatrix4(jk),!(n.boundingBox!==null&&Vc.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Vc)))}_computeIntersections(e,t,n){let r,o=this.geometry,s=this.material,a=o.index,l=o.attributes.position,c=o.attributes.uv,d=o.attributes.uv1,u=o.attributes.normal,f=o.groups,h=o.drawRange;if(a!==null)if(Array.isArray(s))for(let p=0,v=f.length;p<v;p++){let g=f[p],m=s[g.materialIndex],b=Math.max(g.start,h.start),y=Math.min(a.count,Math.min(g.start+g.count,h.start+h.count));for(let x=b,_=y;x<_;x+=3){let w=a.getX(x),T=a.getX(x+1),P=a.getX(x+2);r=jv(this,m,e,n,c,d,u,w,T,P),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),v=Math.min(a.count,h.start+h.count);for(let g=p,m=v;g<m;g+=3){let b=a.getX(g),y=a.getX(g+1),x=a.getX(g+2);r=jv(this,s,e,n,c,d,u,b,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=f.length;p<v;p++){let g=f[p],m=s[g.materialIndex],b=Math.max(g.start,h.start),y=Math.min(l.count,Math.min(g.start+g.count,h.start+h.count));for(let x=b,_=y;x<_;x+=3){let w=x,T=x+1,P=x+2;r=jv(this,m,e,n,c,d,u,w,T,P),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),v=Math.min(l.count,h.start+h.count);for(let g=p,m=v;g<m;g+=3){let b=g,y=g+1,x=g+2;r=jv(this,s,e,n,c,d,u,b,y,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}}};function yW(i,e,t,n,r,o,s,a){let l;if(e.side===Ki?l=n.intersectTriangle(s,o,r,!0,a):l=n.intersectTriangle(r,o,s,e.side===Xi,a),l===null)return null;Hv.copy(a),Hv.applyMatrix4(i.matrixWorld);let c=t.ray.origin.distanceTo(Hv);return c<t.near||c>t.far?null:{distance:c,point:Hv.clone(),object:i}}function jv(i,e,t,n,r,o,s,a,l,c){i.getVertexPosition(a,Uv),i.getVertexPosition(l,zv),i.getVertexPosition(c,Vv);let d=yW(i,e,t,n,Uv,zv,Vv,$k);if(d){let u=new G;fl.getBarycoord($k,Uv,zv,Vv,u),r&&(d.uv=fl.getInterpolatedAttribute(r,a,l,c,u,new vt)),o&&(d.uv1=fl.getInterpolatedAttribute(o,a,l,c,u,new vt)),s&&(d.normal=fl.getInterpolatedAttribute(s,a,l,c,u,new G),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));let f={a,b:l,c,normal:new G,materialIndex:0};fl.getNormal(Uv,zv,Vv,f.normal),d.face=f,d.barycoord=u}return d}var sf=class i extends ei{constructor(e=1,t=1,n=1,r=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:o,depthSegments:s};let a=this;r=Math.floor(r),o=Math.floor(o),s=Math.floor(s);let l=[],c=[],d=[],u=[],f=0,h=0;p("z","y","x",-1,-1,n,t,e,s,o,0),p("z","y","x",1,-1,n,t,-e,s,o,1),p("x","z","y",1,1,e,n,t,r,s,2),p("x","z","y",1,-1,e,n,-t,r,s,3),p("x","y","z",1,-1,e,t,n,r,o,4),p("x","y","z",-1,-1,e,t,-n,r,o,5),this.setIndex(l),this.setAttribute("position",new Hn(c,3)),this.setAttribute("normal",new Hn(d,3)),this.setAttribute("uv",new Hn(u,2));function p(v,g,m,b,y,x,_,w,T,P,S){let D=x/T,L=_/P,H=x/2,V=_/2,X=w/2,Y=T+1,q=P+1,j=0,ne=0,ye=new G;for(let xe=0;xe<q;xe++){let Se=xe*L-V;for(let et=0;et<Y;et++){let pt=et*D-H;ye[v]=pt*b,ye[g]=Se*y,ye[m]=X,c.push(ye.x,ye.y,ye.z),ye[v]=0,ye[g]=0,ye[m]=w>0?1:-1,d.push(ye.x,ye.y,ye.z),u.push(et/T),u.push(1-xe/P),j+=1}}for(let xe=0;xe<P;xe++)for(let Se=0;Se<T;Se++){let et=f+Se+Y*xe,pt=f+Se+Y*(xe+1),Wt=f+(Se+1)+Y*(xe+1),Kt=f+(Se+1)+Y*xe;l.push(et,pt,Kt),l.push(pt,Wt,Kt),ne+=6}a.addGroup(h,ne,S),h+=ne,f+=j}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new i(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}};function id(i){let e={};for(let t in i){e[t]={};for(let n in i[t]){let r=i[t][n];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(ut("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=r.clone():Array.isArray(r)?e[t][n]=r.slice():e[t][n]=r}}return e}function Oi(i){let e={};for(let t=0;t<i.length;t++){let n=id(i[t]);for(let r in n)e[r]=n[r]}return e}function xW(i){let e=[];for(let t=0;t<i.length;t++)e.push(i[t].clone());return e}function ZE(i){let e=i.getRenderTarget();return e===null?i.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:zt.workingColorSpace}var zF={clone:id,merge:Oi},_W=`void main() {
6
6
  gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
7
7
  }`,SW=`void main() {
8
8
  gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );