From d0ec513cd81885c55ad92fe4546a21dd9427de62 Mon Sep 17 00:00:00 2001 From: Andy Date: Mon, 15 Apr 2024 22:10:55 +0300 Subject: [PATCH 1/7] bitmap props in exported TRI OBJ --- frontend/dist/gui/index.html | 4 +- ...9f4069456b.js => main.f6f236a83b931050.js} | 2 +- .../tri-map.block-ui.component.ts | 2 + library/utils/meshes.py | 6 ++ resources/NFS2.md | 2 +- resources/NFS2_SE.md | 2 +- resources/NFS3.md | 2 +- resources/NFS4.md | 2 +- resources/NFS5.md | 2 +- resources/NFS6.md | 2 +- resources/TNFS_SE.md | 2 +- serializers/maps.py | 74 ++++++++++++++++++- settings.py | 4 +- 13 files changed, 92 insertions(+), 14 deletions(-) rename frontend/dist/gui/{main.fc40d99f4069456b.js => main.f6f236a83b931050.js} (86%) diff --git a/frontend/dist/gui/index.html b/frontend/dist/gui/index.html index e7a1fd7..f2ac3da 100644 --- a/frontend/dist/gui/index.html +++ b/frontend/dist/gui/index.html @@ -7,10 +7,10 @@ - + - + \ No newline at end of file diff --git a/frontend/dist/gui/main.fc40d99f4069456b.js b/frontend/dist/gui/main.f6f236a83b931050.js similarity index 86% rename from frontend/dist/gui/main.fc40d99f4069456b.js rename to frontend/dist/gui/main.f6f236a83b931050.js index 4496235..3e6cdf7 100644 --- a/frontend/dist/gui/main.fc40d99f4069456b.js +++ b/frontend/dist/gui/main.f6f236a83b931050.js @@ -1 +1 @@ -(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{980:(wo,Es,qr)=>{"use strict";function Qt(n){return"function"==typeof n}function B(n){const t=n(i=>{Error.call(i),i.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}const Rr=B(n=>function(t){n(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((i,r)=>`${r+1}) ${i.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t});function Yr(n,e){if(n){const t=n.indexOf(e);0<=t&&n.splice(t,1)}}class un{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;const{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(const s of t)s.remove(this);else t.remove(this);const{initialTeardown:i}=this;if(Qt(i))try{i()}catch(s){e=s instanceof Rr?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Ia(s)}catch(o){e=e??[],o instanceof Rr?e=[...e,...o.errors]:e.push(o)}}if(e)throw new Rr(e)}}add(e){var t;if(e&&e!==this)if(this.closed)Ia(e);else{if(e instanceof un){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(t=this._finalizers)&&void 0!==t?t:[]).push(e)}}_hasParent(e){const{_parentage:t}=this;return t===e||Array.isArray(t)&&t.includes(e)}_addParent(e){const{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e}_removeParent(e){const{_parentage:t}=this;t===e?this._parentage=null:Array.isArray(t)&&Yr(t,e)}remove(e){const{_finalizers:t}=this;t&&Yr(t,e),e instanceof un&&e._removeParent(this)}}un.EMPTY=(()=>{const n=new un;return n.closed=!0,n})();const Fn=un.EMPTY;function dl(n){return n instanceof un||n&&"closed"in n&&Qt(n.remove)&&Qt(n.add)&&Qt(n.unsubscribe)}function Ia(n){Qt(n)?n():n.unsubscribe()}const As={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},di={setTimeout(n,e,...t){const{delegate:i}=di;return i?.setTimeout?i.setTimeout(n,e,...t):setTimeout(n,e,...t)},clearTimeout(n){const{delegate:e}=di;return(e?.clearTimeout||clearTimeout)(n)},delegate:void 0};function ui(n){di.setTimeout(()=>{const{onUnhandledError:e}=As;if(!e)throw n;e(n)})}function ls(){}const Ts=Tn("C",void 0,void 0);function Tn(n,e,t){return{kind:n,value:e,error:t}}let ar=null;function ic(n){if(As.useDeprecatedSynchronousErrorHandling){const e=!ar;if(e&&(ar={errorThrown:!1,error:null}),n(),e){const{errorThrown:t,error:i}=ar;if(ar=null,t)throw i}}else n()}class ul extends un{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,dl(e)&&e.add(this)):this.destination=KC}static create(e,t,i){return new Qo(e,t,i)}next(e){this.isStopped?Sg(function Mo(n){return Tn("N",n,void 0)}(e),this):this._next(e)}error(e){this.isStopped?Sg(function Ds(n){return Tn("E",void 0,n)}(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?Sg(Ts,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()}}}const Zo=Function.prototype.bind;function hl(n,e){return Zo.call(n,e)}class Ra{constructor(e){this.partialObserver=e}next(e){const{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(i){rd(i)}}error(e){const{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(i){rd(i)}else rd(e)}complete(){const{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){rd(t)}}}class Qo extends ul{constructor(e,t,i){let r;if(super(),Qt(e)||!e)r={next:e??void 0,error:t??void 0,complete:i??void 0};else{let s;this&&As.useDeprecatedNextContext?(s=Object.create(e),s.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&hl(e.next,s),error:e.error&&hl(e.error,s),complete:e.complete&&hl(e.complete,s)}):r=e}this.destination=new Ra(r)}}function rd(n){As.useDeprecatedSynchronousErrorHandling?function Ko(n){As.useDeprecatedSynchronousErrorHandling&&ar&&(ar.errorThrown=!0,ar.error=n)}(n):ui(n)}function Sg(n,e){const{onStoppedNotification:t}=As;t&&di.setTimeout(()=>t(n,e))}const KC={closed:!0,next:ls,error:function YC(n){throw n},complete:ls},Cg="function"==typeof Symbol&&Symbol.observable||"@@observable";function Pa(n){return n}function Ab(n){return 0===n.length?Pa:1===n.length?n[0]:function(t){return n.reduce((i,r)=>r(i),t)}}let Sn=(()=>{class n{constructor(t){t&&(this._subscribe=t)}lift(t){const i=new n;return i.source=this,i.operator=t,i}subscribe(t,i,r){const s=function vf(n){return n&&n instanceof ul||function QC(n){return n&&Qt(n.next)&&Qt(n.error)&&Qt(n.complete)}(n)&&dl(n)}(t)?t:new Qo(t,i,r);return ic(()=>{const{operator:o,source:a}=this;s.add(o?o.call(s,a):a?this._subscribe(s):this._trySubscribe(s))}),s}_trySubscribe(t){try{return this._subscribe(t)}catch(i){t.error(i)}}forEach(t,i){return new(i=ka(i))((r,s)=>{const o=new Qo({next:a=>{try{t(a)}catch(l){s(l),o.unsubscribe()}},error:s,complete:r});this.subscribe(o)})}_subscribe(t){var i;return null===(i=this.source)||void 0===i?void 0:i.subscribe(t)}[Cg](){return this}pipe(...t){return Ab(t)(this)}toPromise(t){return new(t=ka(t))((i,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>i(s))})}}return n.create=e=>new n(e),n})();function ka(n){var e;return null!==(e=n??As.Promise)&&void 0!==e?e:Promise}const Jo=B(n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Ue=(()=>{class n extends Sn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){const i=new Tb(this,this);return i.operator=t,i}_throwIfClosed(){if(this.closed)throw new Jo}next(t){ic(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const i of this.currentObservers)i.next(t)}})}error(t){ic(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;const{observers:i}=this;for(;i.length;)i.shift().error(t)}})}complete(){ic(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{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(null===(t=this.observers)||void 0===t?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){const{hasError:i,isStopped:r,observers:s}=this;return i||r?Fn:(this.currentObservers=null,s.push(t),new un(()=>{this.currentObservers=null,Yr(s,t)}))}_checkFinalizedStatuses(t){const{hasError:i,thrownError:r,isStopped:s}=this;i?t.error(r):s&&t.complete()}asObservable(){const t=new Sn;return t.source=this,t}}return n.create=(e,t)=>new Tb(e,t),n})();class Tb extends Ue{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,i;null===(i=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===i||i.call(t,e)}error(e){var t,i;null===(i=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===i||i.call(t,e)}complete(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)}_subscribe(e){var t,i;return null!==(i=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==i?i:Fn}}function Db(n){return Qt(n?.lift)}function Gn(n){return e=>{if(Db(e))return e.lift(function(t){try{return n(t,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function Un(n,e,t,i,r){return new JC(n,e,t,i,r)}class JC extends ul{constructor(e,t,i,r,s,o){super(e),this.onFinalize=s,this.shouldUnsubscribe=o,this._next=t?function(a){try{t(a)}catch(l){e.error(l)}}:super._next,this._error=r?function(a){try{r(a)}catch(l){e.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:t}=this;super.unsubscribe(),!t&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}}}function Ye(n,e){return Gn((t,i)=>{let r=0;t.subscribe(Un(i,s=>{i.next(n.call(e,s,r++))}))})}function ea(n){return this instanceof ea?(this.v=n,this):new ea(n)}function Mf(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,e=n[Symbol.asyncIterator];return e?e.call(n):(n=function Eg(n){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&n[e],i=0;if(t)return t.call(n);if(n&&"number"==typeof n.length)return{next:function(){return n&&i>=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(n),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(s){t[s]=n[s]&&function(o){return new Promise(function(a,l){!function r(s,o,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},o)}(a,l,(o=n[s](o)).done,o.value)})}}}"function"==typeof SuppressedError&&SuppressedError;const kg=n=>n&&"number"==typeof n.length&&"function"!=typeof n;function kb(n){return Qt(n?.then)}function Ob(n){return Qt(n[Cg])}function Og(n){return Symbol.asyncIterator&&Qt(n?.[Symbol.asyncIterator])}function Lb(n){return new TypeError(`You provided ${null!==n&&"object"==typeof n?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const Fb=function aE(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Sf(n){return Qt(n?.[Fb])}function Nb(n){return function wf(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=t.apply(n,e||[]),s=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(p){i[p]&&(r[p]=function(m){return new Promise(function(g,b){s.push([p,m,g,b])>1||a(p,m)})})}function a(p,m){try{!function l(p){p.value instanceof ea?Promise.resolve(p.value.v).then(c,u):h(s[0][2],p)}(i[p](m))}catch(g){h(s[0][3],g)}}function c(p){a("next",p)}function u(p){a("throw",p)}function h(p,m){p(m),s.shift(),s.length&&a(s[0][0],s[0][1])}}(this,arguments,function*(){const t=n.getReader();try{for(;;){const{value:i,done:r}=yield ea(t.read());if(r)return yield ea(void 0);yield yield ea(i)}}finally{t.releaseLock()}})}function Cf(n){return Qt(n?.getReader)}function lr(n){if(n instanceof Sn)return n;if(null!=n){if(Ob(n))return function lE(n){return new Sn(e=>{const t=n[Cg]();if(Qt(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(n);if(kg(n))return function cE(n){return new Sn(e=>{for(let t=0;t{n.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,ui)})}(n);if(Og(n))return Bb(n);if(Sf(n))return function uE(n){return new Sn(e=>{for(const t of n)if(e.next(t),e.closed)return;e.complete()})}(n);if(Cf(n))return function hE(n){return Bb(Nb(n))}(n)}throw Lb(n)}function Bb(n){return new Sn(e=>{(function fE(n,e){var t,i,r,s;return function od(n,e,t,i){return new(t||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})}(this,void 0,void 0,function*(){try{for(t=Mf(n);!(i=yield t.next()).done;)if(e.next(i.value),e.closed)return}catch(o){r={error:o}}finally{try{i&&!i.done&&(s=t.return)&&(yield s.call(t))}finally{if(r)throw r.error}}e.complete()})})(n,e).catch(t=>e.error(t))})}function ta(n,e,t,i=0,r=!1){const s=e.schedule(function(){t(),r?n.add(this.schedule(null,i)):this.unsubscribe()},i);if(n.add(s),!r)return s}function er(n,e,t=1/0){return Qt(e)?er((i,r)=>Ye((s,o)=>e(i,s,r,o))(lr(n(i,r))),t):("number"==typeof e&&(t=e),Gn((i,r)=>function pE(n,e,t,i,r,s,o,a){const l=[];let c=0,u=0,h=!1;const p=()=>{h&&!l.length&&!c&&e.complete()},m=b=>c{s&&e.next(b),c++;let y=!1;lr(t(b,u++)).subscribe(Un(e,v=>{r?.(v),s?m(v):e.next(v)},()=>{y=!0},void 0,()=>{if(y)try{for(c--;l.length&&cg(v)):g(v)}p()}catch(v){e.error(v)}}))};return n.subscribe(Un(e,m,()=>{h=!0,p()})),()=>{a?.()}}(i,r,n,t)))}function cd(n=1/0){return er(Pa,n)}const Is=new Sn(n=>n.complete());function Cu(n){return n&&Qt(n.schedule)}function Lg(n){return n[n.length-1]}function Eu(n){return Qt(Lg(n))?n.pop():void 0}function Au(n){return Cu(Lg(n))?n.pop():void 0}function Ub(n,e=0){return Gn((t,i)=>{t.subscribe(Un(i,r=>ta(i,n,()=>i.next(r),e),()=>ta(i,n,()=>i.complete(),e),r=>ta(i,n,()=>i.error(r),e)))})}function Fg(n,e=0){return Gn((t,i)=>{i.add(n.schedule(()=>t.subscribe(i),e))})}function Hb(n,e){if(!n)throw new Error("Iterable cannot be null");return new Sn(t=>{ta(t,e,()=>{const i=n[Symbol.asyncIterator]();ta(t,e,()=>{i.next().then(r=>{r.done?t.complete():t.next(r.value)})},0,!0)})})}function Ri(n,e){return e?function Gb(n,e){if(null!=n){if(Ob(n))return function Vb(n,e){return lr(n).pipe(Fg(e),Ub(e))}(n,e);if(kg(n))return function _E(n,e){return new Sn(t=>{let i=0;return e.schedule(function(){i===n.length?t.complete():(t.next(n[i++]),t.closed||this.schedule())})})}(n,e);if(kb(n))return function zb(n,e){return lr(n).pipe(Fg(e),Ub(e))}(n,e);if(Og(n))return Hb(n,e);if(Sf(n))return function vE(n,e){return new Sn(t=>{let i;return ta(t,e,()=>{i=n[Fb](),ta(t,e,()=>{let r,s;try{({value:r,done:s}=i.next())}catch(o){return void t.error(o)}s?t.complete():t.next(r)},0,!0)}),()=>Qt(i?.return)&&i.return()})}(n,e);if(Cf(n))return function yE(n,e){return Hb(Nb(n),e)}(n,e)}throw Lb(n)}(n,e):lr(n)}function cs(...n){const e=Au(n),t=function gE(n,e){return"number"==typeof Lg(n)?n.pop():e}(n,1/0),i=n;return i.length?1===i.length?lr(i[0]):cd(t)(Ri(i,e)):Is}function Tu(n={}){const{connector:e=(()=>new Ue),resetOnError:t=!0,resetOnComplete:i=!0,resetOnRefCountZero:r=!0}=n;return s=>{let o,a,l,c=0,u=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,u=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return Gn((b,y)=>{c++,!h&&!u&&p();const v=l=l??e();y.add(()=>{c--,0===c&&!h&&!u&&(a=Ng(g,r))}),v.subscribe(y),!o&&c>0&&(o=new Qo({next:M=>v.next(M),error:M=>{h=!0,p(),a=Ng(m,t,M),v.error(M)},complete:()=>{u=!0,p(),a=Ng(m,i),v.complete()}}),lr(b).subscribe(o))})(s)}}function Ng(n,e,...t){if(!0===e)return void n();if(!1===e)return;const i=new Qo({next:()=>{i.unsubscribe(),n()}});return lr(e(...t)).subscribe(i)}function Zn(n){for(let e in n)if(n[e]===Zn)return e;throw Error("Could not find renamed property on target object.")}function dd(n,e){for(const t in e)e.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&(n[t]=e[t])}function ri(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(ri).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const e=n.toString();if(null==e)return""+e;const t=e.indexOf("\n");return-1===t?e:e.substring(0,t)}function Bg(n,e){return null==n||""===n?null===e?"":e:null==e||""===e?n:n+" "+e}const Wb=Zn({__forward_ref__:Zn});function Qn(n){return n.__forward_ref__=Qn,n.toString=function(){return ri(this())},n}function Mt(n){return Ug(n)?n():n}function Ug(n){return"function"==typeof n&&n.hasOwnProperty(Wb)&&n.__forward_ref__===Qn}function Ef(n){return n&&!!n.\u0275providers}const ud="https://g.co/ng/security#xss";class fe extends Error{constructor(e,t){super(Du(e,t)),this.code=e}}function Du(n,e){return`NG0${Math.abs(n)}${e?": "+e.trim():""}`}function Wt(n){return"string"==typeof n?n:null==n?"":String(n)}function Iu(n,e){throw new fe(-201,!1)}function io(n,e){null==n&&function bt(n,e,t,i){throw new Error(`ASSERTION ERROR: ${n}`+(null==i?"":` [Expected=> ${t} ${i} ${e} <=Actual]`))}(e,n,null,"!=")}function ke(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function Yt(n){return{providers:n.providers||[],imports:n.imports||[]}}function Af(n){return Kb(n,ml)||Kb(n,Df)}function Kb(n,e){return n.hasOwnProperty(e)?n[e]:null}function Vg(n){return n&&(n.hasOwnProperty(Tf)||n.hasOwnProperty(ro))?n[Tf]:null}const ml=Zn({\u0275prov:Zn}),Tf=Zn({\u0275inj:Zn}),Df=Zn({ngInjectableDef:Zn}),ro=Zn({ngInjectorDef:Zn});var At=(()=>((At=At||{})[At.Default=0]="Default",At[At.Host=1]="Host",At[At.Self=2]="Self",At[At.SkipSelf=4]="SkipSelf",At[At.Optional=8]="Optional",At))();let If;function Ps(n){const e=If;return If=n,e}function zg(n,e,t){const i=Af(n);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:t&At.Optional?null:void 0!==e?e:void Iu(ri(n))}const bn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),hd={},na="__NG_DI_FLAG__",oc="ngTempTokenPath",Hg="ngTokenPath",hi=/\n/gm,gl="\u0275",Rf="__source";let Ru;function _l(n){const e=Ru;return Ru=n,e}function EE(n,e=At.Default){if(void 0===Ru)throw new fe(-203,!1);return null===Ru?zg(n,void 0,e):Ru.get(n,e&At.Optional?null:void 0,e)}function Q(n,e=At.Default){return(function Zb(){return If}()||EE)(Mt(n),e)}function Ot(n,e=At.Default){return Q(n,ac(e))}function ac(n){return typeof n>"u"||"number"==typeof n?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function vl(n){const e=[];for(let t=0;t((To=To||{})[To.OnPush=0]="OnPush",To[To.Default=1]="Default",To))(),Do=(()=>{return(n=Do||(Do={}))[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",Do;var n})();const Io={},Vn=[],Pf=Zn({\u0275cmp:Zn}),kf=Zn({\u0275dir:Zn}),Kr=Zn({\u0275pipe:Zn}),Of=Zn({\u0275mod:Zn}),ks=Zn({\u0275fac:Zn}),fd=Zn({__NG_ELEMENT_ID__:Zn});let t0=0;function ht(n){return Ao(()=>{const e=r0(n),t={...e,decls:n.decls,vars:n.vars,template:n.template,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,onPush:n.changeDetection===To.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&n.dependencies||null,getStandaloneInjector:null,data:n.data||{},encapsulation:n.encapsulation||Do.Emulated,id:"c"+t0++,styles:n.styles||Vn,_:null,schemas:n.schemas||null,tView:null};lc(t);const i=n.dependencies;return t.directiveDefs=ds(i,!1),t.pipeDefs=ds(i,!0),t})}function ku(n,e,t){const i=n.\u0275cmp;i.directiveDefs=ds(e,!1),i.pipeDefs=ds(t,!0)}function AE(n){return Wn(n)||wi(n)}function TE(n){return null!==n}function Jt(n){return Ao(()=>({type:n.type,bootstrap:n.bootstrap||Vn,declarations:n.declarations||Vn,imports:n.imports||Vn,exports:n.exports||Vn,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null}))}function n0(n,e){if(null==n)return Io;const t={};for(const i in n)if(n.hasOwnProperty(i)){let r=n[i],s=r;Array.isArray(r)&&(s=r[1],r=r[0]),t[r]=i,e&&(e[r]=s)}return t}function Ae(n){return Ao(()=>{const e=r0(n);return lc(e),e})}function Pr(n){return{type:n.type,name:n.name,factory:null,pure:!1!==n.pure,standalone:!0===n.standalone,onDestroy:n.type.prototype.ngOnDestroy||null}}function Wn(n){return n[Pf]||null}function wi(n){return n[kf]||null}function yr(n){return n[Kr]||null}function Os(n,e){const t=n[Of]||null;if(!t&&!0===e)throw new Error(`Type ${ri(n)} does not have '\u0275mod' property.`);return t}function r0(n){const e={};return{type:n.type,providersResolver:null,factory:null,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:e,exportAs:n.exportAs||null,standalone:!0===n.standalone,selectors:n.selectors||Vn,viewQuery:n.viewQuery||null,features:n.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:n0(n.inputs,e),outputs:n0(n.outputs)}}function lc(n){n.features?.forEach(e=>e(n))}function ds(n,e){if(!n)return null;const t=e?yr:AE;return()=>("function"==typeof n?n():n).map(i=>t(i)).filter(TE)}const ia=0,Qe=1,tn=2,Ti=3,Ro=4,cc=5,tr=6,q=7,oe=8,ae=9,Ke=10,Ne=11,zn=12,Mi=13,Jn=14,yl=15,kr=16,Or=17,Oa=18,ra=19,sa=20,Ou=21,ei=22,Wg=1,$g=2,dc=7,Lf=8,gd=9,Zr=10;function Vi(n){return Array.isArray(n)&&"object"==typeof n[Wg]}function us(n){return Array.isArray(n)&&!0===n[Wg]}function Ff(n){return 0!=(4&n.flags)}function bl(n){return n.componentOffset>-1}function Lu(n){return 1==(1&n.flags)}function so(n){return!!n.template}function Nf(n){return 0!=(256&n[tn])}function La(n,e){return n.hasOwnProperty(ks)?n[ks]:null}class Nu{constructor(e,t,i){this.previousValue=e,this.currentValue=t,this.firstChange=i}isFirstChange(){return this.firstChange}}function zi(){return hc}function hc(n){return n.type.prototype.ngOnChanges&&(n.setInput=Uu),Bu}function Bu(){const n=fc(this),e=n?.current;if(e){const t=n.previous;if(t===Io)n.previous=e;else for(let i in e)t[i]=e[i];n.current=null,this.ngOnChanges(e)}}function Uu(n,e,t,i){const r=this.declaredInputs[t],s=fc(n)||function PE(n,e){return n[Vu]=e}(n,{previous:Io,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Nu(l&&l.currentValue,e,a===Io),n[i]=e}zi.ngInherit=!0;const Vu="__ngSimpleChanges__";function fc(n){return n[Vu]||null}const oo=function(n,e,t){},a0="svg";function Pi(n){for(;Array.isArray(n);)n=n[ia];return n}function T(n,e){return Pi(e[n])}function dr(n,e){return Pi(e[n.index])}function Ls(n,e){return n.data[e]}function nn(n,e){return n[e]}function hs(n,e){const t=e[n];return Vi(t)?t:t[ia]}function Uf(n){return 64==(64&n[tn])}function xl(n,e){return null==e?null:n[e]}function c0(n){n[Oa]=0}function Zg(n,e){n[cc]+=e;let t=n,i=n[Ti];for(;null!==i&&(1===e&&1===t[cc]||-1===e&&0===t[cc]);)i[cc]+=e,t=i,i=i[Ti]}const $t={lFrame:r_(null),bindingsEnabled:!0};function u0(){return $t.bindingsEnabled}function Ee(){return $t.lFrame.lView}function Nn(){return $t.lFrame.tView}function Dn(n){return $t.lFrame.contextLView=n,n[oe]}function In(n){return $t.lFrame.contextLView=null,n}function xr(){let n=Ml();for(;null!==n&&64===n.type;)n=n.parent;return n}function Ml(){return $t.lFrame.currentTNode}function oa(n,e){const t=$t.lFrame;t.currentTNode=n,t.isParent=e}function Fs(){return $t.lFrame.isParent}function Qg(){$t.lFrame.isParent=!1}function Qr(){const n=$t.lFrame;let e=n.bindingRootIndex;return-1===e&&(e=n.bindingRootIndex=n.tView.bindingStartIndex),e}function _d(){return $t.lFrame.bindingIndex++}function Na(n){const e=$t.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+n,t}function Vf(n,e){const t=$t.lFrame;t.bindingIndex=t.bindingRootIndex=n,zf(e)}function zf(n){$t.lFrame.currentDirectiveIndex=n}function t_(n){const e=$t.lFrame.currentDirectiveIndex;return-1===e?null:n[e]}function la(){return $t.lFrame.currentQueryIndex}function Gu(n){$t.lFrame.currentQueryIndex=n}function mc(n){const e=n[Qe];return 2===e.type?e.declTNode:1===e.type?n[tr]:null}function Ns(n,e,t){if(t&At.SkipSelf){let r=e,s=n;for(;!(r=r.parent,null!==r||t&At.Host||(r=mc(s),null===r||(s=s[yl],10&r.type))););if(null===r)return!1;e=r,n=s}const i=$t.lFrame=i_();return i.currentTNode=e,i.lView=n,!0}function n_(n){const e=i_(),t=n[Qe];$t.lFrame=e,e.currentTNode=t.firstChild,e.lView=n,e.tView=t,e.contextLView=n,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function i_(){const n=$t.lFrame,e=null===n?null:n.child;return null===e?r_(n):e}function r_(n){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return null!==n&&(n.child=e),e}function yd(){const n=$t.lFrame;return $t.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const Ba=yd;function Hf(){const n=yd();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function Jr(){return $t.lFrame.selectedIndex}function Sl(n){$t.lFrame.selectedIndex=n}function hn(){const n=$t.lFrame;return Ls(n.tView,n.selectedIndex)}function Lr(){$t.lFrame.currentNamespace=a0}function es(){!function s_(){$t.lFrame.currentNamespace=null}()}function Wu(n,e){for(let t=e.directiveStart,i=e.directiveEnd;t=i)break}else e[l]<0&&(n[Oa]+=65536),(a>11>16&&(3&n[tn])===e){n[tn]+=2048,oo(4,a,s);try{s.call(a)}finally{oo(5,a,s)}}}else{oo(4,a,s);try{s.call(a)}finally{oo(5,a,s)}}}const Cl=-1;class $u{constructor(e,t,i){this.factory=e,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=i}}function $f(n,e,t){let i=0;for(;ie){o=s-1;break}}}for(;s>16}(n),i=e;for(;t>0;)i=i[yl],t--;return i}let qf=!0;function Ku(n){const e=qf;return qf=n,e}const v0=255,u_=5;let y0=0;const ca={};function Yf(n,e){const t=h_(n,e);if(-1!==t)return t;const i=e[Qe];i.firstCreatePass&&(n.injectorIndex=e.length,Zu(i.data,n),Zu(e,null),Zu(i.blueprint,null));const r=Qu(n,e),s=n.injectorIndex;if(jf(r)){const o=Xf(r),a=Yu(r,e),l=a[Qe].data;for(let c=0;c<8;c++)e[s+c]=a[o+c]|l[o+c]}return e[s+8]=r,s}function Zu(n,e){n.push(0,0,0,0,0,0,0,0,e)}function h_(n,e){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===e[n.injectorIndex+8]?-1:n.injectorIndex}function Qu(n,e){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let t=0,i=null,r=e;for(;null!==r;){if(i=Zf(r),null===i)return Cl;if(t++,r=r[yl],-1!==i.injectorIndex)return i.injectorIndex|t<<16}return Cl}function f_(n,e,t){!function b0(n,e,t){let i;"string"==typeof t?i=t.charCodeAt(0)||0:t.hasOwnProperty(fd)&&(i=t[fd]),null==i&&(i=t[fd]=y0++);const r=i&v0;e.data[n+(r>>u_)]|=1<=0?e&v0:C0:e}(t);if("function"==typeof s){if(!Ns(e,n,i))return i&At.Host?an(r,0,i):x0(e,t,i,r);try{const o=s(i);if(null!=o||i&At.Optional)return o;Iu()}finally{Ba()}}else if("number"==typeof s){let o=null,a=h_(n,e),l=Cl,c=i&At.Host?e[kr][tr]:null;for((-1===a||i&At.SkipSelf)&&(l=-1===a?Qu(n,e):e[a+8],l!==Cl&&Ju(i,!1)?(o=e[Qe],a=Xf(l),e=Yu(l,e)):a=-1);-1!==a;){const u=e[Qe];if(S0(s,a,u.data)){const h=M0(a,e,t,o,i,c);if(h!==ca)return h}l=e[a+8],l!==Cl&&Ju(i,e[Qe].data[a+8]===c)&&S0(s,a,e)?(o=u,a=Xf(l),e=Yu(l,e)):a=-1}}return r}function M0(n,e,t,i,r,s){const o=e[Qe],a=o.data[n+8],u=Kf(a,o,t,null==i?bl(a)&&qf:i!=o&&0!=(3&a.type),r&At.Host&&s===a);return null!==u?_c(e,o,u,a):ca}function Kf(n,e,t,i,r){const s=n.providerIndexes,o=e.data,a=1048575&s,l=n.directiveStart,u=s>>20,p=r?a+u:n.directiveEnd;for(let m=i?a:a+u;m=l&&g.type===t)return m}if(r){const m=o[l];if(m&&so(m)&&m.type===t)return l}return null}function _c(n,e,t,i){let r=n[t];const s=e.data;if(function ju(n){return n instanceof $u}(r)){const o=r;o.resolving&&function jb(n,e){const t=e?`. Dependency path: ${e.join(" > ")} > ${n}`:"";throw new fe(-200,`Circular dependency in DI detected for ${n}${t}`)}(function jn(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():Wt(n)}(s[t]));const a=Ku(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?Ps(o.injectImpl):null;Ns(n,i,At.Default);try{r=n[t]=o.factory(void 0,s,n,i),e.firstCreatePass&&t>=i.directiveStart&&function gc(n,e,t){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:s}=e.type.prototype;if(i){const o=hc(e);(t.preOrderHooks??(t.preOrderHooks=[])).push(n,o),(t.preOrderCheckHooks??(t.preOrderCheckHooks=[])).push(n,o)}r&&(t.preOrderHooks??(t.preOrderHooks=[])).push(0-n,r),s&&((t.preOrderHooks??(t.preOrderHooks=[])).push(n,s),(t.preOrderCheckHooks??(t.preOrderCheckHooks=[])).push(n,s))}(t,s[t],e)}finally{null!==l&&Ps(l),Ku(a),o.resolving=!1,Ba()}}return r}function S0(n,e,t){return!!(t[e+(n>>u_)]&1<{const e=n.prototype.constructor,t=e[ks]||ts(e),i=Object.prototype;let r=Object.getPrototypeOf(n.prototype).constructor;for(;r&&r!==i;){const s=r[ks]||ts(r);if(s&&s!==t)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function ts(n){return Ug(n)?()=>{const e=ts(Mt(n));return e&&e()}:La(n)}function Zf(n){const e=n[Qe],t=e.type;return 2===t?e.declTNode:1===t?n[tr]:null}function Ua(n){return function p_(n,e){if("class"===e)return n.classes;if("style"===e)return n.styles;const t=n.attrs;if(t){const i=t.length;let r=0;for(;r{const i=function eh(n){return function(...t){if(n){const i=n(...t);for(const r in i)this[r]=i[r]}}}(e);function r(...s){if(this instanceof r)return i.apply(this,s),this;const o=new r(...s);return a.annotation=o,a;function a(l,c,u){const h=l.hasOwnProperty(vc)?l[vc]:Object.defineProperty(l,vc,{value:[]})[vc];for(;h.length<=u;)h.push(null);return(h[u]=h[u]||[]).push(o),l}}return t&&(r.prototype=Object.create(t.prototype)),r.prototype.ngMetadataName=n,r.annotationCls=r,r})}class ge{constructor(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=ke({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function da(n,e){n.forEach(t=>Array.isArray(t)?da(t,e):e(t))}function bc(n,e,t){e>=n.length?n.push(t):n.splice(e,0,t)}function th(n,e){return e>=n.length-1?n.pop():n.splice(e,1)[0]}function Md(n,e){const t=[];for(let i=0;i=0?n[1|i]=t:(i=~i,function Sd(n,e,t,i){let r=n.length;if(r==e)n.push(t,i);else if(1===r)n.push(i,n[0]),n[0]=t;else{for(r--,n.push(n[r-1],n[r]);r>e;)n[r]=n[r-2],r--;n[e]=t,n[e+1]=i}}(n,i,e,t)),i}function Jf(n,e){const t=xc(n,e);if(t>=0)return n[1|t]}function xc(n,e){return function __(n,e,t){let i=0,r=n.length>>t;for(;r!==i;){const s=i+(r-i>>1),o=n[s<e?r=s:i=s+1}return~(r<({token:n})),-1),Po=Pu(Dl("Optional"),8),Il=Pu(Dl("SkipSelf"),4);var ns=(()=>((ns=ns||{})[ns.Important=1]="Important",ns[ns.DashCase=2]="DashCase",ns))();const Sc=new Map;let E_=0;const D_="__ngContext__";function Nr(n,e){Vi(e)?(n[D_]=e[sa],function z0(n){Sc.set(n[sa],n)}(e)):n[D_]=e}let cp;function I_(n,e){return cp(n,e)}function ah(n){const e=n[Ti];return us(e)?e[Ti]:e}function R_(n){return Z0(n[Mi])}function P_(n){return Z0(n[Ro])}function Z0(n){for(;null!==n&&!us(n);)n=n[Ro];return n}function Ad(n,e,t,i,r){if(null!=i){let s,o=!1;us(i)?s=i:Vi(i)&&(o=!0,i=i[ia]);const a=Pi(i);0===n&&null!==t?null==r?nx(e,t,a):Cc(e,t,a,r||null,!0):1===n&&null!==t?Cc(e,t,a,r||null,!0):2===n?function V_(n,e,t){const i=up(n,e);i&&function bA(n,e,t,i){n.removeChild(e,t,i)}(n,i,e,t)}(e,a,o):3===n&&e.destroyNode(a),null!=s&&function MA(n,e,t,i,r){const s=t[dc];s!==Pi(t)&&Ad(e,n,i,s,r);for(let a=Zr;a0&&(n[t-1][Ro]=i[Ro]);const s=th(n,Zr+e);!function fA(n,e){lh(n,e,e[Ne],2,null,null),e[ia]=null,e[tr]=null}(i[Qe],i);const o=s[ra];null!==o&&o.detachView(s[Qe]),i[Ti]=null,i[Ro]=null,i[tn]&=-65}return i}function J0(n,e){if(!(128&e[tn])){const t=e[Ne];t.destroyNode&&lh(n,e,t,3,null,null),function mA(n){let e=n[Mi];if(!e)return F_(n[Qe],n);for(;e;){let t=null;if(Vi(e))t=e[Mi];else{const i=e[Zr];i&&(t=i)}if(!t){for(;e&&!e[Ro]&&e!==n;)Vi(e)&&F_(e[Qe],e),e=e[Ti];null===e&&(e=n),Vi(e)&&F_(e[Qe],e),t=e&&e[Ro]}e=t}}(e)}}function F_(n,e){if(!(128&e[tn])){e[tn]&=-65,e[tn]|=128,function yA(n,e){let t;if(null!=n&&null!=(t=n.destroyHooks))for(let i=0;i=0?i[r=o]():i[r=-o].unsubscribe(),s+=2}else{const o=i[r=t[s+1]];t[s].call(o)}if(null!==i){for(let s=r+1;s-1){const{encapsulation:s}=n.data[i.directiveStart+r];if(s===Do.None||s===Do.Emulated)return null}return dr(i,t)}}(n,e.parent,t)}function Cc(n,e,t,i,r){n.insertBefore(e,t,i,r)}function nx(n,e,t){n.appendChild(e,t)}function ix(n,e,t,i,r){null!==i?Cc(n,e,t,i,r):nx(n,e,t)}function up(n,e){return n.parentNode(e)}function rx(n,e,t){return ox(n,e,t)}let N_,fp,G_,ox=function sx(n,e,t){return 40&n.type?dr(n,t):null};function hp(n,e,t,i){const r=ex(n,i,e),s=e[Ne],a=rx(i.parent||e[tr],i,e);if(null!=r)if(Array.isArray(t))for(let l=0;ln,createScript:n=>n,createScriptURL:n=>n})}catch{}return fp}()?.createHTML(n)||n}class Ec{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${ud})`}}class mx extends Ec{getTypeName(){return"HTML"}}class gx extends Ec{getTypeName(){return"Style"}}class DA extends Ec{getTypeName(){return"Script"}}class IA extends Ec{getTypeName(){return"URL"}}class RA extends Ec{getTypeName(){return"ResourceURL"}}function Vs(n){return n instanceof Ec?n.changingThisBreaksApplicationSecurity:n}function zs(n,e){const t=function PA(n){return n instanceof Ec&&n.getTypeName()||null}(n);if(null!=t&&t!==e){if("ResourceURL"===t&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${t} (see ${ud})`)}return t===e}class BA{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e=""+e;try{const t=(new window.DOMParser).parseFromString(Dd(e),"text/html").body;return null===t?this.inertDocumentHelper.getInertBodyElement(e):(t.removeChild(t.firstChild),t)}catch{return null}}}class UA{constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){const t=this.inertDocument.createElement("template");return t.innerHTML=Dd(e),t}}const zA=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Ac(n){return(n=String(n)).match(zA)?n:"unsafe:"+n}function Ha(n){const e={};for(const t of n.split(","))e[t]=!0;return e}function Id(...n){const e={};for(const t of n)for(const i in t)t.hasOwnProperty(i)&&(e[i]=!0);return e}const $_=Ha("area,br,col,hr,img,wbr"),mp=Ha("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),j_=Ha("rp,rt"),X_=Id($_,Id(mp,Ha("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")),Id(j_,Ha("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")),Id(j_,mp)),q_=Ha("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),dh=Id(q_,Ha("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"),Ha("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")),$A=Ha("script,style,template");class jA{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let t=e.firstChild,i=!0;for(;t;)if(t.nodeType===Node.ELEMENT_NODE?i=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,i&&t.firstChild)t=t.firstChild;else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let r=this.checkClobberedElement(t,t.nextSibling);if(r){t=r;break}t=this.checkClobberedElement(t,t.parentNode)}return this.buf.join("")}startElement(e){const t=e.nodeName.toLowerCase();if(!X_.hasOwnProperty(t))return this.sanitizedSomething=!0,!$A.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);const i=e.attributes;for(let r=0;r"),!0}endElement(e){const t=e.nodeName.toLowerCase();X_.hasOwnProperty(t)&&!$_.hasOwnProperty(t)&&(this.buf.push(""))}chars(e){this.buf.push(yx(e))}checkClobberedElement(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`);return t}}const K_=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,vx=/([^\#-~ |!])/g;function yx(n){return n.replace(/&/g,"&").replace(K_,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(vx,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}let gp;function bx(n,e){let t=null;try{gp=gp||function _x(n){const e=new UA(n);return function VA(){try{return!!(new window.DOMParser).parseFromString(Dd(""),"text/html")}catch{return!1}}()?new BA(e):e}(n);let i=e?String(e):"";t=gp.getInertBodyElement(i);let r=5,s=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=s,s=t.innerHTML,t=gp.getInertBodyElement(i)}while(i!==s);return Dd((new jA).sanitizeChildren(Z_(t)||t))}finally{if(t){const i=Z_(t)||t;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function Z_(n){return"content"in n&&function XA(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var $n=(()=>(($n=$n||{})[$n.NONE=0]="NONE",$n[$n.HTML=1]="HTML",$n[$n.STYLE=2]="STYLE",$n[$n.SCRIPT=3]="SCRIPT",$n[$n.URL=4]="URL",$n[$n.RESOURCE_URL=5]="RESOURCE_URL",$n))();function _p(n){const e=function uh(){const n=Ee();return n&&n[zn]}();return e?e.sanitize($n.URL,n)||"":zs(n,"URL")?Vs(n):Ac(Wt(n))}const Mr=new ge("ENVIRONMENT_INITIALIZER"),Di=new ge("INJECTOR",-1),Mx=new ge("INJECTOR_DEF_TYPES");class Ga{get(e,t=hd){if(t===hd){const i=new Error(`NullInjectorError: No provider for ${ri(e)}!`);throw i.name="NullInjectorError",i}return t}}function JA(...n){return{\u0275providers:Sx(0,n),\u0275fromNgModule:!0}}function Sx(n,...e){const t=[],i=new Set;let r;return da(e,s=>{const o=s;Q_(o,t,[],i)&&(r||(r=[]),r.push(o))}),void 0!==r&&Cx(r,t),t}function Cx(n,e){for(let t=0;t{e.push(s)})}}function Q_(n,e,t,i){if(!(n=Mt(n)))return!1;let r=null,s=Vg(n);const o=!s&&Wn(n);if(s||o){if(o&&!o.standalone)return!1;r=n}else{const l=n.ngModule;if(s=Vg(l),!s)return!1;r=l}const a=i.has(r);if(o){if(a)return!1;if(i.add(r),o.dependencies){const l="function"==typeof o.dependencies?o.dependencies():o.dependencies;for(const c of l)Q_(c,e,t,i)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;i.add(r);try{da(s.imports,u=>{Q_(u,e,t,i)&&(c||(c=[]),c.push(u))})}finally{}void 0!==c&&Cx(c,e)}if(!a){const c=La(r)||(()=>new r);e.push({provide:r,useFactory:c,deps:Vn},{provide:Mx,useValue:r,multi:!0},{provide:Mr,useValue:()=>Q(r),multi:!0})}const l=s.providers;null==l||a||J_(l,u=>{e.push(u)})}}return r!==n&&void 0!==n.providers}function J_(n,e){for(let t of n)Ef(t)&&(t=t.\u0275providers),Array.isArray(t)?J_(t,e):e(t)}const Wa=Zn({provide:String,useValue:Zn});function vp(n){return null!==n&&"object"==typeof n&&Wa in n}function ni(n){return"function"==typeof n}const ev=new ge("Set Injector scope."),yp={},eT={};let tv;function bp(){return void 0===tv&&(tv=new Ga),tv}class $a{}class nv extends $a{get destroyed(){return this._destroyed}constructor(e,t,i,r){super(),this.parent=t,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,sv(e,o=>this.processProvider(o)),this.records.set(Di,ja(void 0,this)),r.has("environment")&&this.records.set($a,ja(void 0,this));const s=this.records.get(ev);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(Mx.multi,Vn,At.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const e of this._ngOnDestroyHooks)e.ngOnDestroy();for(const e of this._onDestroyHooks)e()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(e){this._onDestroyHooks.push(e)}runInContext(e){this.assertNotDestroyed();const t=_l(this),i=Ps(void 0);try{return e()}finally{_l(t),Ps(i)}}get(e,t=hd,i=At.Default){this.assertNotDestroyed(),i=ac(i);const r=_l(this),s=Ps(void 0);try{if(!(i&At.SkipSelf)){let a=this.records.get(e);if(void 0===a){const l=function nT(n){return"function"==typeof n||"object"==typeof n&&n instanceof ge}(e)&&Af(e);a=l&&this.injectableDefInScope(l)?ja(Tc(e),yp):null,this.records.set(e,a)}if(null!=a)return this.hydrate(e,a)}return(i&At.Self?bp():this.parent).get(e,t=i&At.Optional&&t===hd?null:t)}catch(o){if("NullInjectorError"===o.name){if((o[oc]=o[oc]||[]).unshift(ri(e)),r)throw o;return function e0(n,e,t,i){const r=n[oc];throw e[Rf]&&r.unshift(e[Rf]),n.message=function Gg(n,e,t,i=null){n=n&&"\n"===n.charAt(0)&&n.charAt(1)==gl?n.slice(2):n;let r=ri(e);if(Array.isArray(e))r=e.map(ri).join(" -> ");else if("object"==typeof e){let s=[];for(let o in e)if(e.hasOwnProperty(o)){let a=e[o];s.push(o+":"+("string"==typeof a?JSON.stringify(a):ri(a)))}r=`{${s.join(", ")}}`}return`${t}${i?"("+i+")":""}[${r}]: ${n.replace(hi,"\n ")}`}("\n"+n.message,r,t,i),n[Hg]=r,n[oc]=null,n}(o,e,"R3InjectorError",this.source)}throw o}finally{Ps(s),_l(r)}}resolveInjectorInitializers(){const e=_l(this),t=Ps(void 0);try{const i=this.get(Mr.multi,Vn,At.Self);for(const r of i)r()}finally{_l(e),Ps(t)}}toString(){const e=[],t=this.records;for(const i of t.keys())e.push(ri(i));return`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new fe(205,!1)}processProvider(e){let t=ni(e=Mt(e))?e:Mt(e&&e.provide);const i=function tT(n){return vp(n)?ja(void 0,n.useValue):ja(rv(n),yp)}(e);if(ni(e)||!0!==e.multi)this.records.get(t);else{let r=this.records.get(t);r||(r=ja(void 0,yp,!0),r.factory=()=>vl(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,i)}hydrate(e,t){return t.value===yp&&(t.value=eT,t.value=t.factory()),"object"==typeof t.value&&t.value&&function Pd(n){return null!==n&&"object"==typeof n&&"function"==typeof n.ngOnDestroy}(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}injectableDefInScope(e){if(!e.providedIn)return!1;const t=Mt(e.providedIn);return"string"==typeof t?"any"===t||this.scopes.has(t):this.injectorDefTypes.has(t)}}function Tc(n){const e=Af(n),t=null!==e?e.factory:La(n);if(null!==t)return t;if(n instanceof ge)throw new fe(204,!1);if(n instanceof Function)return function iv(n){const e=n.length;if(e>0)throw Md(e,"?"),new fe(204,!1);const t=function vr(n){return n&&(n[ml]||n[Df])||null}(n);return null!==t?()=>t.factory(n):()=>new n}(n);throw new fe(204,!1)}function rv(n,e,t){let i;if(ni(n)){const r=Mt(n);return La(r)||Tc(r)}if(vp(n))i=()=>Mt(n.useValue);else if(function fi(n){return!(!n||!n.useFactory)}(n))i=()=>n.useFactory(...vl(n.deps||[]));else if(function hh(n){return!(!n||!n.useExisting)}(n))i=()=>Q(Mt(n.useExisting));else{const r=Mt(n&&(n.useClass||n.provide));if(!function Hs(n){return!!n.deps}(n))return La(r)||Tc(r);i=()=>new r(...vl(n.deps))}return i}function ja(n,e,t=!1){return{factory:n,value:e,multi:t?[]:void 0}}function sv(n,e){for(const t of n)Array.isArray(t)?sv(t,e):t&&Ef(t)?sv(t.\u0275providers,e):e(t)}class iT{}class Tx{}class rn{resolveComponentFactory(e){throw function rT(n){const e=Error(`No component factory found for ${ri(n)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=n,e}(e)}}let Ol=(()=>{class n{}return n.NULL=new rn,n})();function co(){return Dc(xr(),Ee())}function Dc(n,e){return new yt(dr(n,e))}let yt=(()=>{class n{constructor(t){this.nativeElement=t}}return n.__NG_ELEMENT_ID__=co,n})();function Xn(n){return n instanceof yt?n.nativeElement:n}class fh{}let fa=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>function xp(){const n=Ee(),t=hs(xr().index,n);return(Vi(t)?t:n)[Ne]}(),n})(),sT=(()=>{class n{}return n.\u0275prov=ke({token:n,providedIn:"root",factory:()=>null}),n})();class Ic{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const oT=new Ic("15.2.10"),av={},lv="ngOriginalError";function cv(n){return n[lv]}class Xa{constructor(){this._console=console}handleError(e){const t=this._findOriginalError(e);this._console.error("ERROR",e),t&&this._console.error("ORIGINAL ERROR",t)}_findOriginalError(e){let t=e&&cv(e);for(;t&&cv(t);)t=cv(t);return t||null}}function qa(n){return n instanceof Function?n():n}function Ix(n,e,t){let i=n.length;for(;;){const r=n.indexOf(e,t);if(-1===r)return r;if(0===r||n.charCodeAt(r-1)<=32){const s=e.length;if(r+s===i||n.charCodeAt(r+s)<=32)return r}t=r+1}}const uv="ng-template";function gT(n,e,t){let i=0,r=!0;for(;is?"":r[h+1].toLowerCase();const m=8&i?p:null;if(m&&-1!==Ix(m,c,0)||2&i&&c!==p){if(Oo(i))return!1;o=!0}}}}else{if(!o&&!Oo(i)&&!Oo(l))return!1;if(o&&Oo(l))continue;o=!1,i=l|1&i}}return Oo(i)||o}function Oo(n){return 0==(1&n)}function vT(n,e,t,i){if(null===e)return-1;let r=0;if(i||!t){let s=!1;for(;r-1)for(t++;t0?'="'+a+'"':"")+"]"}else 8&i?r+="."+o:4&i&&(r+=" "+o);else""!==r&&!Oo(o)&&(e+=Fx(s,r),r=""),i=o,s=s||!Oo(i);t++}return""!==r&&(e+=Fx(s,r)),e}const jt={};function j(n){Nx(Nn(),Ee(),Jr()+n,!1)}function Nx(n,e,t,i){if(!i)if(3==(3&e[tn])){const s=n.preOrderCheckHooks;null!==s&&ur(e,s,t)}else{const s=n.preOrderHooks;null!==s&&bd(e,s,0,t)}Sl(t)}function Gx(n,e=null,t=null,i){const r=Wx(n,e,t,i);return r.resolveInjectorInitializers(),r}function Wx(n,e=null,t=null,i,r=new Set){const s=[t||Vn,JA(n)];return i=i||("object"==typeof n?void 0:ri(n)),new nv(s,e||bp(),i||null,r)}let ki=(()=>{class n{static create(t,i){if(Array.isArray(t))return Gx({name:""},i,t,"");{const r=t.name??"";return Gx({name:r},t.parent,t.providers,r)}}}return n.THROW_IF_NOT_FOUND=hd,n.NULL=new Ga,n.\u0275prov=ke({token:n,providedIn:"any",factory:()=>Q(Di)}),n.__NG_ELEMENT_ID__=-1,n})();function D(n,e=At.Default){const t=Ee();return null===t?Q(n,e):w0(xr(),t,Mt(n),e)}function Ya(){throw new Error("invalid")}function Cp(n,e){const t=n.contentQueries;if(null!==t)for(let i=0;iei&&Nx(n,e,ei,!1),oo(o?2:0,r),t(i,r)}finally{Sl(s),oo(o?3:1,r)}}function mh(n,e,t){if(Ff(e)){const r=e.directiveEnd;for(let s=e.directiveStart;s0;){const t=n[--e];if("number"==typeof t&&t<0)return t}return 0})(o)!=a&&o.push(a),o.push(t,i,s)}}(n,e,i,ph(n,t,r.hostVars,jt),r)}function pe(n,e,t,i,r,s){const o=dr(n,e);!function ye(n,e,t,i,r,s,o){if(null==s)n.removeAttribute(e,r,t);else{const a=null==o?Wt(s):o(s,i||"",r);n.setAttribute(e,r,a,t)}}(e[Ne],o,s,n.value,t,i,r)}function Te(n,e,t,i,r,s){const o=s[e];if(null!==o){const a=i.setInput;for(let l=0;l0&&fn(t)}}function fn(n){for(let i=R_(n);null!==i;i=P_(i))for(let r=Zr;r0&&fn(s)}const t=n[Qe].components;if(null!==t)for(let i=0;i0&&fn(r)}}function Rn(n,e){const t=hs(e,n),i=t[Qe];(function $s(n,e){for(let t=e.length;t-1&&(L_(e,i),th(t,i))}this._attachedToViewContainer=!1}J0(this._lView[Qe],this._lView)}onDestroy(e){Jx(this._lView[Qe],this._lView,null,e)}markForCheck(){Ur(this._cdRefInjectingView||this._lView)}detach(){this._lView[tn]&=-65}reattach(){this._lView[tn]|=64}detectChanges(){pi(this._lView[Qe],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new fe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function pA(n,e){lh(n,e,e[Ne],2,null,null)}(this._lView[Qe],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new fe(902,!1);this._appRef=e}}class OG extends bv{constructor(e){super(e),this._view=e}detectChanges(){const e=this._view;pi(e[Qe],e,e[oe],!1)}checkNoChanges(){}get context(){return null}}class AO extends Ol{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){const t=Wn(e);return new xv(t,this.ngModule)}}function TO(n){const e=[];for(let t in n)n.hasOwnProperty(t)&&e.push({propName:n[t],templateName:t});return e}class FG{constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,i){i=ac(i);const r=this.injector.get(e,av,i);return r!==av||t===av?r:this.parentInjector.get(e,t,i)}}class xv extends Tx{get inputs(){return TO(this.componentDef.inputs)}get outputs(){return TO(this.componentDef.outputs)}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=function kd(n){return n.map(xT).join(",")}(e.selectors),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!t}create(e,t,i,r){let s=(r=r||this.ngModule)instanceof $a?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new FG(e,s):e,a=o.get(fh,null);if(null===a)throw new fe(407,!1);const l=o.get(sT,null),c=a.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",h=i?function zT(n,e,t){return n.selectRootElement(e,t===Do.ShadowDom)}(c,i,this.componentDef.encapsulation):O_(c,u,function LG(n){const e=n.toLowerCase();return"svg"===e?a0:"math"===e?"math":null}(u)),p=this.componentDef.onPush?288:272,m=vv(0,null,null,1,0,null,null,null,null,null),g=Ep(null,m,null,p,null,null,a,c,l,o,null);let b,y;n_(g);try{const v=this.componentDef;let M,x=null;v.findHostDirectiveDefs?(M=[],x=new Map,v.findHostDirectiveDefs(v,M,x),M.push(v)):M=[v];const S=function BG(n,e){const t=n[Qe],i=ei;return n[i]=e,Ld(t,i,2,"#host",null)}(g,h),P=function UG(n,e,t,i,r,s,o,a){const l=r[Qe];!function VG(n,e,t,i){for(const r of n)e.mergedAttrs=qu(e.mergedAttrs,r.hostAttrs);null!==e.mergedAttrs&&(iw(e,e.mergedAttrs,!0),null!==t&&ch(i,t,e))}(i,n,e,o);const c=s.createRenderer(e,t),u=Ep(r,Qx(t),null,t.onPush?32:16,r[n.index],n,s,c,a||null,null,null);return l.firstCreatePass&&w(l,n,i.length-1),hr(r,u),r[n.index]=u}(S,h,v,M,g,a,c);y=Ls(m,ei),h&&function HG(n,e,t,i){if(i)$f(n,t,["ng-version",oT.full]);else{const{attrs:r,classes:s}=function wT(n){const e=[],t=[];let i=1,r=2;for(;i0&&dx(n,t,s.join(" "))}}(c,v,h,i),void 0!==t&&function GG(n,e,t){const i=n.projection=[];for(let r=0;r=0;i--){const r=n[i];r.hostVars=e+=r.hostVars,r.hostAttrs=qu(r.hostAttrs,t=qu(t,r.hostAttrs))}}(i)}function QT(n){return n===Io?{}:n===Vn?[]:n}function jG(n,e){const t=n.viewQuery;n.viewQuery=t?(i,r)=>{e(i,r),t(i,r)}:e}function XG(n,e){const t=n.contentQueries;n.contentQueries=t?(i,r,s)=>{e(i,r,s),t(i,r,s)}:e}function qG(n,e){const t=n.hostBindings;n.hostBindings=t?(i,r)=>{e(i,r),t(i,r)}:e}function sw(n){return!!JT(n)&&(Array.isArray(n)||!(n instanceof Map)&&Symbol.iterator in n)}function JT(n){return null!==n&&("function"==typeof n||"object"==typeof n)}function Fl(n,e,t){return n[e]=t}function ms(n,e,t){return!Object.is(n[e],t)&&(n[e]=t,!0)}function gh(n,e,t,i){const r=ms(n,e,t);return ms(n,e+1,i)||r}function Vt(n,e,t,i){const r=Ee();return ms(r,_d(),e)&&(Nn(),pe(hn(),r,n,e,t,i)),Vt}function Rp(n,e,t,i){return ms(n,_d(),t)?e+Wt(t)+i:jt}function Pp(n,e,t,i,r,s){const a=gh(n,function aa(){return $t.lFrame.bindingIndex}(),t,r);return Na(2),a?e+Wt(t)+i+Wt(r)+s:jt}function _e(n,e,t,i,r,s,o,a){const l=Ee(),c=Nn(),u=n+ei,h=c.firstCreatePass?function r8(n,e,t,i,r,s,o,a,l){const c=e.consts,u=Ld(e,n,4,o||null,xl(c,a));yv(e,t,u,xl(c,l)),Wu(e,u);const h=u.tView=vv(2,u,i,r,s,e.directiveRegistry,e.pipeRegistry,null,e.schemas,c);return null!==e.queries&&(e.queries.template(e,u),h.queries=e.queries.embeddedTView(u)),u}(u,c,l,e,t,i,r,s,o):c.data[u];oa(h,!1);const p=l[Ne].createComment("");hp(c,l,p,h),Nr(p,l),hr(l,l[u]=lt(p,l,p,h)),Lu(h)&&gv(c,l,h),null!=o&&_v(l,h,a)}function Vr(n){return nn(function UE(){return $t.lFrame.contextLView}(),ei+n)}function z(n,e,t){const i=Ee();return ms(i,_d(),e)&&Ws(Nn(),hn(),i,n,e,i[Ne],t,!1),z}function e1(n,e,t,i,r){const o=r?"class":"style";ZT(n,t,e.inputs[o],o,i)}function K(n,e,t,i){const r=Ee(),s=Nn(),o=ei+n,a=r[Ne],l=s.firstCreatePass?function o8(n,e,t,i,r,s){const o=e.consts,l=Ld(e,n,2,i,xl(o,r));return yv(e,t,l,xl(o,s)),null!==l.attrs&&iw(l,l.attrs,!1),null!==l.mergedAttrs&&iw(l,l.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,l),l}(o,s,r,e,t,i):s.data[o],c=r[o]=O_(a,e,function Wf(){return $t.lFrame.currentNamespace}()),u=Lu(l);return oa(l,!0),ch(a,c,l),32!=(32&l.flags)&&hp(s,r,c,l),0===function LE(){return $t.lFrame.elementDepthCount}()&&Nr(c,r),function FE(){$t.lFrame.elementDepthCount++}(),u&&(gv(s,r,l),mh(s,l,r)),null!==i&&_v(r,l),K}function J(){let n=xr();Fs()?Qg():(n=n.parent,oa(n,!1));const e=n;!function NE(){$t.lFrame.elementDepthCount--}();const t=Nn();return t.firstCreatePass&&(Wu(t,n),Ff(n)&&t.queries.elementEnd(n)),null!=e.classesWithoutHost&&function Xu(n){return 0!=(8&n.flags)}(e)&&e1(t,e,Ee(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function WE(n){return 0!=(16&n.flags)}(e)&&e1(t,e,Ee(),e.stylesWithoutHost,!1),J}function Fe(n,e,t,i){return K(n,e,t,i),J(),Fe}function uo(n,e,t){const i=Ee(),r=Nn(),s=n+ei,o=r.firstCreatePass?function a8(n,e,t,i,r){const s=e.consts,o=xl(s,i),a=Ld(e,n,8,"ng-container",o);return null!==o&&iw(a,o,!0),yv(e,t,a,xl(s,r)),null!==e.queries&&e.queries.elementStart(e,a),a}(s,r,i,e,t):r.data[s];oa(o,!0);const a=i[s]=i[Ne].createComment("");return hp(r,i,a,o),Nr(a,i),Lu(o)&&(gv(r,i,o),mh(r,o,i)),null!=t&&_v(i,o),uo}function ho(){let n=xr();const e=Nn();return Fs()?Qg():(n=n.parent,oa(n,!1)),e.firstCreatePass&&(Wu(e,n),Ff(n)&&e.queries.elementEnd(n)),ho}function Mv(n,e,t){return uo(n,e,t),ho(),Mv}function Wi(){return Ee()}function Sv(n){return!!n&&"function"==typeof n.then}function HO(n){return!!n&&"function"==typeof n.subscribe}const t1=HO;function ct(n,e,t,i){const r=Ee(),s=Nn(),o=xr();return GO(s,r,r[Ne],o,n,e,i),ct}function n1(n,e){const t=xr(),i=Ee(),r=Nn();return GO(r,i,CO(t_(r.data),t,i),t,n,e),n1}function GO(n,e,t,i,r,s,o){const a=Lu(i),c=n.firstCreatePass&&SO(n),u=e[oe],h=MO(e);let p=!0;if(3&i.type||o){const b=dr(i,e),y=o?o(b):b,v=h.length,M=o?S=>o(Pi(S[i.index])):i.index;let x=null;if(!o&&a&&(x=function l8(n,e,t,i){const r=n.cleanup;if(null!=r)for(let s=0;sl?a[l]:null}"string"==typeof o&&(s+=2)}return null}(n,e,r,i.index)),null!==x)(x.__ngLastListenerFn__||x).__ngNextListenerFn__=s,x.__ngLastListenerFn__=s,p=!1;else{s=$O(i,e,u,s,!1);const S=t.listen(y,r,s);h.push(s,S),c&&c.push(r,M,v,v+1)}}else s=$O(i,e,u,s,!1);const m=i.outputs;let g;if(p&&null!==m&&(g=m[r])){const b=g.length;if(b)for(let y=0;y-1?hs(n.index,e):e);let l=WO(e,t,i,o),c=s.__ngNextListenerFn__;for(;c;)l=WO(e,t,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function be(n=1){return function zE(n){return($t.lFrame.contextLView=function Gf(n,e){for(;n>0;)e=e[yl],n--;return e}(n,$t.lFrame.contextLView))[oe]}(n)}function c8(n,e){let t=null;const i=function Ox(n){const e=n.attrs;if(null!=e){const t=e.indexOf(5);if(!(1&t))return e[t+1]}return null}(n);for(let r=0;r>17&32767}function o1(n){return 2|n}function _h(n){return(131068&n)>>2}function a1(n,e){return-131069&n|e<<2}function l1(n){return 1|n}function eL(n,e,t,i,r){const s=n[t+1],o=null===e;let a=i?Fd(s):_h(s),l=!1;for(;0!==a&&(!1===l||o);){const u=n[a+1];m8(n[a],e)&&(l=!0,n[a+1]=i?l1(u):o1(u)),a=i?Fd(u):_h(u)}l&&(n[t+1]=i?o1(s):l1(s))}function m8(n,e){return null===n||null==e||(Array.isArray(n)?n[1]:n)===e||!(!Array.isArray(n)||"string"!=typeof e)&&xc(n,e)>=0}const Er={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function tL(n){return n.substring(Er.key,Er.keyEnd)}function nL(n,e){const t=Er.textEnd;return t===e?-1:(e=Er.keyEnd=function y8(n,e,t){for(;e32;)e++;return e}(n,Er.key=e,t),Up(n,e,t))}function Up(n,e,t){for(;e=0;t=nL(e,t))Bs(n,tL(e),!0)}function Ka(n,e,t,i){const r=Ee(),s=Nn(),o=Na(2);s.firstUpdatePass&&lL(s,n,o,i),e!==jt&&ms(r,o,e)&&dL(s,s.data[Jr()],r,r[Ne],n,r[o+1]=function R8(n,e){return null==n||""===n||("string"==typeof e?n+=e:"object"==typeof n&&(n=ri(Vs(n)))),n}(e,t),i,o)}function aL(n,e){return e>=n.expandoStartIndex}function lL(n,e,t,i){const r=n.data;if(null===r[t+1]){const s=r[Jr()],o=aL(n,t);hL(s,i)&&null===e&&!o&&(e=!1),e=function S8(n,e,t,i){const r=t_(n);let s=i?e.residualClasses:e.residualStyles;if(null===r)0===(i?e.classBindings:e.styleBindings)&&(t=Cv(t=c1(null,n,e,t,i),e.attrs,i),s=null);else{const o=e.directiveStylingLast;if(-1===o||n[o]!==r)if(t=c1(r,n,e,t,i),null===s){let l=function C8(n,e,t){const i=t?e.classBindings:e.styleBindings;if(0!==_h(i))return n[Fd(i)]}(n,e,i);void 0!==l&&Array.isArray(l)&&(l=c1(null,n,e,l[1],i),l=Cv(l,e.attrs,i),function E8(n,e,t,i){n[Fd(t?e.classBindings:e.styleBindings)]=i}(n,e,i,l))}else s=function A8(n,e,t){let i;const r=e.directiveEnd;for(let s=1+e.directiveStylingLast;s0)&&(c=!0)):u=t,r)if(0!==l){const p=Fd(n[a+1]);n[i+1]=aw(p,a),0!==p&&(n[p+1]=a1(n[p+1],i)),n[a+1]=function u8(n,e){return 131071&n|e<<17}(n[a+1],i)}else n[i+1]=aw(a,0),0!==a&&(n[a+1]=a1(n[a+1],i)),a=i;else n[i+1]=aw(l,0),0===a?a=i:n[l+1]=a1(n[l+1],i),l=i;c&&(n[i+1]=o1(n[i+1])),eL(n,u,i,!0),eL(n,u,i,!1),function p8(n,e,t,i,r){const s=r?n.residualClasses:n.residualStyles;null!=s&&"string"==typeof e&&xc(s,e)>=0&&(t[i+1]=l1(t[i+1]))}(e,u,n,i,s),o=aw(a,l),s?e.classBindings=o:e.styleBindings=o}(r,s,e,t,o,i)}}function c1(n,e,t,i,r){let s=null;const o=t.directiveEnd;let a=t.directiveStylingLast;for(-1===a?a=t.directiveStart:a++;a0;){const l=n[r],c=Array.isArray(l),u=c?l[1]:l,h=null===u;let p=t[r+1];p===jt&&(p=h?Vn:void 0);let m=h?Jf(p,i):u===i?p:void 0;if(c&&!lw(m)&&(m=Jf(l,i)),lw(m)&&(a=m,o))return a;const g=n[r+1];r=o?Fd(g):_h(g)}if(null!==e){let l=s?e.residualClasses:e.residualStyles;null!=l&&(a=Jf(l,i))}return a}function lw(n){return void 0!==n}function hL(n,e){return 0!=(n.flags&(e?8:16))}function Je(n,e=""){const t=Ee(),i=Nn(),r=n+ei,s=i.firstCreatePass?Ld(i,r,1,e,null):i.data[r],o=t[r]=function k_(n,e){return n.createText(e)}(t[Ne],e);hp(i,t,o,s),oa(s,!1)}function $i(n){return nr("",n,""),$i}function nr(n,e,t){const i=Ee(),r=Rp(i,n,e,t);return r!==jt&&Rc(i,Jr(),r),nr}function Vp(n,e,t,i,r){const s=Ee(),o=Pp(s,n,e,t,i,r);return o!==jt&&Rc(s,Jr(),o),Vp}function bL(n,e,t){!function Za(n,e,t,i){const r=Nn(),s=Na(2);r.firstUpdatePass&&lL(r,null,s,i);const o=Ee();if(t!==jt&&ms(o,s,t)){const a=r.data[Jr()];if(hL(a,i)&&!aL(r,s)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(t=Bg(l,t||"")),e1(r,a,o,t,i)}else!function I8(n,e,t,i,r,s,o,a){r===jt&&(r=Vn);let l=0,c=0,u=0((Ze=Ze||{})[Ze.LocaleId=0]="LocaleId",Ze[Ze.DayPeriodsFormat=1]="DayPeriodsFormat",Ze[Ze.DayPeriodsStandalone=2]="DayPeriodsStandalone",Ze[Ze.DaysFormat=3]="DaysFormat",Ze[Ze.DaysStandalone=4]="DaysStandalone",Ze[Ze.MonthsFormat=5]="MonthsFormat",Ze[Ze.MonthsStandalone=6]="MonthsStandalone",Ze[Ze.Eras=7]="Eras",Ze[Ze.FirstDayOfWeek=8]="FirstDayOfWeek",Ze[Ze.WeekendRange=9]="WeekendRange",Ze[Ze.DateFormat=10]="DateFormat",Ze[Ze.TimeFormat=11]="TimeFormat",Ze[Ze.DateTimeFormat=12]="DateTimeFormat",Ze[Ze.NumberSymbols=13]="NumberSymbols",Ze[Ze.NumberFormats=14]="NumberFormats",Ze[Ze.CurrencyCode=15]="CurrencyCode",Ze[Ze.CurrencySymbol=16]="CurrencySymbol",Ze[Ze.CurrencyName=17]="CurrencyName",Ze[Ze.Currencies=18]="Currencies",Ze[Ze.Directionality=19]="Directionality",Ze[Ze.PluralCase=20]="PluralCase",Ze[Ze.ExtraData=21]="ExtraData",Ze))();const Hp="en-US";let PL=Hp;function f1(n,e,t,i,r){if(n=Mt(n),Array.isArray(n))for(let s=0;s>20;if(ni(n)||!n.multi){const m=new $u(l,r,D),g=m1(a,e,r?u:u+p,h);-1===g?(f_(Yf(c,o),s,a),p1(s,n,e.length),e.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),t.push(m),o.push(m)):(t[g]=m,o[g]=m)}else{const m=m1(a,e,u+p,h),g=m1(a,e,u,u+p),y=g>=0&&t[g];if(r&&!y||!r&&!(m>=0&&t[m])){f_(Yf(c,o),s,a);const v=function qW(n,e,t,i,r){const s=new $u(n,t,D);return s.multi=[],s.index=e,s.componentProviders=0,iF(s,r,i&&!t),s}(r?XW:jW,t.length,r,i,l);!r&&y&&(t[g].providerFactory=v),p1(s,n,e.length,0),e.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),t.push(v),o.push(v)}else p1(s,n,m>-1?m:g,iF(t[r?g:m],l,!r&&i));!r&&i&&y&&t[g].componentProviders++}}}function p1(n,e,t,i){const r=ni(e),s=function Ax(n){return!!n.useClass}(e);if(r||s){const l=(s?Mt(e.useClass):e).prototype.ngOnDestroy;if(l){const c=n.destroyHooks||(n.destroyHooks=[]);if(!r&&e.multi){const u=c.indexOf(t);-1===u?c.push(t,[i,l]):c[u+1].push(i,l)}else c.push(t,l)}}}function iF(n,e,t){return t&&n.componentProviders++,n.multi.push(e)-1}function m1(n,e,t,i){for(let r=t;r{t.providersResolver=(i,r)=>function $W(n,e,t){const i=Nn();if(i.firstCreatePass){const r=so(n);f1(t,i.data,i.blueprint,r,!0),f1(e,i.data,i.blueprint,r,!1)}}(i,r?r(n):n,e)}}class Gp{}class rF{}class sF extends Gp{constructor(e,t){super(),this._parent=t,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new AO(this);const i=Os(e);this._bootstrapComponents=qa(i.bootstrap),this._r3Injector=Wx(e,t,[{provide:Gp,useValue:this},{provide:Ol,useValue:this.componentFactoryResolver}],ri(e),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(e)}get injector(){return this._r3Injector}destroy(){const e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class _1 extends rF{constructor(e){super(),this.moduleType=e}create(e){return new sF(this.moduleType,e)}}class KW extends Gp{constructor(e,t,i){super(),this.componentFactoryResolver=new AO(this),this.instance=null;const r=new nv([...e,{provide:Gp,useValue:this},{provide:Ol,useValue:this.componentFactoryResolver}],t||bp(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}}function fw(n,e,t=null){return new KW(n,e,t).injector}let ZW=(()=>{class n{constructor(t){this._injector=t,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t.id)){const i=Sx(0,t.type),r=i.length>0?fw([i],this._injector,`Standalone[${t.type.name}]`):null;this.cachedInjectors.set(t.id,r)}return this.cachedInjectors.get(t.id)}ngOnDestroy(){try{for(const t of this.cachedInjectors.values())null!==t&&t.destroy()}finally{this.cachedInjectors.clear()}}}return n.\u0275prov=ke({token:n,providedIn:"environment",factory:()=>new n(Q($a))}),n})();function v1(n){n.getStandaloneInjector=e=>e.get(ZW).getOrCreateStandaloneInjector(n)}function Xs(n,e,t){const i=Qr()+n,r=Ee();return r[i]===jt?Fl(r,i,t?e.call(t):e()):function wv(n,e){return n[e]}(r,i)}function pw(n,e,t,i){return fF(Ee(),Qr(),n,e,t,i)}function hF(n,e,t,i,r,s,o){return function gF(n,e,t,i,r,s,o,a,l){const c=e+t;return function ma(n,e,t,i,r,s){const o=gh(n,e,t,i);return gh(n,e+2,r,s)||o}(n,c,r,s,o,a)?Fl(n,c+4,l?i.call(l,r,s,o,a):i(r,s,o,a)):Rv(n,c+4)}(Ee(),Qr(),n,e,t,i,r,s,o)}function Rv(n,e){const t=n[e];return t===jt?void 0:t}function fF(n,e,t,i,r,s){const o=e+t;return ms(n,o,r)?Fl(n,o+1,s?i.call(s,r):i(r)):Rv(n,o+1)}function zt(n,e){const t=Nn();let i;const r=n+ei;t.firstCreatePass?(i=function f$(n,e){if(e)for(let t=e.length-1;t>=0;t--){const i=e[t];if(n===i.name)return i}}(e,t.pipeRegistry),t.data[r]=i,i.onDestroy&&(t.destroyHooks??(t.destroyHooks=[])).push(r,i.onDestroy)):i=t.data[r];const s=i.factory||(i.factory=La(i.type)),o=Ps(D);try{const a=Ku(!1),l=s();return Ku(a),function s8(n,e,t,i){t>=n.data.length&&(n.data[t]=null,n.blueprint[t]=null),e[t]=i}(t,Ee(),r,l),l}finally{Ps(o)}}function Xt(n,e,t){const i=n+ei,r=Ee(),s=nn(r,i);return Pv(r,i)?fF(r,Qr(),e,s.transform,t,s):s.transform(t)}function b1(n,e,t,i){const r=n+ei,s=Ee(),o=nn(s,r);return Pv(s,r)?function pF(n,e,t,i,r,s,o){const a=e+t;return gh(n,a,r,s)?Fl(n,a+2,o?i.call(o,r,s):i(r,s)):Rv(n,a+2)}(s,Qr(),e,o.transform,t,i,o):o.transform(t,i)}function Pv(n,e){return n[Qe].data[e].pure}function x1(n){return e=>{setTimeout(n,void 0,e)}}const it=class _$ extends Ue{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,t,i){let r=e,s=t||(()=>null),o=i;if(e&&"object"==typeof e){const l=e;r=l.next?.bind(l),s=l.error?.bind(l),o=l.complete?.bind(l)}this.__isAsync&&(s=x1(s),r&&(r=x1(r)),o&&(o=x1(o)));const a=super.subscribe({next:r,error:s,complete:o});return e instanceof un&&e.add(a),a}};function v$(){return this._results[Symbol.iterator]()}class Wp{get changes(){return this._changes||(this._changes=new it)}constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const t=Wp.prototype;t[Symbol.iterator]||(t[Symbol.iterator]=v$)}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){const i=this;i.dirty=!1;const r=function lo(n){return n.flat(Number.POSITIVE_INFINITY)}(e);(this._changesDetected=!function KE(n,e,t){if(n.length!==e.length)return!1;for(let i=0;i{class n{}return n.__NG_ELEMENT_ID__=x$,n})();const y$=fo,b$=class extends y${constructor(e,t,i){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=i}createEmbeddedView(e,t){const i=this._declarationTContainer.tView,r=Ep(this._declarationLView,i,e,16,null,i.declTNode,null,null,null,null,t||null);r[Or]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[ra];return null!==o&&(r[ra]=o.createEmbeddedView(i)),mv(i,r,e),new bv(r)}};function x$(){return mw(xr(),Ee())}function mw(n,e){return 4&n.type?new b$(e,n,Dc(n,e)):null}let is=(()=>{class n{}return n.__NG_ELEMENT_ID__=w$,n})();function w$(){return bF(xr(),Ee())}const M$=is,vF=class extends M${constructor(e,t,i){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=i}get element(){return Dc(this._hostTNode,this._hostLView)}get injector(){return new El(this._hostTNode,this._hostLView)}get parentInjector(){const e=Qu(this._hostTNode,this._hostLView);if(jf(e)){const t=Yu(e,this._hostLView),i=Xf(e);return new El(t[Qe].data[i+8],t)}return new El(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){const t=yF(this._lContainer);return null!==t&&t[e]||null}get length(){return this._lContainer.length-Zr}createEmbeddedView(e,t,i){let r,s;"number"==typeof i?r=i:null!=i&&(r=i.index,s=i.injector);const o=e.createEmbeddedView(t||{},s);return this.insert(o,r),o}createComponent(e,t,i,r,s){const o=e&&!function fs(n){return"function"==typeof n}(e);let a;if(o)a=t;else{const h=t||{};a=h.index,i=h.injector,r=h.projectableNodes,s=h.environmentInjector||h.ngModuleRef}const l=o?e:new xv(Wn(e)),c=i||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get($a,null);p&&(s=p)}const u=l.create(c,r,void 0,s);return this.insert(u.hostView,a),u}insert(e,t){const i=e._lView,r=i[Qe];if(function pc(n){return us(n[Ti])}(i)){const u=this.indexOf(e);if(-1!==u)this.detach(u);else{const h=i[Ti],p=new vF(h,h[tr],h[Ti]);p.detach(p.indexOf(e))}}const s=this._adjustIndex(t),o=this._lContainer;!function gA(n,e,t,i){const r=Zr+i,s=t.length;i>0&&(t[r-1][Ro]=e),i0)i.push(o[a/2]);else{const c=s[a+1],u=e[-l];for(let h=Zr;h{class n{constructor(t){this.appInits=t,this.resolve=_w,this.reject=_w,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const t=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{s.subscribe({complete:a,error:l})});t.push(o)}}Promise.all(t).then(()=>{i()}).catch(r=>{this.reject(r)}),0===t.length&&i(),this.initialized=!0}}return n.\u0275fac=function(t){return new(t||n)(Q(vw,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Xp=new ge("AppId",{providedIn:"root",factory:function GF(){return`${k1()}${k1()}${k1()}`}});function k1(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const WF=new ge("Platform Initializer"),O1=new ge("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),rs=new ge("AnimationModuleType");let Y$=(()=>{class n{log(t){console.log(t)}warn(t){console.warn(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();const Ul=new ge("LocaleId",{providedIn:"root",factory:()=>Ot(Ul,At.Optional|At.SkipSelf)||function K$(){return typeof $localize<"u"&&$localize.locale||Hp}()});class Q${constructor(e,t){this.ngModuleFactory=e,this.componentFactories=t}}let $F=(()=>{class n{compileModuleSync(t){return new _1(t)}compileModuleAsync(t){return Promise.resolve(this.compileModuleSync(t))}compileModuleAndAllComponentsSync(t){const i=this.compileModuleSync(t),s=qa(Os(t).declarations).reduce((o,a)=>{const l=Wn(a);return l&&o.push(new xv(l)),o},[]);return new Q$(i,s)}compileModuleAndAllComponentsAsync(t){return Promise.resolve(this.compileModuleAndAllComponentsSync(t))}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const t6=(()=>Promise.resolve(0))();function L1(n){typeof Zone>"u"?t6.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class pt{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new it(!1),this.onMicrotaskEmpty=new it(!1),this.onStable=new it(!1),this.onError=new it(!1),typeof Zone>"u")throw new fe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&t,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function n6(){let n=bn.requestAnimationFrame,e=bn.cancelAnimationFrame;if(typeof Zone<"u"&&n&&e){const t=n[Zone.__symbol__("OriginalDelegate")];t&&(n=t);const i=e[Zone.__symbol__("OriginalDelegate")];i&&(e=i)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function s6(n){const e=()=>{!function r6(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(bn,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,N1(n),n.isCheckStableRunning=!0,F1(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),N1(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,i,r,s,o,a)=>{try{return qF(n),t.invokeTask(r,s,o,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||n.shouldCoalesceRunChangeDetection)&&e(),YF(n)}},onInvoke:(t,i,r,s,o,a,l)=>{try{return qF(n),t.invoke(r,s,o,a,l)}finally{n.shouldCoalesceRunChangeDetection&&e(),YF(n)}},onHasTask:(t,i,r,s)=>{t.hasTask(r,s),i===r&&("microTask"==s.change?(n._hasPendingMicrotasks=s.microTask,N1(n),F1(n)):"macroTask"==s.change&&(n.hasPendingMacrotasks=s.macroTask))},onHandleError:(t,i,r,s)=>(t.handleError(r,s),n.runOutsideAngular(()=>n.onError.emit(s)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!pt.isInAngularZone())throw new fe(909,!1)}static assertNotInAngularZone(){if(pt.isInAngularZone())throw new fe(909,!1)}run(e,t,i){return this._inner.run(e,t,i)}runTask(e,t,i,r){const s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+r,e,i6,_w,_w);try{return s.runTask(o,t,i)}finally{s.cancelTask(o)}}runGuarded(e,t,i){return this._inner.runGuarded(e,t,i)}runOutsideAngular(e){return this._outer.run(e)}}const i6={};function F1(n){if(0==n._nesting&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function N1(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function qF(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function YF(n){n._nesting--,F1(n)}class o6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new it,this.onMicrotaskEmpty=new it,this.onStable=new it,this.onError=new it}run(e,t,i){return e.apply(t,i)}runGuarded(e,t,i){return e.apply(t,i)}runOutsideAngular(e){return e()}runTask(e,t,i,r){return e.apply(t,i)}}const KF=new ge(""),bw=new ge("");let V1,B1=(()=>{class n{constructor(t,i,r){this._ngZone=t,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,V1||(function a6(n){V1=n}(r),r.addToWindow(i)),this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{pt.assertNotInAngularZone(),L1(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())L1(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(t)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,i,r){let s=-1;i&&i>0&&(s=setTimeout(()=>{this._callbacks=this._callbacks.filter(o=>o.timeoutId!==s),t(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:t,timeoutId:s,updateCb:r})}whenStable(t,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(t,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(t){this.registry.registerApplication(t,this)}unregisterApplication(t){this.registry.unregisterApplication(t)}findProviders(t,i,r){return[]}}return n.\u0275fac=function(t){return new(t||n)(Q(pt),Q(U1),Q(bw))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),U1=(()=>{class n{constructor(){this._applications=new Map}registerApplication(t,i){this._applications.set(t,i)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,i=!0){return V1?.findTestabilityInTree(this,t,i)??null}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();const Oc=!1;let Bd=null;const ZF=new ge("AllowMultipleToken"),z1=new ge("PlatformDestroyListeners"),QF=new ge("appBootstrapListener");class JF{constructor(e,t){this.name=e,this.token=t}}function t2(n,e,t=[]){const i=`Platform: ${e}`,r=new ge(i);return(s=[])=>{let o=H1();if(!o||o.injector.get(ZF,!1)){const a=[...t,...s,{provide:r,useValue:!0}];n?n(a):function d6(n){if(Bd&&!Bd.get(ZF,!1))throw new fe(400,!1);Bd=n;const e=n.get(r2);(function e2(n){const e=n.get(WF,null);e&&e.forEach(t=>t())})(n)}(function n2(n=[],e){return ki.create({name:e,providers:[{provide:ev,useValue:"platform"},{provide:z1,useValue:new Set([()=>Bd=null])},...n]})}(a,i))}return function h6(n){const e=H1();if(!e)throw new fe(401,!1);return e}()}}function H1(){return Bd?.get(r2)??null}let r2=(()=>{class n{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,i){const r=function o2(n,e){let t;return t="noop"===n?new o6:("zone.js"===n?void 0:n)||new pt(e),t}(i?.ngZone,function s2(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!n||!n.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!n||!n.ngZoneRunCoalescing)||!1}}(i)),s=[{provide:pt,useValue:r}];return r.run(()=>{const o=ki.create({providers:s,parent:this.injector,name:t.moduleType.name}),a=t.create(o),l=a.injector.get(Xa,null);if(!l)throw new fe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:u=>{l.handleError(u)}});a.onDestroy(()=>{xw(this._modules,a),c.unsubscribe()})}),function a2(n,e,t){try{const i=t();return Sv(i)?i.catch(r=>{throw e.runOutsideAngular(()=>n.handleError(r)),r}):i}catch(i){throw e.runOutsideAngular(()=>n.handleError(i)),i}}(l,r,()=>{const c=a.injector.get(yw);return c.runInitializers(),c.donePromise.then(()=>(function kL(n){io(n,"Expected localeId to be defined"),"string"==typeof n&&(PL=n.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Ul,Hp)||Hp),this._moduleDoBootstrap(a),a))})})}bootstrapModule(t,i=[]){const r=l2({},i);return function l6(n,e,t){const i=new _1(t);return Promise.resolve(i)}(0,0,t).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(t){const i=t.injector.get(qp);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!t.instance.ngDoBootstrap)throw new fe(-403,!1);t.instance.ngDoBootstrap(i)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new fe(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const t=this._injector.get(z1,null);t&&(t.forEach(i=>i()),t.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(t){return new(t||n)(Q(ki))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();function l2(n,e){return Array.isArray(e)?e.reduce(l2,n):{...n,...e}}let qp=(()=>{class n{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(t,i,r){this._zone=t,this._injector=i,this._exceptionHandler=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const s=new Sn(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new Sn(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{pt.assertNotInAngularZone(),L1(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{pt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=cs(s,o.pipe(Tu()))}bootstrap(t,i){const r=t instanceof Tx;if(!this._injector.get(yw).done){!r&&function md(n){const e=Wn(n)||wi(n)||yr(n);return null!==e&&e.standalone}(t);throw new fe(405,Oc)}let o;o=r?t:this._injector.get(Ol).resolveComponentFactory(t),this.componentTypes.push(o.componentType);const a=function c6(n){return n.isBoundToModule}(o)?void 0:this._injector.get(Gp),c=o.create(ki.NULL,[],i||o.selector,a),u=c.location.nativeElement,h=c.injector.get(KF,null);return h?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),xw(this.components,c),h?.unregisterApplication(u)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new fe(101,!1);try{this._runningTick=!0;for(let t of this._views)t.detectChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const i=t;this._views.push(i),i.attachToAppRef(this)}detachView(t){const i=t;xw(this._views,i),i.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t);const i=this._injector.get(QF,[]);i.push(...this._bootstrapListeners),i.forEach(r=>r(t))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(t=>t()),this._views.slice().forEach(t=>t.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>xw(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new fe(406,!1);const t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return n.\u0275fac=function(t){return new(t||n)(Q(pt),Q($a),Q(Xa))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function xw(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}let ci=(()=>{class n{}return n.__NG_ELEMENT_ID__=p6,n})();function p6(n){return function m6(n,e,t){if(bl(n)&&!t){const i=hs(n.index,e);return new bv(i,i)}return 47&n.type?new bv(e[kr],e):null}(xr(),Ee(),16==(16&n))}class f2{constructor(){}supports(e){return sw(e)}create(e){return new x6(e)}}const b6=(n,e)=>e;class x6{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||b6}forEachItem(e){let t;for(t=this._itHead;null!==t;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,i=this._removalsHead,r=0,s=null;for(;t||i;){const o=!i||t&&t.currentIndex{o=this._trackByFn(r,a),null!==t&&Object.is(t.trackById,o)?(i&&(t=this._verifyReinsertion(t,a,o,r)),Object.is(t.item,a)||this._addIdentityChange(t,a)):(t=this._mismatch(t,a,o,r),i=!0),t=t._next,r++}),this.length=r;return this._truncate(t),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,i,r){let s;return null===e?s=this._itTail:(s=e._prev,this._remove(e)),null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,s,r)):null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,s,r)):e=this._addAfter(new w6(t,i),s,r),e}_verifyReinsertion(e,t,i,r){let s=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==s?e=this._reinsertAfter(s,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e}_truncate(e){for(;null!==e;){const t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,t,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const r=e._prevRemoved,s=e._nextRemoved;return null===r?this._removalsHead=s:r._nextRemoved=s,null===s?this._removalsTail=r:s._prevRemoved=r,this._insertAfter(e,t,i),this._addToMoves(e,i),e}_moveAfter(e,t,i){return this._unlink(e),this._insertAfter(e,t,i),this._addToMoves(e,i),e}_addAfter(e,t,i){return this._insertAfter(e,t,i),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e}_insertAfter(e,t,i){const r=null===t?this._itHead:t._next;return e._next=r,e._prev=t,null===r?this._itTail=e:r._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new p2),this._linkedRecords.put(e),e.currentIndex=i,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const t=e._prev,i=e._next;return null===t?this._itHead=i:t._next=i,null===i?this._itTail=t:i._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new p2),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e}}class w6{constructor(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class M6{constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,t){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===t||t<=i.currentIndex)&&Object.is(i.trackById,e))return i;return null}remove(e){const t=e._prevDup,i=e._nextDup;return null===t?this._head=i:t._nextDup=i,null===i?this._tail=t:i._prevDup=t,null===this._head}}class p2{constructor(){this.map=new Map}put(e){const t=e.trackById;let i=this.map.get(t);i||(i=new M6,this.map.set(t,i)),i.add(e)}get(e,t){const r=this.map.get(e);return r?r.get(e,t):null}remove(e){const t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function m2(n,e,t){const i=n.previousIndex;if(null===i)return i;let r=0;return t&&i{if(t&&t.key===r)this._maybeAddToChanges(t,i),this._appendAfter=t,t=t._next;else{const s=this._getOrCreateRecordForKey(r,i);t=this._insertBeforeOrAppend(t,s)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let i=t;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){const i=e._prev;return t._next=e,t._prev=i,e._prev=t,i&&(i._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){const r=this._records.get(e);this._maybeAddToChanges(r,t);const s=r._prev,o=r._next;return s&&(s._next=o),o&&(o._prev=s),r._next=null,r._prev=null,r}const i=new C6(e);return this._records.set(e,i),i.currentValue=t,this._addToAdditions(i),i}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,t){Object.is(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(i=>t(e[i],i))}}class C6{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function _2(){return new Sw([new f2])}let Sw=(()=>{class n{constructor(t){this.factories=t}static create(t,i){if(null!=i){const r=i.factories.slice();t=t.concat(r)}return new n(t)}static extend(t){return{provide:n,useFactory:i=>n.create(t,i||_2()),deps:[[n,new Il,new Po]]}}find(t){const i=this.factories.find(r=>r.supports(t));if(null!=i)return i;throw new fe(901,!1)}}return n.\u0275prov=ke({token:n,providedIn:"root",factory:_2}),n})();function v2(){return new Ov([new g2])}let Ov=(()=>{class n{constructor(t){this.factories=t}static create(t,i){if(i){const r=i.factories.slice();t=t.concat(r)}return new n(t)}static extend(t){return{provide:n,useFactory:i=>n.create(t,i||v2()),deps:[[n,new Il,new Po]]}}find(t){const i=this.factories.find(r=>r.supports(t));if(i)return i;throw new fe(901,!1)}}return n.\u0275prov=ke({token:n,providedIn:"root",factory:v2}),n})();const T6=t2(null,"core",[]);let D6=(()=>{class n{constructor(t){}}return n.\u0275fac=function(t){return new(t||n)(Q(qp))},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({}),n})();let X1=null;function Lc(){return X1}class P6{}const Ht=new ge("DocumentToken");let q1=(()=>{class n{historyGo(t){throw new Error("Not implemented")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:function(){return function k6(){return Q(y2)}()},providedIn:"platform"}),n})();const O6=new ge("Location Initialized");let y2=(()=>{class n extends q1{constructor(t){super(),this._doc=t,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Lc().getBaseHref(this._doc)}onPopState(t){const i=Lc().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",t,!1),()=>i.removeEventListener("popstate",t)}onHashChange(t){const i=Lc().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",t,!1),()=>i.removeEventListener("hashchange",t)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(t){this._location.pathname=t}pushState(t,i,r){b2()?this._history.pushState(t,i,r):this._location.hash=r}replaceState(t,i,r){b2()?this._history.replaceState(t,i,r):this._location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}}return n.\u0275fac=function(t){return new(t||n)(Q(Ht))},n.\u0275prov=ke({token:n,factory:function(){return function L6(){return new y2(Q(Ht))}()},providedIn:"platform"}),n})();function b2(){return!!window.history.pushState}function Y1(n,e){if(0==n.length)return e;if(0==e.length)return n;let t=0;return n.endsWith("/")&&t++,e.startsWith("/")&&t++,2==t?n+e.substring(1):1==t?n+e:n+"/"+e}function x2(n){const e=n.match(/#|\?|$/),t=e&&e.index||n.length;return n.slice(0,t-("/"===n[t-1]?1:0))+n.slice(t)}function Fc(n){return n&&"?"!==n[0]?"?"+n:n}let bh=(()=>{class n{historyGo(t){throw new Error("Not implemented")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:function(){return Ot(M2)},providedIn:"root"}),n})();const w2=new ge("appBaseHref");let M2=(()=>{class n extends bh{constructor(t,i){super(),this._platformLocation=t,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??Ot(Ht).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return Y1(this._baseHref,t)}path(t=!1){const i=this._platformLocation.pathname+Fc(this._platformLocation.search),r=this._platformLocation.hash;return r&&t?`${i}${r}`:i}pushState(t,i,r,s){const o=this.prepareExternalUrl(r+Fc(s));this._platformLocation.pushState(t,i,o)}replaceState(t,i,r,s){const o=this.prepareExternalUrl(r+Fc(s));this._platformLocation.replaceState(t,i,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}}return n.\u0275fac=function(t){return new(t||n)(Q(q1),Q(w2,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),F6=(()=>{class n extends bh{constructor(t,i){super(),this._platformLocation=t,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}path(t=!1){let i=this._platformLocation.hash;return null==i&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(t){const i=Y1(this._baseHref,t);return i.length>0?"#"+i:i}pushState(t,i,r,s){let o=this.prepareExternalUrl(r+Fc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(t,i,o)}replaceState(t,i,r,s){let o=this.prepareExternalUrl(r+Fc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.replaceState(t,i,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}}return n.\u0275fac=function(t){return new(t||n)(Q(q1),Q(w2,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),Lv=(()=>{class n{constructor(t){this._subject=new it,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=t;const i=this._locationStrategy.getBaseHref();this._basePath=function U6(n){if(new RegExp("^(https?:)?//").test(n)){const[,t]=n.split(/\/\/[^\/]+/);return t}return n}(x2(S2(i))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(t=!1){return this.normalize(this._locationStrategy.path(t))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(t,i=""){return this.path()==this.normalize(t+Fc(i))}normalize(t){return n.stripTrailingSlash(function B6(n,e){if(!n||!e.startsWith(n))return e;const t=e.substring(n.length);return""===t||["/",";","?","#"].includes(t[0])?t:e}(this._basePath,S2(t)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._locationStrategy.prepareExternalUrl(t)}go(t,i="",r=null){this._locationStrategy.pushState(r,"",t,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Fc(i)),r)}replaceState(t,i="",r=null){this._locationStrategy.replaceState(r,"",t,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Fc(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(t=0){this._locationStrategy.historyGo?.(t)}onUrlChange(t){return this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{const i=this._urlChangeListeners.indexOf(t);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(t="",i){this._urlChangeListeners.forEach(r=>r(t,i))}subscribe(t,i,r){return this._subject.subscribe({next:t,error:i,complete:r})}}return n.normalizeQueryParams=Fc,n.joinWithSlash=Y1,n.stripTrailingSlash=x2,n.\u0275fac=function(t){return new(t||n)(Q(bh))},n.\u0275prov=ke({token:n,factory:function(){return function N6(){return new Lv(Q(bh))}()},providedIn:"root"}),n})();function S2(n){return n.replace(/\/index.html$/,"")}var po=(()=>((po=po||{})[po.Decimal=0]="Decimal",po[po.Percent=1]="Percent",po[po.Currency=2]="Currency",po[po.Scientific=3]="Scientific",po))(),It=(()=>((It=It||{})[It.Decimal=0]="Decimal",It[It.Group=1]="Group",It[It.List=2]="List",It[It.PercentSign=3]="PercentSign",It[It.PlusSign=4]="PlusSign",It[It.MinusSign=5]="MinusSign",It[It.Exponential=6]="Exponential",It[It.SuperscriptingExponent=7]="SuperscriptingExponent",It[It.PerMille=8]="PerMille",It[It.Infinity=9]="Infinity",It[It.NaN=10]="NaN",It[It.TimeSeparator=11]="TimeSeparator",It[It.CurrencyDecimal=12]="CurrencyDecimal",It[It.CurrencyGroup=13]="CurrencyGroup",It))();function ga(n,e){const t=js(n),i=t[Ze.NumberSymbols][e];if(typeof i>"u"){if(e===It.CurrencyDecimal)return t[Ze.NumberSymbols][It.Decimal];if(e===It.CurrencyGroup)return t[Ze.NumberSymbols][It.Group]}return i}const uj=/^(\d+)?\.((\d+)(-(\d+))?)?$/,I2=22,kw=".",Nv="0",hj=";",fj=",",eD="#";function iD(n){const e=parseInt(n);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+n);return e}const sD=/\s+/,k2=[];let Bv=(()=>{class n{constructor(t,i,r,s){this._iterableDiffers=t,this._keyValueDiffers=i,this._ngEl=r,this._renderer=s,this.initialClasses=k2,this.stateMap=new Map}set klass(t){this.initialClasses=null!=t?t.trim().split(sD):k2}set ngClass(t){this.rawClass="string"==typeof t?t.trim().split(sD):t}ngDoCheck(){for(const i of this.initialClasses)this._updateState(i,!0);const t=this.rawClass;if(Array.isArray(t)||t instanceof Set)for(const i of t)this._updateState(i,!0);else if(null!=t)for(const i of Object.keys(t))this._updateState(i,Boolean(t[i]));this._applyStateDiff()}_updateState(t,i){const r=this.stateMap.get(t);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(t,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(const t of this.stateMap){const i=t[0],r=t[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(t,i){(t=t.trim()).length>0&&t.split(sD).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return n.\u0275fac=function(t){return new(t||n)(D(Sw),D(Ov),D(yt),D(fa))},n.\u0275dir=Ae({type:n,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),n})();class Sj{constructor(e,t,i,r){this.$implicit=e,this.ngForOf=t,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Fo=(()=>{class n{set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}constructor(t,i,r){this._viewContainer=t,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const t=this._ngForOf;!this._differ&&t&&(this._differ=this._differs.find(t).create(this.ngForTrackBy))}if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const i=this._viewContainer;t.forEachOperation((r,s,o)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new Sj(r.item,this._ngForOf,-1,-1),null===o?void 0:o);else if(null==o)i.remove(null===s?void 0:s);else if(null!==s){const a=i.get(s);i.move(a,o),F2(a,r)}});for(let r=0,s=i.length;r{F2(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(t,i){return!0}}return n.\u0275fac=function(t){return new(t||n)(D(is),D(fo),D(Sw))},n.\u0275dir=Ae({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),n})();function F2(n,e){n.context.$implicit=e.item}let gi=(()=>{class n{constructor(t,i){this._viewContainer=t,this._context=new Ej,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){N2("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){N2("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,i){return!0}}return n.\u0275fac=function(t){return new(t||n)(D(is),D(fo))},n.\u0275dir=Ae({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),n})();class Ej{constructor(){this.$implicit=null,this.ngIf=null}}function N2(n,e){if(e&&!e.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${ri(e)}'.`)}class oD{constructor(e,t){this._viewContainerRef=e,this._templateRef=t,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(e){e&&!this._created?this.create():!e&&this._created&&this.destroy()}}let Uv=(()=>{class n{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(t){this._ngSwitch=t,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(t){this._defaultViews.push(t)}_matchCase(t){const i=t==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(t){if(this._defaultViews.length>0&&t!==this._defaultUsed){this._defaultUsed=t;for(const i of this._defaultViews)i.enforceState(t)}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),n})(),aD=(()=>{class n{constructor(t,i,r){this.ngSwitch=r,r._addCase(),this._view=new oD(t,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return n.\u0275fac=function(t){return new(t||n)(D(is),D(fo),D(Uv,9))},n.\u0275dir=Ae({type:n,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),n})(),B2=(()=>{class n{constructor(t,i,r){r._addDefault(new oD(t,i))}}return n.\u0275fac=function(t){return new(t||n)(D(is),D(fo),D(Uv,9))},n.\u0275dir=Ae({type:n,selectors:[["","ngSwitchDefault",""]],standalone:!0}),n})(),Ow=(()=>{class n{constructor(t,i,r){this._ngEl=t,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,i){const[r,s]=t.split("."),o=-1===r.indexOf("-")?void 0:ns.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,s?`${i}${s}`:i,o):this._renderer.removeStyle(this._ngEl.nativeElement,r,o)}_applyChanges(t){t.forEachRemovedItem(i=>this._setStyle(i.key,null)),t.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),t.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(Ov),D(fa))},n.\u0275dir=Ae({type:n,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),n})(),Vv=(()=>{class n{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(t){if(t.ngTemplateOutlet||t.ngTemplateOutletInjector){const i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:r,ngTemplateOutletContext:s,ngTemplateOutletInjector:o}=this;this._viewRef=i.createEmbeddedView(r,s,o?{injector:o}:void 0)}else this._viewRef=null}else this._viewRef&&t.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return n.\u0275fac=function(t){return new(t||n)(D(is))},n.\u0275dir=Ae({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[zi]}),n})();function el(n,e){return new fe(2100,!1)}class Tj{createSubscription(e,t){return e.subscribe({next:t,error:i=>{throw i}})}dispose(e){e.unsubscribe()}}class Dj{createSubscription(e,t){return e.then(t,i=>{throw i})}dispose(e){}}const Ij=new Dj,Rj=new Tj;let Vl=(()=>{class n{constructor(t){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=t}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(t){return this._obj?t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue:(t&&this._subscribe(t),this._latestValue)}_subscribe(t){this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,i=>this._updateLatestValue(t,i))}_selectStrategy(t){if(Sv(t))return Ij;if(HO(t))return Rj;throw el()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(t,i){t===this._obj&&(this._latestValue=i,this._ref.markForCheck())}}return n.\u0275fac=function(t){return new(t||n)(D(ci,16))},n.\u0275pipe=Pr({name:"async",type:n,pure:!1,standalone:!0}),n})(),V2=(()=>{class n{constructor(t){this.differs=t,this.keyValues=[],this.compareFn=z2}transform(t,i=z2){if(!t||!(t instanceof Map)&&"object"!=typeof t)return null;this.differ||(this.differ=this.differs.find(t).create());const r=this.differ.diff(t),s=i!==this.compareFn;return r&&(this.keyValues=[],r.forEachItem(o=>{this.keyValues.push(function Wj(n,e){return{key:n,value:e}}(o.key,o.currentValue))})),(r||s)&&(this.keyValues.sort(i),this.compareFn=i),this.keyValues}}return n.\u0275fac=function(t){return new(t||n)(D(Ov,16))},n.\u0275pipe=Pr({name:"keyvalue",type:n,pure:!1,standalone:!0}),n})();function z2(n,e){const t=n.key,i=e.key;if(t===i)return 0;if(void 0===t)return 1;if(void 0===i)return-1;if(null===t)return 1;if(null===i)return-1;if("string"==typeof t&&"string"==typeof i)return t{class n{constructor(t){this._locale=t}transform(t,i,r){if(!function lD(n){return!(null==n||""===n||n!=n)}(t))return null;r=r||this._locale;try{return function _j(n,e,t){return function tD(n,e,t,i,r,s,o=!1){let a="",l=!1;if(isFinite(n)){let c=function yj(n){let i,r,s,o,a,e=Math.abs(n)+"",t=0;for((r=e.indexOf(kw))>-1&&(e=e.replace(kw,"")),(s=e.search(/e/i))>0?(r<0&&(r=s),r+=+e.slice(s+1),e=e.substring(0,s)):r<0&&(r=e.length),s=0;e.charAt(s)===Nv;s++);if(s===(a=e.length))i=[0],r=1;else{for(a--;e.charAt(a)===Nv;)a--;for(r-=s,i=[],o=0;s<=a;s++,o++)i[o]=Number(e.charAt(s))}return r>I2&&(i=i.splice(0,I2-1),t=r-1,r=1),{digits:i,exponent:t,integerLen:r}}(n);o&&(c=function vj(n){if(0===n.digits[0])return n;const e=n.digits.length-n.integerLen;return n.exponent?n.exponent+=2:(0===e?n.digits.push(0,0):1===e&&n.digits.push(0),n.integerLen+=2),n}(c));let u=e.minInt,h=e.minFrac,p=e.maxFrac;if(s){const M=s.match(uj);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],S=M[3],P=M[5];null!=x&&(u=iD(x)),null!=S&&(h=iD(S)),null!=P?p=iD(P):null!=S&&h>p&&(p=h)}!function bj(n,e,t){if(e>t)throw new Error(`The minimum number of digits after fraction (${e}) is higher than the maximum (${t}).`);let i=n.digits,r=i.length-n.integerLen;const s=Math.min(Math.max(e,r),t);let o=s+n.integerLen,a=i[o];if(o>0){i.splice(Math.max(n.integerLen,o));for(let h=o;h=5)if(o-1<0){for(let h=0;h>o;h--)i.unshift(0),n.integerLen++;i.unshift(1),n.integerLen++}else i[o-1]++;for(;r=c?g.pop():l=!1),p>=10?1:0},0);u&&(i.unshift(u),n.integerLen++)}(c,h,p);let m=c.digits,g=c.integerLen;const b=c.exponent;let y=[];for(l=m.every(M=>!M);g0?y=m.splice(g,m.length):(y=m,m=[0]);const v=[];for(m.length>=e.lgSize&&v.unshift(m.splice(-e.lgSize,m.length).join(""));m.length>e.gSize;)v.unshift(m.splice(-e.gSize,m.length).join(""));m.length&&v.unshift(m.join("")),a=v.join(ga(t,i)),y.length&&(a+=ga(t,r)+y.join("")),b&&(a+=ga(t,It.Exponential)+"+"+b)}else a=ga(t,It.Infinity);return a=n<0&&!l?e.negPre+a+e.negSuf:e.posPre+a+e.posSuf,a}(n,function nD(n,e="-"){const t={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=n.split(hj),r=i[0],s=i[1],o=-1!==r.indexOf(kw)?r.split(kw):[r.substring(0,r.lastIndexOf(Nv)+1),r.substring(r.lastIndexOf(Nv)+1)],a=o[0],l=o[1]||"";t.posPre=a.substring(0,a.indexOf(eD));for(let u=0;u{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({}),n})();const G2="browser";let Zj=(()=>{class n{}return n.\u0275prov=ke({token:n,providedIn:"root",factory:()=>new Qj(Q(Ht),window)}),n})();class Qj{constructor(e,t){this.document=e,this.window=t,this.offset=()=>[0,0]}setOffset(e){this.offset=Array.isArray(e)?()=>e:e}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(e){this.supportsScrolling()&&this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){if(!this.supportsScrolling())return;const t=function Jj(n,e){const t=n.getElementById(e)||n.getElementsByName(e)[0];if(t)return t;if("function"==typeof n.createTreeWalker&&n.body&&(n.body.createShadowRoot||n.body.attachShadow)){const i=n.createTreeWalker(n.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const s=r.shadowRoot;if(s){const o=s.getElementById(e)||s.querySelector(`[name="${e}"]`);if(o)return o}r=i.nextNode()}}return null}(this.document,e);t&&(this.scrollToElement(t),t.focus())}setHistoryScrollRestoration(e){if(this.supportScrollRestoration()){const t=this.window.history;t&&t.scrollRestoration&&(t.scrollRestoration=e)}}scrollToElement(e){const t=e.getBoundingClientRect(),i=t.left+this.window.pageXOffset,r=t.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(i-s[0],r-s[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const e=W2(this.window.history)||W2(Object.getPrototypeOf(this.window.history));return!(!e||!e.writable&&!e.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function W2(n){return Object.getOwnPropertyDescriptor(n,"scrollRestoration")}class A9 extends P6{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class hD extends A9{static makeCurrent(){!function R6(n){X1||(X1=n)}(new hD)}onAndCancel(e,t,i){return e.addEventListener(t,i,!1),()=>{e.removeEventListener(t,i,!1)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,t){return(t=t||this.getDefaultDocument()).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"window"===t?window:"document"===t?e:"body"===t?e.body:null}getBaseHref(e){const t=function T9(){return Hv=Hv||document.querySelector("base"),Hv?Hv.getAttribute("href"):null}();return null==t?null:function D9(n){Nw=Nw||document.createElement("a"),Nw.setAttribute("href",n);const e=Nw.pathname;return"/"===e.charAt(0)?e:`/${e}`}(t)}resetBaseElement(){Hv=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return function wj(n,e){e=encodeURIComponent(e);for(const t of n.split(";")){const i=t.indexOf("="),[r,s]=-1==i?[t,""]:[t.slice(0,i),t.slice(i+1)];if(r.trim()===e)return decodeURIComponent(s)}return null}(document.cookie,e)}}let Nw,Hv=null;const Y2=new ge("TRANSITION_ID"),R9=[{provide:vw,useFactory:function I9(n,e,t){return()=>{t.get(yw).donePromise.then(()=>{const i=Lc(),r=e.querySelectorAll(`style[ng-transition="${n}"]`);for(let s=0;s{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const Bw=new ge("EventManagerPlugins");let Uw=(()=>{class n{constructor(t,i){this._zone=i,this._eventNameToPlugin=new Map,t.forEach(r=>{r.manager=this}),this._plugins=t.slice().reverse()}addEventListener(t,i,r){return this._findPluginFor(i).addEventListener(t,i,r)}addGlobalEventListener(t,i,r){return this._findPluginFor(i).addGlobalEventListener(t,i,r)}getZone(){return this._zone}_findPluginFor(t){const i=this._eventNameToPlugin.get(t);if(i)return i;const r=this._plugins;for(let s=0;s{class n{constructor(){this.usageCount=new Map}addStyles(t){for(const i of t)1===this.changeUsageCount(i,1)&&this.onStyleAdded(i)}removeStyles(t){for(const i of t)0===this.changeUsageCount(i,-1)&&this.onStyleRemoved(i)}onStyleRemoved(t){}onStyleAdded(t){}getAllStyles(){return this.usageCount.keys()}changeUsageCount(t,i){const r=this.usageCount;let s=r.get(t)??0;return s+=i,s>0?r.set(t,s):r.delete(t),s}ngOnDestroy(){for(const t of this.getAllStyles())this.onStyleRemoved(t);this.usageCount.clear()}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),Gv=(()=>{class n extends Z2{constructor(t){super(),this.doc=t,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(t){for(const i of this.hostNodes)this.addStyleToHost(i,t)}onStyleRemoved(t){const i=this.styleRef;i.get(t)?.forEach(s=>s.remove()),i.delete(t)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(t){this.hostNodes.add(t);for(const i of this.getAllStyles())this.addStyleToHost(t,i)}removeHost(t){this.hostNodes.delete(t)}addStyleToHost(t,i){const r=this.doc.createElement("style");r.textContent=i,t.appendChild(r);const s=this.styleRef.get(i);s?s.push(r):this.styleRef.set(i,[r])}resetHostNodes(){const t=this.hostNodes;t.clear(),t.add(this.doc.head)}}return n.\u0275fac=function(t){return new(t||n)(Q(Ht))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const fD={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/MathML/"},pD=/%COMP%/g,eN=new ge("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function tN(n,e){return e.flat(100).map(t=>t.replace(pD,n))}function nN(n){return e=>{if("__ngUnwrap__"===e)return n;!1===n(e)&&(e.preventDefault(),e.returnValue=!1)}}let Vw=(()=>{class n{constructor(t,i,r,s){this.eventManager=t,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestory=s,this.rendererByCompId=new Map,this.defaultRenderer=new mD(t)}createRenderer(t,i){if(!t||!i)return this.defaultRenderer;const r=this.getOrCreateRenderer(t,i);return r instanceof sN?r.applyToHost(t):r instanceof gD&&r.applyStyles(),r}getOrCreateRenderer(t,i){const r=this.rendererByCompId;let s=r.get(i.id);if(!s){const o=this.eventManager,a=this.sharedStylesHost,l=this.removeStylesOnCompDestory;switch(i.encapsulation){case Do.Emulated:s=new sN(o,a,i,this.appId,l);break;case Do.ShadowDom:return new V9(o,a,t,i);default:s=new gD(o,a,i,l)}s.onDestroy=()=>r.delete(i.id),r.set(i.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}return n.\u0275fac=function(t){return new(t||n)(Q(Uw),Q(Gv),Q(Xp),Q(eN))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();class mD{constructor(e){this.eventManager=e,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(e,t){return t?document.createElementNS(fD[t]||t,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,t){(rN(e)?e.content:e).appendChild(t)}insertBefore(e,t,i){e&&(rN(e)?e.content:e).insertBefore(t,i)}removeChild(e,t){e&&e.removeChild(t)}selectRootElement(e,t){let i="string"==typeof e?document.querySelector(e):e;if(!i)throw new Error(`The selector "${e}" did not match any elements`);return t||(i.textContent=""),i}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,i,r){if(r){t=r+":"+t;const s=fD[r];s?e.setAttributeNS(s,t,i):e.setAttribute(t,i)}else e.setAttribute(t,i)}removeAttribute(e,t,i){if(i){const r=fD[i];r?e.removeAttributeNS(r,t):e.removeAttribute(`${i}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,i,r){r&(ns.DashCase|ns.Important)?e.style.setProperty(t,i,r&ns.Important?"important":""):e.style[t]=i}removeStyle(e,t,i){i&ns.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,i){e[t]=i}setValue(e,t){e.nodeValue=t}listen(e,t,i){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,nN(i)):this.eventManager.addEventListener(e,t,nN(i))}}function rN(n){return"TEMPLATE"===n.tagName&&void 0!==n.content}class V9 extends mD{constructor(e,t,i,r){super(e),this.sharedStylesHost=t,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const s=tN(r.id,r.styles);for(const o of s){const a=document.createElement("style");a.textContent=o,this.shadowRoot.appendChild(a)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,i){return super.insertBefore(this.nodeOrShadowRoot(e),t,i)}removeChild(e,t){return super.removeChild(this.nodeOrShadowRoot(e),t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class gD extends mD{constructor(e,t,i,r,s=i.id){super(e),this.sharedStylesHost=t,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=tN(s,i.styles)}applyStyles(){this.sharedStylesHost.addStyles(this.styles),this.rendererUsageCount++}destroy(){this.removeStylesOnCompDestory&&(this.sharedStylesHost.removeStyles(this.styles),this.rendererUsageCount--,0===this.rendererUsageCount&&this.onDestroy?.())}}class sN extends gD{constructor(e,t,i,r,s){const o=r+"-"+i.id;super(e,t,i,s,o),this.contentAttr=function N9(n){return"_ngcontent-%COMP%".replace(pD,n)}(o),this.hostAttr=function B9(n){return"_nghost-%COMP%".replace(pD,n)}(o)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){const i=super.createElement(e,t);return super.setAttribute(i,this.contentAttr,""),i}}let z9=(()=>{class n extends K2{constructor(t){super(t)}supports(t){return!0}addEventListener(t,i,r){return t.addEventListener(i,r,!1),()=>this.removeEventListener(t,i,r)}removeEventListener(t,i,r){return t.removeEventListener(i,r)}}return n.\u0275fac=function(t){return new(t||n)(Q(Ht))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const oN=["alt","control","meta","shift"],H9={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},G9={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let W9=(()=>{class n extends K2{constructor(t){super(t)}supports(t){return null!=n.parseEventName(t)}addEventListener(t,i,r){const s=n.parseEventName(i),o=n.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Lc().onAndCancel(t,s.domEventName,o))}static parseEventName(t){const i=t.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const s=n._normalizeKey(i.pop());let o="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),o="code."),oN.forEach(c=>{const u=i.indexOf(c);u>-1&&(i.splice(u,1),o+=c+".")}),o+=s,0!=i.length||0===s.length)return null;const l={};return l.domEventName=r,l.fullKey=o,l}static matchEventFullKeyCode(t,i){let r=H9[t.key]||t.key,s="";return i.indexOf("code.")>-1&&(r=t.code,s="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),oN.forEach(o=>{o!==r&&(0,G9[o])(t)&&(s+=o+".")}),s+=r,s===i)}static eventCallback(t,i,r){return s=>{n.matchEventFullKeyCode(s,t)&&r.runGuarded(()=>i(s))}}static _normalizeKey(t){return"esc"===t?"escape":t}}return n.\u0275fac=function(t){return new(t||n)(Q(Ht))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const q9=t2(T6,"browser",[{provide:O1,useValue:G2},{provide:WF,useValue:function $9(){hD.makeCurrent()},multi:!0},{provide:Ht,useFactory:function X9(){return function TA(n){G_=n}(document),document},deps:[]}]),cN=new ge(""),dN=[{provide:bw,useClass:class P9{addToWindow(e){bn.getAngularTestability=(i,r=!0)=>{const s=e.findTestabilityInTree(i,r);if(null==s)throw new Error("Could not find testability for element.");return s},bn.getAllAngularTestabilities=()=>e.getAllTestabilities(),bn.getAllAngularRootElements=()=>e.getAllRootElements(),bn.frameworkStabilizers||(bn.frameworkStabilizers=[]),bn.frameworkStabilizers.push(i=>{const r=bn.getAllAngularTestabilities();let s=r.length,o=!1;const a=function(l){o=o||l,s--,0==s&&i(o)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(e,t,i){return null==t?null:e.getTestability(t)??(i?Lc().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null)}},deps:[]},{provide:KF,useClass:B1,deps:[pt,U1,bw]},{provide:B1,useClass:B1,deps:[pt,U1,bw]}],uN=[{provide:ev,useValue:"root"},{provide:Xa,useFactory:function j9(){return new Xa},deps:[]},{provide:Bw,useClass:z9,multi:!0,deps:[Ht,pt,O1]},{provide:Bw,useClass:W9,multi:!0,deps:[Ht]},{provide:Vw,useClass:Vw,deps:[Uw,Gv,Xp,eN]},{provide:fh,useExisting:Vw},{provide:Z2,useExisting:Gv},{provide:Gv,useClass:Gv,deps:[Ht]},{provide:Uw,useClass:Uw,deps:[Bw,pt]},{provide:class e9{},useClass:k9,deps:[]},[]];let hN=(()=>{class n{constructor(t){}static withServerTransition(t){return{ngModule:n,providers:[{provide:Xp,useValue:t.appId},{provide:Y2,useExisting:Xp},R9]}}}return n.\u0275fac=function(t){return new(t||n)(Q(cN,12))},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({providers:[...uN,...dN],imports:[va,D6]}),n})(),fN=(()=>{class n{constructor(t){this._doc=t}getTitle(){return this._doc.title}setTitle(t){this._doc.title=t||""}}return n.\u0275fac=function(t){return new(t||n)(Q(Ht))},n.\u0275prov=ke({token:n,factory:function(t){let i=null;return i=t?new t:function K9(){return new fN(Q(Ht))}(),i},providedIn:"root"}),n})();typeof window<"u"&&window;let yD=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:function(t){let i=null;return i=t?new(t||n):Q(gN),i},providedIn:"root"}),n})(),gN=(()=>{class n extends yD{constructor(t){super(),this._doc=t}sanitize(t,i){if(null==i)return null;switch(t){case $n.NONE:return i;case $n.HTML:return zs(i,"HTML")?Vs(i):bx(this._doc,String(i)).toString();case $n.STYLE:return zs(i,"Style")?Vs(i):i;case $n.SCRIPT:if(zs(i,"Script"))return Vs(i);throw new Error("unsafe value used in a script context");case $n.URL:return zs(i,"URL")?Vs(i):Ac(String(i));case $n.RESOURCE_URL:if(zs(i,"ResourceURL"))return Vs(i);throw new Error(`unsafe value used in a resource URL context (see ${ud})`);default:throw new Error(`Unexpected SecurityContext ${t} (see ${ud})`)}}bypassSecurityTrustHtml(t){return function kA(n){return new mx(n)}(t)}bypassSecurityTrustStyle(t){return function OA(n){return new gx(n)}(t)}bypassSecurityTrustScript(t){return function LA(n){return new DA(n)}(t)}bypassSecurityTrustUrl(t){return function FA(n){return new IA(n)}(t)}bypassSecurityTrustResourceUrl(t){return function NA(n){return new RA(n)}(t)}}return n.\u0275fac=function(t){return new(t||n)(Q(Ht))},n.\u0275prov=ke({token:n,factory:function(t){let i=null;return i=t?new t:function t7(n){return new gN(n.get(Ht))}(Q(ki)),i},providedIn:"root"}),n})();function dt(...n){return Ri(n,Au(n))}class Ct extends Ue{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){const t=super._subscribe(e);return!t.closed&&e.next(this._value),t}getValue(){const{hasError:e,thrownError:t,_value:i}=this;if(e)throw t;return this._throwIfClosed(),i}next(e){super.next(this._value=e)}}const Wv=B(n=>function(){n(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:n7}=Array,{getPrototypeOf:i7,prototype:r7,keys:s7}=Object;function _N(n){if(1===n.length){const e=n[0];if(n7(e))return{args:e,keys:null};if(function o7(n){return n&&"object"==typeof n&&i7(n)===r7}(e)){const t=s7(e);return{args:t.map(i=>e[i]),keys:t}}}return{args:n,keys:null}}const{isArray:a7}=Array;function bD(n){return Ye(e=>function l7(n,e){return a7(e)?n(...e):n(e)}(n,e))}function vN(n,e){return n.reduce((t,i,r)=>(t[i]=e[r],t),{})}function Vd(...n){const e=Au(n),t=Eu(n),{args:i,keys:r}=_N(n);if(0===i.length)return Ri([],e);const s=new Sn(function c7(n,e,t=Pa){return i=>{yN(e,()=>{const{length:r}=n,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Ri(n[l],e);let u=!1;c.subscribe(Un(i,h=>{s[l]=h,u||(u=!0,a--),a||i.next(t(s.slice()))},()=>{--o||i.complete()}))},i)},i)}}(i,e,r?o=>vN(r,o):Pa));return t?s.pipe(bD(t)):s}function yN(n,e,t){n?ta(t,n,e):e()}function $v(...n){return function d7(){return cd(1)}()(Ri(n,Au(n)))}function jv(n){return new Sn(e=>{lr(n()).subscribe(e)})}function Kp(n,e){const t=Qt(n)?n:()=>n,i=r=>r.error(t());return new Sn(e?r=>e.schedule(i,0,r):i)}function xD(){return Gn((n,e)=>{let t=null;n._refCount++;const i=Un(e,void 0,void 0,void 0,()=>{if(!n||n._refCount<=0||0<--n._refCount)return void(t=null);const r=n._connection,s=t;t=null,r&&(!s||r===s)&&r.unsubscribe(),e.unsubscribe()});n.subscribe(i),i.closed||(t=n.connect())})}class bN extends Sn{constructor(e,t){super(),this.source=e,this.subjectFactory=t,this._subject=null,this._refCount=0,this._connection=null,Db(e)&&(this.lift=e.lift)}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){const e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:e}=this;this._subject=this._connection=null,e?.unsubscribe()}connect(){let e=this._connection;if(!e){e=this._connection=new un;const t=this.getSubject();e.add(this.source.subscribe(Un(t,void 0,()=>{this._teardown(),t.complete()},i=>{this._teardown(),t.error(i)},()=>this._teardown()))),e.closed&&(this._connection=null,e=un.EMPTY)}return e}refCount(){return xD()(this)}}function gs(n,e){return Gn((t,i)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&i.complete();t.subscribe(Un(i,l=>{r?.unsubscribe();let c=0;const u=s++;lr(n(l,u)).subscribe(r=Un(i,h=>i.next(e?e(l,h,u,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Li(n){return n<=0?()=>Is:Gn((e,t)=>{let i=0;e.subscribe(Un(t,r=>{++i<=n&&(t.next(r),n<=i&&t.complete())}))})}function No(...n){const e=Au(n);return Gn((t,i)=>{(e?$v(n,t,e):$v(n,t)).subscribe(i)})}function On(n,e){return Gn((t,i)=>{let r=0;t.subscribe(Un(i,s=>n.call(e,s,r++)&&i.next(s)))})}function zw(n){return Gn((e,t)=>{let i=!1;e.subscribe(Un(t,r=>{i=!0,t.next(r)},()=>{i||t.next(n),t.complete()}))})}function xN(n=u7){return Gn((e,t)=>{let i=!1;e.subscribe(Un(t,r=>{i=!0,t.next(r)},()=>i?t.complete():t.error(n())))})}function u7(){return new Wv}function zd(n,e){const t=arguments.length>=2;return i=>i.pipe(n?On((r,s)=>n(r,s,i)):Pa,Li(1),t?zw(e):xN(()=>new Wv))}function Hd(n,e){return Qt(e)?er(n,e,1):er(n,1)}function Ii(n,e,t){const i=Qt(n)||e||t?{next:n,error:e,complete:t}:n;return i?Gn((r,s)=>{var o;null===(o=i.subscribe)||void 0===o||o.call(i);let a=!0;r.subscribe(Un(s,l=>{var c;null===(c=i.next)||void 0===c||c.call(i,l),s.next(l)},()=>{var l;a=!1,null===(l=i.complete)||void 0===l||l.call(i),s.complete()},l=>{var c;a=!1,null===(c=i.error)||void 0===c||c.call(i,l),s.error(l)},()=>{var l,c;a&&(null===(l=i.unsubscribe)||void 0===l||l.call(i)),null===(c=i.finalize)||void 0===c||c.call(i)}))}):Pa}function Bc(n){return Gn((e,t)=>{let s,i=null,r=!1;i=e.subscribe(Un(t,void 0,void 0,o=>{s=lr(n(o,Bc(n)(e))),i?(i.unsubscribe(),i=null,s.subscribe(t)):r=!0})),r&&(i.unsubscribe(),i=null,s.subscribe(t))})}function wN(n,e){return Gn(function h7(n,e,t,i,r){return(s,o)=>{let a=t,l=e,c=0;s.subscribe(Un(o,u=>{const h=c++;l=a?n(l,u,h):(a=!0,u),i&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(n,e,arguments.length>=2,!0))}function wD(n){return n<=0?()=>Is:Gn((e,t)=>{let i=[];e.subscribe(Un(t,r=>{i.push(r),n{for(const r of i)t.next(r);t.complete()},void 0,()=>{i=null}))})}function MN(n,e){const t=arguments.length>=2;return i=>i.pipe(n?On((r,s)=>n(r,s,i)):Pa,wD(1),t?zw(e):xN(()=>new Wv))}function SN(n,e=!1){return Gn((t,i)=>{let r=0;t.subscribe(Un(i,s=>{const o=n(s,r++);(o||e)&&i.next(s),!o&&i.complete()}))})}function CN(n){return Ye(()=>n)}function Gd(n){return Gn((e,t)=>{try{e.subscribe(t)}finally{t.add(n)}})}const sn="primary",Xv=Symbol("RouteTitle");class f7{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){const t=this.params[e];return Array.isArray(t)?t[0]:t}return null}getAll(e){if(this.has(e)){const t=this.params[e];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}}function Zp(n){return new f7(n)}function p7(n,e,t){const i=t.path.split("/");if(i.length>n.length||"full"===t.pathMatch&&(e.hasChildren()||i.lengthi[s]===r)}return n===e}function AN(n){return Array.prototype.concat.apply([],n)}function TN(n){return n.length>0?n[n.length-1]:null}function ss(n,e){for(const t in n)n.hasOwnProperty(t)&&e(n[t],t)}function Wd(n){return t1(n)?n:Sv(n)?Ri(Promise.resolve(n)):dt(n)}const Hw=!1,g7={exact:function RN(n,e,t){if(!xh(n.segments,e.segments)||!Gw(n.segments,e.segments,t)||n.numberOfChildren!==e.numberOfChildren)return!1;for(const i in e.children)if(!n.children[i]||!RN(n.children[i],e.children[i],t))return!1;return!0},subset:PN},DN={exact:function _7(n,e){return zl(n,e)},subset:function v7(n,e){return Object.keys(e).length<=Object.keys(n).length&&Object.keys(e).every(t=>EN(n[t],e[t]))},ignored:()=>!0};function IN(n,e,t){return g7[t.paths](n.root,e.root,t.matrixParams)&&DN[t.queryParams](n.queryParams,e.queryParams)&&!("exact"===t.fragment&&n.fragment!==e.fragment)}function PN(n,e,t){return kN(n,e,e.segments,t)}function kN(n,e,t,i){if(n.segments.length>t.length){const r=n.segments.slice(0,t.length);return!(!xh(r,t)||e.hasChildren()||!Gw(r,t,i))}if(n.segments.length===t.length){if(!xh(n.segments,t)||!Gw(n.segments,t,i))return!1;for(const r in e.children)if(!n.children[r]||!PN(n.children[r],e.children[r],i))return!1;return!0}{const r=t.slice(0,n.segments.length),s=t.slice(n.segments.length);return!!(xh(n.segments,r)&&Gw(n.segments,r,i)&&n.children[sn])&&kN(n.children[sn],e,s,i)}}function Gw(n,e,t){return e.every((i,r)=>DN[t](n[r].parameters,i.parameters))}class $d{constructor(e=new xn([],{}),t={},i=null){this.root=e,this.queryParams=t,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Zp(this.queryParams)),this._queryParamMap}toString(){return x7.serialize(this)}}class xn{constructor(e,t){this.segments=e,this.children=t,this.parent=null,ss(t,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Ww(this)}}class qv{constructor(e,t){this.path=e,this.parameters=t}get parameterMap(){return this._parameterMap||(this._parameterMap=Zp(this.parameters)),this._parameterMap}toString(){return FN(this)}}function xh(n,e){return n.length===e.length&&n.every((t,i)=>t.path===e[i].path)}let Yv=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:function(){return new MD},providedIn:"root"}),n})();class MD{parse(e){const t=new I7(e);return new $d(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(e){const t=`/${Kv(e.root,!0)}`,i=function S7(n){const e=Object.keys(n).map(t=>{const i=n[t];return Array.isArray(i)?i.map(r=>`${$w(t)}=${$w(r)}`).join("&"):`${$w(t)}=${$w(i)}`}).filter(t=>!!t);return e.length?`?${e.join("&")}`:""}(e.queryParams);return`${t}${i}${"string"==typeof e.fragment?`#${function w7(n){return encodeURI(n)}(e.fragment)}`:""}`}}const x7=new MD;function Ww(n){return n.segments.map(e=>FN(e)).join("/")}function Kv(n,e){if(!n.hasChildren())return Ww(n);if(e){const t=n.children[sn]?Kv(n.children[sn],!1):"",i=[];return ss(n.children,(r,s)=>{s!==sn&&i.push(`${s}:${Kv(r,!1)}`)}),i.length>0?`${t}(${i.join("//")})`:t}{const t=function b7(n,e){let t=[];return ss(n.children,(i,r)=>{r===sn&&(t=t.concat(e(i,r)))}),ss(n.children,(i,r)=>{r!==sn&&(t=t.concat(e(i,r)))}),t}(n,(i,r)=>r===sn?[Kv(n.children[sn],!1)]:[`${r}:${Kv(i,!1)}`]);return 1===Object.keys(n.children).length&&null!=n.children[sn]?`${Ww(n)}/${t[0]}`:`${Ww(n)}/(${t.join("//")})`}}function ON(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function $w(n){return ON(n).replace(/%3B/gi,";")}function SD(n){return ON(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function jw(n){return decodeURIComponent(n)}function LN(n){return jw(n.replace(/\+/g,"%20"))}function FN(n){return`${SD(n.path)}${function M7(n){return Object.keys(n).map(e=>`;${SD(e)}=${SD(n[e])}`).join("")}(n.parameters)}`}const C7=/^[^\/()?;=#]+/;function Xw(n){const e=n.match(C7);return e?e[0]:""}const E7=/^[^=?&#]+/,T7=/^[^&#]+/;class I7{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new xn([],{}):new xn([],this.parseChildren())}parseQueryParams(){const e={};if(this.consumeOptional("?"))do{this.parseQueryParam(e)}while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(i[sn]=new xn(e,t)),i}parseSegment(){const e=Xw(this.remaining);if(""===e&&this.peekStartsWith(";"))throw new fe(4009,Hw);return this.capture(e),new qv(jw(e),this.parseMatrixParams())}parseMatrixParams(){const e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){const t=Xw(this.remaining);if(!t)return;this.capture(t);let i="";if(this.consumeOptional("=")){const r=Xw(this.remaining);r&&(i=r,this.capture(i))}e[jw(t)]=jw(i)}parseQueryParam(e){const t=function A7(n){const e=n.match(E7);return e?e[0]:""}(this.remaining);if(!t)return;this.capture(t);let i="";if(this.consumeOptional("=")){const o=function D7(n){const e=n.match(T7);return e?e[0]:""}(this.remaining);o&&(i=o,this.capture(i))}const r=LN(t),s=LN(i);if(e.hasOwnProperty(r)){let o=e[r];Array.isArray(o)||(o=[o],e[r]=o),o.push(s)}else e[r]=s}parseParens(e){const t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=Xw(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new fe(4010,Hw);let s;i.indexOf(":")>-1?(s=i.slice(0,i.indexOf(":")),this.capture(s),this.capture(":")):e&&(s=sn);const o=this.parseChildren();t[s]=1===Object.keys(o).length?o[sn]:new xn([],o),this.consumeOptional("//")}return t}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return!!this.peekStartsWith(e)&&(this.remaining=this.remaining.substring(e.length),!0)}capture(e){if(!this.consumeOptional(e))throw new fe(4011,Hw)}}function CD(n){return n.segments.length>0?new xn([],{[sn]:n}):n}function qw(n){const e={};for(const i of Object.keys(n.children)){const s=qw(n.children[i]);(s.segments.length>0||s.hasChildren())&&(e[i]=s)}return function R7(n){if(1===n.numberOfChildren&&n.children[sn]){const e=n.children[sn];return new xn(n.segments.concat(e.segments),e.children)}return n}(new xn(n.segments,e))}function wh(n){return n instanceof $d}const ED=!1;function P7(n,e,t,i,r){if(0===t.length)return Qp(e.root,e.root,e.root,i,r);const s=function zN(n){if("string"==typeof n[0]&&1===n.length&&"/"===n[0])return new VN(!0,0,n);let e=0,t=!1;const i=n.reduce((r,s,o)=>{if("object"==typeof s&&null!=s){if(s.outlets){const a={};return ss(s.outlets,(l,c)=>{a[c]="string"==typeof l?l.split("/"):l}),[...r,{outlets:a}]}if(s.segmentPath)return[...r,s.segmentPath]}return"string"!=typeof s?[...r,s]:0===o?(s.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?t=!0:".."===a?e++:""!=a&&r.push(a))}),r):[...r,s]},[]);return new VN(t,e,i)}(t);return s.toRoot()?Qp(e.root,e.root,new xn([],{}),i,r):function o(l){const c=function O7(n,e,t,i){if(n.isAbsolute)return new Jp(e.root,!0,0);if(-1===i)return new Jp(t,t===e.root,0);return function HN(n,e,t){let i=n,r=e,s=t;for(;s>r;){if(s-=r,i=i.parent,!i)throw new fe(4005,ED&&"Invalid number of '../'");r=i.segments.length}return new Jp(i,!1,r-s)}(t,i+(Zv(n.commands[0])?0:1),n.numberOfDoubleDots)}(s,e,n.snapshot?._urlSegment,l),u=c.processChildren?em(c.segmentGroup,c.index,s.commands):AD(c.segmentGroup,c.index,s.commands);return Qp(e.root,c.segmentGroup,u,i,r)}(n.snapshot?._lastPathIndex)}function Zv(n){return"object"==typeof n&&null!=n&&!n.outlets&&!n.segmentPath}function Qv(n){return"object"==typeof n&&null!=n&&n.outlets}function Qp(n,e,t,i,r){let o,s={};i&&ss(i,(l,c)=>{s[c]=Array.isArray(l)?l.map(u=>`${u}`):`${l}`}),o=n===e?t:UN(n,e,t);const a=CD(qw(o));return new $d(a,s,r)}function UN(n,e,t){const i={};return ss(n.children,(r,s)=>{i[s]=r===e?t:UN(r,e,t)}),new xn(n.segments,i)}class VN{constructor(e,t,i){if(this.isAbsolute=e,this.numberOfDoubleDots=t,this.commands=i,e&&i.length>0&&Zv(i[0]))throw new fe(4003,ED&&"Root segment cannot have matrix parameters");const r=i.find(Qv);if(r&&r!==TN(i))throw new fe(4004,ED&&"{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Jp{constructor(e,t,i){this.segmentGroup=e,this.processChildren=t,this.index=i}}function AD(n,e,t){if(n||(n=new xn([],{})),0===n.segments.length&&n.hasChildren())return em(n,e,t);const i=function F7(n,e,t){let i=0,r=e;const s={match:!1,pathIndex:0,commandIndex:0};for(;r=t.length)return s;const o=n.segments[r],a=t[i];if(Qv(a))break;const l=`${a}`,c=i0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!WN(l,c,o))return s;i+=2}else{if(!WN(l,{},o))return s;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(n,e,t),r=t.slice(i.commandIndex);if(i.match&&i.pathIndex{"string"==typeof s&&(s=[s]),null!==s&&(r[o]=AD(n.children[o],e,s))}),ss(n.children,(s,o)=>{void 0===i[o]&&(r[o]=s)}),new xn(n.segments,r)}}function TD(n,e,t){const i=n.segments.slice(0,e);let r=0;for(;r{"string"==typeof t&&(t=[t]),null!==t&&(e[i]=TD(new xn([],{}),0,t))}),e}function GN(n){const e={};return ss(n,(t,i)=>e[i]=`${t}`),e}function WN(n,e,t){return n==t.path&&zl(e,t.parameters)}const Jv="imperative";class Hl{constructor(e,t){this.id=e,this.url=t}}class DD extends Hl{constructor(e,t,i="imperative",r=null){super(e,t),this.type=0,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Mh extends Hl{constructor(e,t,i){super(e,t),this.urlAfterRedirects=i,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class Yw extends Hl{constructor(e,t,i,r){super(e,t),this.reason=i,this.code=r,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class Kw extends Hl{constructor(e,t,i,r){super(e,t),this.reason=i,this.code=r,this.type=16}}class ID extends Hl{constructor(e,t,i,r){super(e,t),this.error=i,this.target=r,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class B7 extends Hl{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class U7 extends Hl{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class V7 extends Hl{constructor(e,t,i,r,s){super(e,t),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=s,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class z7 extends Hl{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class H7 extends Hl{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class G7{constructor(e){this.route=e,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class W7{constructor(e){this.route=e,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class $7{constructor(e){this.snapshot=e,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class j7{constructor(e){this.snapshot=e,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class X7{constructor(e){this.snapshot=e,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class q7{constructor(e){this.snapshot=e,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class $N{constructor(e,t,i){this.routerEvent=e,this.position=t,this.anchor=i,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}let Z7=(()=>{class n{createUrlTree(t,i,r,s,o,a){return P7(t||i.root,r,s,o,a)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),J7=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:function(e){return Z7.\u0275fac(e)},providedIn:"root"}),n})();class jN{constructor(e){this._root=e}get root(){return this._root.value}parent(e){const t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}children(e){const t=RD(e,this._root);return t?t.children.map(i=>i.value):[]}firstChild(e){const t=RD(e,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(e){const t=PD(e,this._root);return t.length<2?[]:t[t.length-2].children.map(r=>r.value).filter(r=>r!==e)}pathFromRoot(e){return PD(e,this._root).map(t=>t.value)}}function RD(n,e){if(n===e.value)return e;for(const t of e.children){const i=RD(n,t);if(i)return i}return null}function PD(n,e){if(n===e.value)return[e];for(const t of e.children){const i=PD(n,t);if(i.length)return i.unshift(e),i}return[]}class Uc{constructor(e,t){this.value=e,this.children=t}toString(){return`TreeNode(${this.value})`}}function tm(n){const e={};return n&&n.children.forEach(t=>e[t.value.outlet]=t),e}class XN extends jN{constructor(e,t){super(e),this.snapshot=t,kD(this,e)}toString(){return this.snapshot.toString()}}function qN(n,e){const t=function eX(n,e){const o=new Zw([],{},{},"",{},sn,e,null,n.root,-1,{});return new KN("",new Uc(o,[]))}(n,e),i=new Ct([new qv("",{})]),r=new Ct({}),s=new Ct({}),o=new Ct({}),a=new Ct(""),l=new nm(i,r,o,a,s,sn,e,t.root);return l.snapshot=t.root,new XN(new Uc(l,[]),t)}class nm{constructor(e,t,i,r,s,o,a,l){this.url=e,this.params=t,this.queryParams=i,this.fragment=r,this.data=s,this.outlet=o,this.component=a,this.title=this.data?.pipe(Ye(c=>c[Xv]))??dt(void 0),this._futureSnapshot=l}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(Ye(e=>Zp(e)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(Ye(e=>Zp(e)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function YN(n,e="emptyOnly"){const t=n.pathFromRoot;let i=0;if("always"!==e)for(i=t.length-1;i>=1;){const r=t[i],s=t[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(s.component)break;i--}}return function tX(n){return n.reduce((e,t)=>({params:{...e.params,...t.params},data:{...e.data,...t.data},resolve:{...t.data,...e.resolve,...t.routeConfig?.data,...t._resolvedData}}),{params:{},data:{},resolve:{}})}(t.slice(i))}class Zw{get title(){return this.data?.[Xv]}constructor(e,t,i,r,s,o,a,l,c,u,h){this.url=e,this.params=t,this.queryParams=i,this.fragment=r,this.data=s,this.outlet=o,this.component=a,this.routeConfig=l,this._urlSegment=c,this._lastPathIndex=u,this._resolve=h}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Zp(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Zp(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class KN extends jN{constructor(e,t){super(t),this.url=e,kD(this,t)}toString(){return ZN(this._root)}}function kD(n,e){e.value._routerState=n,e.children.forEach(t=>kD(n,t))}function ZN(n){const e=n.children.length>0?` { ${n.children.map(ZN).join(", ")} } `:"";return`${n.value}${e}`}function OD(n){if(n.snapshot){const e=n.snapshot,t=n._futureSnapshot;n.snapshot=t,zl(e.queryParams,t.queryParams)||n.queryParams.next(t.queryParams),e.fragment!==t.fragment&&n.fragment.next(t.fragment),zl(e.params,t.params)||n.params.next(t.params),function m7(n,e){if(n.length!==e.length)return!1;for(let t=0;tzl(t.parameters,e[i].parameters))}(n.url,e.url);return t&&!(!n.parent!=!e.parent)&&(!n.parent||LD(n.parent,e.parent))}function ey(n,e,t){if(t&&n.shouldReuseRoute(e.value,t.value.snapshot)){const i=t.value;i._futureSnapshot=e.value;const r=function iX(n,e,t){return e.children.map(i=>{for(const r of t.children)if(n.shouldReuseRoute(i.value,r.value.snapshot))return ey(n,i,r);return ey(n,i)})}(n,e,t);return new Uc(i,r)}{if(n.shouldAttach(e.value)){const s=n.retrieve(e.value);if(null!==s){const o=s.route;return o.value._futureSnapshot=e.value,o.children=e.children.map(a=>ey(n,a)),o}}const i=function rX(n){return new nm(new Ct(n.url),new Ct(n.params),new Ct(n.queryParams),new Ct(n.fragment),new Ct(n.data),n.outlet,n.component,n)}(e.value),r=e.children.map(s=>ey(n,s));return new Uc(i,r)}}const FD="ngNavigationCancelingError";function QN(n,e){const{redirectTo:t,navigationBehaviorOptions:i}=wh(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,r=JN(!1,0,e);return r.url=t,r.navigationBehaviorOptions=i,r}function JN(n,e,t){const i=new Error("NavigationCancelingError: "+(n||""));return i[FD]=!0,i.cancellationCode=e,t&&(i.url=t),i}function eB(n){return tB(n)&&wh(n.url)}function tB(n){return n&&n[FD]}class sX{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new ty,this.attachRef=null}}let ty=(()=>{class n{constructor(){this.contexts=new Map}onChildOutletCreated(t,i){const r=this.getOrCreateContext(t);r.outlet=i,this.contexts.set(t,r)}onChildOutletDestroyed(t){const i=this.getContext(t);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let i=this.getContext(t);return i||(i=new sX,this.contexts.set(t,i)),i}getContext(t){return this.contexts.get(t)||null}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Qw=!1;let nB=(()=>{class n{constructor(){this.activated=null,this._activatedRoute=null,this.name=sn,this.activateEvents=new it,this.deactivateEvents=new it,this.attachEvents=new it,this.detachEvents=new it,this.parentContexts=Ot(ty),this.location=Ot(is),this.changeDetector=Ot(ci),this.environmentInjector=Ot($a)}ngOnChanges(t){if(t.name){const{firstChange:i,previousValue:r}=t.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name)}isTrackedInParentContexts(t){return this.parentContexts.getContext(t)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const t=this.parentContexts.getContext(this.name);t?.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new fe(4012,Qw);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new fe(4012,Qw);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new fe(4012,Qw);this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(t.instance),t}attach(t,i){this.activated=t,this._activatedRoute=i,this.location.insert(t.hostView),this.attachEvents.emit(t.instance)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,i){if(this.isActivated)throw new fe(4013,Qw);this._activatedRoute=t;const r=this.location,o=t.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new oX(t,a,r.injector);if(i&&function aX(n){return!!n.resolveComponentFactory}(i)){const c=i.resolveComponentFactory(o);this.activated=r.createComponent(c,r.length,l)}else this.activated=r.createComponent(o,{index:r.length,injector:l,environmentInjector:i??this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[zi]}),n})();class oX{constructor(e,t,i){this.route=e,this.childContexts=t,this.parent=i}get(e,t){return e===nm?this.route:e===ty?this.childContexts:this.parent.get(e,t)}}let ND=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=ht({type:n,selectors:[["ng-component"]],standalone:!0,features:[v1],decls:1,vars:0,template:function(t,i){1&t&&Fe(0,"router-outlet")},dependencies:[nB],encapsulation:2}),n})();function iB(n,e){return n.providers&&!n._injector&&(n._injector=fw(n.providers,e,`Route: ${n.path}`)),n._injector??e}function UD(n){const e=n.children&&n.children.map(UD),t=e?{...n,children:e}:{...n};return!t.component&&!t.loadComponent&&(e||t.loadChildren)&&t.outlet&&t.outlet!==sn&&(t.component=ND),t}function ya(n){return n.outlet||sn}function rB(n,e){const t=n.filter(i=>ya(i)===e);return t.push(...n.filter(i=>ya(i)!==e)),t}function ny(n){if(!n)return null;if(n.routeConfig?._injector)return n.routeConfig._injector;for(let e=n.parent;e;e=e.parent){const t=e.routeConfig;if(t?._loadedInjector)return t._loadedInjector;if(t?._injector)return t._injector}return null}class hX{constructor(e,t,i,r){this.routeReuseStrategy=e,this.futureState=t,this.currState=i,this.forwardEvent=r}activate(e){const t=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,i,e),OD(this.futureState.root),this.activateChildRoutes(t,i,e)}deactivateChildRoutes(e,t,i){const r=tm(t);e.children.forEach(s=>{const o=s.value.outlet;this.deactivateRoutes(s,r[o],i),delete r[o]}),ss(r,(s,o)=>{this.deactivateRouteAndItsChildren(s,i)})}deactivateRoutes(e,t,i){const r=e.value,s=t?t.value:null;if(r===s)if(r.component){const o=i.getContext(r.outlet);o&&this.deactivateChildRoutes(e,t,o.children)}else this.deactivateChildRoutes(e,t,i);else s&&this.deactivateRouteAndItsChildren(t,i)}deactivateRouteAndItsChildren(e,t){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}detachAndStoreRouteSubtree(e,t){const i=t.getContext(e.value.outlet),r=i&&e.value.component?i.children:t,s=tm(e);for(const o of Object.keys(s))this.deactivateRouteAndItsChildren(s[o],r);if(i&&i.outlet){const o=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:o,route:e,contexts:a})}}deactivateRouteAndOutlet(e,t){const i=t.getContext(e.value.outlet),r=i&&e.value.component?i.children:t,s=tm(e);for(const o of Object.keys(s))this.deactivateRouteAndItsChildren(s[o],r);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.resolver=null,i.route=null)}activateChildRoutes(e,t,i){const r=tm(t);e.children.forEach(s=>{this.activateRoutes(s,r[s.value.outlet],i),this.forwardEvent(new q7(s.value.snapshot))}),e.children.length&&this.forwardEvent(new j7(e.value.snapshot))}activateRoutes(e,t,i){const r=e.value,s=t?t.value:null;if(OD(r),r===s)if(r.component){const o=i.getOrCreateContext(r.outlet);this.activateChildRoutes(e,t,o.children)}else this.activateChildRoutes(e,t,i);else if(r.component){const o=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),o.children.onOutletReAttached(a.contexts),o.attachRef=a.componentRef,o.route=a.route.value,o.outlet&&o.outlet.attach(a.componentRef,a.route.value),OD(a.route.value),this.activateChildRoutes(e,null,o.children)}else{const a=ny(r.snapshot),l=a?.get(Ol)??null;o.attachRef=null,o.route=r,o.resolver=l,o.injector=a,o.outlet&&o.outlet.activateWith(r,o.injector),this.activateChildRoutes(e,null,o.children)}}else this.activateChildRoutes(e,null,i)}}class sB{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}}class Jw{constructor(e,t){this.component=e,this.route=t}}function fX(n,e,t){const i=n._root;return iy(i,e?e._root:null,t,[i.value])}function im(n,e){const t=Symbol(),i=e.get(n,t);return i===t?"function"!=typeof n||function Yb(n){return null!==Af(n)}(n)?e.get(n):n:i}function iy(n,e,t,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=tm(e);return n.children.forEach(o=>{(function mX(n,e,t,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=n.value,o=e?e.value:null,a=t?t.getContext(n.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){const l=function gX(n,e,t){if("function"==typeof t)return t(n,e);switch(t){case"pathParamsChange":return!xh(n.url,e.url);case"pathParamsOrQueryParamsChange":return!xh(n.url,e.url)||!zl(n.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!LD(n,e)||!zl(n.queryParams,e.queryParams);default:return!LD(n,e)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new sB(i)):(s.data=o.data,s._resolvedData=o._resolvedData),iy(n,e,s.component?a?a.children:null:t,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Jw(a.outlet.component,o))}else o&&ry(e,a,r),r.canActivateChecks.push(new sB(i)),iy(n,null,s.component?a?a.children:null:t,i,r)})(o,s[o.value.outlet],t,i.concat([o.value]),r),delete s[o.value.outlet]}),ss(s,(o,a)=>ry(o,t.getContext(a),r)),r}function ry(n,e,t){const i=tm(n),r=n.value;ss(i,(s,o)=>{ry(s,r.component?e?e.children.getContext(o):null:e,t)}),t.canDeactivateChecks.push(new Jw(r.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,r))}function sy(n){return"function"==typeof n}function VD(n){return n instanceof Wv||"EmptyError"===n?.name}const eM=Symbol("INITIAL_VALUE");function rm(){return gs(n=>Vd(n.map(e=>e.pipe(Li(1),No(eM)))).pipe(Ye(e=>{for(const t of e)if(!0!==t){if(t===eM)return eM;if(!1===t||t instanceof $d)return t}return!0}),On(e=>e!==eM),Li(1)))}function oB(n){return function ZC(...n){return Ab(n)}(Ii(e=>{if(wh(e))throw QN(0,e)}),Ye(e=>!0===e))}const zD={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function aB(n,e,t,i,r){const s=HD(n,e,t);return s.matched?function kX(n,e,t,i){const r=e.canMatch;return r&&0!==r.length?dt(r.map(o=>{const a=im(o,n);return Wd(function wX(n){return n&&sy(n.canMatch)}(a)?a.canMatch(e,t):n.runInContext(()=>a(e,t)))})).pipe(rm(),oB()):dt(!0)}(i=iB(e,i),e,t).pipe(Ye(o=>!0===o?s:{...zD})):dt(s)}function HD(n,e,t){if(""===e.path)return"full"===e.pathMatch&&(n.hasChildren()||t.length>0)?{...zD}:{matched:!0,consumedSegments:[],remainingSegments:t,parameters:{},positionalParamSegments:{}};const r=(e.matcher||p7)(t,n,e);if(!r)return{...zD};const s={};ss(r.posParams,(a,l)=>{s[l]=a.path});const o=r.consumed.length>0?{...s,...r.consumed[r.consumed.length-1].parameters}:s;return{matched:!0,consumedSegments:r.consumed,remainingSegments:t.slice(r.consumed.length),parameters:o,positionalParamSegments:r.posParams??{}}}function tM(n,e,t,i){if(t.length>0&&function FX(n,e,t){return t.some(i=>nM(n,e,i)&&ya(i)!==sn)}(n,t,i)){const s=new xn(e,function LX(n,e,t,i){const r={};r[sn]=i,i._sourceSegment=n,i._segmentIndexShift=e.length;for(const s of t)if(""===s.path&&ya(s)!==sn){const o=new xn([],{});o._sourceSegment=n,o._segmentIndexShift=e.length,r[ya(s)]=o}return r}(n,e,i,new xn(t,n.children)));return s._sourceSegment=n,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:[]}}if(0===t.length&&function NX(n,e,t){return t.some(i=>nM(n,e,i))}(n,t,i)){const s=new xn(n.segments,function OX(n,e,t,i,r){const s={};for(const o of i)if(nM(n,t,o)&&!r[ya(o)]){const a=new xn([],{});a._sourceSegment=n,a._segmentIndexShift=e.length,s[ya(o)]=a}return{...r,...s}}(n,e,t,i,n.children));return s._sourceSegment=n,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:t}}const r=new xn(n.segments,n.children);return r._sourceSegment=n,r._segmentIndexShift=e.length,{segmentGroup:r,slicedSegments:t}}function nM(n,e,t){return(!(n.hasChildren()||e.length>0)||"full"!==t.pathMatch)&&""===t.path}function lB(n,e,t,i){return!!(ya(n)===i||i!==sn&&nM(e,t,n))&&("**"===n.path||HD(e,n,t).matched)}function cB(n,e,t){return 0===e.length&&!n.children[t]}const iM=!1;class rM{constructor(e){this.segmentGroup=e||null}}class dB{constructor(e){this.urlTree=e}}function oy(n){return Kp(new rM(n))}function uB(n){return Kp(new dB(n))}class zX{constructor(e,t,i,r,s){this.injector=e,this.configLoader=t,this.urlSerializer=i,this.urlTree=r,this.config=s,this.allowRedirects=!0}apply(){const e=tM(this.urlTree.root,[],[],this.config).segmentGroup,t=new xn(e.segments,e.children);return this.expandSegmentGroup(this.injector,this.config,t,sn).pipe(Ye(s=>this.createUrlTree(qw(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Bc(s=>{if(s instanceof dB)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof rM?this.noMatchError(s):s}))}match(e){return this.expandSegmentGroup(this.injector,this.config,e.root,sn).pipe(Ye(r=>this.createUrlTree(qw(r),e.queryParams,e.fragment))).pipe(Bc(r=>{throw r instanceof rM?this.noMatchError(r):r}))}noMatchError(e){return new fe(4002,iM)}createUrlTree(e,t,i){const r=CD(e);return new $d(r,t,i)}expandSegmentGroup(e,t,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(e,t,i).pipe(Ye(s=>new xn([],s))):this.expandSegment(e,i,t,i.segments,r,!0)}expandChildren(e,t,i){const r=[];for(const s of Object.keys(i.children))"primary"===s?r.unshift(s):r.push(s);return Ri(r).pipe(Hd(s=>{const o=i.children[s],a=rB(t,s);return this.expandSegmentGroup(e,a,o,s).pipe(Ye(l=>({segment:l,outlet:s})))}),wN((s,o)=>(s[o.outlet]=o.segment,s),{}),MN())}expandSegment(e,t,i,r,s,o){return Ri(i).pipe(Hd(a=>this.expandSegmentAgainstRoute(e,t,i,a,r,s,o).pipe(Bc(c=>{if(c instanceof rM)return dt(null);throw c}))),zd(a=>!!a),Bc((a,l)=>{if(VD(a))return cB(t,r,s)?dt(new xn([],{})):oy(t);throw a}))}expandSegmentAgainstRoute(e,t,i,r,s,o,a){return lB(r,t,s,o)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(e,t,r,s,o):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(e,t,i,r,s,o):oy(t):oy(t)}expandSegmentAgainstRouteUsingRedirect(e,t,i,r,s,o){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(e,i,r,o):this.expandRegularSegmentAgainstRouteUsingRedirect(e,t,i,r,s,o)}expandWildCardWithParamsAgainstRouteUsingRedirect(e,t,i,r){const s=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?uB(s):this.lineralizeSegments(i,s).pipe(er(o=>{const a=new xn(o,{});return this.expandSegment(e,a,t,o,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(e,t,i,r,s,o){const{matched:a,consumedSegments:l,remainingSegments:c,positionalParamSegments:u}=HD(t,r,s);if(!a)return oy(t);const h=this.applyRedirectCommands(l,r.redirectTo,u);return r.redirectTo.startsWith("/")?uB(h):this.lineralizeSegments(r,h).pipe(er(p=>this.expandSegment(e,t,i,p.concat(c),o,!1)))}matchSegmentAgainstRoute(e,t,i,r,s){return"**"===i.path?(e=iB(i,e),i.loadChildren?(i._loadedRoutes?dt({routes:i._loadedRoutes,injector:i._loadedInjector}):this.configLoader.loadChildren(e,i)).pipe(Ye(a=>(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,new xn(r,{})))):dt(new xn(r,{}))):aB(t,i,r,e).pipe(gs(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(e=i._injector??e,i,r).pipe(er(u=>{const h=u.injector??e,p=u.routes,{segmentGroup:m,slicedSegments:g}=tM(t,a,l,p),b=new xn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(Ye(x=>new xn(a,x)));if(0===p.length&&0===g.length)return dt(new xn(a,{}));const y=ya(i)===s;return this.expandSegment(h,b,p,g,y?sn:s,!0).pipe(Ye(M=>new xn(a.concat(M.segments),M.children)))})):oy(t)))}getChildConfig(e,t,i){return t.children?dt({routes:t.children,injector:e}):t.loadChildren?void 0!==t._loadedRoutes?dt({routes:t._loadedRoutes,injector:t._loadedInjector}):function PX(n,e,t,i){const r=e.canLoad;return void 0===r||0===r.length?dt(!0):dt(r.map(o=>{const a=im(o,n);return Wd(function vX(n){return n&&sy(n.canLoad)}(a)?a.canLoad(e,t):n.runInContext(()=>a(e,t)))})).pipe(rm(),oB())}(e,t,i).pipe(er(r=>r?this.configLoader.loadChildren(e,t).pipe(Ii(s=>{t._loadedRoutes=s.routes,t._loadedInjector=s.injector})):function UX(n){return Kp(JN(iM,3))}())):dt({routes:[],injector:e})}lineralizeSegments(e,t){let i=[],r=t.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return dt(i);if(r.numberOfChildren>1||!r.children[sn])return e.redirectTo,Kp(new fe(4e3,iM));r=r.children[sn]}}applyRedirectCommands(e,t,i){return this.applyRedirectCreateUrlTree(t,this.urlSerializer.parse(t),e,i)}applyRedirectCreateUrlTree(e,t,i,r){const s=this.createSegmentGroup(e,t.root,i,r);return new $d(s,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(e,t){const i={};return ss(e,(r,s)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);i[s]=t[a]}else i[s]=r}),i}createSegmentGroup(e,t,i,r){const s=this.createSegments(e,t.segments,i,r);let o={};return ss(t.children,(a,l)=>{o[l]=this.createSegmentGroup(e,a,i,r)}),new xn(s,o)}createSegments(e,t,i,r){return t.map(s=>s.path.startsWith(":")?this.findPosParam(e,s,r):this.findOrReturn(s,i))}findPosParam(e,t,i){const r=i[t.path.substring(1)];if(!r)throw new fe(4001,iM);return r}findOrReturn(e,t){let i=0;for(const r of t){if(r.path===e.path)return t.splice(i),r;i++}return e}}class GX{}class jX{constructor(e,t,i,r,s,o,a){this.injector=e,this.rootComponentType=t,this.config=i,this.urlTree=r,this.url=s,this.paramsInheritanceStrategy=o,this.urlSerializer=a}recognize(){const e=tM(this.urlTree.root,[],[],this.config.filter(t=>void 0===t.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,e,sn).pipe(Ye(t=>{if(null===t)return null;const i=new Zw([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},sn,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Uc(i,t),s=new KN(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(e){const t=e.value,i=YN(t,this.paramsInheritanceStrategy);t.params=Object.freeze(i.params),t.data=Object.freeze(i.data),e.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(e,t,i,r){return 0===i.segments.length&&i.hasChildren()?this.processChildren(e,t,i):this.processSegment(e,t,i,i.segments,r)}processChildren(e,t,i){return Ri(Object.keys(i.children)).pipe(Hd(r=>{const s=i.children[r],o=rB(t,r);return this.processSegmentGroup(e,o,s,r)}),wN((r,s)=>r&&s?(r.push(...s),r):null),SN(r=>null!==r),zw(null),MN(),Ye(r=>{if(null===r)return null;const s=fB(r);return function XX(n){n.sort((e,t)=>e.value.outlet===sn?-1:t.value.outlet===sn?1:e.value.outlet.localeCompare(t.value.outlet))}(s),s}))}processSegment(e,t,i,r,s){return Ri(t).pipe(Hd(o=>this.processSegmentAgainstRoute(o._injector??e,o,i,r,s)),zd(o=>!!o),Bc(o=>{if(VD(o))return cB(i,r,s)?dt([]):dt(null);throw o}))}processSegmentAgainstRoute(e,t,i,r,s){if(t.redirectTo||!lB(t,i,r,s))return dt(null);let o;if("**"===t.path){const a=r.length>0?TN(r).parameters:{},l=mB(i)+r.length;o=dt({snapshot:new Zw(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,gB(t),ya(t),t.component??t._loadedComponent??null,t,pB(i),l,_B(t)),consumedSegments:[],remainingSegments:[]})}else o=aB(i,t,r,e).pipe(Ye(({matched:a,consumedSegments:l,remainingSegments:c,parameters:u})=>{if(!a)return null;const h=mB(i)+l.length;return{snapshot:new Zw(l,u,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,gB(t),ya(t),t.component??t._loadedComponent??null,t,pB(i),h,_B(t)),consumedSegments:l,remainingSegments:c}}));return o.pipe(gs(a=>{if(null===a)return dt(null);const{snapshot:l,consumedSegments:c,remainingSegments:u}=a;e=t._injector??e;const h=t._loadedInjector??e,p=function qX(n){return n.children?n.children:n.loadChildren?n._loadedRoutes:[]}(t),{segmentGroup:m,slicedSegments:g}=tM(i,c,u,p.filter(y=>void 0===y.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(Ye(y=>null===y?null:[new Uc(l,y)]));if(0===p.length&&0===g.length)return dt([new Uc(l,[])]);const b=ya(t)===s;return this.processSegment(h,p,m,g,b?sn:s).pipe(Ye(y=>null===y?null:[new Uc(l,y)]))}))}}function YX(n){const e=n.value.routeConfig;return e&&""===e.path&&void 0===e.redirectTo}function fB(n){const e=[],t=new Set;for(const i of n){if(!YX(i)){e.push(i);continue}const r=e.find(s=>i.value.routeConfig===s.value.routeConfig);void 0!==r?(r.children.push(...i.children),t.add(r)):e.push(i)}for(const i of t){const r=fB(i.children);e.push(new Uc(i.value,r))}return e.filter(i=>!t.has(i))}function pB(n){let e=n;for(;e._sourceSegment;)e=e._sourceSegment;return e}function mB(n){let e=n,t=e._segmentIndexShift??0;for(;e._sourceSegment;)e=e._sourceSegment,t+=e._segmentIndexShift??0;return t-1}function gB(n){return n.data||{}}function _B(n){return n.resolve||{}}function vB(n){return"string"==typeof n.title||null===n.title}function GD(n){return gs(e=>{const t=n(e);return t?Ri(t).pipe(Ye(()=>e)):dt(e)})}const sm=new ge("ROUTES");let WD=(()=>{class n{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Ot($F)}loadComponent(t){if(this.componentLoaders.get(t))return this.componentLoaders.get(t);if(t._loadedComponent)return dt(t._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(t);const i=Wd(t.loadComponent()).pipe(Ye(bB),Ii(s=>{this.onLoadEndListener&&this.onLoadEndListener(t),t._loadedComponent=s}),Gd(()=>{this.componentLoaders.delete(t)})),r=new bN(i,()=>new Ue).pipe(xD());return this.componentLoaders.set(t,r),r}loadChildren(t,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return dt({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const s=this.loadModuleFactoryOrRoutes(i.loadChildren).pipe(Ye(a=>{this.onLoadEndListener&&this.onLoadEndListener(i);let l,c,u=!1;Array.isArray(a)?c=a:(l=a.create(t).injector,c=AN(l.get(sm,[],At.Self|At.Optional)));return{routes:c.map(UD),injector:l}}),Gd(()=>{this.childrenLoaders.delete(i)})),o=new bN(s,()=>new Ue).pipe(xD());return this.childrenLoaders.set(i,o),o}loadModuleFactoryOrRoutes(t){return Wd(t()).pipe(Ye(bB),er(i=>i instanceof rF||Array.isArray(i)?dt(i):Ri(this.compiler.compileModuleAsync(i))))}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function bB(n){return function iq(n){return n&&"object"==typeof n&&"default"in n}(n)?n.default:n}let oM=(()=>{class n{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Ue,this.configLoader=Ot(WD),this.environmentInjector=Ot($a),this.urlSerializer=Ot(Yv),this.rootContexts=Ot(ty),this.navigationId=0,this.afterPreactivation=()=>dt(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new W7(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new G7(r))}complete(){this.transitions?.complete()}handleNavigationRequest(t){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...t,id:i})}setupNavigations(t){return this.transitions=new Ct({id:0,targetPageId:0,currentUrlTree:t.currentUrlTree,currentRawUrl:t.currentUrlTree,extractedUrl:t.urlHandlingStrategy.extract(t.currentUrlTree),urlAfterRedirects:t.urlHandlingStrategy.extract(t.currentUrlTree),rawUrl:t.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:Jv,restoredState:null,currentSnapshot:t.routerState.snapshot,targetSnapshot:null,currentRouterState:t.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(On(i=>0!==i.id),Ye(i=>({...i,extractedUrl:t.urlHandlingStrategy.extract(i.rawUrl)})),gs(i=>{let r=!1,s=!1;return dt(i).pipe(Ii(o=>{this.currentNavigation={id:o.id,initialUrl:o.rawUrl,extractedUrl:o.extractedUrl,trigger:o.source,extras:o.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),gs(o=>{const a=t.browserUrlTree.toString(),l=!t.navigated||o.extractedUrl.toString()!==a||a!==t.currentUrlTree.toString();if(!l&&"reload"!==(o.extras.onSameUrlNavigation??t.onSameUrlNavigation)){const u="";return this.events.next(new Kw(o.id,t.serializeUrl(i.rawUrl),u,0)),t.rawUrlTree=o.rawUrl,o.resolve(null),Is}if(t.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return xB(o.source)&&(t.browserUrlTree=o.extractedUrl),dt(o).pipe(gs(u=>{const h=this.transitions?.getValue();return this.events.next(new DD(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),h!==this.transitions?.getValue()?Is:Promise.resolve(u)}),function HX(n,e,t,i){return gs(r=>function VX(n,e,t,i,r){return new zX(n,e,t,i,r).apply()}(n,e,t,r.extractedUrl,i).pipe(Ye(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,t.config),Ii(u=>{this.currentNavigation={...this.currentNavigation,finalUrl:u.urlAfterRedirects},i.urlAfterRedirects=u.urlAfterRedirects}),function ZX(n,e,t,i,r){return er(s=>function $X(n,e,t,i,r,s,o="emptyOnly"){return new jX(n,e,t,i,r,o,s).recognize().pipe(gs(a=>null===a?function WX(n){return new Sn(e=>e.error(n))}(new GX):dt(a)))}(n,e,t,s.urlAfterRedirects,i.serialize(s.urlAfterRedirects),i,r).pipe(Ye(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,t.config,this.urlSerializer,t.paramsInheritanceStrategy),Ii(u=>{if(i.targetSnapshot=u.targetSnapshot,"eager"===t.urlUpdateStrategy){if(!u.extras.skipLocationChange){const p=t.urlHandlingStrategy.merge(u.urlAfterRedirects,u.rawUrl);t.setBrowserUrl(p,u)}t.browserUrlTree=u.urlAfterRedirects}const h=new B7(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(h)}));if(l&&t.urlHandlingStrategy.shouldProcessUrl(t.rawUrlTree)){const{id:u,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new DD(u,this.urlSerializer.serialize(h),p,m);this.events.next(b);const y=qN(h,this.rootComponentType).snapshot;return dt(i={...o,targetSnapshot:y,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const u="";return this.events.next(new Kw(o.id,t.serializeUrl(i.extractedUrl),u,1)),t.rawUrlTree=o.rawUrl,o.resolve(null),Is}}),Ii(o=>{const a=new U7(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),Ye(o=>i={...o,guards:fX(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function SX(n,e){return er(t=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=t;return 0===o.length&&0===s.length?dt({...t,guardsResult:!0}):function CX(n,e,t,i){return Ri(n).pipe(er(r=>function RX(n,e,t,i,r){const s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return s&&0!==s.length?dt(s.map(a=>{const l=ny(e)??r,c=im(a,l);return Wd(function xX(n){return n&&sy(n.canDeactivate)}(c)?c.canDeactivate(n,e,t,i):l.runInContext(()=>c(n,e,t,i))).pipe(zd())})).pipe(rm()):dt(!0)}(r.component,r.route,t,e,i)),zd(r=>!0!==r,!0))}(o,i,r,n).pipe(er(a=>a&&function _X(n){return"boolean"==typeof n}(a)?function EX(n,e,t,i){return Ri(e).pipe(Hd(r=>$v(function TX(n,e){return null!==n&&e&&e(new $7(n)),dt(!0)}(r.route.parent,i),function AX(n,e){return null!==n&&e&&e(new X7(n)),dt(!0)}(r.route,i),function IX(n,e,t){const i=e[e.length-1],s=e.slice(0,e.length-1).reverse().map(o=>function pX(n){const e=n.routeConfig?n.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:n,guards:e}:null}(o)).filter(o=>null!==o).map(o=>jv(()=>dt(o.guards.map(l=>{const c=ny(o.node)??t,u=im(l,c);return Wd(function bX(n){return n&&sy(n.canActivateChild)}(u)?u.canActivateChild(i,n):c.runInContext(()=>u(i,n))).pipe(zd())})).pipe(rm())));return dt(s).pipe(rm())}(n,r.path,t),function DX(n,e,t){const i=e.routeConfig?e.routeConfig.canActivate:null;if(!i||0===i.length)return dt(!0);const r=i.map(s=>jv(()=>{const o=ny(e)??t,a=im(s,o);return Wd(function yX(n){return n&&sy(n.canActivate)}(a)?a.canActivate(e,n):o.runInContext(()=>a(e,n))).pipe(zd())}));return dt(r).pipe(rm())}(n,r.route,t))),zd(r=>!0!==r,!0))}(i,s,n,e):dt(a)),Ye(a=>({...t,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Ii(o=>{if(i.guardsResult=o.guardsResult,wh(o.guardsResult))throw QN(0,o.guardsResult);const a=new V7(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),On(o=>!!o.guardsResult||(t.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),GD(o=>{if(o.guards.canActivateChecks.length)return dt(o).pipe(Ii(a=>{const l=new z7(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),gs(a=>{let l=!1;return dt(a).pipe(function QX(n,e){return er(t=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=t;if(!r.length)return dt(t);let s=0;return Ri(r).pipe(Hd(o=>function JX(n,e,t,i){const r=n.routeConfig,s=n._resolve;return void 0!==r?.title&&!vB(r)&&(s[Xv]=r.title),function eq(n,e,t,i){const r=function tq(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}(n);if(0===r.length)return dt({});const s={};return Ri(r).pipe(er(o=>function nq(n,e,t,i){const r=ny(e)??i,s=im(n,r);return Wd(s.resolve?s.resolve(e,t):r.runInContext(()=>s(e,t)))}(n[o],e,t,i).pipe(zd(),Ii(a=>{s[o]=a}))),wD(1),CN(s),Bc(o=>VD(o)?Is:Kp(o)))}(s,n,e,i).pipe(Ye(o=>(n._resolvedData=o,n.data=YN(n,t).resolve,r&&vB(r)&&(n.data[Xv]=r.title),null)))}(o.route,i,n,e)),Ii(()=>s++),wD(1),er(o=>s===r.length?dt(t):Is))})}(t.paramsInheritanceStrategy,this.environmentInjector),Ii({next:()=>l=!0,complete:()=>{l||(t.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Ii(a=>{const l=new H7(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),GD(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Ii(u=>{l.component=u}),Ye(()=>{})));for(const u of l.children)c.push(...a(u));return c};return Vd(a(o.targetSnapshot.root)).pipe(zw(),Li(1))}),GD(()=>this.afterPreactivation()),Ye(o=>{const a=function nX(n,e,t){const i=ey(n,e._root,t?t._root:void 0);return new XN(i,e)}(t.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return i={...o,targetRouterState:a}}),Ii(o=>{t.currentUrlTree=o.urlAfterRedirects,t.rawUrlTree=t.urlHandlingStrategy.merge(o.urlAfterRedirects,o.rawUrl),t.routerState=o.targetRouterState,"deferred"===t.urlUpdateStrategy&&(o.extras.skipLocationChange||t.setBrowserUrl(t.rawUrlTree,o),t.browserUrlTree=o.urlAfterRedirects)}),((n,e,t)=>Ye(i=>(new hX(e,i.targetRouterState,i.currentRouterState,t).activate(n),i)))(this.rootContexts,t.routeReuseStrategy,o=>this.events.next(o)),Li(1),Ii({next:o=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,t.navigated=!0,this.events.next(new Mh(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(t.currentUrlTree))),t.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),Gd(()=>{r||s||this.cancelNavigationTransition(i,"",1),this.currentNavigation?.id===i.id&&(this.currentNavigation=null)}),Bc(o=>{if(s=!0,tB(o)){eB(o)||(t.navigated=!0,t.restoreHistory(i,!0));const a=new Yw(i.id,this.urlSerializer.serialize(i.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),eB(o)){const l=t.urlHandlingStrategy.merge(o.url,t.rawUrlTree),c={skipLocationChange:i.extras.skipLocationChange,replaceUrl:"eager"===t.urlUpdateStrategy||xB(i.source)};t.scheduleNavigation(l,Jv,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}else i.resolve(!1)}else{t.restoreHistory(i,!0);const a=new ID(i.id,this.urlSerializer.serialize(i.extractedUrl),o,i.targetSnapshot??void 0);this.events.next(a);try{i.resolve(t.errorHandler(o))}catch(l){i.reject(l)}}return Is}))}))}cancelNavigationTransition(t,i,r){const s=new Yw(t.id,this.urlSerializer.serialize(t.extractedUrl),i,r);this.events.next(s),t.resolve(!1)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function xB(n){return n!==Jv}let wB=(()=>{class n{buildTitle(t){let i,r=t.root;for(;void 0!==r;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(s=>s.outlet===sn);return i}getResolvedTitleForRoute(t){return t.data[Xv]}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:function(){return Ot(rq)},providedIn:"root"}),n})(),rq=(()=>{class n extends wB{constructor(t){super(),this.title=t}updateTitle(t){const i=this.buildTitle(t);void 0!==i&&this.title.setTitle(i)}}return n.\u0275fac=function(t){return new(t||n)(Q(fN))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),sq=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:function(){return Ot(aq)},providedIn:"root"}),n})();class oq{shouldDetach(e){return!1}store(e,t){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,t){return e.routeConfig===t.routeConfig}}let aq=(()=>{class n extends oq{}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const aM=new ge("",{providedIn:"root",factory:()=>({})});let cq=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:function(){return Ot(dq)},providedIn:"root"}),n})(),dq=(()=>{class n{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,i){return t}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function uq(n){throw n}function hq(n,e,t){return e.parse("/")}const fq={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},pq={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Bo=(()=>{class n{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){if("computed"===this.canceledNavigationResolution)return this.location.getState()?.\u0275routerPageId}get events(){return this.navigationTransitions.events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=Ot(Y$),this.isNgZoneEnabled=!1,this.options=Ot(aM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||uq,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||hq,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Ot(cq),this.routeReuseStrategy=Ot(sq),this.urlCreationStrategy=Ot(J7),this.titleStrategy=Ot(wB),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=AN(Ot(sm,{optional:!0})??[]),this.navigationTransitions=Ot(oM),this.urlSerializer=Ot(Yv),this.location=Ot(Lv),this.isNgZoneEnabled=Ot(pt)instanceof pt&&pt.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new $d,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=qN(this.currentUrlTree,null),this.navigationTransitions.setupNavigations(this).subscribe(t=>{this.lastSuccessfulId=t.id,this.currentPageId=this.browserPageId??0},t=>{this.console.warn(`Unhandled Navigation Error: ${t}`)})}resetRootComponentType(t){this.routerState.root.component=t,this.navigationTransitions.rootComponentType=t}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const t=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),Jv,t)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{const i="popstate"===t.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{this.navigateToSyncWithBrowser(t.url,i,t.state)},0)}))}navigateToSyncWithBrowser(t,i,r){const s={replaceUrl:!0},o=r?.navigationId?r:null;if(r){const l={...r};delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(s.state=l)}const a=this.parseUrl(t);this.scheduleNavigation(a,i,o,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}resetConfig(t){this.config=t.map(UD),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(t,i={}){const{relativeTo:r,queryParams:s,fragment:o,queryParamsHandling:a,preserveFragment:l}=i,c=l?this.currentUrlTree.fragment:o;let u=null;switch(a){case"merge":u={...this.currentUrlTree.queryParams,...s};break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=s||null}return null!==u&&(u=this.removeEmptyProps(u)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,t,u,c??null)}navigateByUrl(t,i={skipLocationChange:!1}){const r=wh(t)?t:this.parseUrl(t),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Jv,null,i)}navigate(t,i={skipLocationChange:!1}){return function mq(n){for(let e=0;e{const s=t[r];return null!=s&&(i[r]=s),i},{})}scheduleNavigation(t,i,r,s,o){if(this.disposed)return Promise.resolve(!1);let a,l,c,u;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),u="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:u,source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:t,extras:s,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(h=>Promise.reject(h))}setBrowserUrl(t,i){const r=this.urlSerializer.serialize(t);if(this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl){const o={...i.extras.state,...this.generateNgRouterState(i.id,this.browserPageId)};this.location.replaceState(r,"",o)}else{const s={...i.extras.state,...this.generateNgRouterState(i.id,i.targetPageId)};this.location.go(r,"",s)}}restoreHistory(t,i=!1){if("computed"===this.canceledNavigationResolution){const s=this.currentPageId-(this.browserPageId??this.currentPageId);0!==s?this.location.historyGo(s):this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===s&&(this.resetState(t),this.browserUrlTree=t.currentUrlTree,this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(t),this.resetUrlToCurrentUrlTree())}resetState(t){this.routerState=t.currentRouterState,this.currentUrlTree=t.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(t,i){return"computed"===this.canceledNavigationResolution?{navigationId:t,\u0275routerPageId:i}:{navigationId:t}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class MB{}let vq=(()=>{class n{constructor(t,i,r,s,o){this.router=t,this.injector=r,this.preloadingStrategy=s,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(On(t=>t instanceof Mh),Hd(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,i){const r=[];for(const s of i){s.providers&&!s._injector&&(s._injector=fw(s.providers,t,`Route: ${s.path}`));const o=s._injector??t,a=s._loadedInjector??o;(s.loadChildren&&!s._loadedRoutes&&void 0===s.canLoad||s.loadComponent&&!s._loadedComponent)&&r.push(this.preloadConfig(o,s)),(s.children||s._loadedRoutes)&&r.push(this.processRoutes(a,s.children??s._loadedRoutes))}return Ri(r).pipe(cd())}preloadConfig(t,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(t,i):dt(null);const s=r.pipe(er(o=>null===o?dt(void 0):(i._loadedRoutes=o.routes,i._loadedInjector=o.injector,this.processRoutes(o.injector??t,o.routes))));return i.loadComponent&&!i._loadedComponent?Ri([s,this.loader.loadComponent(i)]).pipe(cd()):s})}}return n.\u0275fac=function(t){return new(t||n)(Q(Bo),Q($F),Q($a),Q(MB),Q(WD))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const XD=new ge("");let SB=(()=>{class n{constructor(t,i,r,s,o={}){this.urlSerializer=t,this.transitions=i,this.viewportScroller=r,this.zone=s,this.options=o,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},o.scrollPositionRestoration=o.scrollPositionRestoration||"disabled",o.anchorScrolling=o.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(t=>{t instanceof DD?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof Mh&&(this.lastId=t.id,this.scheduleScrollEvent(t,this.urlSerializer.parse(t.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(t=>{t instanceof $N&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new $N(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return n.\u0275fac=function(t){Ya()},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();var Uo=(()=>((Uo=Uo||{})[Uo.COMPLETE=0]="COMPLETE",Uo[Uo.FAILED=1]="FAILED",Uo[Uo.REDIRECTING=2]="REDIRECTING",Uo))();const om=!1;function jd(n,e){return{\u0275kind:n,\u0275providers:e}}const qD=new ge("",{providedIn:"root",factory:()=>!1});function EB(){const n=Ot(ki);return e=>{const t=n.get(qp);if(e!==t.components[0])return;const i=n.get(Bo),r=n.get(AB);1===n.get(YD)&&i.initialNavigation(),n.get(TB,null,At.Optional)?.setUpPreloading(),n.get(XD,null,At.Optional)?.init(),i.resetRootComponentType(t.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const AB=new ge(om?"bootstrap done indicator":"",{factory:()=>new Ue}),YD=new ge(om?"initial navigation":"",{providedIn:"root",factory:()=>1});function Mq(){let n=[];return n=om?[{provide:Mr,multi:!0,useFactory:()=>{const e=Ot(Bo);return()=>e.events.subscribe(t=>{console.group?.(`Router Event: ${t.constructor.name}`),console.log(function Y7(n){if(!("type"in n))return`Unknown Router Event: ${n.constructor.name}`;switch(n.type){case 14:return`ActivationEnd(path: '${n.snapshot.routeConfig?.path||""}')`;case 13:return`ActivationStart(path: '${n.snapshot.routeConfig?.path||""}')`;case 12:return`ChildActivationEnd(path: '${n.snapshot.routeConfig?.path||""}')`;case 11:return`ChildActivationStart(path: '${n.snapshot.routeConfig?.path||""}')`;case 8:return`GuardsCheckEnd(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}', state: ${n.state}, shouldActivate: ${n.shouldActivate})`;case 7:return`GuardsCheckStart(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}', state: ${n.state})`;case 2:return`NavigationCancel(id: ${n.id}, url: '${n.url}')`;case 16:return`NavigationSkipped(id: ${n.id}, url: '${n.url}')`;case 1:return`NavigationEnd(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}')`;case 3:return`NavigationError(id: ${n.id}, url: '${n.url}', error: ${n.error})`;case 0:return`NavigationStart(id: ${n.id}, url: '${n.url}')`;case 6:return`ResolveEnd(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}', state: ${n.state})`;case 5:return`ResolveStart(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}', state: ${n.state})`;case 10:return`RouteConfigLoadEnd(path: ${n.route.path})`;case 9:return`RouteConfigLoadStart(path: ${n.route.path})`;case 4:return`RoutesRecognized(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}', state: ${n.state})`;case 15:return`Scroll(anchor: '${n.anchor}', position: '${n.position?`${n.position[0]}, ${n.position[1]}`:null}')`}}(t)),console.log(t),console.groupEnd?.()})}}]:[],jd(1,n)}const TB=new ge(om?"router preloader":"");function Sq(n){return jd(0,[{provide:TB,useExisting:vq},{provide:MB,useExisting:n}])}const ay=!1,DB=new ge(ay?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),Cq=[Lv,{provide:Yv,useClass:MD},Bo,ty,{provide:nm,useFactory:function CB(n){return n.routerState.root},deps:[Bo]},WD,ay?{provide:qD,useValue:!0}:[]];function Eq(){return new JF("Router",Bo)}let IB=(()=>{class n{constructor(t){}static forRoot(t,i){return{ngModule:n,providers:[Cq,ay&&i?.enableTracing?Mq().\u0275providers:[],{provide:sm,multi:!0,useValue:t},{provide:DB,useFactory:Iq,deps:[[Bo,new Po,new Il]]},{provide:aM,useValue:i||{}},i?.useHash?{provide:bh,useClass:F6}:{provide:bh,useClass:M2},{provide:XD,useFactory:()=>{const n=Ot(Zj),e=Ot(pt),t=Ot(aM),i=Ot(oM),r=Ot(Yv);return t.scrollOffset&&n.setOffset(t.scrollOffset),new SB(r,i,n,e,t)}},i?.preloadingStrategy?Sq(i.preloadingStrategy).\u0275providers:[],{provide:JF,multi:!0,useFactory:Eq},i?.initialNavigation?Rq(i):[],[{provide:RB,useFactory:EB},{provide:QF,multi:!0,useExisting:RB}]]}}static forChild(t){return{ngModule:n,providers:[{provide:sm,multi:!0,useValue:t}]}}}return n.\u0275fac=function(t){return new(t||n)(Q(DB,8))},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[ND]}),n})();function Iq(n){if(ay&&n)throw new fe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function Rq(n){return["disabled"===n.initialNavigation?jd(3,[{provide:vw,multi:!0,useFactory:()=>{const e=Ot(Bo);return()=>{e.setUpLocationChangeListener()}}},{provide:YD,useValue:2}]).\u0275providers:[],"enabledBlocking"===n.initialNavigation?jd(2,[{provide:YD,useValue:0},{provide:vw,multi:!0,deps:[ki],useFactory:e=>{const t=e.get(O6,Promise.resolve());return()=>t.then(()=>new Promise(i=>{const r=e.get(Bo),s=e.get(AB);(function yq(n,e){n.events.pipe(On(t=>t instanceof Mh||t instanceof Yw||t instanceof ID||t instanceof Kw),Ye(t=>t instanceof Mh||t instanceof Kw?Uo.COMPLETE:t instanceof Yw&&(0===t.code||1===t.code)?Uo.REDIRECTING:Uo.FAILED),On(t=>t!==Uo.REDIRECTING),Li(1)).subscribe(()=>{e()})})(r,()=>{i(!0)}),e.get(oM).afterPreactivation=()=>(i(!0),s.closed?dt(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const RB=new ge(ay?"Router Initializer":""),kq=[];let Oq=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[IB.forRoot(kq),IB]}),n})();function PB(n,e,t,i,r,s,o){try{var a=n[s](o),l=a.value}catch(c){return void t(c)}a.done?e(l):Promise.resolve(l).then(i,r)}function xt(n){return function(){var e=this,t=arguments;return new Promise(function(i,r){var s=n.apply(e,t);function o(l){PB(s,i,r,o,a,"next",l)}function a(l){PB(s,i,r,o,a,"throw",l)}o(void 0)})}}function Cn(n){return null!=n&&"false"!=`${n}`}function Ys(n,e=0){return function Lq(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}(n)?Number(n):e}function lM(n){return Array.isArray(n)?n:[n]}function mr(n){return null==n?"":"string"==typeof n?n:`${n}px`}function Vc(n){return n instanceof yt?n.nativeElement:n}const Fq=["addListener","removeListener"],Nq=["addEventListener","removeEventListener"],Bq=["on","off"];function ba(n,e,t,i){if(Qt(t)&&(i=t,t=void 0),i)return ba(n,e,t).pipe(bD(i));const[r,s]=function zq(n){return Qt(n.addEventListener)&&Qt(n.removeEventListener)}(n)?Nq.map(o=>a=>n[o](e,a,t)):function Uq(n){return Qt(n.addListener)&&Qt(n.removeListener)}(n)?Fq.map(kB(n,e)):function Vq(n){return Qt(n.on)&&Qt(n.off)}(n)?Bq.map(kB(n,e)):[];if(!r&&kg(n))return er(o=>ba(o,e,t))(lr(n));if(!r)throw new TypeError("Invalid event target");return new Sn(o=>{const a=(...l)=>o.next(1s(a)})}function kB(n,e){return t=>i=>n[t](e,i)}class Hq extends un{constructor(e,t){super()}schedule(e,t=0){return this}}const cM={setInterval(n,e,...t){const{delegate:i}=cM;return i?.setInterval?i.setInterval(n,e,...t):setInterval(n,e,...t)},clearInterval(n){const{delegate:e}=cM;return(e?.clearInterval||clearInterval)(n)},delegate:void 0};class KD extends Hq{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){var i;if(this.closed)return this;this.state=e;const r=this.id,s=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(s,r,t)),this.pending=!0,this.delay=t,this.id=null!==(i=this.id)&&void 0!==i?i:this.requestAsyncId(s,this.id,t),this}requestAsyncId(e,t,i=0){return cM.setInterval(e.flush.bind(e,this),i)}recycleAsyncId(e,t,i=0){if(null!=i&&this.delay===i&&!1===this.pending)return t;null!=t&&cM.clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(e,t);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let r,i=!1;try{this.work(e)}catch(s){i=!0,r=s||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){const{id:e,scheduler:t}=this,{actions:i}=t;this.work=this.state=this.scheduler=null,this.pending=!1,Yr(i,this),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,super.unsubscribe()}}}const ly={schedule(n){let e=requestAnimationFrame,t=cancelAnimationFrame;const{delegate:i}=ly;i&&(e=i.requestAnimationFrame,t=i.cancelAnimationFrame);const r=e(s=>{t=void 0,n(s)});return new un(()=>t?.(r))},requestAnimationFrame(...n){const{delegate:e}=ly;return(e?.requestAnimationFrame||requestAnimationFrame)(...n)},cancelAnimationFrame(...n){const{delegate:e}=ly;return(e?.cancelAnimationFrame||cancelAnimationFrame)(...n)},delegate:void 0},OB={now:()=>(OB.delegate||Date).now(),delegate:void 0};class cy{constructor(e,t=cy.now){this.schedulerActionCtor=e,this.now=t}schedule(e,t=0,i){return new this.schedulerActionCtor(this,e).schedule(i,t)}}cy.now=OB.now;class ZD extends cy{constructor(e,t=cy.now){super(e,t),this.actions=[],this._active=!1}flush(e){const{actions:t}=this;if(this._active)return void t.push(e);let i;this._active=!0;do{if(i=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,i){for(;e=t.shift();)e.unsubscribe();throw i}}}const LB=new class Wq extends ZD{flush(e){this._active=!0;const t=this._scheduled;this._scheduled=void 0;const{actions:i}=this;let r;e=e||i.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=i[0])&&e.id===t&&i.shift());if(this._active=!1,r){for(;(e=i[0])&&e.id===t&&i.shift();)e.unsubscribe();throw r}}}(class Gq extends KD{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,i=0){return null!==i&&i>0?super.requestAsyncId(e,t,i):(e.actions.push(this),e._scheduled||(e._scheduled=ly.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,t,i=0){var r;if(null!=i?i>0:this.delay>0)return super.recycleAsyncId(e,t,i);const{actions:s}=e;null!=t&&(null===(r=s[s.length-1])||void 0===r?void 0:r.id)!==t&&(ly.cancelAnimationFrame(t),e._scheduled=void 0)}});let QD,$q=1;const dM={};function FB(n){return n in dM&&(delete dM[n],!0)}const jq={setImmediate(n){const e=$q++;return dM[e]=!0,QD||(QD=Promise.resolve()),QD.then(()=>FB(e)&&n()),e},clearImmediate(n){FB(n)}},{setImmediate:Xq,clearImmediate:qq}=jq,uM={setImmediate(...n){const{delegate:e}=uM;return(e?.setImmediate||Xq)(...n)},clearImmediate(n){const{delegate:e}=uM;return(e?.clearImmediate||qq)(n)},delegate:void 0},JD=new class Kq extends ZD{flush(e){this._active=!0;const t=this._scheduled;this._scheduled=void 0;const{actions:i}=this;let r;e=e||i.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=i[0])&&e.id===t&&i.shift());if(this._active=!1,r){for(;(e=i[0])&&e.id===t&&i.shift();)e.unsubscribe();throw r}}}(class Yq extends KD{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,i=0){return null!==i&&i>0?super.requestAsyncId(e,t,i):(e.actions.push(this),e._scheduled||(e._scheduled=uM.setImmediate(e.flush.bind(e,void 0))))}recycleAsyncId(e,t,i=0){var r;if(null!=i?i>0:this.delay>0)return super.recycleAsyncId(e,t,i);const{actions:s}=e;null!=t&&(null===(r=s[s.length-1])||void 0===r?void 0:r.id)!==t&&(uM.clearImmediate(t),e._scheduled=void 0)}}),dy=new ZD(KD),Zq=dy;function hM(n=0,e,t=Zq){let i=-1;return null!=e&&(Cu(e)?t=e:i=e),new Sn(r=>{let s=function Jq(n){return n instanceof Date&&!isNaN(n)}(n)?+n-t.now():n;s<0&&(s=0);let o=0;return t.schedule(function(){r.closed||(r.next(o++),0<=i?this.schedule(void 0,i):r.complete())},s)})}function fM(n,e=dy){return function Qq(n){return Gn((e,t)=>{let i=!1,r=null,s=null,o=!1;const a=()=>{if(s?.unsubscribe(),s=null,i){i=!1;const c=r;r=null,t.next(c)}o&&t.complete()},l=()=>{s=null,o&&t.complete()};e.subscribe(Un(t,c=>{i=!0,r=c,s||lr(n(c)).subscribe(s=Un(t,a,l))},()=>{o=!0,(!i||!s||s.closed)&&t.complete()}))})}(()=>hM(n,e))}function et(n){return Gn((e,t)=>{lr(n).subscribe(Un(t,()=>t.complete(),ls)),!t.closed&&e.subscribe(t)})}let eI;try{eI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{eI=!1}let am,Fi=(()=>{class n{constructor(t){this._platformId=t,this.isBrowser=this._platformId?function Kj(n){return n===G2}(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!eI)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return n.\u0275fac=function(t){return new(t||n)(Q(O1))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const NB=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function BB(){if(am)return am;if("object"!=typeof document||!document)return am=new Set(NB),am;let n=document.createElement("input");return am=new Set(NB.filter(e=>(n.setAttribute("type",e),n.type===e))),am}let uy,pM,Ch,tI;function Sh(n){return function eY(){if(null==uy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>uy=!0}))}finally{uy=uy||!1}return uy}()?n:!!n.capture}function UB(){if(null==Ch){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Ch=!1,Ch;if("scrollBehavior"in document.documentElement.style)Ch=!0;else{const n=Element.prototype.scrollTo;Ch=!!n&&!/\{\s*\[native code\]\s*\}/.test(n.toString())}}return Ch}function hy(){if("object"!=typeof document||!document)return 0;if(null==pM){const n=document.createElement("div"),e=n.style;n.dir="rtl",e.width="1px",e.overflow="auto",e.visibility="hidden",e.pointerEvents="none",e.position="absolute";const t=document.createElement("div"),i=t.style;i.width="2px",i.height="1px",n.appendChild(t),document.body.appendChild(n),pM=0,0===n.scrollLeft&&(n.scrollLeft=1,pM=0===n.scrollLeft?1:2),n.remove()}return pM}function mM(){let n=typeof document<"u"&&document?document.activeElement:null;for(;n&&n.shadowRoot;){const e=n.shadowRoot.activeElement;if(e===n)break;n=e}return n}function Xd(n){return n.composedPath?n.composedPath()[0]:n.target}function nI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const iY=new ge("cdk-dir-doc",{providedIn:"root",factory:function rY(){return Ot(Ht)}}),sY=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let tl=(()=>{class n{constructor(t){this.value="ltr",this.change=new it,t&&(this.value=function oY(n){const e=n?.toLowerCase()||"";return"auto"===e&&typeof navigator<"u"&&navigator?.language?sY.test(navigator.language)?"rtl":"ltr":"rtl"===e?"rtl":"ltr"}((t.body?t.body.dir:null)||(t.documentElement?t.documentElement.dir:null)||"ltr"))}ngOnDestroy(){this.change.complete()}}return n.\u0275fac=function(t){return new(t||n)(Q(iY,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),fy=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({}),n})();const aY=["contentWrapper"],lY=["*"],cY=new ge("VIRTUAL_SCROLL_STRATEGY");let py=(()=>{class n{constructor(t,i,r){this._ngZone=t,this._platform=i,this._scrolled=new Ue,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=r}register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){const i=this.scrollContainers.get(t);i&&(i.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=20){return this._platform.isBrowser?new Sn(i=>{this._globalSubscription||this._addGlobalListener();const r=t>0?this._scrolled.pipe(fM(t)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):dt()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((t,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(t,i){const r=this.getAncestorScrollContainers(t);return this.scrolled(i).pipe(On(s=>!s||r.indexOf(s)>-1))}getAncestorScrollContainers(t){const i=[];return this.scrollContainers.forEach((r,s)=>{this._scrollableContainsElement(s,t)&&i.push(s)}),i}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(t,i){let r=Vc(i),s=t.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>ba(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}return n.\u0275fac=function(t){return new(t||n)(Q(pt),Q(Fi),Q(Ht,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),VB=(()=>{class n{constructor(t,i,r,s){this.elementRef=t,this.scrollDispatcher=i,this.ngZone=r,this.dir=s,this._destroyed=new Ue,this._elementScrolled=new Sn(o=>this.ngZone.runOutsideAngular(()=>ba(this.elementRef.nativeElement,"scroll").pipe(et(this._destroyed)).subscribe(o)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(t){const i=this.elementRef.nativeElement,r=this.dir&&"rtl"==this.dir.value;null==t.left&&(t.left=r?t.end:t.start),null==t.right&&(t.right=r?t.start:t.end),null!=t.bottom&&(t.top=i.scrollHeight-i.clientHeight-t.bottom),r&&0!=hy()?(null!=t.left&&(t.right=i.scrollWidth-i.clientWidth-t.left),2==hy()?t.left=t.right:1==hy()&&(t.left=t.right?-t.right:t.right)):null!=t.right&&(t.left=i.scrollWidth-i.clientWidth-t.right),this._applyScrollToOptions(t)}_applyScrollToOptions(t){const i=this.elementRef.nativeElement;UB()?i.scrollTo(t):(null!=t.top&&(i.scrollTop=t.top),null!=t.left&&(i.scrollLeft=t.left))}measureScrollOffset(t){const i="left",r="right",s=this.elementRef.nativeElement;if("top"==t)return s.scrollTop;if("bottom"==t)return s.scrollHeight-s.clientHeight-s.scrollTop;const o=this.dir&&"rtl"==this.dir.value;return"start"==t?t=o?r:i:"end"==t&&(t=o?i:r),o&&2==hy()?t==i?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==hy()?t==i?s.scrollLeft+s.scrollWidth-s.clientWidth:-s.scrollLeft:t==i?s.scrollLeft:s.scrollWidth-s.clientWidth-s.scrollLeft}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(py),D(pt),D(tl,8))},n.\u0275dir=Ae({type:n,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),n})(),gM=(()=>{class n{constructor(t,i,r){this._platform=t,this._change=new Ue,this._changeListener=s=>{this._change.next(s)},this._document=r,i.runOutsideAngular(()=>{if(t.isBrowser){const s=this._getWindow();s.addEventListener("resize",this._changeListener),s.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:i,height:r}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+r,right:t.left+i,height:r,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._document,i=this._getWindow(),r=t.documentElement,s=r.getBoundingClientRect();return{top:-s.top||t.body.scrollTop||i.scrollY||r.scrollTop||0,left:-s.left||t.body.scrollLeft||i.scrollX||r.scrollLeft||0}}change(t=20){return t>0?this._change.pipe(fM(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}}return n.\u0275fac=function(t){return new(t||n)(Q(Fi),Q(pt),Q(Ht,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const zB=new ge("VIRTUAL_SCROLLABLE");let hY=(()=>{class n extends VB{constructor(t,i,r,s){super(t,i,r,s)}measureViewportSize(t){const i=this.elementRef.nativeElement;return"horizontal"===t?i.clientWidth:i.clientHeight}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(py),D(pt),D(tl,8))},n.\u0275dir=Ae({type:n,features:[ft]}),n})();const pY=typeof requestAnimationFrame<"u"?LB:JD;let mY=(()=>{class n extends hY{get orientation(){return this._orientation}set orientation(t){this._orientation!==t&&(this._orientation=t,this._calculateSpacerSize())}get appendOnly(){return this._appendOnly}set appendOnly(t){this._appendOnly=Cn(t)}constructor(t,i,r,s,o,a,l,c){super(t,a,r,o),this.elementRef=t,this._changeDetectorRef=i,this._scrollStrategy=s,this.scrollable=c,this._platform=Ot(Fi),this._detachedSubject=new Ue,this._renderedRangeSubject=new Ue,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new Sn(u=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>u.next(h))))),this.renderedRangeStream=this._renderedRangeSubject,this._totalContentSize=0,this._totalContentWidth="",this._totalContentHeight="",this._renderedRange={start:0,end:0},this._dataLength=0,this._viewportSize=0,this._renderedContentOffset=0,this._renderedContentOffsetNeedsRewrite=!1,this._isChangeDetectionPending=!1,this._runAfterChangeDetection=[],this._viewportChanges=un.EMPTY,this._viewportChanges=l.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this)}ngOnInit(){this._platform.isBrowser&&(this.scrollable===this&&super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.scrollable.elementScrolled().pipe(No(null),fM(0,pY)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()})))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),super.ngOnDestroy()}attach(t){this.ngZone.runOutsideAngular(()=>{this._forOf=t,this._forOf.dataStream.pipe(et(this._detachedSubject)).subscribe(i=>{const r=i.length;r!==this._dataLength&&(this._dataLength=r,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}measureBoundingClientRectWithScrollOffset(t){return this.getElementRef().nativeElement.getBoundingClientRect()[t]}setTotalContentSize(t){this._totalContentSize!==t&&(this._totalContentSize=t,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(t){(function fY(n,e){return n.start==e.start&&n.end==e.end})(this._renderedRange,t)||(this.appendOnly&&(t={start:0,end:Math.max(this._renderedRange.end,t.end)}),this._renderedRangeSubject.next(this._renderedRange=t),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(t,i="to-start"){t=this.appendOnly&&"to-start"===i?0:t;const s="horizontal"==this.orientation,o=s?"X":"Y";let l=`translate${o}(${Number((s&&this.dir&&"rtl"==this.dir.value?-1:1)*t)}px)`;this._renderedContentOffset=t,"to-end"===i&&(l+=` translate${o}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=l&&(this._renderedContentTransform=l,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(t,i="auto"){const r={behavior:i};"horizontal"===this.orientation?r.start=t:r.top=t,this.scrollable.scrollTo(r)}scrollToIndex(t,i="auto"){this._scrollStrategy.scrollToIndex(t,i)}measureScrollOffset(t){let i;return i=this.scrollable==this?r=>super.measureScrollOffset(r):r=>this.scrollable.measureScrollOffset(r),Math.max(0,i(t??("horizontal"===this.orientation?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(t){let i;const r="left",s="right",o="rtl"==this.dir?.value;i="start"==t?o?s:r:"end"==t?o?r:s:t||("horizontal"===this.orientation?"left":"top");const a=this.scrollable.measureBoundingClientRectWithScrollOffset(i);return this.elementRef.nativeElement.getBoundingClientRect()[i]-a}measureRenderedContentSize(){const t=this._contentWrapper.nativeElement;return"horizontal"===this.orientation?t.offsetWidth:t.offsetHeight}measureRangeSize(t){return this._forOf?this._forOf.measureRangeSize(t,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){this._viewportSize=this.scrollable.measureViewportSize(this.orientation)}_markChangeDetectionNeeded(t){t&&this._runAfterChangeDetection.push(t),this._isChangeDetectionPending||(this._isChangeDetectionPending=!0,this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._doChangeDetection()})))}_doChangeDetection(){this._isChangeDetectionPending=!1,this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,this.ngZone.run(()=>this._changeDetectorRef.markForCheck());const t=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(const i of t)i()}_calculateSpacerSize(){this._totalContentHeight="horizontal"===this.orientation?"":`${this._totalContentSize}px`,this._totalContentWidth="horizontal"===this.orientation?`${this._totalContentSize}px`:""}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(ci),D(pt),D(cY,8),D(tl,8),D(py),D(gM),D(zB,8))},n.\u0275cmp=ht({type:n,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(t,i){if(1&t&&oi(aY,7),2&t){let r;Lt(r=Ft())&&(i._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(t,i){2&t&&Pn("cdk-virtual-scroll-orientation-horizontal","horizontal"===i.orientation)("cdk-virtual-scroll-orientation-vertical","horizontal"!==i.orientation)},inputs:{orientation:"orientation",appendOnly:"appendOnly"},outputs:{scrolledIndexChange:"scrolledIndexChange"},standalone:!0,features:[Hn([{provide:VB,useFactory:(e,t)=>e||t,deps:[[new Po,new rp(zB)],n]}]),ft,v1],ngContentSelectors:lY,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(t,i){1&t&&(Cr(),K(0,"div",0,1),Kt(2),J(),Fe(3,"div",2)),2&t&&(j(3),Pc("width",i._totalContentWidth)("height",i._totalContentHeight))},styles:["cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}"],encapsulation:2,changeDetection:0}),n})(),my=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({}),n})(),HB=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[fy,my,mY,fy,my]}),n})();class iI{attach(e){return this._attachedHost=e,e.attach(this)}detach(){let e=this._attachedHost;null!=e&&(this._attachedHost=null,e.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(e){this._attachedHost=e}}class lm extends iI{constructor(e,t,i,r,s){super(),this.component=e,this.viewContainerRef=t,this.injector=i,this.componentFactoryResolver=r,this.projectableNodes=s}}class cm extends iI{constructor(e,t,i,r){super(),this.templateRef=e,this.viewContainerRef=t,this.context=i,this.injector=r}get origin(){return this.templateRef.elementRef}attach(e,t=this.context){return this.context=t,super.attach(e)}detach(){return this.context=void 0,super.detach()}}class gY extends iI{constructor(e){super(),this.element=e instanceof yt?e.nativeElement:e}}class _M{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(e){return e instanceof lm?(this._attachedPortal=e,this.attachComponentPortal(e)):e instanceof cm?(this._attachedPortal=e,this.attachTemplatePortal(e)):this.attachDomPortal&&e instanceof gY?(this._attachedPortal=e,this.attachDomPortal(e)):void 0}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(e){this._disposeFn=e}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}class _Y extends _M{constructor(e,t,i,r,s){super(),this.outletElement=e,this._componentFactoryResolver=t,this._appRef=i,this._defaultInjector=r,this.attachDomPortal=o=>{const a=o.element,l=this._document.createComment("dom-portal");a.parentNode.insertBefore(l,a),this.outletElement.appendChild(a),this._attachedPortal=o,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=s}attachComponentPortal(e){const i=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component);let r;return e.viewContainerRef?(r=e.viewContainerRef.createComponent(i,e.viewContainerRef.length,e.injector||e.viewContainerRef.injector,e.projectableNodes||void 0),this.setDisposeFn(()=>r.destroy())):(r=i.create(e.injector||this._defaultInjector||ki.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=e,r}attachTemplatePortal(e){let t=e.viewContainerRef,i=t.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return i.rootNodes.forEach(r=>this.outletElement.appendChild(r)),i.detectChanges(),this.setDisposeFn(()=>{let r=t.indexOf(i);-1!==r&&t.remove(r)}),this._attachedPortal=e,i}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(e){return e.hostView.rootNodes[0]}}let dm=(()=>{class n extends _M{constructor(t,i,r){super(),this._componentFactoryResolver=t,this._viewContainerRef=i,this._isInitialized=!1,this.attached=new it,this.attachDomPortal=s=>{const o=s.element,a=this._document.createComment("dom-portal");s.setAttachedHost(this),o.parentNode.insertBefore(a,o),this._getRootNode().appendChild(o),this._attachedPortal=s,super.setDisposeFn(()=>{a.parentNode&&a.parentNode.replaceChild(o,a)})},this._document=r}get portal(){return this._attachedPortal}set portal(t){this.hasAttached()&&!t&&!this._isInitialized||(this.hasAttached()&&super.detach(),t&&super.attach(t),this._attachedPortal=t||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(t){t.setAttachedHost(this);const i=null!=t.viewContainerRef?t.viewContainerRef:this._viewContainerRef,s=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component),o=i.createComponent(s,i.length,t.injector||i.injector,t.projectableNodes||void 0);return i!==this._viewContainerRef&&this._getRootNode().appendChild(o.hostView.rootNodes[0]),super.setDisposeFn(()=>o.destroy()),this._attachedPortal=t,this._attachedRef=o,this.attached.emit(o),o}attachTemplatePortal(t){t.setAttachedHost(this);const i=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=t,this._attachedRef=i,this.attached.emit(i),i}_getRootNode(){const t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}}return n.\u0275fac=function(t){return new(t||n)(D(Ol),D(is),D(Ht))},n.\u0275dir=Ae({type:n,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[ft]}),n})(),um=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({}),n})();function nl(n,...e){return e.length?e.some(t=>n[t]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}const GB=UB();class RY{constructor(e,t){this._viewportRuler=e,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=t}attach(){}enable(){if(this._canBeEnabled()){const e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=mr(-this._previousScrollPosition.left),e.style.top=mr(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const e=this._document.documentElement,i=e.style,r=this._document.body.style,s=i.scrollBehavior||"",o=r.scrollBehavior||"";this._isEnabled=!1,i.left=this._previousHTMLStyles.left,i.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),GB&&(i.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),GB&&(i.scrollBehavior=s,r.scrollBehavior=o)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const t=this._document.body,i=this._viewportRuler.getViewportSize();return t.scrollHeight>i.height||t.scrollWidth>i.width}}class PY{constructor(e,t,i,r){this._scrollDispatcher=e,this._ngZone=t,this._viewportRuler=i,this._config=r,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(e){this._overlayRef=e}enable(){if(this._scrollSubscription)return;const e=this._scrollDispatcher.scrolled(0).pipe(On(t=>!t||!this._overlayRef.overlayElement.contains(t.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(()=>{const t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}class WB{enable(){}disable(){}attach(){}}function sI(n,e){return e.some(t=>n.bottomt.bottom||n.rightt.right)}function $B(n,e){return e.some(t=>n.topt.bottom||n.leftt.right)}class kY{constructor(e,t,i,r){this._scrollDispatcher=e,this._viewportRuler=t,this._ngZone=i,this._config=r,this._scrollSubscription=null}attach(e){this._overlayRef=e}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){const t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:i,height:r}=this._viewportRuler.getViewportSize();sI(t,[{width:i,height:r,bottom:r,right:i,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}let OY=(()=>{class n{constructor(t,i,r,s){this._scrollDispatcher=t,this._viewportRuler=i,this._ngZone=r,this.noop=()=>new WB,this.close=o=>new PY(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new RY(this._viewportRuler,this._document),this.reposition=o=>new kY(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return n.\u0275fac=function(t){return new(t||n)(Q(py),Q(gM),Q(pt),Q(Ht))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class _y{constructor(e){if(this.scrollStrategy=new WB,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,e){const t=Object.keys(e);for(const i of t)void 0!==e[i]&&(this[i]=e[i])}}}class LY{constructor(e,t){this.connectionPair=e,this.scrollableViewProperties=t}}let jB=(()=>{class n{constructor(t){this._attachedOverlays=[],this._document=t}ngOnDestroy(){this.detach()}add(t){this.remove(t),this._attachedOverlays.push(t)}remove(t){const i=this._attachedOverlays.indexOf(t);i>-1&&this._attachedOverlays.splice(i,1),0===this._attachedOverlays.length&&this.detach()}}return n.\u0275fac=function(t){return new(t||n)(Q(Ht))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),FY=(()=>{class n extends jB{constructor(t,i){super(t),this._ngZone=i,this._keydownListener=r=>{const s=this._attachedOverlays;for(let o=s.length-1;o>-1;o--)if(s[o]._keydownEvents.observers.length>0){const a=s[o]._keydownEvents;this._ngZone?this._ngZone.run(()=>a.next(r)):a.next(r);break}}}add(t){super.add(t),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}return n.\u0275fac=function(t){return new(t||n)(Q(Ht),Q(pt,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),NY=(()=>{class n extends jB{constructor(t,i,r){super(t),this._platform=i,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=Xd(s)},this._clickListener=s=>{const o=Xd(s),a="click"===s.type&&this._pointerDownEventTarget?this._pointerDownEventTarget:o;this._pointerDownEventTarget=null;const l=this._attachedOverlays.slice();for(let c=l.length-1;c>-1;c--){const u=l[c];if(u._outsidePointerEvents.observers.length<1||!u.hasAttached())continue;if(u.overlayElement.contains(o)||u.overlayElement.contains(a))break;const h=u._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>h.next(s)):h.next(s)}}}add(t){if(super.add(t),!this._isAttached){const i=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(i)):this._addEventListeners(i),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=i.style.cursor,i.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){const t=this._document.body;t.removeEventListener("pointerdown",this._pointerDownListener,!0),t.removeEventListener("click",this._clickListener,!0),t.removeEventListener("auxclick",this._clickListener,!0),t.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(t.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(t){t.addEventListener("pointerdown",this._pointerDownListener,!0),t.addEventListener("click",this._clickListener,!0),t.addEventListener("auxclick",this._clickListener,!0),t.addEventListener("contextmenu",this._clickListener,!0)}}return n.\u0275fac=function(t){return new(t||n)(Q(Ht),Q(Fi),Q(pt,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),wM=(()=>{class n{constructor(t,i){this._platform=i,this._document=t}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const t="cdk-overlay-container";if(this._platform.isBrowser||nI()){const r=this._document.querySelectorAll(`.${t}[platform="server"], .${t}[platform="test"]`);for(let s=0;sthis._backdropClick.next(h),this._backdropTransitionendHandler=h=>{this._disposeBackdrop(h.target)},this._keydownEvents=new Ue,this._outsidePointerEvents=new Ue,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(e){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);const t=this._portalOutlet.attach(e);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(Li(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),"function"==typeof t?.onDestroy&&t.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();const e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){const e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._previousHostParent=this._pane=this._host=null,e&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config={...this._config,...e},this._updateElementSize()}setDirection(e){this._config={...this._config,direction:e},this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){const e=this._config.direction;return e?"string"==typeof e?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;const e=this._pane.style;e.width=mr(this._config.width),e.height=mr(this._config.height),e.minWidth=mr(this._config.minWidth),e.minHeight=mr(this._config.minHeight),e.maxWidth=mr(this._config.maxWidth),e.maxHeight=mr(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){const e="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(e)})}):this._backdropElement.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){const e=this._backdropElement;if(e){if(this._animationsDisabled)return void this._disposeBackdrop(e);e.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{e.addEventListener("transitionend",this._backdropTransitionendHandler)}),e.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(e)},500))}}_toggleClasses(e,t,i){const r=lM(t||[]).filter(s=>!!s);r.length&&(i?e.classList.add(...r):e.classList.remove(...r))}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{const e=this._ngZone.onStable.pipe(et(cs(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||0===this._pane.children.length)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){const e=this._scrollStrategy;e&&(e.disable(),e.detach&&e.detach())}_disposeBackdrop(e){e&&(e.removeEventListener("click",this._backdropClickHandler),e.removeEventListener("transitionend",this._backdropTransitionendHandler),e.remove(),this._backdropElement===e&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}}const XB="cdk-overlay-connected-position-bounding-box",BY=/([A-Za-z%]+)$/;class UY{get positions(){return this._preferredPositions}constructor(e,t,i,r,s){this._viewportRuler=t,this._document=i,this._platform=r,this._overlayContainer=s,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new Ue,this._resizeSubscription=un.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(e)}attach(e){this._validatePositions(),e.hostElement.classList.add(XB),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const e=this._originRect,t=this._overlayRect,i=this._viewportRect,r=this._containerRect,s=[];let o;for(let a of this._preferredPositions){let l=this._getOriginPoint(e,r,a),c=this._getOverlayPoint(l,t,a),u=this._getOverlayFit(c,t,i,a);if(u.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(u,c,i)?s.push({position:a,origin:l,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=u,a=c)}return this._isPushed=!1,void this._applyPosition(a.position,a.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(o.position,o.originPoint);this._applyPosition(o.position,o.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&Eh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(XB),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;const e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const t=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,t)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,-1===e.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,t,i){let r,s;if("center"==i.originX)r=e.left+e.width/2;else{const o=this._isRtl()?e.right:e.left,a=this._isRtl()?e.left:e.right;r="start"==i.originX?o:a}return t.left<0&&(r-=t.left),s="center"==i.originY?e.top+e.height/2:"top"==i.originY?e.top:e.bottom,t.top<0&&(s-=t.top),{x:r,y:s}}_getOverlayPoint(e,t,i){let r,s;return r="center"==i.overlayX?-t.width/2:"start"===i.overlayX?this._isRtl()?-t.width:0:this._isRtl()?0:-t.width,s="center"==i.overlayY?-t.height/2:"top"==i.overlayY?0:-t.height,{x:e.x+r,y:e.y+s}}_getOverlayFit(e,t,i,r){const s=YB(t);let{x:o,y:a}=e,l=this._getOffset(r,"x"),c=this._getOffset(r,"y");l&&(o+=l),c&&(a+=c);let p=0-a,m=a+s.height-i.height,g=this._subtractOverflows(s.width,0-o,o+s.width-i.width),b=this._subtractOverflows(s.height,p,m),y=g*b;return{visibleArea:y,isCompletelyWithinViewport:s.width*s.height===y,fitsInViewportVertically:b===s.height,fitsInViewportHorizontally:g==s.width}}_canFitWithFlexibleDimensions(e,t,i){if(this._hasFlexibleDimensions){const r=i.bottom-t.y,s=i.right-t.x,o=qB(this._overlayRef.getConfig().minHeight),a=qB(this._overlayRef.getConfig().minWidth);return(e.fitsInViewportVertically||null!=o&&o<=r)&&(e.fitsInViewportHorizontally||null!=a&&a<=s)}return!1}_pushOverlayOnScreen(e,t,i){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};const r=YB(t),s=this._viewportRect,o=Math.max(e.x+r.width-s.width,0),a=Math.max(e.y+r.height-s.height,0),l=Math.max(s.top-i.top-e.y,0),c=Math.max(s.left-i.left-e.x,0);let u=0,h=0;return u=r.width<=s.width?c||-o:e.xg&&!this._isInitialRender&&!this._growAfterOpen&&(o=e.y-g/2)}if("end"===t.overlayX&&!r||"start"===t.overlayX&&r)p=i.width-e.x+this._viewportMargin,u=e.x-this._viewportMargin;else if("start"===t.overlayX&&!r||"end"===t.overlayX&&r)h=e.x,u=i.right-e.x;else{const m=Math.min(i.right-e.x+i.left,e.x),g=this._lastBoundingBoxSize.width;u=2*m,h=e.x-m,u>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=e.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:u,height:s}}_setBoundingBoxStyles(e,t){const i=this._calculateBoundingBoxRect(e,t);!this._isInitialRender&&!this._growAfterOpen&&(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));const r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{const s=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;r.height=mr(i.height),r.top=mr(i.top),r.bottom=mr(i.bottom),r.width=mr(i.width),r.left=mr(i.left),r.right=mr(i.right),r.alignItems="center"===t.overlayX?"center":"end"===t.overlayX?"flex-end":"flex-start",r.justifyContent="center"===t.overlayY?"center":"bottom"===t.overlayY?"flex-end":"flex-start",s&&(r.maxHeight=mr(s)),o&&(r.maxWidth=mr(o))}this._lastBoundingBoxSize=i,Eh(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Eh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Eh(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,t){const i={},r=this._hasExactPosition(),s=this._hasFlexibleDimensions,o=this._overlayRef.getConfig();if(r){const u=this._viewportRuler.getViewportScrollPosition();Eh(i,this._getExactOverlayY(t,e,u)),Eh(i,this._getExactOverlayX(t,e,u))}else i.position="static";let a="",l=this._getOffset(t,"x"),c=this._getOffset(t,"y");l&&(a+=`translateX(${l}px) `),c&&(a+=`translateY(${c}px)`),i.transform=a.trim(),o.maxHeight&&(r?i.maxHeight=mr(o.maxHeight):s&&(i.maxHeight="")),o.maxWidth&&(r?i.maxWidth=mr(o.maxWidth):s&&(i.maxWidth="")),Eh(this._pane.style,i)}_getExactOverlayY(e,t,i){let r={top:"",bottom:""},s=this._getOverlayPoint(t,this._overlayRect,e);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,i)),"bottom"===e.overlayY?r.bottom=this._document.documentElement.clientHeight-(s.y+this._overlayRect.height)+"px":r.top=mr(s.y),r}_getExactOverlayX(e,t,i){let o,r={left:"",right:""},s=this._getOverlayPoint(t,this._overlayRect,e);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,i)),o=this._isRtl()?"end"===e.overlayX?"left":"right":"end"===e.overlayX?"right":"left","right"===o?r.right=this._document.documentElement.clientWidth-(s.x+this._overlayRect.width)+"px":r.left=mr(s.x),r}_getScrollVisibility(){const e=this._getOriginRect(),t=this._pane.getBoundingClientRect(),i=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:$B(e,i),isOriginOutsideView:sI(e,i),isOverlayClipped:$B(t,i),isOverlayOutsideView:sI(t,i)}}_subtractOverflows(e,...t){return t.reduce((i,r)=>i-Math.max(r,0),e)}_getNarrowedViewportRect(){const e=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+e-this._viewportMargin,bottom:i.top+t-this._viewportMargin,width:e-2*this._viewportMargin,height:t-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,t){return"x"===t?null==e.offsetX?this._offsetX:e.offsetX:null==e.offsetY?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&lM(e).forEach(t=>{""!==t&&-1===this._appliedPanelClasses.indexOf(t)&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){const e=this._origin;if(e instanceof yt)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();const t=e.width||0,i=e.height||0;return{top:e.y,bottom:e.y+i,left:e.x,right:e.x+t,height:i,width:t}}}function Eh(n,e){for(let t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function qB(n){if("number"!=typeof n&&null!=n){const[e,t]=n.split(BY);return t&&"px"!==t?null:parseFloat(e)}return n||null}function YB(n){return{top:Math.floor(n.top),right:Math.floor(n.right),bottom:Math.floor(n.bottom),left:Math.floor(n.left),width:Math.floor(n.width),height:Math.floor(n.height)}}const KB="cdk-global-overlay-wrapper";class VY{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(e){const t=e.getConfig();this._overlayRef=e,this._width&&!t.width&&e.updateSize({width:this._width}),this._height&&!t.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(KB),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;const e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:r,height:s,maxWidth:o,maxHeight:a}=i,l=!("100%"!==r&&"100vw"!==r||o&&"100%"!==o&&"100vw"!==o),c=!("100%"!==s&&"100vh"!==s||a&&"100%"!==a&&"100vh"!==a),u=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===u?(b="center",p?g=h:m=h):p?"left"===u||"end"===u?(b="flex-end",m=h):("right"===u||"start"===u)&&(b="flex-start",g=h):"left"===u||"start"===u?(b="flex-start",m=h):("right"===u||"end"===u)&&(b="flex-end",g=h),e.position=this._cssPosition,e.marginLeft=l?"0":m,e.marginTop=c?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=l?"0":g,t.justifyContent=b,t.alignItems=c?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;const e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,i=t.style;t.classList.remove(KB),i.justifyContent=i.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}}let zY=(()=>{class n{constructor(t,i,r,s){this._viewportRuler=t,this._document=i,this._platform=r,this._overlayContainer=s}global(){return new VY}flexibleConnectedTo(t){return new UY(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return n.\u0275fac=function(t){return new(t||n)(Q(gM),Q(Ht),Q(Fi),Q(wM))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),HY=0,mo=(()=>{class n{constructor(t,i,r,s,o,a,l,c,u,h,p,m){this.scrollStrategies=t,this._overlayContainer=i,this._componentFactoryResolver=r,this._positionBuilder=s,this._keyboardDispatcher=o,this._injector=a,this._ngZone=l,this._document=c,this._directionality=u,this._location=h,this._outsideClickDispatcher=p,this._animationsModuleType=m}create(t){const i=this._createHostElement(),r=this._createPaneElement(i),s=this._createPortalOutlet(r),o=new _y(t);return o.direction=o.direction||this._directionality.value,new vy(s,i,r,o,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,"NoopAnimations"===this._animationsModuleType)}position(){return this._positionBuilder}_createPaneElement(t){const i=this._document.createElement("div");return i.id="cdk-overlay-"+HY++,i.classList.add("cdk-overlay-pane"),t.appendChild(i),i}_createHostElement(){const t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}_createPortalOutlet(t){return this._appRef||(this._appRef=this._injector.get(qp)),new _Y(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return n.\u0275fac=function(t){return new(t||n)(Q(OY),Q(wM),Q(Ol),Q(zY),Q(FY),Q(ki),Q(pt),Q(Ht),Q(tl),Q(Lv),Q(NY),Q(rs,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const GY=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],ZB=new ge("cdk-connected-overlay-scroll-strategy");let oI=(()=>{class n{constructor(t){this.elementRef=t}}return n.\u0275fac=function(t){return new(t||n)(D(yt))},n.\u0275dir=Ae({type:n,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),n})(),QB=(()=>{class n{get offsetX(){return this._offsetX}set offsetX(t){this._offsetX=t,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(t){this._offsetY=t,this._position&&this._updatePositionStrategy(this._position)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(t){this._hasBackdrop=Cn(t)}get lockPosition(){return this._lockPosition}set lockPosition(t){this._lockPosition=Cn(t)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(t){this._flexibleDimensions=Cn(t)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(t){this._growAfterOpen=Cn(t)}get push(){return this._push}set push(t){this._push=Cn(t)}constructor(t,i,r,s,o){this._overlay=t,this._dir=o,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=un.EMPTY,this._attachSubscription=un.EMPTY,this._detachSubscription=un.EMPTY,this._positionSubscription=un.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new it,this.positionChange=new it,this.attach=new it,this.detach=new it,this.overlayKeydown=new it,this.overlayOutsideClick=new it,this._templatePortal=new cm(i,r),this._scrollStrategyFactory=s,this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(t){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),t.origin&&this.open&&this._position.apply()),t.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=GY);const t=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=t.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=t.detachments().subscribe(()=>this.detach.emit()),t.keydownEvents().subscribe(i=>{this.overlayKeydown.next(i),27===i.keyCode&&!this.disableClose&&!nl(i)&&(i.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(i=>{this.overlayOutsideClick.next(i)})}_buildConfig(){const t=this._position=this.positionStrategy||this._createPositionStrategy(),i=new _y({direction:this._dir,positionStrategy:t,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(i.width=this.width),(this.height||0===this.height)&&(i.height=this.height),(this.minWidth||0===this.minWidth)&&(i.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(i.minHeight=this.minHeight),this.backdropClass&&(i.backdropClass=this.backdropClass),this.panelClass&&(i.panelClass=this.panelClass),i}_updatePositionStrategy(t){const i=this.positions.map(r=>({originX:r.originX,originY:r.originY,overlayX:r.overlayX,overlayY:r.overlayY,offsetX:r.offsetX||this.offsetX,offsetY:r.offsetY||this.offsetY,panelClass:r.panelClass||void 0}));return t.setOrigin(this._getFlexibleConnectedPositionStrategyOrigin()).withPositions(i).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){const t=this._overlay.position().flexibleConnectedTo(this._getFlexibleConnectedPositionStrategyOrigin());return this._updatePositionStrategy(t),t}_getFlexibleConnectedPositionStrategyOrigin(){return this.origin instanceof oI?this.origin.elementRef:this.origin}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(t=>{this.backdropClick.emit(t)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(SN(()=>this.positionChange.observers.length>0)).subscribe(t=>{this.positionChange.emit(t),0===this.positionChange.observers.length&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(D(mo),D(fo),D(is),D(ZB),D(tl,8))},n.\u0275dir=Ae({type:n,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:["cdkConnectedOverlayOrigin","origin"],positions:["cdkConnectedOverlayPositions","positions"],positionStrategy:["cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:["cdkConnectedOverlayOffsetX","offsetX"],offsetY:["cdkConnectedOverlayOffsetY","offsetY"],width:["cdkConnectedOverlayWidth","width"],height:["cdkConnectedOverlayHeight","height"],minWidth:["cdkConnectedOverlayMinWidth","minWidth"],minHeight:["cdkConnectedOverlayMinHeight","minHeight"],backdropClass:["cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:["cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:["cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:["cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:["cdkConnectedOverlayOpen","open"],disableClose:["cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:["cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:["cdkConnectedOverlayHasBackdrop","hasBackdrop"],lockPosition:["cdkConnectedOverlayLockPosition","lockPosition"],flexibleDimensions:["cdkConnectedOverlayFlexibleDimensions","flexibleDimensions"],growAfterOpen:["cdkConnectedOverlayGrowAfterOpen","growAfterOpen"],push:["cdkConnectedOverlayPush","push"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],standalone:!0,features:[zi]}),n})();const $Y={provide:ZB,deps:[mo],useFactory:function WY(n){return()=>n.scrollStrategies.reposition()}};let pm=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({providers:[mo,$Y],imports:[fy,um,HB,HB]}),n})();function Ah(n,e=dy){return Gn((t,i)=>{let r=null,s=null,o=null;const a=()=>{if(r){r.unsubscribe(),r=null;const c=s;s=null,i.next(c)}};function l(){const c=o+n,u=e.now();if(u{s=c,o=e.now(),r||(r=e.schedule(l,n),i.add(r))},()=>{a(),i.complete()},void 0,()=>{s=r=null}))})}function JB(n){return On((e,t)=>n<=t)}function qd(n,e=Pa){return n=n??jY,Gn((t,i)=>{let r,s=!0;t.subscribe(Un(i,o=>{const a=e(o);(s||!n(r,a))&&(s=!1,r=a,i.next(o))}))})}function jY(n,e){return n===e}let eU=(()=>{class n{create(t){return typeof MutationObserver>"u"?null:new MutationObserver(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),XY=(()=>{class n{constructor(t){this._mutationObserverFactory=t,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((t,i)=>this._cleanupObserver(i))}observe(t){const i=Vc(t);return new Sn(r=>{const o=this._observeElement(i).subscribe(r);return()=>{o.unsubscribe(),this._unobserveElement(i)}})}_observeElement(t){if(this._observedElements.has(t))this._observedElements.get(t).count++;else{const i=new Ue,r=this._mutationObserverFactory.create(s=>i.next(s));r&&r.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:r,stream:i,count:1})}return this._observedElements.get(t).stream}_unobserveElement(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))}_cleanupObserver(t){if(this._observedElements.has(t)){const{observer:i,stream:r}=this._observedElements.get(t);i&&i.disconnect(),r.complete(),this._observedElements.delete(t)}}}return n.\u0275fac=function(t){return new(t||n)(Q(eU))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),tU=(()=>{class n{get disabled(){return this._disabled}set disabled(t){this._disabled=Cn(t),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(t){this._debounce=Ys(t),this._subscribe()}constructor(t,i,r){this._contentObserver=t,this._elementRef=i,this._ngZone=r,this.event=new it,this._disabled=!1,this._currentSubscription=null}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();const t=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(()=>{this._currentSubscription=(this.debounce?t.pipe(Ah(this.debounce)):t).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(D(XY),D(yt),D(pt))},n.\u0275dir=Ae({type:n,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),n})(),aI=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({providers:[eU]}),n})();const nU=new Set;let mm,qY=(()=>{class n{constructor(t){this._platform=t,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):KY}matchMedia(t){return(this._platform.WEBKIT||this._platform.BLINK)&&function YY(n){if(!nU.has(n))try{mm||(mm=document.createElement("style"),mm.setAttribute("type","text/css"),document.head.appendChild(mm)),mm.sheet&&(mm.sheet.insertRule(`@media ${n} {body{ }}`,0),nU.add(n))}catch(e){console.error(e)}}(t),this._matchMedia(t)}}return n.\u0275fac=function(t){return new(t||n)(Q(Fi))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function KY(n){return{matches:"all"===n||""===n,media:n,addListener:()=>{},removeListener:()=>{}}}let lI=(()=>{class n{constructor(t,i){this._mediaMatcher=t,this._zone=i,this._queries=new Map,this._destroySubject=new Ue}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return iU(lM(t)).some(r=>this._registerQuery(r).mql.matches)}observe(t){let s=Vd(iU(lM(t)).map(o=>this._registerQuery(o).observable));return s=$v(s.pipe(Li(1)),s.pipe(JB(1),Ah(0))),s.pipe(Ye(o=>{const a={matches:!1,breakpoints:{}};return o.forEach(({matches:l,query:c})=>{a.matches=a.matches||l,a.breakpoints[c]=l}),a}))}_registerQuery(t){if(this._queries.has(t))return this._queries.get(t);const i=this._mediaMatcher.matchMedia(t),s={observable:new Sn(o=>{const a=l=>this._zone.run(()=>o.next(l));return i.addListener(a),()=>{i.removeListener(a)}}).pipe(No(i),Ye(({matches:o})=>({query:t,matches:o})),et(this._destroySubject)),mql:i};return this._queries.set(t,s),s}}return n.\u0275fac=function(t){return new(t||n)(Q(qY),Q(pt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function iU(n){return n.map(e=>e.split(",")).reduce((e,t)=>e.concat(t)).map(e=>e.trim())}function MM(n,e){return(n.getAttribute(e)||"").match(/\S+/g)||[]}const sU="cdk-describedby-message",SM="cdk-describedby-host";let cI=0,eK=(()=>{class n{constructor(t,i){this._platform=i,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+cI++,this._document=t,this._id=Ot(Xp)+"-"+cI++}describe(t,i,r){if(!this._canBeDescribed(t,i))return;const s=dI(i,r);"string"!=typeof i?(oU(i,this._id),this._messageRegistry.set(s,{messageElement:i,referenceCount:0})):this._messageRegistry.has(s)||this._createMessageElement(i,r),this._isElementDescribedByMessage(t,s)||this._addMessageReference(t,s)}removeDescription(t,i,r){if(!i||!this._isElementNode(t))return;const s=dI(i,r);if(this._isElementDescribedByMessage(t,s)&&this._removeMessageReference(t,s),"string"==typeof i){const o=this._messageRegistry.get(s);o&&0===o.referenceCount&&this._deleteMessageElement(s)}0===this._messagesContainer?.childNodes.length&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){const t=this._document.querySelectorAll(`[${SM}="${this._id}"]`);for(let i=0;i0!=r.indexOf(sU));t.setAttribute("aria-describedby",i.join(" "))}_addMessageReference(t,i){const r=this._messageRegistry.get(i);(function QY(n,e,t){const i=MM(n,e);i.some(r=>r.trim()==t.trim())||(i.push(t.trim()),n.setAttribute(e,i.join(" ")))})(t,"aria-describedby",r.messageElement.id),t.setAttribute(SM,this._id),r.referenceCount++}_removeMessageReference(t,i){const r=this._messageRegistry.get(i);r.referenceCount--,function JY(n,e,t){const r=MM(n,e).filter(s=>s!=t.trim());r.length?n.setAttribute(e,r.join(" ")):n.removeAttribute(e)}(t,"aria-describedby",r.messageElement.id),t.removeAttribute(SM)}_isElementDescribedByMessage(t,i){const r=MM(t,"aria-describedby"),s=this._messageRegistry.get(i),o=s&&s.messageElement.id;return!!o&&-1!=r.indexOf(o)}_canBeDescribed(t,i){if(!this._isElementNode(t))return!1;if(i&&"object"==typeof i)return!0;const r=null==i?"":`${i}`.trim(),s=t.getAttribute("aria-label");return!(!r||s&&s.trim()===r)}_isElementNode(t){return t.nodeType===this._document.ELEMENT_NODE}}return n.\u0275fac=function(t){return new(t||n)(Q(Ht),Q(Fi))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function dI(n,e){return"string"==typeof n?`${e||""}/${n}`:n}function oU(n,e){n.id||(n.id=`${sU}-${e}-${cI++}`)}class aU{constructor(e){this._items=e,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Ue,this._typeaheadSubscription=un.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=t=>t.disabled,this._pressedLetters=[],this.tabOut=new Ue,this.change=new Ue,e instanceof Wp&&(this._itemChangesSubscription=e.changes.subscribe(t=>{if(this._activeItem){const r=t.toArray().indexOf(this._activeItem);r>-1&&r!==this._activeItemIndex&&(this._activeItemIndex=r)}}))}skipPredicate(e){return this._skipPredicateFn=e,this}withWrap(e=!0){return this._wrap=e,this}withVerticalOrientation(e=!0){return this._vertical=e,this}withHorizontalOrientation(e){return this._horizontal=e,this}withAllowedModifierKeys(e){return this._allowedModifierKeys=e,this}withTypeAhead(e=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Ii(t=>this._pressedLetters.push(t)),Ah(e),On(()=>this._pressedLetters.length>0),Ye(()=>this._pressedLetters.join(""))).subscribe(t=>{const i=this._getItemsArray();for(let r=1;r!e[s]||this._allowedModifierKeys.indexOf(s)>-1);switch(t){case 9:return void this.tabOut.next();case 40:if(this._vertical&&r){this.setNextItemActive();break}return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}return;case 33:if(this._pageUpAndDown.enabled&&r){const s=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(s>0?s:0,1);break}return;case 34:if(this._pageUpAndDown.enabled&&r){const s=this._activeItemIndex+this._pageUpAndDown.delta,o=this._getItemsArray().length;this._setActiveItemByIndex(s=65&&t<=90||t>=48&&t<=57)&&this._letterKeyStream.next(String.fromCharCode(t))))}this._pressedLetters=[],e.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(e){const t=this._getItemsArray(),i="number"==typeof e?e:t.indexOf(e);this._activeItem=t[i]??null,this._activeItemIndex=i}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(e){this._wrap?this._setActiveInWrapMode(e):this._setActiveInDefaultMode(e)}_setActiveInWrapMode(e){const t=this._getItemsArray();for(let i=1;i<=t.length;i++){const r=(this._activeItemIndex+e*i+t.length)%t.length;if(!this._skipPredicateFn(t[r]))return void this.setActiveItem(r)}}_setActiveInDefaultMode(e){this._setActiveItemByIndex(this._activeItemIndex+e,e)}_setActiveItemByIndex(e,t){const i=this._getItemsArray();if(i[e]){for(;this._skipPredicateFn(i[e]);)if(!i[e+=t])return;this.setActiveItem(e)}}_getItemsArray(){return this._items instanceof Wp?this._items.toArray():this._items}}class tK extends aU{setActiveItem(e){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(e),this.activeItem&&this.activeItem.setActiveStyles()}}class lU extends aU{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(e){return this._origin=e,this}setActiveItem(e){super.setActiveItem(e),this.activeItem&&this.activeItem.focus(this._origin)}}let CM=(()=>{class n{constructor(t){this._platform=t}isDisabled(t){return t.hasAttribute("disabled")}isVisible(t){return function iK(n){return!!(n.offsetWidth||n.offsetHeight||"function"==typeof n.getClientRects&&n.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility}isTabbable(t){if(!this._platform.isBrowser)return!1;const i=function nK(n){try{return n.frameElement}catch{return null}}(function uK(n){return n.ownerDocument&&n.ownerDocument.defaultView||window}(t));if(i&&(-1===dU(i)||!this.isVisible(i)))return!1;let r=t.nodeName.toLowerCase(),s=dU(t);return t.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function cK(n){let e=n.nodeName.toLowerCase(),t="input"===e&&n.type;return"text"===t||"password"===t||"select"===e||"textarea"===e}(t))&&("audio"===r?!!t.hasAttribute("controls")&&-1!==s:"video"===r?-1!==s&&(null!==s||this._platform.FIREFOX||t.hasAttribute("controls")):t.tabIndex>=0)}isFocusable(t,i){return function dK(n){return!function sK(n){return function aK(n){return"input"==n.nodeName.toLowerCase()}(n)&&"hidden"==n.type}(n)&&(function rK(n){let e=n.nodeName.toLowerCase();return"input"===e||"select"===e||"button"===e||"textarea"===e}(n)||function oK(n){return function lK(n){return"a"==n.nodeName.toLowerCase()}(n)&&n.hasAttribute("href")}(n)||n.hasAttribute("contenteditable")||cU(n))}(t)&&!this.isDisabled(t)&&(i?.ignoreVisibility||this.isVisible(t))}}return n.\u0275fac=function(t){return new(t||n)(Q(Fi))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function cU(n){if(!n.hasAttribute("tabindex")||void 0===n.tabIndex)return!1;let e=n.getAttribute("tabindex");return!(!e||isNaN(parseInt(e,10)))}function dU(n){if(!cU(n))return null;const e=parseInt(n.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}class hK{get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}constructor(e,t,i,r,s=!1){this._element=e,this._checker=t,this._ngZone=i,this._document=r,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,s||this.attachAnchors()}destroy(){const e=this._startAnchor,t=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.remove()),t&&(t.removeEventListener("focus",this.endAnchorListener),t.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement(e)))})}focusFirstTabbableElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement(e)))})}focusLastTabbableElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement(e)))})}_getRegionBoundary(e){const t=this._element.querySelectorAll(`[cdk-focus-region-${e}], [cdkFocusRegion${e}], [cdk-focus-${e}]`);return"start"==e?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(e){const t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(!this._checker.isFocusable(t)){const i=this._getFirstTabbableElement(t);return i?.focus(e),!!i}return t.focus(e),!0}return this.focusFirstTabbableElement(e)}focusFirstTabbableElement(e){const t=this._getRegionBoundary("start");return t&&t.focus(e),!!t}focusLastTabbableElement(e){const t=this._getRegionBoundary("end");return t&&t.focus(e),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;const t=e.children;for(let i=0;i=0;i--){const r=t[i].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[i]):null;if(r)return r}return null}_createAnchor(){const e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e}_toggleAnchorTabIndex(e,t){e?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}toggleAnchors(e){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_executeOnStable(e){this._ngZone.isStable?e():this._ngZone.onStable.pipe(Li(1)).subscribe(e)}}let uI=(()=>{class n{constructor(t,i,r){this._checker=t,this._ngZone=i,this._document=r}create(t,i=!1){return new hK(t,this._checker,this._ngZone,this._document,i)}}return n.\u0275fac=function(t){return new(t||n)(Q(CM),Q(pt),Q(Ht))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function hI(n){return 0===n.buttons||0===n.offsetX&&0===n.offsetY}function fI(n){const e=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!e||-1!==e.identifier||null!=e.radiusX&&1!==e.radiusX||null!=e.radiusY&&1!==e.radiusY)}const fK=new ge("cdk-input-modality-detector-options"),pK={ignoreKeys:[18,17,224,91,16]},gm=Sh({passive:!0,capture:!0});let mK=(()=>{class n{get mostRecentModality(){return this._modality.value}constructor(t,i,r,s){this._platform=t,this._mostRecentTarget=null,this._modality=new Ct(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Xd(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(hI(o)?"keyboard":"mouse"),this._mostRecentTarget=Xd(o))},this._onTouchstart=o=>{fI(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Xd(o))},this._options={...pK,...s},this.modalityDetected=this._modality.pipe(JB(1)),this.modalityChanged=this.modalityDetected.pipe(qd()),t.isBrowser&&i.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,gm),r.addEventListener("mousedown",this._onMousedown,gm),r.addEventListener("touchstart",this._onTouchstart,gm)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,gm),document.removeEventListener("mousedown",this._onMousedown,gm),document.removeEventListener("touchstart",this._onTouchstart,gm))}}return n.\u0275fac=function(t){return new(t||n)(Q(Fi),Q(pt),Q(Ht),Q(fK,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const gK=new ge("liveAnnouncerElement",{providedIn:"root",factory:function _K(){return null}}),vK=new ge("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let yK=0,pI=(()=>{class n{constructor(t,i,r,s){this._ngZone=i,this._defaultOptions=s,this._document=r,this._liveElement=t||this._createLiveElement()}announce(t,...i){const r=this._defaultOptions;let s,o;return 1===i.length&&"number"==typeof i[0]?o=i[0]:[s,o]=i,this.clear(),clearTimeout(this._previousTimeout),s||(s=r&&r.politeness?r.politeness:"polite"),null==o&&r&&(o=r.duration),this._liveElement.setAttribute("aria-live",s),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(a=>this._currentResolve=a)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=t,"number"==typeof o&&(this._previousTimeout=setTimeout(()=>this.clear(),o)),this._currentResolve(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){const t="cdk-live-announcer-element",i=this._document.getElementsByClassName(t),r=this._document.createElement("div");for(let s=0;s .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{class n{constructor(t,i,r,s,o){this._ngZone=t,this._platform=i,this._inputModalityDetector=r,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new Ue,this._rootNodeFocusAndBlurListener=a=>{for(let c=Xd(a);c;c=c.parentElement)"focus"===a.type?this._onFocus(a,c):this._onBlur(a,c)},this._document=s,this._detectionMode=o?.detectionMode||0}monitor(t,i=!1){const r=Vc(t);if(!this._platform.isBrowser||1!==r.nodeType)return dt(null);const s=function nY(n){if(function tY(){if(null==tI){const n=typeof document<"u"?document.head:null;tI=!(!n||!n.createShadowRoot&&!n.attachShadow)}return tI}()){const e=n.getRootNode?n.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}(r)||this._getDocument(),o=this._elementInfo.get(r);if(o)return i&&(o.checkChildren=!0),o.subject;const a={checkChildren:i,subject:new Ue,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(t){const i=Vc(t),r=this._elementInfo.get(i);r&&(r.subject.complete(),this._setClasses(i),this._elementInfo.delete(i),this._removeGlobalListeners(r))}focusVia(t,i,r){const s=Vc(t);s===this._getDocument().activeElement?this._getClosestElementsInfo(s).forEach(([a,l])=>this._originChanged(a,i,l)):(this._setOrigin(i),"function"==typeof s.focus&&s.focus(r))}ngOnDestroy(){this._elementInfo.forEach((t,i)=>this.stopMonitoring(i))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(t){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(t)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:t&&this._isLastInteractionFromInputLabel(t)?"mouse":"program"}_shouldBeAttributedToTouch(t){return 1===this._detectionMode||!!t?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(t,i){t.classList.toggle("cdk-focused",!!i),t.classList.toggle("cdk-touch-focused","touch"===i),t.classList.toggle("cdk-keyboard-focused","keyboard"===i),t.classList.toggle("cdk-mouse-focused","mouse"===i),t.classList.toggle("cdk-program-focused","program"===i)}_setOrigin(t,i=!1){this._ngZone.runOutsideAngular(()=>{this._origin=t,this._originFromTouchInteraction="touch"===t&&i,0===this._detectionMode&&(clearTimeout(this._originTimeoutId),this._originTimeoutId=setTimeout(()=>this._origin=null,this._originFromTouchInteraction?650:1))})}_onFocus(t,i){const r=this._elementInfo.get(i),s=Xd(t);!r||!r.checkChildren&&i!==s||this._originChanged(i,this._getFocusOrigin(s),r)}_onBlur(t,i){const r=this._elementInfo.get(i);!r||r.checkChildren&&t.relatedTarget instanceof Node&&i.contains(t.relatedTarget)||(this._setClasses(i),this._emitOrigin(r,null))}_emitOrigin(t,i){t.subject.observers.length&&this._ngZone.run(()=>t.subject.next(i))}_registerGlobalListeners(t){if(!this._platform.isBrowser)return;const i=t.rootNode,r=this._rootNodeFocusListenerCount.get(i)||0;r||this._ngZone.runOutsideAngular(()=>{i.addEventListener("focus",this._rootNodeFocusAndBlurListener,EM),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,EM)}),this._rootNodeFocusListenerCount.set(i,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(et(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(t){const i=t.rootNode;if(this._rootNodeFocusListenerCount.has(i)){const r=this._rootNodeFocusListenerCount.get(i);r>1?this._rootNodeFocusListenerCount.set(i,r-1):(i.removeEventListener("focus",this._rootNodeFocusAndBlurListener,EM),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,EM),this._rootNodeFocusListenerCount.delete(i))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(t,i,r){this._setClasses(t,i),this._emitOrigin(r,i),this._lastFocusOrigin=i}_getClosestElementsInfo(t){const i=[];return this._elementInfo.forEach((r,s)=>{(s===t||r.checkChildren&&s.contains(t))&&i.push([s,r])}),i}_isLastInteractionFromInputLabel(t){const{_mostRecentTarget:i,mostRecentModality:r}=this._inputModalityDetector;if("mouse"!==r||!i||i===t||"INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName||t.disabled)return!1;const s=t.labels;if(s)for(let o=0;o{class n{constructor(t,i){this._platform=t,this._document=i,this._breakpointSubscription=Ot(lI).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return 0;const t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);const i=this._document.defaultView||window,r=i&&i.getComputedStyle?i.getComputedStyle(t):null,s=(r&&r.backgroundColor||"").replace(/ /g,"");switch(t.remove(),s){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return 2;case"rgb(255,255,255)":case"rgb(255,250,239)":return 1}return 0}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){const t=this._document.body.classList;t.remove(mI,hU,fU),this._hasCheckedHighContrastMode=!0;const i=this.getHighContrastMode();1===i?t.add(mI,hU):2===i&&t.add(mI,fU)}}}return n.\u0275fac=function(t){return new(t||n)(Q(Fi),Q(Ht))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),mU=(()=>{class n{constructor(t){t._applyBodyHighContrastModeCssClasses()}}return n.\u0275fac=function(t){return new(t||n)(Q(pU))},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[aI]}),n})();function xK(n,e){}class AM{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0,this.closeOnOverlayDetachments=!0}}let gU=(()=>{class n extends _M{constructor(t,i,r,s,o,a,l,c){super(),this._elementRef=t,this._focusTrapFactory=i,this._config=s,this._interactivityChecker=o,this._ngZone=a,this._overlayRef=l,this._focusMonitor=c,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this.attachDomPortal=u=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(u);return this._contentAttached(),h},this._ariaLabelledBy=this._config.ariaLabelledBy||null,this._document=r}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._restoreFocus()}attachComponentPortal(t){this._portalOutlet.hasAttached();const i=this._portalOutlet.attachComponentPortal(t);return this._contentAttached(),i}attachTemplatePortal(t){this._portalOutlet.hasAttached();const i=this._portalOutlet.attachTemplatePortal(t);return this._contentAttached(),i}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(t,i){this._interactivityChecker.isFocusable(t)||(t.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{const r=()=>{t.removeEventListener("blur",r),t.removeEventListener("mousedown",r),t.removeAttribute("tabindex")};t.addEventListener("blur",r),t.addEventListener("mousedown",r)})),t.focus(i)}_focusByCssSelector(t,i){let r=this._elementRef.nativeElement.querySelector(t);r&&this._forceFocus(r,i)}_trapFocus(){const t=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||t.focus();break;case!0:case"first-tabbable":this._focusTrap.focusInitialElementWhenReady().then(i=>{i||this._focusDialogContainer()});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus)}}_restoreFocus(){const t=this._config.restoreFocus;let i=null;if("string"==typeof t?i=this._document.querySelector(t):"boolean"==typeof t?i=t?this._elementFocusedBeforeDialogWasOpened:null:t&&(i=t),this._config.restoreFocus&&i&&"function"==typeof i.focus){const r=mM(),s=this._elementRef.nativeElement;(!r||r===this._document.body||r===s||s.contains(r))&&(this._focusMonitor?(this._focusMonitor.focusVia(i,this._closeInteractionType),this._closeInteractionType=null):i.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){const t=this._elementRef.nativeElement,i=mM();return t===i||t.contains(i)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=mM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(uI),D(Ht,8),D(AM),D(CM),D(pt),D(vy),D(Yd))},n.\u0275cmp=ht({type:n,selectors:[["cdk-dialog-container"]],viewQuery:function(t,i){if(1&t&&oi(dm,7),2&t){let r;Lt(r=Ft())&&(i._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(t,i){2&t&&Vt("id",i._config.id||null)("role",i._config.role)("aria-modal",i._config.ariaModal)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledBy)("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null)},features:[ft],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,i){1&t&&_e(0,xK,0,0,"ng-template",0)},dependencies:[dm],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2}),n})();class gI{constructor(e,t){this.overlayRef=e,this.config=t,this.closed=new Ue,this.disableClose=t.disableClose,this.backdropClick=e.backdropClick(),this.keydownEvents=e.keydownEvents(),this.outsidePointerEvents=e.outsidePointerEvents(),this.id=t.id,this.keydownEvents.subscribe(i=>{27===i.keyCode&&!this.disableClose&&!nl(i)&&(i.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=e.detachments().subscribe(()=>{!1!==t.closeOnOverlayDetachments&&this.close()})}close(e,t){if(this.containerInstance){const i=this.closed;this.containerInstance._closeInteractionType=t?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),i.next(e),i.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(e="",t=""){return this.overlayRef.updateSize({width:e,height:t}),this}addPanelClass(e){return this.overlayRef.addPanelClass(e),this}removePanelClass(e){return this.overlayRef.removePanelClass(e),this}}const _U=new ge("DialogScrollStrategy"),wK=new ge("DialogData"),MK=new ge("DefaultDialogConfig"),CK={provide:_U,deps:[mo],useFactory:function SK(n){return()=>n.scrollStrategies.block()}};let EK=0,vU=(()=>{class n{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(t,i,r,s,o,a){this._overlay=t,this._injector=i,this._defaultOptions=r,this._parentDialog=s,this._overlayContainer=o,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Ue,this._afterOpenedAtThisLevel=new Ue,this._ariaHiddenElements=new Map,this.afterAllClosed=jv(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(No(void 0))),this._scrollStrategy=a}open(t,i){(i={...this._defaultOptions||new AM,...i}).id=i.id||"cdk-dialog-"+EK++,i.id&&this.getDialogById(i.id);const s=this._getOverlayConfig(i),o=this._overlay.create(s),a=new gI(o,i),l=this._attachContainer(o,a,i);return a.containerInstance=l,this._attachDialogContent(t,a,l,i),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){_I(this.openDialogs,t=>t.close())}getDialogById(t){return this.openDialogs.find(i=>i.id===t)}ngOnDestroy(){_I(this._openDialogsAtThisLevel,t=>{!1===t.config.closeOnDestroy&&this._removeOpenDialog(t,!1)}),_I(this._openDialogsAtThisLevel,t=>t.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(t){const i=new _y({positionStrategy:t.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,width:t.width,height:t.height,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(i.backdropClass=t.backdropClass),i}_attachContainer(t,i,r){const s=r.injector||r.viewContainerRef?.injector,o=[{provide:AM,useValue:r},{provide:gI,useValue:i},{provide:vy,useValue:t}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=gU;const l=new lm(a,r.viewContainerRef,ki.create({parent:s||this._injector,providers:o}),r.componentFactoryResolver);return t.attach(l).instance}_attachDialogContent(t,i,r,s){if(t instanceof fo){const o=this._createInjector(s,i,r,void 0);let a={$implicit:s.data,dialogRef:i};s.templateContext&&(a={...a,..."function"==typeof s.templateContext?s.templateContext():s.templateContext}),r.attachTemplatePortal(new cm(t,null,a,o))}else{const o=this._createInjector(s,i,r,this._injector),a=r.attachComponentPortal(new lm(t,s.viewContainerRef,o,s.componentFactoryResolver));i.componentInstance=a.instance}}_createInjector(t,i,r,s){const o=t.injector||t.viewContainerRef?.injector,a=[{provide:wK,useValue:t.data},{provide:gI,useValue:i}];return t.providers&&("function"==typeof t.providers?a.push(...t.providers(i,t,r)):a.push(...t.providers)),t.direction&&(!o||!o.get(tl,null,{optional:!0}))&&a.push({provide:tl,useValue:{value:t.direction,change:dt()}}),ki.create({parent:o||s,providers:a})}_removeOpenDialog(t,i){const r=this.openDialogs.indexOf(t);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((s,o)=>{s?o.setAttribute("aria-hidden",s):o.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),i&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){const t=this._overlayContainer.getContainerElement();if(t.parentElement){const i=t.parentElement.children;for(let r=i.length-1;r>-1;r--){const s=i[r];s!==t&&"SCRIPT"!==s.nodeName&&"STYLE"!==s.nodeName&&!s.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(s,s.getAttribute("aria-hidden")),s.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){const t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}}return n.\u0275fac=function(t){return new(t||n)(Q(mo),Q(ki),Q(MK,8),Q(n,12),Q(wM),Q(_U))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();function _I(n,e){let t=n.length;for(;t--;)e(n[t])}let AK=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({providers:[vU,CK],imports:[pm,um,mU,um]}),n})();const TK=["text"];function DK(n,e){if(1&n&&Fe(0,"mat-pseudo-checkbox",6),2&n){const t=be();z("state",t.selected?"checked":"unchecked")("disabled",t.disabled)}}function IK(n,e){1&n&&Fe(0,"mat-pseudo-checkbox",7),2&n&&z("disabled",be().disabled)}function RK(n,e){if(1&n&&(K(0,"span",8),Je(1),J()),2&n){const t=be();j(1),nr("(",t.group.label,")")}}const PK=[[["mat-icon"]],"*"],kK=["mat-icon","*"],LK=new ge("mat-sanity-checks",{providedIn:"root",factory:function OK(){return!0}});let qn=(()=>{class n{constructor(t,i,r){this._sanityChecks=i,this._document=r,this._hasDoneGlobalChecks=!1,t._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(t){return!nI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[t])}}return n.\u0275fac=function(t){return new(t||n)(Q(pU),Q(LK,8),Q(Ht))},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[fy,fy]}),n})();function TM(n){return class extends n{get disabled(){return this._disabled}set disabled(e){this._disabled=Cn(e)}constructor(...e){super(...e),this._disabled=!1}}}function DM(n,e){return class extends n{get color(){return this._color}set color(t){const i=t||this.defaultColor;i!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove(`mat-${this._color}`),i&&this._elementRef.nativeElement.classList.add(`mat-${i}`),this._color=i)}constructor(...t){super(...t),this.defaultColor=e,this.color=e}}}function vI(n){return class extends n{get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=Cn(e)}constructor(...e){super(...e),this._disableRipple=!1}}}function xU(n,e=0){return class extends n{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(t){this._tabIndex=null!=t?Ys(t):this.defaultTabIndex}constructor(...t){super(...t),this._tabIndex=e,this.defaultTabIndex=e}}}function wU(n){return class extends n{updateErrorState(){const e=this.errorState,s=(this.errorStateMatcher||this._defaultErrorStateMatcher).isErrorState(this.ngControl?this.ngControl.control:null,this._parentFormGroup||this._parentForm);s!==e&&(this.errorState=s,this.stateChanges.next())}constructor(...e){super(...e),this.errorState=!1}}}function FK(n){return class extends n{constructor(...e){super(...e),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new Sn(t=>{this._isInitialized?this._notifySubscriber(t):this._pendingSubscribers.push(t)})}_markInitialized(){this._isInitialized=!0,this._pendingSubscribers.forEach(this._notifySubscriber),this._pendingSubscribers=null}_notifySubscriber(e){e.next(),e.complete()}}}let MU=(()=>{class n{isErrorState(t,i){return!!(t&&t.invalid&&(t.touched||i&&i.submitted))}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class BK{constructor(e,t,i,r=!1){this._renderer=e,this.element=t,this.config=i,this._animationForciblyDisabledThroughCss=r,this.state=3}fadeOut(){this._renderer.fadeOutRipple(this)}}const SU=Sh({passive:!0,capture:!0});class UK{constructor(){this._events=new Map,this._delegateEventHandler=e=>{const t=Xd(e);t&&this._events.get(e.type)?.forEach((i,r)=>{(r===t||r.contains(t))&&i.forEach(s=>s.handleEvent(e))})}}addHandler(e,t,i,r){const s=this._events.get(t);if(s){const o=s.get(i);o?o.add(r):s.set(i,new Set([r]))}else this._events.set(t,new Map([[i,new Set([r])]])),e.runOutsideAngular(()=>{document.addEventListener(t,this._delegateEventHandler,SU)})}removeHandler(e,t,i){const r=this._events.get(e);if(!r)return;const s=r.get(t);s&&(s.delete(i),0===s.size&&r.delete(t),0===r.size&&(this._events.delete(e),document.removeEventListener(e,this._delegateEventHandler,SU)))}}const CU={enterDuration:225,exitDuration:150},EU=Sh({passive:!0,capture:!0}),AU=["mousedown","touchstart"],TU=["mouseup","mouseleave","touchend","touchcancel"];class _m{constructor(e,t,i,r){this._target=e,this._ngZone=t,this._platform=r,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=Vc(i))}fadeInRipple(e,t,i={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...CU,...i.animation};i.centered&&(e=r.left+r.width/2,t=r.top+r.height/2);const o=i.radius||function zK(n,e,t){const i=Math.max(Math.abs(n-t.left),Math.abs(n-t.right)),r=Math.max(Math.abs(e-t.top),Math.abs(e-t.bottom));return Math.sqrt(i*i+r*r)}(e,t,r),a=e-r.left,l=t-r.top,c=s.enterDuration,u=document.createElement("div");u.classList.add("mat-ripple-element"),u.style.left=a-o+"px",u.style.top=l-o+"px",u.style.height=2*o+"px",u.style.width=2*o+"px",null!=i.color&&(u.style.backgroundColor=i.color),u.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(u);const h=window.getComputedStyle(u),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new BK(this,u,i,g);u.style.transform="scale3d(1, 1, 1)",b.state=0,i.persistent||(this._mostRecentTransientRipple=b);let y=null;return!g&&(c||s.exitDuration)&&this._ngZone.runOutsideAngular(()=>{const v=()=>this._finishRippleTransition(b),M=()=>this._destroyRipple(b);u.addEventListener("transitionend",v),u.addEventListener("transitioncancel",M),y={onTransitionEnd:v,onTransitionCancel:M}}),this._activeRipples.set(b,y),(g||!c)&&this._finishRippleTransition(b),b}fadeOutRipple(e){if(2===e.state||3===e.state)return;const t=e.element,i={...CU,...e.config.animation};t.style.transitionDuration=`${i.exitDuration}ms`,t.style.opacity="0",e.state=2,(e._animationForciblyDisabledThroughCss||!i.exitDuration)&&this._finishRippleTransition(e)}fadeOutAll(){this._getActiveRipples().forEach(e=>e.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(e=>{e.config.persistent||e.fadeOut()})}setupTriggerEvents(e){const t=Vc(e);!this._platform.isBrowser||!t||t===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=t,AU.forEach(i=>{_m._eventManager.addHandler(this._ngZone,i,t,this)}))}handleEvent(e){"mousedown"===e.type?this._onMousedown(e):"touchstart"===e.type?this._onTouchStart(e):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{TU.forEach(t=>{this._triggerElement.addEventListener(t,this,EU)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(e){0===e.state?this._startFadeOutTransition(e):2===e.state&&this._destroyRipple(e)}_startFadeOutTransition(e){const t=e===this._mostRecentTransientRipple,{persistent:i}=e.config;e.state=1,!i&&(!t||!this._isPointerDown)&&e.fadeOut()}_destroyRipple(e){const t=this._activeRipples.get(e)??null;this._activeRipples.delete(e),this._activeRipples.size||(this._containerRect=null),e===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),e.state=3,null!==t&&(e.element.removeEventListener("transitionend",t.onTransitionEnd),e.element.removeEventListener("transitioncancel",t.onTransitionCancel)),e.element.remove()}_onMousedown(e){const t=hI(e),i=this._lastTouchStartEvent&&Date.now(){!e.config.persistent&&(1===e.state||e.config.terminateOnPointerUp&&0===e.state)&&e.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){const e=this._triggerElement;e&&(AU.forEach(t=>_m._eventManager.removeHandler(t,e,this)),this._pointerUpEventsRegistered&&TU.forEach(t=>e.removeEventListener(t,this,EU)))}}_m._eventManager=new UK;const yI=new ge("mat-ripple-global-options");let by=(()=>{class n{get disabled(){return this._disabled}set disabled(t){t&&this.fadeOutAllNonPersistent(),this._disabled=t,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}constructor(t,i,r,s,o){this._elementRef=t,this._animationMode=o,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=s||{},this._rippleRenderer=new _m(this,i,t,r)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:{...this._globalOptions.animation,..."NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{},...this.animation},terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(t,i=0,r){return"number"==typeof t?this._rippleRenderer.fadeInRipple(t,i,{...this.rippleConfig,...r}):this._rippleRenderer.fadeInRipple(0,0,{...this.rippleConfig,...t})}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(pt),D(Fi),D(yI,8),D(rs,8))},n.\u0275dir=Ae({type:n,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(t,i){2&t&&Pn("mat-ripple-unbounded",i.unbounded)},inputs:{color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],radius:["matRippleRadius","radius"],animation:["matRippleAnimation","animation"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"]},exportAs:["matRipple"]}),n})(),IM=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[qn,qn]}),n})(),HK=(()=>{class n{constructor(t){this._animationMode=t,this.state="unchecked",this.disabled=!1,this.appearance="full"}}return n.\u0275fac=function(t){return new(t||n)(D(rs,8))},n.\u0275cmp=ht({type:n,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(t,i){2&t&&Pn("mat-pseudo-checkbox-indeterminate","indeterminate"===i.state)("mat-pseudo-checkbox-checked","checked"===i.state)("mat-pseudo-checkbox-disabled",i.disabled)("mat-pseudo-checkbox-minimal","minimal"===i.appearance)("mat-pseudo-checkbox-full","full"===i.appearance)("_mat-animation-noopable","NoopAnimations"===i._animationMode)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(t,i){},styles:['.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-full{border:2px solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}'],encapsulation:2,changeDetection:0}),n})(),DU=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[qn]}),n})();const IU=new ge("MAT_OPTION_PARENT_COMPONENT"),RU=new ge("MatOptgroup");let GK=0;class WK{constructor(e,t=!1){this.source=e,this.isUserInput=t}}let $K=(()=>{class n{get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(t){this._disabled=Cn(t)}get disableRipple(){return!(!this._parent||!this._parent.disableRipple)}get hideSingleSelectionIndicator(){return!(!this._parent||!this._parent.hideSingleSelectionIndicator)}constructor(t,i,r,s){this._element=t,this._changeDetectorRef=i,this._parent=r,this.group=s,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+GK++,this.onSelectionChange=new it,this._stateChanges=new Ue}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}deselect(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}focus(t,i){const r=this._getHostElement();"function"==typeof r.focus&&r.focus(i)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(t){(13===t.keyCode||32===t.keyCode)&&!nl(t)&&(this._selectViaInteraction(),t.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){const t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=t)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(t=!1){this.onSelectionChange.emit(new WK(this,t))}}return n.\u0275fac=function(t){Ya()},n.\u0275dir=Ae({type:n,viewQuery:function(t,i){if(1&t&&oi(TK,7),2&t){let r;Lt(r=Ft())&&(i._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),n})(),vm=(()=>{class n extends $K{constructor(t,i,r,s){super(t,i,r,s)}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(ci),D(IU,8),D(RU,8))},n.\u0275cmp=ht({type:n,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(t,i){1&t&&ct("click",function(){return i._selectViaInteraction()})("keydown",function(s){return i._handleKeydown(s)}),2&t&&(Nd("id",i.id),Vt("aria-selected",i.selected)("aria-disabled",i.disabled.toString()),Pn("mdc-list-item--selected",i.selected)("mat-mdc-option-multiple",i.multiple)("mat-mdc-option-active",i.active)("mdc-list-item--disabled",i.disabled))},exportAs:["matOption"],features:[ft],ngContentSelectors:kK,decls:8,vars:5,consts:[["class","mat-mdc-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mdc-list-item__primary-text"],["text",""],["class","mat-mdc-option-pseudo-checkbox","state","checked","appearance","minimal",3,"disabled",4,"ngIf"],["class","cdk-visually-hidden",4,"ngIf"],["mat-ripple","",1,"mat-mdc-option-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-mdc-option-pseudo-checkbox",3,"state","disabled"],["state","checked","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"]],template:function(t,i){1&t&&(Cr(PK),_e(0,DK,1,2,"mat-pseudo-checkbox",0),Kt(1),K(2,"span",1,2),Kt(4,1),J(),_e(5,IK,1,1,"mat-pseudo-checkbox",3),_e(6,RK,2,1,"span",4),Fe(7,"div",5)),2&t&&(z("ngIf",i.multiple),j(5),z("ngIf",!i.multiple&&i.selected&&!i.hideSingleSelectionIndicator),j(1),z("ngIf",i.group&&i.group._inert),j(1),z("matRippleTrigger",i._getHostElement())("matRippleDisabled",i.disabled||i.disableRipple))},dependencies:[by,gi,HK],styles:['.mat-mdc-option{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:16px;padding-right:16px;-webkit-user-select:none;user-select:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);min-height:48px}.mat-mdc-option:focus{outline:none}[dir=rtl] .mat-mdc-option,.mat-mdc-option[dir=rtl]{padding-left:16px;padding-right:16px}.mat-mdc-option.mdc-list-item{align-items:center}.mat-mdc-option.mdc-list-item--disabled{opacity:.38;cursor:default}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}.cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{right:auto;left:16px}.mat-mdc-option-active .mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0}),n})(),bI=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[IM,va,qn,DU]}),n})();class PU{}class qK{}const zc="*";function Gl(n,e){return{type:7,name:n,definitions:e,options:{}}}function go(n,e=null){return{type:4,styles:e,timings:n}}function OU(n,e=null){return{type:2,steps:n,options:e}}function Ci(n){return{type:6,styles:n,offset:null}}function _o(n,e,t){return{type:0,name:n,styles:e,options:t}}function Ks(n,e,t=null){return{type:1,expr:n,animation:e,options:t}}function xI(n=null){return{type:9,options:n}}function wI(n,e,t=null){return{type:11,selector:n,animation:e,options:t}}function LU(n){Promise.resolve().then(n)}class xy{constructor(e=0,t=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=e+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){LU(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(e){this._position=this.totalTime?e*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}class FU{constructor(e){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;let t=0,i=0,r=0;const s=this.players.length;0==s?LU(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++t==s&&this._onFinish()}),o.onDestroy(()=>{++i==s&&this._onDestroy()}),o.onStart(()=>{++r==s&&this._onStart()})}),this.totalTime=this.players.reduce((o,a)=>Math.max(o,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this.players.forEach(e=>e.init())}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(e=>e()),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play())}pause(){this.players.forEach(e=>e.pause())}restart(){this.players.forEach(e=>e.restart())}finish(){this._onFinish(),this.players.forEach(e=>e.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this.players.forEach(e=>e.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){const t=e*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,t/i.totalTime):1;i.setPosition(r)})}getPosition(){const e=this.players.reduce((t,i)=>null===t||i.totalTime>t.totalTime?i:t,null);return null!=e?e.getPosition():0}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}const MI="!";function YK(n,e){}class RM{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0}}const SI="mdc-dialog--open",NU="mdc-dialog--opening",BU="mdc-dialog--closing";let QK=(()=>{class n extends gU{constructor(t,i,r,s,o,a,l,c){super(t,i,r,s,o,a,l,c),this._animationStateChanged=new it}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(t){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:t})}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(uI),D(Ht,8),D(RM),D(CM),D(pt),D(vy),D(Yd))},n.\u0275cmp=ht({type:n,selectors:[["ng-component"]],features:[ft],decls:0,vars:0,template:function(t,i){},encapsulation:2}),n})();const UU="--mat-dialog-transition-duration";function VU(n){return null==n?null:"number"==typeof n?n:n.endsWith("ms")?Ys(n.substring(0,n.length-2)):n.endsWith("s")?1e3*Ys(n.substring(0,n.length-1)):"0"===n?0:null}let JK=(()=>{class n extends QK{constructor(t,i,r,s,o,a,l,c,u){super(t,i,r,s,o,a,l,u),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?VU(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?VU(this._config.exitAnimationDuration)??75:0,this._animationTimer=null,this._finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._openAnimationDuration)},this._finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._closeAnimationDuration})}}_contentAttached(){super._contentAttached(),this._startOpenAnimation()}ngOnDestroy(){super.ngOnDestroy(),null!==this._animationTimer&&clearTimeout(this._animationTimer)}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._openAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(UU,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(NU,SI)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(SI),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(SI),this._animationsEnabled?(this._hostElement.style.setProperty(UU,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(BU)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(NU,BU)}_waitForAnimationToComplete(t,i){null!==this._animationTimer&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(i,t)}_requestAnimationFrame(t){this._ngZone.runOutsideAngular(()=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(t):t()})}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(uI),D(Ht,8),D(RM),D(CM),D(pt),D(vy),D(rs,8),D(Yd))},n.\u0275cmp=ht({type:n,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(t,i){2&t&&(Nd("id",i._config.id),Vt("aria-modal",i._config.ariaModal)("role",i._config.role)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledBy)("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null),Pn("_mat-animation-noopable",!i._animationsEnabled))},features:[ft],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(t,i){1&t&&(K(0,"div",0)(1,"div",1),_e(2,YK,0,0,"ng-template",2),J()())},dependencies:[dm],styles:['.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog{display:none;z-index:var(--mdc-dialog-z-index, 7)}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media(max-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media(min-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media(max-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media(max-width: 720px)and (min-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media(max-width: 720px)and (max-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media(max-width: 720px)and (min-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media(max-width: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-height: 400px),(max-width: 600px),(min-width: 720px)and (max-height: 400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(min-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;transform:scale(0.8);opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}[dir=rtl] .mdc-dialog__surface,.mdc-dialog__surface[dir=rtl]{text-align:right}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-dialog__surface::before{border-color:CanvasText}}@media screen and (-ms-high-contrast: active),screen and (-ms-high-contrast: none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mdc-dialog__title,.mdc-dialog__title[dir=rtl]{text-align:right}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid rgba(0,0,0,0);display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}@media screen and (forced-colors: active){.mdc-dialog--fullscreen .mdc-dialog__header{border-bottom-color:CanvasText}}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--fullscreen--titleless .mdc-dialog__close{margin-top:4px}.mdc-dialog--fullscreen--titleless.mdc-dialog--scrollable .mdc-dialog__close{margin-top:0}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__title+.mdc-dialog__content,.mdc-dialog__header+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{margin-left:0;margin-right:8px}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button:first-child,.mdc-dialog__button:first-child[dir=rtl]{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{text-align:left}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--open,.mdc-dialog--opening,.mdc-dialog--closing{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear,transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-dialog--closing .mdc-dialog__scrim,.mdc-dialog--closing .mdc-dialog__container{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{transform:none;opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%;z-index:1}.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}.mdc-dialog--no-content-padding .mdc-dialog__content{padding:0}.mdc-dialog--sheet .mdc-dialog__close{right:12px;top:9px;position:absolute;z-index:1}.mdc-dialog__scrim--removed{pointer-events:none}.mdc-dialog__scrim--removed .mdc-dialog__scrim,.mdc-dialog__scrim--removed .mdc-dialog__surface-scrim{display:none}.mat-mdc-dialog-content{max-height:65vh}.mat-mdc-dialog-container{position:static;display:block}.mat-mdc-dialog-container,.mat-mdc-dialog-container .mdc-dialog__container,.mat-mdc-dialog-container .mdc-dialog__surface{max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mat-mdc-dialog-container .mdc-dialog__surface{display:block;width:100%;height:100%}.mat-mdc-dialog-container{outline:0}.mat-mdc-dialog-container .mdc-dialog__surface{background-color:var(--mdc-dialog-container-color, white)}.mat-mdc-dialog-container .mdc-dialog__surface{box-shadow:var(--mdc-dialog-container-elevation, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12))}.mat-mdc-dialog-container .mdc-dialog__surface{border-radius:var(--mdc-dialog-container-shape, var(--mdc-shape-medium, 4px))}.mat-mdc-dialog-container.mdc-dialog--scrollable .mdc-dialog__title,.mat-mdc-dialog-container.mdc-dialog--scrollable .mdc-dialog__actions,.mat-mdc-dialog-container.mdc-dialog--scrollable.mdc-dialog-scroll-divider-footer .mdc-dialog__actions{border-color:var(--mdc-dialog-with-divider-divider-color, black)}.mat-mdc-dialog-container.mdc-dialog--scrollable .mdc-dialog__title{border-bottom-color:var(--mdc-dialog-with-divider-divider-color, black)}.mat-mdc-dialog-container .mdc-dialog__title{font-family:var(--mdc-dialog-subhead-font, "Arial");line-height:var(--mdc-dialog-subhead-line-height, 14px);font-size:var(--mdc-dialog-subhead-size, 14px);font-weight:var(--mdc-dialog-subhead-weight, 500);letter-spacing:var(--mdc-dialog-subhead-tracking, 1px)}.mat-mdc-dialog-container .mdc-dialog__title{color:var(--mdc-dialog-subhead-color, black)}.mat-mdc-dialog-container .mdc-dialog__content{font-family:var(--mdc-dialog-supporting-text-font, "Arial");line-height:var(--mdc-dialog-supporting-text-line-height, 14px);font-size:var(--mdc-dialog-supporting-text-size, 14px);font-weight:var(--mdc-dialog-supporting-text-weight, 500);letter-spacing:var(--mdc-dialog-supporting-text-tracking, 1px)}.mat-mdc-dialog-container .mdc-dialog__content{color:var(--mdc-dialog-supporting-text-color, black)}.mat-mdc-dialog-container .mdc-dialog__container{transition-duration:var(--mat-dialog-transition-duration, 0ms)}.mat-mdc-dialog-container._mat-animation-noopable .mdc-dialog__container{transition:none}.mat-mdc-dialog-content{display:block}.mat-mdc-dialog-actions{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2}),n})();class wy{constructor(e,t,i){this._ref=e,this._containerInstance=i,this._afterOpened=new Ue,this._beforeClosed=new Ue,this._state=0,this.disableClose=t.disableClose,this.id=e.id,i._animationStateChanged.pipe(On(r=>"opened"===r.state),Li(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),i._animationStateChanged.pipe(On(r=>"closed"===r.state),Li(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),e.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),cs(this.backdropClick(),this.keydownEvents().pipe(On(r=>27===r.keyCode&&!this.disableClose&&!nl(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),zU(this,"keydown"===r.type?"keyboard":"mouse"))})}close(e){this._result=e,this._containerInstance._animationStateChanged.pipe(On(t=>"closing"===t.state),Li(1)).subscribe(t=>{this._beforeClosed.next(e),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),t.totalTime+100)}),this._state=1,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(e){let t=this._ref.config.positionStrategy;return e&&(e.left||e.right)?e.left?t.left(e.left):t.right(e.right):t.centerHorizontally(),e&&(e.top||e.bottom)?e.top?t.top(e.top):t.bottom(e.bottom):t.centerVertically(),this._ref.updatePosition(),this}updateSize(e="",t=""){return this._ref.updateSize(e,t),this}addPanelClass(e){return this._ref.addPanelClass(e),this}removePanelClass(e){return this._ref.removePanelClass(e),this}getState(){return this._state}_finishDialogClose(){this._state=2,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}}function zU(n,e,t){return n._closeInteractionType=e,n.close(t)}const CI=new ge("MatMdcDialogData"),eZ=new ge("mat-mdc-dialog-default-options"),HU=new ge("mat-mdc-dialog-scroll-strategy"),nZ={provide:HU,deps:[mo],useFactory:function tZ(n){return()=>n.scrollStrategies.block()}};let iZ=0,rZ=(()=>{class n{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){const t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}constructor(t,i,r,s,o,a,l,c,u,h){this._overlay=t,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=u,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Ue,this._afterOpenedAtThisLevel=new Ue,this._idPrefix="mat-dialog-",this.dialogConfigClass=RM,this.afterAllClosed=jv(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(No(void 0))),this._scrollStrategy=a,this._dialog=i.get(vU)}open(t,i){let r;(i={...this._defaultOptions||new RM,...i}).id=i.id||`${this._idPrefix}${iZ++}`,i.scrollStrategy=i.scrollStrategy||this._scrollStrategy();const s=this._dialog.open(t,{...i,positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:i},{provide:AM,useValue:i}]},templateContext:()=>({dialogRef:r}),providers:(o,a,l)=>(r=new this._dialogRefConstructor(o,i,l),r.updatePosition(i?.position),[{provide:this._dialogContainerType,useValue:l},{provide:this._dialogDataToken,useValue:a.data},{provide:this._dialogRefConstructor,useValue:r}])});return r.componentInstance=s.componentInstance,this.openDialogs.push(r),this.afterOpened.next(r),r.afterClosed().subscribe(()=>{const o=this.openDialogs.indexOf(r);o>-1&&(this.openDialogs.splice(o,1),this.openDialogs.length||this._getAfterAllClosed().next())}),r}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(t){return this.openDialogs.find(i=>i.id===t)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(t){let i=t.length;for(;i--;)t[i].close()}}return n.\u0275fac=function(t){Ya()},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),My=(()=>{class n extends rZ{constructor(t,i,r,s,o,a,l,c){super(t,i,s,a,l,o,wy,JK,CI,c),this._idPrefix="mat-mdc-dialog-"}}return n.\u0275fac=function(t){return new(t||n)(Q(mo),Q(ki),Q(Lv,8),Q(eZ,8),Q(HU),Q(n,12),Q(wM),Q(rs,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),sZ=0,oZ=(()=>{class n{constructor(t,i,r){this.dialogRef=t,this._elementRef=i,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=jU(this._elementRef,this._dialog.openDialogs))}ngOnChanges(t){const i=t._matDialogClose||t._matDialogCloseResult;i&&(this.dialogResult=i.currentValue)}_onButtonClick(t){zU(this.dialogRef,0===t.screenX&&0===t.screenY?"keyboard":"mouse",this.dialogResult)}}return n.\u0275fac=function(t){return new(t||n)(D(wy,8),D(yt),D(My))},n.\u0275dir=Ae({type:n,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(t,i){1&t&&ct("click",function(s){return i._onButtonClick(s)}),2&t&&Vt("aria-label",i.ariaLabel||null)("type",i.type)},inputs:{ariaLabel:["aria-label","ariaLabel"],type:"type",dialogResult:["mat-dialog-close","dialogResult"],_matDialogClose:["matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[zi]}),n})(),GU=(()=>{class n{constructor(t,i,r){this._dialogRef=t,this._elementRef=i,this._dialog=r,this.id="mat-mdc-dialog-title-"+sZ++}ngOnInit(){this._dialogRef||(this._dialogRef=jU(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{const t=this._dialogRef._containerInstance;t&&!t._ariaLabelledBy&&(t._ariaLabelledBy=this.id)})}}return n.\u0275fac=function(t){return new(t||n)(D(wy,8),D(yt),D(My))},n.\u0275dir=Ae({type:n,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(t,i){2&t&&Nd("id",i.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),n})(),WU=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),n})(),$U=(()=>{class n{constructor(){this.align="start"}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:4,hostBindings:function(t,i){2&t&&Pn("mat-mdc-dialog-actions-align-center","center"===i.align)("mat-mdc-dialog-actions-align-end","end"===i.align)},inputs:{align:"align"}}),n})();function jU(n,e){let t=n.nativeElement.parentElement;for(;t&&!t.classList.contains("mat-mdc-dialog-container");)t=t.parentElement;return t?e.find(i=>i.id===t.id):null}let aZ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({providers:[My,nZ],imports:[AK,pm,um,qn,qn]}),n})();const lZ=["mat-button",""],cZ=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],dZ=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],hZ=["mat-icon-button",""],fZ=["*"],pZ=[{selector:"mat-button",mdcClasses:["mdc-button","mat-mdc-button"]},{selector:"mat-flat-button",mdcClasses:["mdc-button","mdc-button--unelevated","mat-mdc-unelevated-button"]},{selector:"mat-raised-button",mdcClasses:["mdc-button","mdc-button--raised","mat-mdc-raised-button"]},{selector:"mat-stroked-button",mdcClasses:["mdc-button","mdc-button--outlined","mat-mdc-outlined-button"]},{selector:"mat-fab",mdcClasses:["mdc-fab","mat-mdc-fab"]},{selector:"mat-mini-fab",mdcClasses:["mdc-fab","mdc-fab--mini","mat-mdc-mini-fab"]},{selector:"mat-icon-button",mdcClasses:["mdc-icon-button","mat-mdc-icon-button"]}],mZ=DM(TM(vI(class{constructor(n){this._elementRef=n}})));let qU=(()=>{class n extends mZ{constructor(t,i,r,s){super(t),this._platform=i,this._ngZone=r,this._animationMode=s,this._focusMonitor=Ot(Yd),this._isFab=!1;const o=t.nativeElement.classList;for(const a of pZ)this._hasHostAttributes(a.selector)&&a.mdcClasses.forEach(l=>{o.add(l)})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}focus(t="program",i){t?this._focusMonitor.focusVia(this._elementRef.nativeElement,t,i):this._elementRef.nativeElement.focus(i)}_hasHostAttributes(...t){return t.some(i=>this._elementRef.nativeElement.hasAttribute(i))}_isRippleDisabled(){return this.disableRipple||this.disabled}}return n.\u0275fac=function(t){Ya()},n.\u0275dir=Ae({type:n,viewQuery:function(t,i){if(1&t&&oi(by,5),2&t){let r;Lt(r=Ft())&&(i.ripple=r.first)}},features:[ft]}),n})(),PM=(()=>{class n extends qU{constructor(t,i,r,s){super(t,i,r,s)}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(Fi),D(pt),D(rs,8))},n.\u0275cmp=ht({type:n,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""]],hostVars:7,hostBindings:function(t,i){2&t&&(Vt("disabled",i.disabled||null),Pn("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-unthemed",!i.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[ft],attrs:lZ,ngContentSelectors:dZ,decls:8,vars:6,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(t,i){1&t&&(Cr(cZ),Fe(0,"span",0),Kt(1),K(2,"span",1),Kt(3,1),J(),Kt(4,2),Fe(5,"span",2)(6,"span",3)(7,"span",4)),2&t&&(Pn("mdc-button__ripple",!i._isFab)("mdc-fab__ripple",i._isFab),j(6),z("matRippleDisabled",i._isRippleDisabled())("matRippleTrigger",i._elementRef.nativeElement))},dependencies:[by],styles:['.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0)}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__progress-indicator{font-size:0;position:absolute;transform:translate(-50%, -50%);top:50%;left:50%;line-height:initial}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(\n 100% + 4px\n );width:calc(\n 100% + 4px\n );display:none}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring{border-color:CanvasText}}.mdc-button .mdc-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring::after{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{display:block}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button{height:var(--mdc-text-button-container-height, 36px);border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, inherit)}.mat-mdc-button:disabled{color:var(--mdc-text-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button{height:var(--mdc-filled-button-container-height, 36px);border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button:not(:disabled){background-color:var(--mdc-filled-button-container-color, transparent)}.mat-mdc-unelevated-button:disabled{background-color:var(--mdc-filled-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, inherit)}.mat-mdc-unelevated-button:disabled{color:var(--mdc-filled-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button{height:var(--mdc-protected-button-container-height, 36px);border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px));box-shadow:var(--mdc-protected-button-container-elevation, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){background-color:var(--mdc-protected-button-container-color, transparent)}.mat-mdc-raised-button:disabled{background-color:var(--mdc-protected-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, inherit)}.mat-mdc-raised-button:disabled{color:var(--mdc-protected-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button.mdc-ripple-upgraded--background-focused,.mat-mdc-raised-button:not(.mdc-ripple-upgraded):focus{box-shadow:var(--mdc-protected-button-focus-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled):active{box-shadow:var(--mdc-protected-button-pressed-container-elevation, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button{height:var(--mdc-outlined-button-container-height, 36px);border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px));padding:0 15px 0 15px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, inherit)}.mat-mdc-outlined-button:disabled{color:var(--mdc-outlined-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-outlined-button .mdc-button__ripple{border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-outlined-button:not(:disabled){border-color:var(--mdc-outlined-button-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button:disabled{border-color:var(--mdc-outlined-button-disabled-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button.mdc-button--icon-trailing{padding:0 11px 0 15px}.mat-mdc-outlined-button.mdc-button--icon-leading{padding:0 15px 0 11px}.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button .mdc-button__touch{left:calc(-1 * var(--mdc-outlined-button-outline-width, 1px));width:calc(100% + 2 * var(--mdc-outlined-button-outline-width, 1px))}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-button .mat-ripple-element,.mat-mdc-unelevated-button .mat-ripple-element,.mat-mdc-raised-button .mat-ripple-element,.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-button .mdc-button__label,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-outlined-button .mdc-button__label{z-index:1}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button[disabled],.mat-mdc-unelevated-button[disabled],.mat-mdc-raised-button[disabled],.mat-mdc-outlined-button[disabled]{cursor:default;pointer-events:none}.mat-mdc-button .mat-mdc-button-touch-target,.mat-mdc-unelevated-button .mat-mdc-button-touch-target,.mat-mdc-raised-button .mat-mdc-button-touch-target,.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}[dir=rtl] .mat-mdc-button>.mat-icon,.mat-mdc-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}.mat-mdc-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon,.mat-mdc-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem;margin-left:-4px;margin-right:8px}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:-4px}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon,.mat-mdc-raised-button .mdc-button__label+.mat-icon,.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:-4px}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon,.mat-mdc-unelevated-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-raised-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-outlined-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:-4px;margin-right:8px}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px) * -1)}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0}),n})(),EI=(()=>{class n extends qU{constructor(t,i,r,s){super(t,i,r,s)}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(Fi),D(pt),D(rs,8))},n.\u0275cmp=ht({type:n,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(t,i){2&t&&(Vt("disabled",i.disabled||null),Pn("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-unthemed",!i.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[ft],attrs:hZ,ngContentSelectors:fZ,decls:5,vars:3,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(t,i){1&t&&(Cr(),Fe(0,"span",0),Kt(1),Fe(2,"span",1)(3,"span",2)(4,"span",3)),2&t&&(j(3),z("matRippleDisabled",i._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",i._elementRef.nativeElement))},dependencies:[by],styles:['.mdc-icon-button{font-size:24px;width:48px;height:48px;padding:12px}.mdc-icon-button .mdc-icon-button__focus-ring{max-height:48px;max-width:48px}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:40px;height:40px;margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button svg,.mdc-icon-button img{width:24px;height:24px}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block}}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button[hidden]{display:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%;display:none}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring{border-color:CanvasText}}.mdc-icon-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}.mat-mdc-icon-button{height:var(--mdc-icon-button-state-layer-size, 48px);width:var(--mdc-icon-button-state-layer-size, 48px);color:var(--mdc-icon-button-icon-color, inherit);border-radius:50%;flex-shrink:0;text-align:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mdc-button__icon{font-size:var(--mdc-icon-button-icon-size, 24px)}.mat-mdc-icon-button svg,.mat-mdc-icon-button img{width:var(--mdc-icon-button-icon-size, 24px);height:var(--mdc-icon-button-icon-size, 24px)}.mat-mdc-icon-button:disabled{opacity:var(--mdc-icon-button-disabled-icon-opacity, 0.38)}.mat-mdc-icon-button:disabled{color:var(--mdc-icon-button-disabled-icon-color, #000)}.mat-mdc-icon-button svg{vertical-align:baseline}.mat-mdc-icon-button[disabled]{cursor:default;pointer-events:none;opacity:1}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-icon-button .mdc-button__label{z-index:1}.mat-mdc-icon-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0}),n})(),AI=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[qn,IM,qn]}),n})();const vZ=["class","dialog"];let YU=(()=>{class n{constructor(t,i){this.dialogRef=t,this.data=i}}return n.\u0275fac=function(t){return new(t||n)(D(wy),D(CI))},n.\u0275cmp=ht({type:n,selectors:[["app-confirm",8,"dialog"]],attrs:vZ,decls:10,vars:2,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["mat-dialog-actions",""],["mat-button","",3,"click"],["mat-button","","cdkFocusInitial","",3,"mat-dialog-close"]],template:function(t,i){1&t&&(K(0,"h1",0),Je(1,"Confirmation"),J(),K(2,"div",1)(3,"p"),Je(4),J()(),K(5,"div",2)(6,"button",3),ct("click",function(){return i.dialogRef.close()}),Je(7,"Cancel"),J(),K(8,"button",4),Je(9,"Yes"),J()()),2&t&&(j(4),$i(i.data.text),j(4),z("mat-dialog-close",!0))},dependencies:[PM,oZ,GU,WU,$U]}),n})();function TI(n,e){const t="object"==typeof e;return new Promise((i,r)=>{const s=new Qo({next:o=>{i(o),s.unsubscribe()},error:r,complete:()=>{t?i(e.defaultValue):r(new Wv)}});n.subscribe(s)})}let Hc=(()=>{class n{constructor(t){this.ngZone=t,this.openedResource$=new Ct(null),this.openedResourcePath$=new Ct(null),eel.expose(this.wrapHandler(this.openFile),"open_file"),eel.on_angular_ready(),setTimeout(xt(function*(){for(;;){if(eel._websocket){eel._websocket.onclose=()=>window.close();break}yield new Promise(i=>setTimeout(i,0))}}),0)}wrapHandler(t){return(...i)=>{try{pt.assertInAngularZone(),t.bind(this)(...i)}catch{this.ngZone.run(t,this,i)}}}openFile(t,i=!1){var r=this;return xt(function*(){r.openedResource$.next(null),r.openedResourcePath$.next(null);const s=yield eel.open_file(t,i)();r.openedResource$.next({...s,id:s.name}),r.openedResourcePath$.next(t)})()}openFileWithSystemApp(t){return xt(function*(){yield eel.open_file_with_system_app(t)()})()}retrieveValue(t){return xt(function*(){return yield eel.retrieve_value(t)()})()}runCustomAction(t,i,r){return xt(function*(){return eel.run_custom_action(t,i,r)()})()}saveFile(t){var i=this;return xt(function*(){const r=i.openedResource$.getValue();if(!r)return;const s=yield eel.save_file(i.openedResourcePath$.getValue(),t)();i.openedResource$.next({id:r.id,name:r.name,schema:r.schema,data:s})})()}serializeResource(t,i={}){return xt(function*(){return eel.serialize_resource(t,i)()})()}serializeResourceTmp(t,i,r={}){return xt(function*(){return eel.serialize_resource_tmp(t,i,r)()})()}serializeReversible(t,i){return xt(function*(){return eel.serialize_reversible(t,i)()})()}deserializeResource(t){return xt(function*(){return eel.deserialize_resource(t)()})()}}return n.\u0275fac=function(t){return new(t||n)(Q(pt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();var DI=qr(489);const KU=n=>!(!n||"object"!=typeof n),ZU=(n={},e,t,i=[])=>{const r=[];if(KU(n)){const s=Object.entries(n);for(let o=0;o{class n{constructor(t){var i=this;this.eelDelegate=t,this._hasUnsavedChanges$=new Ct(!1),this.resource$=new Ct(null),this.error$=new Ct(null),this.customActionRunning$=new Ct(!1),this.changedDataBlocks={},this.dataBlockChange$=new Ue,this.hideHiddenFields$=new Ct(!0),this.eelDelegate.openedResource$.subscribe(r=>{if(this.clearUnsavedChanges(),r?.data.error_class)this.error$.next(r),this.resource$.next(null);else if(r?.schema){const s=ZU(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,u=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!u&&c[h]?.block_class_mro===l&&(u=c[h]),c=c[h];c[a[a.length-1]]=u}this.resource$.next(r),this.error$.next(null)}else this.resource$.next(null),this.error$.next(null)}),this.dataBlockChange$.subscribe(function(){var r=xt(function*([s,o]){i.changedDataBlocks[s]=o,i.updateUnsavedChanges();const a=yield i.eelDelegate.retrieveValue(s);i.changedDataBlocks[s]==o&&((0,DI.isNumber)(o)?Math.abs(o-a)<1e-10:(0,DI.isEqual)(o,a))&&(delete i.changedDataBlocks[s],i.updateUnsavedChanges())});return function(s){return r.apply(this,arguments)}}())}updateUnsavedChanges(){this._hasUnsavedChanges$.next(Object.keys(this.changedDataBlocks).length>0)}get hasUnsavedChanges$(){return this._hasUnsavedChanges$.asObservable()}get hasUnsavedChanges(){return this._hasUnsavedChanges$.getValue()}clearUnsavedChanges(){Object.keys(this.changedDataBlocks).forEach(t=>{delete this.changedDataBlocks[t]}),this.updateUnsavedChanges()}processExternalChanges(t,i){var r=this;return xt(function*(){r.customActionRunning$.next(!0);const s=yield i();if(s.error_class)throw r.customActionRunning$.next(!1),s;if(r.resource$.getValue().id===t)r.resource$.getValue().data=s;else{let o=t.substring(r.resource$.getValue().id.length).replace("__","/").split("/").filter(c=>c),a=r.resource$.getValue().data;for(const c of o.slice(0,o.length-1))a=a[c]||a[+c];let l=o[o.length-1];void 0===a[l]&&void 0!==a[+l]&&(l=+l),a[l]=s}r.clearUnsavedChanges(),r.changedDataBlocks.__has_external_changes__=1,r.updateUnsavedChanges(),r.customActionRunning$.next(!1)})()}runCustomAction(t,i,r){var s=this;return xt(function*(){return s.processExternalChanges(t,()=>s.eelDelegate.runCustomAction(t,i,r))})()}deserializeResource(t){var i=this;return xt(function*(){return i.processExternalChanges(t,()=>i.eelDelegate.deserializeResource(t))})()}reloadResource(){var t=this;return xt(function*(){const i=t.eelDelegate.openedResourcePath$.getValue();i&&t.eelDelegate.openFile(i,!0).then()})()}saveResource(){var t=this;return xt(function*(){const i=Object.entries(t.changedDataBlocks).filter(([r,s])=>"__has_external_changes__"!=r);yield t.eelDelegate.saveFile(i.map(([r,s])=>({id:r,value:s}))),t.clearUnsavedChanges()})()}}return n.\u0275fac=function(t){return new(t||n)(Q(Hc))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function yZ(n,e){if(1&n){const t=Wi();K(0,"div",2)(1,"button",3),ct("click",function(){return Dn(t),In(be().action())}),Je(2),J()()}if(2&n){const t=be();j(2),nr(" ",t.data.action," ")}}const bZ=["label"];function xZ(n,e){}const wZ=Math.pow(2,31)-1;class II{constructor(e,t){this._overlayRef=t,this._afterDismissed=new Ue,this._afterOpened=new Ue,this._onAction=new Ue,this._dismissedByAction=!1,this.containerInstance=e,e._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(e){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(e,wZ))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}}const QU=new ge("MatSnackBarData");class kM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let MZ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),n})(),SZ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),n})(),CZ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),n})(),EZ=(()=>{class n{constructor(t,i){this.snackBarRef=t,this.data=i}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}}return n.\u0275fac=function(t){return new(t||n)(D(II),D(QU))},n.\u0275cmp=ht({type:n,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions","",4,"ngIf"],["matSnackBarActions",""],["mat-button","","matSnackBarAction","",3,"click"]],template:function(t,i){1&t&&(K(0,"div",0),Je(1),J(),_e(2,yZ,3,1,"div",1)),2&t&&(j(1),nr(" ",i.data.message,"\n"),j(1),z("ngIf",i.hasAction))},dependencies:[gi,PM,MZ,SZ,CZ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),n})();const AZ={snackBarState:Gl("state",[_o("void, hidden",Ci({transform:"scale(0.8)",opacity:0})),_o("visible",Ci({transform:"scale(1)",opacity:1})),Ks("* => visible",go("150ms cubic-bezier(0, 0, 0.2, 1)")),Ks("* => void, * => hidden",go("75ms cubic-bezier(0.4, 0.0, 1, 1)",Ci({opacity:0})))])};let TZ=0,DZ=(()=>{class n extends _M{constructor(t,i,r,s,o){super(),this._ngZone=t,this._elementRef=i,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Ot(Ht),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Ue,this._onExit=new Ue,this._onEnter=new Ue,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+TZ++,this.attachDomPortal=a=>{this._assertNotAttached();const l=this._portalOutlet.attachDomPortal(a);return this._afterPortalAttached(),l},this._live="assertive"!==o.politeness||o.announcementMessage?"off"===o.politeness?"off":"polite":"assertive",this._platform.FIREFOX&&("polite"===this._live&&(this._role="status"),"assertive"===this._live&&(this._role="alert"))}attachComponentPortal(t){this._assertNotAttached();const i=this._portalOutlet.attachComponentPortal(t);return this._afterPortalAttached(),i}attachTemplatePortal(t){this._assertNotAttached();const i=this._portalOutlet.attachTemplatePortal(t);return this._afterPortalAttached(),i}onAnimationEnd(t){const{fromState:i,toState:r}=t;if(("void"===r&&"void"!==i||"hidden"===r)&&this._completeExit(),"visible"===r){const s=this._onEnter;this._ngZone.run(()=>{s.next(),s.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._ngZone.run(()=>{this._animationState="hidden",this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId)}),this._onExit}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){this._ngZone.onMicrotaskEmpty.pipe(Li(1)).subscribe(()=>{this._ngZone.run(()=>{this._onExit.next(),this._onExit.complete()})})}_afterPortalAttached(){const t=this._elementRef.nativeElement,i=this.snackBarConfig.panelClass;i&&(Array.isArray(i)?i.forEach(r=>t.classList.add(r)):t.classList.add(i)),this._exposeToModals()}_exposeToModals(){const t=this._liveElementId,i=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{const i=t.getAttribute("aria-owns");if(i){const r=i.replace(this._liveElementId,"").trim();r.length>0?t.setAttribute("aria-owns",r):t.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{const t=this._elementRef.nativeElement.querySelector("[aria-hidden]"),i=this._elementRef.nativeElement.querySelector("[aria-live]");if(t&&i){let r=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)&&(r=document.activeElement),t.removeAttribute("aria-hidden"),i.appendChild(t),r?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}}return n.\u0275fac=function(t){return new(t||n)(D(pt),D(yt),D(ci),D(Fi),D(kM))},n.\u0275dir=Ae({type:n,viewQuery:function(t,i){if(1&t&&oi(dm,7),2&t){let r;Lt(r=Ft())&&(i._portalOutlet=r.first)}},features:[ft]}),n})(),IZ=(()=>{class n extends DZ{_afterPortalAttached(){super._afterPortalAttached();const t=this._label.nativeElement,i="mdc-snackbar__label";t.classList.toggle(i,!t.querySelector(`.${i}`))}}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275cmp=ht({type:n,selectors:[["mat-snack-bar-container"]],viewQuery:function(t,i){if(1&t&&oi(bZ,7),2&t){let r;Lt(r=Ft())&&(i._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(t,i){1&t&&n1("@state.done",function(s){return i.onAnimationEnd(s)}),2&t&&d1("@state",i._animationState)},features:[ft],decls:6,vars:3,consts:[[1,"mdc-snackbar__surface"],[1,"mat-mdc-snack-bar-label"],["label",""],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(t,i){1&t&&(K(0,"div",0)(1,"div",1,2)(3,"div",3),_e(4,xZ,0,0,"ng-template",4),J(),Fe(5,"div"),J()()),2&t&&(j(5),Vt("aria-live",i._live)("role",i._role)("id",i._liveElementId))},dependencies:[dm],styles:['.mdc-snackbar{display:none;position:fixed;right:0;bottom:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;pointer-events:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mdc-snackbar--opening,.mdc-snackbar--open,.mdc-snackbar--closing{display:flex}.mdc-snackbar--open .mdc-snackbar__label,.mdc-snackbar--open .mdc-snackbar__actions{visibility:visible}.mdc-snackbar__surface{padding-left:0;padding-right:8px;display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;transform:scale(0.8);opacity:0}.mdc-snackbar__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-snackbar__surface::before{border-color:CanvasText}}[dir=rtl] .mdc-snackbar__surface,.mdc-snackbar__surface[dir=rtl]{padding-left:8px;padding-right:0}.mdc-snackbar--open .mdc-snackbar__surface{transform:scale(1);opacity:1;pointer-events:auto}.mdc-snackbar--closing .mdc-snackbar__surface{transform:scale(1)}.mdc-snackbar__label{padding-left:16px;padding-right:8px;width:100%;flex-grow:1;box-sizing:border-box;margin:0;visibility:hidden;padding-top:14px;padding-bottom:14px}[dir=rtl] .mdc-snackbar__label,.mdc-snackbar__label[dir=rtl]{padding-left:8px;padding-right:16px}.mdc-snackbar__label::before{display:inline;content:attr(data-mdc-snackbar-label-text)}.mdc-snackbar__actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box;visibility:hidden}.mdc-snackbar__action+.mdc-snackbar__dismiss{margin-left:8px;margin-right:0}[dir=rtl] .mdc-snackbar__action+.mdc-snackbar__dismiss,.mdc-snackbar__action+.mdc-snackbar__dismiss[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-snack-bar-container{margin:8px;position:static}.mat-mdc-snack-bar-container .mdc-snackbar__surface{min-width:344px}@media(max-width: 480px),(max-width: 344px){.mat-mdc-snack-bar-container .mdc-snackbar__surface{min-width:100%}}@media(max-width: 480px),(max-width: 344px){.mat-mdc-snack-bar-container{width:100vw}}.mat-mdc-snack-bar-container .mdc-snackbar__surface{max-width:672px}.mat-mdc-snack-bar-container .mdc-snackbar__surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)}.mat-mdc-snack-bar-container .mdc-snackbar__dismiss .mdc-button__icon{font-size:var(--mdc-icon-button-icon-size, var(--mdc-snackbar-icon-size, 24px))}.mat-mdc-snack-bar-container .mdc-snackbar__dismiss svg,.mat-mdc-snack-bar-container .mdc-snackbar__dismiss img{width:var(--mdc-icon-button-icon-size, var(--mdc-snackbar-icon-size, 24px));height:var(--mdc-icon-button-icon-size, var(--mdc-snackbar-icon-size, 24px))}.mat-mdc-snack-bar-container .mdc-snackbar__surface{background-color:var(--mdc-snackbar-container-color, inherit)}.mat-mdc-snack-bar-container .mdc-snackbar__surface{border-radius:var(--mdc-snackbar-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-snack-bar-container .mdc-snackbar__label{color:var(--mdc-snackbar-supporting-text-color, inherit)}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-size:var(--mdc-snackbar-supporting-text-size, inherit);font-family:var(--mdc-snackbar-supporting-text-font, inherit);font-weight:var(--mdc-snackbar-supporting-text-weight, inherit);line-height:var(--mdc-snackbar-supporting-text-line-height, inherit)}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){color:var(--mat-mdc-snack-bar-button-color, transparent);--mat-mdc-button-persistent-ripple-color: currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{background-color:currentColor;opacity:.1}.mat-mdc-snack-bar-container .mdc-snackbar__label::before{display:none}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-handset .mdc-snackbar__surface{width:100%}'],encapsulation:2,data:{animation:[AZ.snackBarState]}}),n})(),JU=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[pm,um,va,AI,qn,qn]}),n})();const e3=new ge("mat-snack-bar-default-options",{providedIn:"root",factory:function RZ(){return new kM}});let PZ=(()=>{class n{get _openedSnackBarRef(){const t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t}constructor(t,i,r,s,o,a){this._overlay=t,this._live=i,this._injector=r,this._breakpointObserver=s,this._parentSnackBar=o,this._defaultConfig=a,this._snackBarRefAtThisLevel=null}openFromComponent(t,i){return this._attach(t,i)}openFromTemplate(t,i){return this._attach(t,i)}open(t,i="",r){const s={...this._defaultConfig,...r};return s.data={message:t,action:i},s.announcementMessage===t&&(s.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,s)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(t,i){const s=ki.create({parent:i&&i.viewContainerRef&&i.viewContainerRef.injector||this._injector,providers:[{provide:kM,useValue:i}]}),o=new lm(this.snackBarContainerComponent,i.viewContainerRef,s),a=t.attach(o);return a.instance.snackBarConfig=i,a.instance}_attach(t,i){const r={...new kM,...this._defaultConfig,...i},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),a=new II(o,s);if(t instanceof fo){const l=new cm(t,null,{$implicit:r.data,snackBarRef:a});a.instance=o.attachTemplatePortal(l)}else{const l=this._createInjector(r,a),c=new lm(t,void 0,l),u=o.attachComponentPortal(c);a.instance=u.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(et(s.detachments())).subscribe(l=>{s.overlayElement.classList.toggle(this.handsetCssClass,l.matches)}),r.announcementMessage&&o._onAnnounce.subscribe(()=>{this._live.announce(r.announcementMessage,r.politeness)}),this._animateSnackBar(a,r),this._openedSnackBarRef=a,this._openedSnackBarRef}_animateSnackBar(t,i){t.afterDismissed().subscribe(()=>{this._openedSnackBarRef==t&&(this._openedSnackBarRef=null),i.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{t.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):t.containerInstance.enter(),i.duration&&i.duration>0&&t.afterOpened().subscribe(()=>t._dismissAfter(i.duration))}_createOverlay(t){const i=new _y;i.direction=t.direction;let r=this._overlay.position().global();const s="rtl"===t.direction,o="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!s||"end"===t.horizontalPosition&&s,a=!o&&"center"!==t.horizontalPosition;return o?r.left("0"):a?r.right("0"):r.centerHorizontally(),"top"===t.verticalPosition?r.top("0"):r.bottom("0"),i.positionStrategy=r,this._overlay.create(i)}_createInjector(t,i){return ki.create({parent:t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,providers:[{provide:II,useValue:i},{provide:QU,useValue:t.data}]})}}return n.\u0275fac=function(t){return new(t||n)(Q(mo),Q(pI),Q(ki),Q(lI),Q(n,12),Q(e3))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),t3=(()=>{class n extends PZ{constructor(t,i,r,s,o,a){super(t,i,r,s,o,a),this.simpleSnackBarComponent=EZ,this.snackBarContainerComponent=IZ,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return n.\u0275fac=function(t){return new(t||n)(Q(mo),Q(pI),Q(ki),Q(lI),Q(n,12),Q(e3))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:JU}),n})();const kZ=["*",[["mat-toolbar-row"]]],OZ=["*","mat-toolbar-row"],LZ=DM(class{constructor(n){this._elementRef=n}});let FZ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),n})(),NZ=(()=>{class n extends LZ{constructor(t,i,r){super(t),this._platform=i,this._document=r}ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()))}_checkToolbarMixedModes(){}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(Fi),D(Ht))},n.\u0275cmp=ht({type:n,selectors:[["mat-toolbar"]],contentQueries:function(t,i,r){if(1&t&&Xi(r,FZ,5),2&t){let s;Lt(s=Ft())&&(i._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(t,i){2&t&&Pn("mat-toolbar-multiple-rows",i._toolbarRows.length>0)("mat-toolbar-single-row",0===i._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[ft],ngContentSelectors:OZ,decls:2,vars:0,template:function(t,i){1&t&&(Cr(kZ),Kt(0),Kt(1,1))},styles:[".cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar .mat-mdc-button-base.mat-unthemed{--mdc-text-button-label-text-color: inherit;--mdc-outlined-button-label-text-color: inherit}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}"],encapsulation:2,changeDetection:0}),n})(),BZ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[qn,qn]}),n})(),UZ=(()=>{class n{constructor(){this._vertical=!1,this._inset=!1}get vertical(){return this._vertical}set vertical(t){this._vertical=Cn(t)}get inset(){return this._inset}set inset(t){this._inset=Cn(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=ht({type:n,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(t,i){2&t&&(Vt("aria-orientation",i.vertical?"vertical":"horizontal"),Pn("mat-divider-vertical",i.vertical)("mat-divider-horizontal",!i.vertical)("mat-divider-inset",i.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(t,i){},styles:[".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}"],encapsulation:2,changeDetection:0}),n})(),n3=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[qn,qn]}),n})();const VZ=["tooltip"],r3=new ge("mat-tooltip-scroll-strategy"),GZ={provide:r3,deps:[mo],useFactory:function HZ(n){return()=>n.scrollStrategies.reposition({scrollThrottle:20})}},$Z=new ge("mat-tooltip-default-options",{providedIn:"root",factory:function WZ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),s3="tooltip-panel",o3=Sh({passive:!0});let ZZ=(()=>{class n{get position(){return this._position}set position(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(t){this._positionAtOrigin=Cn(t),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(t){this._disabled=Cn(t),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(t){this._showDelay=Ys(t)}get hideDelay(){return this._hideDelay}set hideDelay(t){this._hideDelay=Ys(t),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}get message(){return this._message}set message(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message,"tooltip"),this._message=null!=t?String(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")})}))}get tooltipClass(){return this._tooltipClass}set tooltipClass(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}constructor(t,i,r,s,o,a,l,c,u,h,p,m){this._overlay=t,this._elementRef=i,this._scrollDispatcher=r,this._viewContainerRef=s,this._ngZone=o,this._platform=a,this._ariaDescriber=l,this._focusMonitor=c,this._dir=h,this._defaultOptions=p,this._position="below",this._positionAtOrigin=!1,this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this._viewportMargin=8,this._cssClassPrefix="mat",this._showDelay=this._defaultOptions.showDelay,this._hideDelay=this._defaultOptions.hideDelay,this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new Ue,this._scrollStrategy=u,this._document=m,p&&(p.position&&(this.position=p.position),p.positionAtOrigin&&(this.positionAtOrigin=p.positionAtOrigin),p.touchGestures&&(this.touchGestures=p.touchGestures)),h.change.pipe(et(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(et(this._destroyed)).subscribe(t=>{t?"keyboard"===t&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){const t=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([i,r])=>{t.removeEventListener(i,r,o3)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(t,this.message,"tooltip"),this._focusMonitor.stopMonitoring(t)}show(t=this.showDelay,i){if(this.disabled||!this.message||this._isTooltipVisible())return void this._tooltipInstance?._cancelPendingAnimations();const r=this._createOverlay(i);this._detach(),this._portal=this._portal||new lm(this._tooltipComponent,this._viewContainerRef);const s=this._tooltipInstance=r.attach(this._portal).instance;s._triggerElement=this._elementRef.nativeElement,s._mouseLeaveHideDelay=this._hideDelay,s.afterHidden().pipe(et(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),s.show(t)}hide(t=this.hideDelay){const i=this._tooltipInstance;i&&(i.isVisible()?i.hide(t):(i._cancelPendingAnimations(),this._detach()))}toggle(t){this._isTooltipVisible()?this.hide():this.show(void 0,t)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(t){if(this._overlayRef){const s=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!t)&&s._origin instanceof yt)return this._overlayRef;this._detach()}const i=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),r=this._overlay.position().flexibleConnectedTo(this.positionAtOrigin&&t||this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(i);return r.positionChanges.pipe(et(this._destroyed)).subscribe(s=>{this._updateCurrentPositionClass(s.connectionPair),this._tooltipInstance&&s.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:r,panelClass:`${this._cssClassPrefix}-${s3}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(et(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(et(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(et(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!nl(s)&&(s.preventDefault(),s.stopPropagation(),this._ngZone.run(()=>this.hide(0)))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(t){const i=t.getConfig().positionStrategy,r=this._getOrigin(),s=this._getOverlayPosition();i.withPositions([this._addOffset({...r.main,...s.main}),this._addOffset({...r.fallback,...s.fallback})])}_addOffset(t){return t}_getOrigin(){const t=!this._dir||"ltr"==this._dir.value,i=this.position;let r;"above"==i||"below"==i?r={originX:"center",originY:"above"==i?"top":"bottom"}:"before"==i||"left"==i&&t||"right"==i&&!t?r={originX:"start",originY:"center"}:("after"==i||"right"==i&&t||"left"==i&&!t)&&(r={originX:"end",originY:"center"});const{x:s,y:o}=this._invertPosition(r.originX,r.originY);return{main:r,fallback:{originX:s,originY:o}}}_getOverlayPosition(){const t=!this._dir||"ltr"==this._dir.value,i=this.position;let r;"above"==i?r={overlayX:"center",overlayY:"bottom"}:"below"==i?r={overlayX:"center",overlayY:"top"}:"before"==i||"left"==i&&t||"right"==i&&!t?r={overlayX:"end",overlayY:"center"}:("after"==i||"right"==i&&t||"left"==i&&!t)&&(r={overlayX:"start",overlayY:"center"});const{x:s,y:o}=this._invertPosition(r.overlayX,r.overlayY);return{main:r,fallback:{overlayX:s,overlayY:o}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(Li(1),et(this._destroyed)).subscribe(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()}))}_setTooltipClass(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())}_invertPosition(t,i){return"above"===this.position||"below"===this.position?"top"===i?i="bottom":"bottom"===i&&(i="top"):"end"===t?t="start":"start"===t&&(t="end"),{x:t,y:i}}_updateCurrentPositionClass(t){const{overlayY:i,originX:r,originY:s}=t;let o;if(o="center"===i?this._dir&&"rtl"===this._dir.value?"end"===r?"left":"right":"start"===r?"left":"right":"bottom"===i&&"top"===s?"above":"below",o!==this._currentPosition){const a=this._overlayRef;if(a){const l=`${this._cssClassPrefix}-${s3}-`;a.removePanelClass(l+this._currentPosition),a.addPanelClass(l+o)}this._currentPosition=o}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",t=>{let i;this._setupPointerExitEventsIfNeeded(),void 0!==t.x&&void 0!==t.y&&(i=t),this.show(void 0,i)}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",t=>{const i=t.targetTouches?.[0],r=i?{x:i.clientX,y:i.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),clearTimeout(this._touchstartTimeout),this._touchstartTimeout=setTimeout(()=>this.show(void 0,r),500)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;const t=[];if(this._platformSupportsMouseEvents())t.push(["mouseleave",i=>{const r=i.relatedTarget;(!r||!this._overlayRef?.overlayElement.contains(r))&&this.hide()}],["wheel",i=>this._wheelListener(i)]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();const i=()=>{clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions.touchendHideDelay)};t.push(["touchend",i],["touchcancel",i])}this._addListeners(t),this._passiveListeners.push(...t)}_addListeners(t){t.forEach(([i,r])=>{this._elementRef.nativeElement.addEventListener(i,r,o3)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(t){if(this._isTooltipVisible()){const i=this._document.elementFromPoint(t.clientX,t.clientY),r=this._elementRef.nativeElement;i!==r&&!r.contains(i)&&this.hide()}}_disableNativeGesturesIfNecessary(){const t=this.touchGestures;if("off"!==t){const i=this._elementRef.nativeElement,r=i.style;("on"===t||"INPUT"!==i.nodeName&&"TEXTAREA"!==i.nodeName)&&(r.userSelect=r.msUserSelect=r.webkitUserSelect=r.MozUserSelect="none"),("on"===t||!i.draggable)&&(r.webkitUserDrag="none"),r.touchAction="none",r.webkitTapHighlightColor="transparent"}}}return n.\u0275fac=function(t){Ya()},n.\u0275dir=Ae({type:n,inputs:{position:["matTooltipPosition","position"],positionAtOrigin:["matTooltipPositionAtOrigin","positionAtOrigin"],disabled:["matTooltipDisabled","disabled"],showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],touchGestures:["matTooltipTouchGestures","touchGestures"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]}}),n})(),_s=(()=>{class n extends ZZ{constructor(t,i,r,s,o,a,l,c,u,h,p,m){super(t,i,r,s,o,a,l,c,u,h,p,m),this._tooltipComponent=JZ,this._cssClassPrefix="mat-mdc",this._viewportMargin=8}_addOffset(t){const r=!this._dir||"ltr"==this._dir.value;return"top"===t.originY?t.offsetY=-8:"bottom"===t.originY?t.offsetY=8:"start"===t.originX?t.offsetX=r?-8:8:"end"===t.originX&&(t.offsetX=r?8:-8),t}}return n.\u0275fac=function(t){return new(t||n)(D(mo),D(yt),D(py),D(is),D(pt),D(Fi),D(eK),D(Yd),D(r3),D(tl,8),D($Z,8),D(Ht))},n.\u0275dir=Ae({type:n,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[ft]}),n})(),QZ=(()=>{class n{constructor(t,i){this._changeDetectorRef=t,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Ue,this._animationsDisabled="NoopAnimations"===i}show(t){clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},t)}hide(t){clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},t)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:t}){(!t||!this._triggerElement.contains(t))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){}_handleAnimationEnd({animationName:t}){(t===this._showAnimation||t===this._hideAnimation)&&this._finalizeAnimation(t===this._showAnimation)}_cancelPendingAnimations(){clearTimeout(this._showTimeoutId),clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(t){t?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(t){const i=this._tooltip.nativeElement,r=this._showAnimation,s=this._hideAnimation;if(i.classList.remove(t?s:r),i.classList.add(t?r:s),this._isVisible=t,t&&!this._animationsDisabled&&"function"==typeof getComputedStyle){const o=getComputedStyle(i);("0s"===o.getPropertyValue("animation-duration")||"none"===o.getPropertyValue("animation-name"))&&(this._animationsDisabled=!0)}t&&this._onShow(),this._animationsDisabled&&(i.classList.add("_mat-animation-noopable"),this._finalizeAnimation(t))}}return n.\u0275fac=function(t){return new(t||n)(D(ci),D(rs,8))},n.\u0275dir=Ae({type:n}),n})(),JZ=(()=>{class n extends QZ{constructor(t,i,r){super(t,r),this._elementRef=i,this._isMultiline=!1,this._showAnimation="mat-mdc-tooltip-show",this._hideAnimation="mat-mdc-tooltip-hide"}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){const t=this._elementRef.nativeElement.getBoundingClientRect();return t.height>24&&t.width>=200}}return n.\u0275fac=function(t){return new(t||n)(D(ci),D(yt),D(rs,8))},n.\u0275cmp=ht({type:n,selectors:[["mat-tooltip-component"]],viewQuery:function(t,i){if(1&t&&oi(VZ,7),2&t){let r;Lt(r=Ft())&&(i._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(t,i){1&t&&ct("mouseleave",function(s){return i._handleMouseLeave(s)}),2&t&&Pc("zoom",i.isVisible()?1:null)},features:[ft],decls:4,vars:4,consts:[[1,"mdc-tooltip","mdc-tooltip--shown","mat-mdc-tooltip",3,"ngClass","animationend"],["tooltip",""],[1,"mdc-tooltip__surface","mdc-tooltip__surface-animation"]],template:function(t,i){1&t&&(K(0,"div",0,1),ct("animationend",function(s){return i._handleAnimationEnd(s)}),K(2,"div",2),Je(3),J()()),2&t&&(Pn("mdc-tooltip--multiline",i._isMultiline),z("ngClass",i.tooltipClass),j(3),$i(i.message))},dependencies:[Bv],styles:['.mdc-tooltip__surface{word-break:var(--mdc-tooltip-word-break, normal);overflow-wrap:anywhere}.mdc-tooltip{position:fixed;display:none;z-index:9}.mdc-tooltip-wrapper--rich{position:relative}.mdc-tooltip--shown,.mdc-tooltip--showing,.mdc-tooltip--hide{display:inline-flex}.mdc-tooltip--shown.mdc-tooltip--rich,.mdc-tooltip--showing.mdc-tooltip--rich,.mdc-tooltip--hide.mdc-tooltip--rich{display:inline-block;left:-320px;position:absolute}.mdc-tooltip__surface{line-height:16px;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center}.mdc-tooltip__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-tooltip__surface::before{border-color:CanvasText}}.mdc-tooltip--rich .mdc-tooltip__surface{align-items:flex-start;display:flex;flex-direction:column;min-height:24px;min-width:40px;max-width:320px;position:relative}.mdc-tooltip--multiline .mdc-tooltip__surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mdc-tooltip__surface,.mdc-tooltip--multiline .mdc-tooltip__surface[dir=rtl]{text-align:right}.mdc-tooltip__surface .mdc-tooltip__title{margin:0 8px}.mdc-tooltip__surface .mdc-tooltip__content{max-width:calc(200px - (2 * 8px));margin:8px;text-align:left}[dir=rtl] .mdc-tooltip__surface .mdc-tooltip__content,.mdc-tooltip__surface .mdc-tooltip__content[dir=rtl]{text-align:right}.mdc-tooltip--rich .mdc-tooltip__surface .mdc-tooltip__content{max-width:calc(320px - (2 * 8px));align-self:stretch}.mdc-tooltip__surface .mdc-tooltip__content-link{text-decoration:none}.mdc-tooltip--rich-actions,.mdc-tooltip__content,.mdc-tooltip__title{z-index:1}.mdc-tooltip__surface-animation{opacity:0;transform:scale(0.8);will-change:transform,opacity}.mdc-tooltip--shown .mdc-tooltip__surface-animation{transform:scale(1);opacity:1}.mdc-tooltip--hide .mdc-tooltip__surface-animation{transform:scale(1)}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{position:absolute;height:24px;width:24px;transform:rotate(35deg) skewY(20deg) scaleX(0.9396926208)}.mdc-tooltip__caret-surface-top .mdc-elevation-overlay,.mdc-tooltip__caret-surface-bottom .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-tooltip__caret-surface-bottom{outline:1px solid rgba(0,0,0,0);z-index:-1}@media screen and (forced-colors: active){.mdc-tooltip__caret-surface-bottom{outline-color:CanvasText}}.mdc-tooltip__surface{background-color:var(--mdc-plain-tooltip-container-color, #fff)}.mdc-tooltip__surface{border-radius:var(--mdc-plain-tooltip-container-shape, var(--mdc-shape-small, 4px))}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{border-radius:var(--mdc-plain-tooltip-container-shape, var(--mdc-shape-small, 4px))}.mdc-tooltip__surface{color:var(--mdc-plain-tooltip-supporting-text-color, #000)}.mdc-tooltip__surface{font-family:var(--mdc-plain-tooltip-supporting-text-font, inherit);font-size:var(--mdc-plain-tooltip-supporting-text-size, inherit);font-weight:var(--mdc-plain-tooltip-supporting-text-weight, inherit);letter-spacing:var(--mdc-plain-tooltip-supporting-text-tracking, inherit)}.mat-mdc-tooltip{position:relative;transform:scale(0)}.mat-mdc-tooltip::before{content:"";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}'],encapsulation:2,changeDetection:0}),n})(),a3=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({providers:[GZ],imports:[mU,va,pm,qn,qn,my]}),n})();function l3(...n){const e=Eu(n),{args:t,keys:i}=_N(n),r=new Sn(s=>{const{length:o}=t;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let u=0;u{h||(h=!0,c--),a[u]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(i?vN(i,a):a),s.complete())}))}});return e?r.pipe(bD(e)):r}class RI{}class Kd{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?this.lazyInit="string"==typeof e?()=>{this.headers=new Map,e.split("\n").forEach(t=>{const i=t.indexOf(":");if(i>0){const r=t.slice(0,i),s=r.toLowerCase(),o=t.slice(i+1).trim();this.maybeSetNormalizedName(r,s),this.headers.has(s)?this.headers.get(s).push(o):this.headers.set(s,[o])}})}:()=>{this.headers=new Map,Object.entries(e).forEach(([t,i])=>{let r;if(r="string"==typeof i?[i]:"number"==typeof i?[i.toString()]:i.map(s=>s.toString()),r.length>0){const s=t.toLowerCase();this.headers.set(s,r),this.maybeSetNormalizedName(t,s)}})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();const 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 Kd?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){const t=new Kd;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof Kd?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){const t=e.name.toLowerCase();switch(e.op){case"a":case"s":let i=e.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(e.name,t);const r=("a"===e.op?this.headers.get(t):void 0)||[];r.push(...i),this.headers.set(t,r);break;case"d":const s=e.value;if(s){let o=this.headers.get(t);if(!o)return;o=o.filter(a=>-1===s.indexOf(a)),0===o.length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,o)}else this.headers.delete(t),this.normalizedNames.delete(t)}}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}}class eQ{encodeKey(e){return d3(e)}encodeValue(e){return d3(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}}const nQ=/%(\d[a-f0-9])/gi,iQ={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function d3(n){return encodeURIComponent(n).replace(nQ,(e,t)=>iQ[t]??e)}function OM(n){return`${n}`}class Zd{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new eQ,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function tQ(n,e){const t=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{const s=r.indexOf("="),[o,a]=-1==s?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,s)),e.decodeValue(r.slice(s+1))],l=t.get(o)||[];l.push(a),t.set(o,l)}),t}(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{const i=e.fromObject[t],r=Array.isArray(i)?i.map(OM):[OM(i)];this.map.set(t,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();const 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){const t=[];return Object.keys(e).forEach(i=>{const r=e[i];Array.isArray(r)?r.forEach(s=>{t.push({param:i,value:s,op:"a"})}):t.push({param:i,value:r,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{const t=this.encoder.encodeKey(e);return this.map.get(e).map(i=>t+"="+this.encoder.encodeValue(i)).join("&")}).filter(e=>""!==e).join("&")}clone(e){const t=new Zd({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(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":const t=("a"===e.op?this.map.get(e.param):void 0)||[];t.push(OM(e.value)),this.map.set(e.param,t);break;case"d":if(void 0===e.value){this.map.delete(e.param);break}{let i=this.map.get(e.param)||[];const r=i.indexOf(OM(e.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(e.param,i):this.map.delete(e.param)}}}),this.cloneFrom=this.updates=null)}}class rQ{constructor(){this.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()}}function u3(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function h3(n){return typeof Blob<"u"&&n instanceof Blob}function f3(n){return typeof FormData<"u"&&n instanceof FormData}class Sy{constructor(e,t,i,r){let s;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function sQ(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,s=r):s=i,s&&(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params)),this.headers||(this.headers=new Kd),this.context||(this.context=new rQ),this.params){const o=this.params.toString();if(0===o.length)this.urlWithParams=t;else{const a=t.indexOf("?");this.urlWithParams=t+(-1===a?"?":ah.set(p,e.setHeaders[p]),l)),e.setParams&&(c=Object.keys(e.setParams).reduce((h,p)=>h.set(p,e.setParams[p]),c)),new Sy(t,i,s,{params:c,headers:l,context:u,reportProgress:a,responseType:r,withCredentials:o})}}var os=(()=>((os=os||{})[os.Sent=0]="Sent",os[os.UploadProgress=1]="UploadProgress",os[os.ResponseHeader=2]="ResponseHeader",os[os.DownloadProgress=3]="DownloadProgress",os[os.Response=4]="Response",os[os.User=5]="User",os))();class aQ{constructor(e,t=200,i="OK"){this.headers=e.headers||new Kd,this.status=void 0!==e.status?e.status:t,this.statusText=e.statusText||i,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}}class PI extends aQ{constructor(e={}){super(e),this.type=os.Response,this.body=void 0!==e.body?e.body:null}clone(e={}){return new PI({body:void 0!==e.body?e.body:this.body,headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}function kI(n,e){return{body:e,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials}}let OI=(()=>{class n{constructor(t){this.handler=t}request(t,i,r={}){let s;if(t instanceof Sy)s=t;else{let l,c;l=r.headers instanceof Kd?r.headers:new Kd(r.headers),r.params&&(c=r.params instanceof Zd?r.params:new Zd({fromObject:r.params})),s=new Sy(t,i,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const o=dt(s).pipe(Hd(l=>this.handler.handle(l)));if(t instanceof Sy||"events"===r.observe)return o;const a=o.pipe(On(l=>l instanceof PI));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(Ye(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(Ye(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(Ye(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(Ye(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(t,i={}){return this.request("DELETE",t,i)}get(t,i={}){return this.request("GET",t,i)}head(t,i={}){return this.request("HEAD",t,i)}jsonp(t,i){return this.request("JSONP",t,{params:(new Zd).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,i={}){return this.request("OPTIONS",t,i)}patch(t,i,r={}){return this.request("PATCH",t,kI(r,i))}post(t,i,r={}){return this.request("POST",t,kI(r,i))}put(t,i,r={}){return this.request("PUT",t,kI(r,i))}}return n.\u0275fac=function(t){return new(t||n)(Q(RI))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const bQ=["*"];let FM;function Cy(n){return function xQ(){if(void 0===FM&&(FM=null,typeof window<"u")){const n=window;void 0!==n.trustedTypes&&(FM=n.trustedTypes.createPolicy("angular#components",{createHTML:e=>e}))}return FM}()?.createHTML(n)||n}function x3(n){return Error(`Unable to find icon with the name "${n}"`)}function w3(n){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${n}".`)}function M3(n){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${n}".`)}class Th{constructor(e,t,i){this.url=e,this.svgText=t,this.options=i}}let NM=(()=>{class n{constructor(t,i,r,s){this._httpClient=t,this._sanitizer=i,this._errorHandler=s,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=r}addSvgIcon(t,i,r){return this.addSvgIconInNamespace("",t,i,r)}addSvgIconLiteral(t,i,r){return this.addSvgIconLiteralInNamespace("",t,i,r)}addSvgIconInNamespace(t,i,r,s){return this._addSvgIconConfig(t,i,new Th(r,null,s))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,i,r,s){const o=this._sanitizer.sanitize($n.HTML,r);if(!o)throw M3(r);const a=Cy(o);return this._addSvgIconConfig(t,i,new Th("",a,s))}addSvgIconSet(t,i){return this.addSvgIconSetInNamespace("",t,i)}addSvgIconSetLiteral(t,i){return this.addSvgIconSetLiteralInNamespace("",t,i)}addSvgIconSetInNamespace(t,i,r){return this._addSvgIconSetConfig(t,new Th(i,null,r))}addSvgIconSetLiteralInNamespace(t,i,r){const s=this._sanitizer.sanitize($n.HTML,i);if(!s)throw M3(i);const o=Cy(s);return this._addSvgIconSetConfig(t,new Th("",o,r))}registerFontClassAlias(t,i=t){return this._fontCssClassesByAlias.set(t,i),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(...t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){const i=this._sanitizer.sanitize($n.RESOURCE_URL,t);if(!i)throw w3(t);const r=this._cachedIconsByUrl.get(i);return r?dt(BM(r)):this._loadSvgIconFromConfig(new Th(t,null)).pipe(Ii(s=>this._cachedIconsByUrl.set(i,s)),Ye(s=>BM(s)))}getNamedSvgIcon(t,i=""){const r=S3(i,t);let s=this._svgIconConfigs.get(r);if(s)return this._getSvgFromConfig(s);if(s=this._getIconConfigFromResolvers(i,t),s)return this._svgIconConfigs.set(r,s),this._getSvgFromConfig(s);const o=this._iconSetConfigs.get(i);return o?this._getSvgFromIconSetConfigs(t,o):Kp(x3(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?dt(BM(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(Ye(i=>BM(i)))}_getSvgFromIconSetConfigs(t,i){const r=this._extractIconWithNameFromAnySet(t,i);return r?dt(r):l3(i.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(Bc(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize($n.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),dt(null)})))).pipe(Ye(()=>{const o=this._extractIconWithNameFromAnySet(t,i);if(!o)throw x3(t);return o}))}_extractIconWithNameFromAnySet(t,i){for(let r=i.length-1;r>=0;r--){const s=i[r];if(s.svgText&&s.svgText.toString().indexOf(t)>-1){const o=this._svgElementFromConfig(s),a=this._extractSvgIconFromSet(o,t,s.options);if(a)return a}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(Ii(i=>t.svgText=i),Ye(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?dt(null):this._fetchIcon(t).pipe(Ii(i=>t.svgText=i))}_extractSvgIconFromSet(t,i,r){const s=t.querySelector(`[id="${i}"]`);if(!s)return null;const o=s.cloneNode(!0);if(o.removeAttribute("id"),"svg"===o.nodeName.toLowerCase())return this._setSvgAttributes(o,r);if("symbol"===o.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(o),r);const a=this._svgElementFromString(Cy(""));return a.appendChild(o),this._setSvgAttributes(a,r)}_svgElementFromString(t){const i=this._document.createElement("DIV");i.innerHTML=t;const r=i.querySelector("svg");if(!r)throw Error(" tag not found");return r}_toSvgElement(t){const i=this._svgElementFromString(Cy("")),r=t.attributes;for(let s=0;sCy(c)),Gd(()=>this._inProgressUrlFetches.delete(o)),Tu());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(t,i,r){return this._svgIconConfigs.set(S3(t,i),r),this}_addSvgIconSetConfig(t,i){const r=this._iconSetConfigs.get(t);return r?r.push(i):this._iconSetConfigs.set(t,[i]),this}_svgElementFromConfig(t){if(!t.svgElement){const i=this._svgElementFromString(t.svgText);this._setSvgAttributes(i,t.options),t.svgElement=i}return t.svgElement}_getIconConfigFromResolvers(t,i){for(let r=0;re?e.pathname+e.search:""}}}),C3=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],DQ=C3.map(n=>`[${n}]`).join(", "),IQ=/^url\(['"]?#(.*?)['"]?\)$/;let E3=(()=>{class n extends CQ{get inline(){return this._inline}set inline(t){this._inline=Cn(t)}get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}get fontSet(){return this._fontSet}set fontSet(t){const i=this._cleanupFontValue(t);i!==this._fontSet&&(this._fontSet=i,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(t){const i=this._cleanupFontValue(t);i!==this._fontIcon&&(this._fontIcon=i,this._updateFontIconClasses())}constructor(t,i,r,s,o,a){super(t),this._iconRegistry=i,this._location=s,this._errorHandler=o,this._inline=!1,this._previousFontSetClass=[],this._currentIconFetch=un.EMPTY,a&&(a.color&&(this.color=this.defaultColor=a.color),a.fontSet&&(this.fontSet=a.fontSet)),r||t.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(t){if(!t)return["",""];const i=t.split(":");switch(i.length){case 1:return["",i[0]];case 2:return i;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const t=this._elementsWithExternalReferences;if(t&&t.size){const i=this._location.getPathname();i!==this._previousPath&&(this._previousPath=i,this._prependPathToReferences(i))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();const i=this._location.getPathname();this._previousPath=i,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(i),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){const t=this._elementRef.nativeElement;let i=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();i--;){const r=t.childNodes[i];(1!==r.nodeType||"svg"===r.nodeName.toLowerCase())&&r.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const t=this._elementRef.nativeElement,i=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(r=>r.length>0);this._previousFontSetClass.forEach(r=>t.classList.remove(r)),i.forEach(r=>t.classList.add(r)),this._previousFontSetClass=i,this.fontIcon!==this._previousFontIconClass&&!i.includes("mat-ligature-font")&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return"string"==typeof t?t.trim().split(" ")[0]:t}_prependPathToReferences(t){const i=this._elementsWithExternalReferences;i&&i.forEach((r,s)=>{r.forEach(o=>{s.setAttribute(o.name,`url('${t}#${o.value}')`)})})}_cacheChildrenWithExternalReferences(t){const i=t.querySelectorAll(DQ),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=i[s],l=a.getAttribute(o),c=l?l.match(IQ):null;if(c){let u=r.get(a);u||(u=[],r.set(a,u)),u.push({name:o,value:c[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){const[i,r]=this._splitIconName(t);i&&(this._svgNamespace=i),r&&(this._svgName=r),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(r,i).pipe(Li(1)).subscribe(s=>this._setSvgElement(s),s=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${i}:${r}! ${s.message}`))})}}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(NM),Ua("aria-hidden"),D(AQ),D(Xa),D(EQ,8))},n.\u0275cmp=ht({type:n,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(t,i){2&t&&(Vt("data-mat-icon-type",i._usingFontIcon()?"font":"svg")("data-mat-icon-name",i._svgName||i.fontIcon)("data-mat-icon-namespace",i._svgNamespace||i.fontSet)("fontIcon",i._usingFontIcon()?i.fontIcon:null),Pn("mat-icon-inline",i.inline)("mat-icon-no-color","primary"!==i.color&&"accent"!==i.color&&"warn"!==i.color))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[ft],ngContentSelectors:bQ,decls:1,vars:0,template:function(t,i){1&t&&(Cr(),Kt(0))},styles:[".mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0}),n})(),RQ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[qn,qn]}),n})(),A3=(()=>{class n{constructor(t){this.viewContainerRef=t}}return n.\u0275fac=function(t){return new(t||n)(D(is))},n.\u0275dir=Ae({type:n,selectors:[["","dataBlockUI",""]]}),n})(),PQ=(()=>{class n{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new it}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=ht({type:n,selectors:[["app-fallback-block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},decls:2,vars:3,consts:[["matTooltipPosition","above",3,"matTooltip"]],template:function(t,i){1&t&&(K(0,"p",0),Je(1),J()),2&t&&(z("matTooltip",i.resourceDescription),j(1),Vp("",null==i.resource?null:i.resource.name,"> GUI component for block ",((null==i.resource||null==i.resource.schema?null:i.resource.schema.block_class_mro)||"").split("__")[0]," not implemented :(\n"))},dependencies:[_s],changeDetection:0}),n})();function kQ(n,e){if(1&n&&(K(0,"h2",4),Je(1),J()),2&n){const t=be();z("matTooltip",t.resourceDescription),j(1),$i(t.name)}}function OQ(n,e){1&n&&Fe(0,"app-block-actions",5),2&n&&z("resource",be().resource)}const LQ=function(n,e,t,i){return{id:n,name:e,data:t,schema:i}};function FQ(n,e){if(1&n&&Fe(0,"app-editor",7),2&n){const t=be().$implicit,i=be();z("resource",hF(3,LQ,i.resource.id+(i.resource.id.includes("__")?"/":"__")+t.key,t.key,null==i.data?null:i.data[t.key],null==i.schema?null:i.schema.fields[t.index].schema))("resourceDescription",(null==i.schema?null:i.schema.fields[t.index].description)||"")("disabled",i.disabled||!(null==i.schema||!i.schema.fields[t.index].is_programmatic))}}function NQ(n,e){if(1&n&&(uo(0),_e(1,FQ,1,8,"app-editor",6),zt(2,"async"),ho()),2&n){const t=e.$implicit,i=be();j(1),z("ngIf",!(Xt(2,1,i.main.hideHiddenFields$)&&(null!=i.schema&&i.schema.fields[t.index].is_unknown||void 0!==(null==i.schema?null:i.schema.fields[t.index].schema.required_value)||null!=i.schema&&i.schema.fields[t.index].is_programmatic)))}}let Gc=(()=>{class n{constructor(t){this.main=t,this.resource=null,this.resourceDescription="",this.hideBlockActions=!1,this.disabled=!1,this.fieldWhitelist=null,this.fieldBlacklist=null,this.changed=new it,this.destroyed$=new Ue}get name(){return this.resource&&this.resource.name}get data(){return this.resource&&this.resource.data}get schema(){return this.resource&&this.resource.schema}get fieldKeys(){let t=this.schema?.fields.map((i,r)=>({index:r,key:i.name}))||[];return this.fieldWhitelist?t=t.filter(({key:i})=>this.fieldWhitelist?.includes(i)):this.fieldBlacklist&&(t=t.filter(({key:i})=>!this.fieldBlacklist?.includes(i))),t}fieldTrackBy(t,i){return i.index}ngAfterViewInit(){var t=this;this.main.dataBlockChange$.pipe(et(this.destroyed$),On(([i,r])=>!!this.resource&&i.startsWith(this.resource.id)&&!i.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var i=xt(function*([r,s]){const o=r.substring(t.resource.id.length+1);t.data[o]=s});return function(r){return i.apply(this,arguments)}}())}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return n.\u0275fac=function(t){return new(t||n)(D(il))},n.\u0275cmp=ht({type:n,selectors:[["app-compound-block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled",fieldWhitelist:"fieldWhitelist",fieldBlacklist:"fieldBlacklist"},outputs:{changed:"changed"},decls:5,vars:6,consts:[["matTooltipPosition","above",3,"matTooltip",4,"ngIf"],[3,"resource",4,"ngIf"],[1,"container"],[4,"ngFor","ngForOf","ngForTrackBy"],["matTooltipPosition","above",3,"matTooltip"],[3,"resource"],[3,"resource","resourceDescription","disabled",4,"ngIf"],[3,"resource","resourceDescription","disabled"]],template:function(t,i){if(1&t&&(_e(0,kQ,2,2,"h2",0),zt(1,"async"),_e(2,OQ,1,1,"app-block-actions",1),K(3,"div",2),_e(4,NQ,3,3,"ng-container",3),J()),2&t){let r;z("ngIf",i.name&&i.name!=(null==(r=Xt(1,4,i.main.resource$))?null:r.name)),j(2),z("ngIf",!i.hideBlockActions),j(2),z("ngForOf",i.fieldKeys)("ngForTrackBy",i.fieldTrackBy)}},styles:[".container[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-around;column-gap:1rem}"],changeDetection:0}),n})(),T3=(()=>{class n{constructor(t,i){this._renderer=t,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(t,i){this._renderer.setProperty(this._elementRef.nativeElement,t,i)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}}return n.\u0275fac=function(t){return new(t||n)(D(fa),D(yt))},n.\u0275dir=Ae({type:n}),n})(),Dh=(()=>{class n extends T3{}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275dir=Ae({type:n,features:[ft]}),n})();const rl=new ge("NgValueAccessor"),UQ={provide:rl,useExisting:Qn(()=>Wc),multi:!0},zQ=new ge("CompositionEventMode");let Wc=(()=>{class n extends T3{constructor(t,i,r){super(t,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function VQ(){const n=Lc()?Lc().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}())}writeValue(t){this.setProperty("value",t??"")}_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)}}return n.\u0275fac=function(t){return new(t||n)(D(fa),D(yt),D(zQ,8))},n.\u0275dir=Ae({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,i){1&t&&ct("input",function(s){return i._handleInput(s.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(s){return i._compositionEnd(s.target.value)})},features:[Hn([UQ]),ft]}),n})();const HQ=!1;function Qd(n){return null==n||("string"==typeof n||Array.isArray(n))&&0===n.length}function I3(n){return null!=n&&"number"==typeof n.length}const vs=new ge("NgValidators"),Jd=new ge("NgAsyncValidators"),GQ=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class FI{static min(e){return R3(e)}static max(e){return P3(e)}static required(e){return function k3(n){return Qd(n.value)?{required:!0}:null}(e)}static requiredTrue(e){return function O3(n){return!0===n.value?null:{required:!0}}(e)}static email(e){return function L3(n){return Qd(n.value)||GQ.test(n.value)?null:{email:!0}}(e)}static minLength(e){return F3(e)}static maxLength(e){return N3(e)}static pattern(e){return function B3(n){if(!n)return UM;let e,t;return"string"==typeof n?(t="","^"!==n.charAt(0)&&(t+="^"),t+=n,"$"!==n.charAt(n.length-1)&&(t+="$"),e=new RegExp(t)):(t=n.toString(),e=n),i=>{if(Qd(i.value))return null;const r=i.value;return e.test(r)?null:{pattern:{requiredPattern:t,actualValue:r}}}}(e)}static nullValidator(e){return null}static compose(e){return W3(e)}static composeAsync(e){return $3(e)}}function R3(n){return e=>{if(Qd(e.value)||Qd(n))return null;const t=parseFloat(e.value);return!isNaN(t)&&t{if(Qd(e.value)||Qd(n))return null;const t=parseFloat(e.value);return!isNaN(t)&&t>n?{max:{max:n,actual:e.value}}:null}}function F3(n){return e=>Qd(e.value)||!I3(e.value)?null:e.value.lengthI3(e.value)&&e.value.length>n?{maxlength:{requiredLength:n,actualLength:e.value.length}}:null}function UM(n){return null}function U3(n){return null!=n}function V3(n){const e=Sv(n)?Ri(n):n;if(HQ&&!t1(e)){let t="Expected async validator to return Promise or Observable.";throw"object"==typeof n&&(t+=" Are you using a synchronous validator where an async validator is expected?"),new fe(-1101,t)}return e}function z3(n){let e={};return n.forEach(t=>{e=null!=t?{...e,...t}:e}),0===Object.keys(e).length?null:e}function H3(n,e){return e.map(t=>t(n))}function G3(n){return n.map(e=>function WQ(n){return!n.validate}(e)?e:t=>e.validate(t))}function W3(n){if(!n)return null;const e=n.filter(U3);return 0==e.length?null:function(t){return z3(H3(t,e))}}function NI(n){return null!=n?W3(G3(n)):null}function $3(n){if(!n)return null;const e=n.filter(U3);return 0==e.length?null:function(t){return l3(H3(t,e).map(V3)).pipe(Ye(z3))}}function BI(n){return null!=n?$3(G3(n)):null}function j3(n,e){return null===n?[e]:Array.isArray(n)?[...n,e]:[n,e]}function X3(n){return n._rawValidators}function q3(n){return n._rawAsyncValidators}function UI(n){return n?Array.isArray(n)?n:[n]:[]}function VM(n,e){return Array.isArray(n)?n.includes(e):n===e}function Y3(n,e){const t=UI(e);return UI(n).forEach(r=>{VM(t,r)||t.push(r)}),t}function K3(n,e){return UI(e).filter(t=>!VM(n,t))}class Z3{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}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}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=NI(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=BI(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e){this.control&&this.control.reset(e)}hasError(e,t){return!!this.control&&this.control.hasError(e,t)}getError(e,t){return this.control?this.control.getError(e,t):null}}class Zs extends Z3{get formDirective(){return null}get path(){return null}}class Wl extends Z3{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Q3{constructor(e){this._cd=e}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let eu=(()=>{class n extends Q3{constructor(t){super(t)}}return n.\u0275fac=function(t){return new(t||n)(D(Wl,2))},n.\u0275dir=Ae({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,i){2&t&&Pn("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[ft]}),n})(),J3=(()=>{class n extends Q3{constructor(t){super(t)}}return n.\u0275fac=function(t){return new(t||n)(D(Zs,10))},n.\u0275dir=Ae({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(t,i){2&t&&Pn("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[ft]}),n})();function eV(n,e){return n?`with name: '${e}'`:`at index: ${e}`}const HI=!1,Ey="VALID",HM="INVALID",xm="PENDING",Ay="DISABLED";function GI(n){return(GM(n)?n.validators:n)||null}function WI(n,e){return(GM(e)?e.asyncValidators:n)||null}function GM(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}function tV(n,e,t){const i=n.controls;if(!(e?Object.keys(i):i).length)throw new fe(1e3,HI?function qQ(n){return`\n There are no form controls registered with this ${n?"group":"array"} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `}(e):"");if(!i[t])throw new fe(1001,HI?function YQ(n,e){return`Cannot find form control ${eV(n,e)}`}(e,t):"")}function nV(n,e,t){n._forEachChild((i,r)=>{if(void 0===t[r])throw new fe(1002,HI?function KQ(n,e){return`Must supply a value for form control ${eV(n,e)}`}(e,r):"")})}class WM{constructor(e,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],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 valid(){return this.status===Ey}get invalid(){return this.status===HM}get pending(){return this.status==xm}get disabled(){return this.status===Ay}get enabled(){return this.status!==Ay}get dirty(){return!this.pristine}get untouched(){return!this.touched}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(Y3(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(Y3(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(K3(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(K3(e,this._rawAsyncValidators))}hasValidator(e){return VM(this._rawValidators,e)}hasAsyncValidator(e){return VM(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=xm,!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=Ay,this.errors=null,this._forEachChild(i=>{i.disable({...e,onlySelf:!0})}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...e,skipPristineCheck:t}),this._onDisabledChange.forEach(i=>i(!0))}enable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=Ey,this._forEachChild(i=>{i.enable({...e,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors({...e,skipPristineCheck:t}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Ey||this.status===xm)&&this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Ay:Ey}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=xm,this._hasOwnPendingAsyncValidator=!0;const t=V3(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(!1!==t.emitEvent)}get(e){let t=e;return null==t||(Array.isArray(t)||(t=t.split(".")),0===t.length)?null:t.reduce((i,r)=>i&&i._find(r),this)}getError(e,t){const i=t?this.get(t):this;return i&&i.errors?i.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new it,this.statusChanges=new it}_calculateStatus(){return this._allControlsDisabled()?Ay:this.errors?HM:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(xm)?xm:this._anyControlsHaveStatus(HM)?HM:Ey}_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={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){GM(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=function ZQ(n){return Array.isArray(n)?NI(n):n||null}(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=function QQ(n){return Array.isArray(n)?BI(n):n||null}(this._rawAsyncValidators)}}class Ty extends WM{constructor(e,t,i){super(GI(t),WI(i,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(e,t,i={}){this.registerControl(e,t),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(e,t,i={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,t={}){nV(this,!0,e),Object.keys(e).forEach(i=>{tV(this,!0,i),this.controls[i].setValue(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){null!=e&&(Object.keys(e).forEach(i=>{const r=this.controls[i];r&&r.patchValue(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e={},t={}){this._forEachChild((i,r)=>{i.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(e,t,i)=>(e[i]=t.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(t,i)=>!!i._syncPendingControls()||t);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(t=>{const i=this.controls[t];i&&e(i,t)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(const[t,i]of Object.entries(this.controls))if(this.contains(t)&&e(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(t,i,r)=>((i.enabled||this.disabled)&&(t[r]=i.value),t))}_reduceChildren(e,t){let i=e;return this._forEachChild((r,s)=>{i=t(i,r,s)}),i}_allControlsDisabled(){for(const e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}}class iV extends Ty{}const Ih=new ge("CallSetDisabledState",{providedIn:"root",factory:()=>Dy}),Dy="always";function $M(n,e){return[...e.path,n]}function Iy(n,e,t=Dy){$I(n,e),e.valueAccessor.writeValue(n.value),(n.disabled||"always"===t)&&e.valueAccessor.setDisabledState?.(n.disabled),function eJ(n,e){e.valueAccessor.registerOnChange(t=>{n._pendingValue=t,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&rV(n,e)})}(n,e),function nJ(n,e){const t=(i,r)=>{e.valueAccessor.writeValue(i),r&&e.viewToModelUpdate(i)};n.registerOnChange(t),e._registerOnDestroy(()=>{n._unregisterOnChange(t)})}(n,e),function tJ(n,e){e.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,"blur"===n.updateOn&&n._pendingChange&&rV(n,e),"submit"!==n.updateOn&&n.markAsTouched()})}(n,e),function JQ(n,e){if(e.valueAccessor.setDisabledState){const t=i=>{e.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(t),e._registerOnDestroy(()=>{n._unregisterOnDisabledChange(t)})}}(n,e)}function jM(n,e,t=!0){const i=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(i),e.valueAccessor.registerOnTouched(i)),qM(n,e),n&&(e._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function XM(n,e){n.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function $I(n,e){const t=X3(n);null!==e.validator?n.setValidators(j3(t,e.validator)):"function"==typeof t&&n.setValidators([t]);const i=q3(n);null!==e.asyncValidator?n.setAsyncValidators(j3(i,e.asyncValidator)):"function"==typeof i&&n.setAsyncValidators([i]);const r=()=>n.updateValueAndValidity();XM(e._rawValidators,r),XM(e._rawAsyncValidators,r)}function qM(n,e){let t=!1;if(null!==n){if(null!==e.validator){const r=X3(n);if(Array.isArray(r)&&r.length>0){const s=r.filter(o=>o!==e.validator);s.length!==r.length&&(t=!0,n.setValidators(s))}}if(null!==e.asyncValidator){const r=q3(n);if(Array.isArray(r)&&r.length>0){const s=r.filter(o=>o!==e.asyncValidator);s.length!==r.length&&(t=!0,n.setAsyncValidators(s))}}}const i=()=>{};return XM(e._rawValidators,i),XM(e._rawAsyncValidators,i),t}function rV(n,e){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function sV(n,e){$I(n,e)}function XI(n,e){if(!n.hasOwnProperty("model"))return!1;const t=n.model;return!!t.isFirstChange()||!Object.is(e,t.currentValue)}function oV(n,e){n._syncPendingControls(),e.forEach(t=>{const i=t.control;"submit"===i.updateOn&&i._pendingChange&&(t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function qI(n,e){if(!e)return null;let t,i,r;return Array.isArray(e),e.forEach(s=>{s.constructor===Wc?t=s:function sJ(n){return Object.getPrototypeOf(n.constructor)===Dh}(s)?i=s:r=s}),r||i||t||null}const aJ={provide:Zs,useExisting:Qn(()=>Py)},Ry=(()=>Promise.resolve())();let Py=(()=>{class n extends Zs{constructor(t,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new it,this.form=new Ty({},NI(t),BI(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){Ry.then(()=>{const i=this._findContainer(t.path);t.control=i.registerControl(t.name,t.control),Iy(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){Ry.then(()=>{const i=this._findContainer(t.path);i&&i.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){Ry.then(()=>{const i=this._findContainer(t.path),r=new Ty({});sV(r,t),i.registerControl(t.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){Ry.then(()=>{const i=this._findContainer(t.path);i&&i.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,i){Ry.then(()=>{this.form.get(t.path).setValue(i)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,oV(this.form,this._directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}}return n.\u0275fac=function(t){return new(t||n)(D(vs,10),D(Jd,10),D(Ih,8))},n.\u0275dir=Ae({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,i){1&t&&ct("submit",function(s){return i.onSubmit(s)})("reset",function(){return i.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Hn([aJ]),ft]}),n})();function aV(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}function lV(n){return"object"==typeof n&&null!==n&&2===Object.keys(n).length&&"value"in n&&"disabled"in n}const ky=class extends WM{constructor(e=null,t,i){super(GI(t),WI(i,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),GM(t)&&(t.nonNullable||t.initialValueIsDefault)&&(this.defaultValue=lV(e)?e.value:e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==t.emitViewToModelChange)),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),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){aV(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){aV(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(e){lV(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}},dJ={provide:Wl,useExisting:Qn(()=>tu)},uV=(()=>Promise.resolve())();let tu=(()=>{class n extends Wl{constructor(t,i,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this.control=new ky,this._registered=!1,this.update=new it,this._parent=t,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=qI(0,s)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){const i=t.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),XI(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&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&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){Iy(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(t){uV.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){const i=t.isDisabled.currentValue,r=0!==i&&function Yp(n){return"boolean"==typeof n?n:null!=n&&"false"!==n}(i);uV.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?$M(t,this._parent):[t]}}return n.\u0275fac=function(t){return new(t||n)(D(Zs,9),D(vs,10),D(Jd,10),D(rl,10),D(ci,8),D(Ih,8))},n.\u0275dir=Ae({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Hn([dJ]),ft,zi]}),n})(),hV=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),n})();const uJ={provide:rl,useExisting:Qn(()=>wm),multi:!0};let wm=(()=>{class n extends Dh{writeValue(t){this.setProperty("value",t??"")}registerOnChange(t){this.onChange=i=>{t(""==i?null:parseFloat(i))}}}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275dir=Ae({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,i){1&t&&ct("input",function(s){return i.onChange(s.target.value)})("blur",function(){return i.onTouched()})},features:[Hn([uJ]),ft]}),n})(),fV=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({}),n})();const YI=new ge("NgModelWithFormControlWarning"),gJ={provide:Zs,useExisting:Qn(()=>Mm)};let Mm=(()=>{class n extends Zs{constructor(t,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new it,this._setValidators(t),this._setAsyncValidators(i)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(qM(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const i=this.form.get(t.path);return Iy(i,t,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),i}getControl(t){return this.form.get(t.path)}removeControl(t){jM(t.control||null,t,!1),function oJ(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,i){this.form.get(t.path).setValue(i)}onSubmit(t){return this.submitted=!0,oV(this.form,this.directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const i=t.control,r=this.form.get(t.path);i!==r&&(jM(i||null,t),(n=>n instanceof ky)(r)&&(Iy(r,t,this.callSetDisabledState),t.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){const i=this.form.get(t.path);sV(i,t),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){const i=this.form.get(t.path);i&&function iJ(n,e){return qM(n,e)}(i,t)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){$I(this.form,this),this._oldForm&&qM(this._oldForm,this)}_checkFormPresent(){}}return n.\u0275fac=function(t){return new(t||n)(D(vs,10),D(Jd,10),D(Ih,8))},n.\u0275dir=Ae({type:n,selectors:[["","formGroup",""]],hostBindings:function(t,i){1&t&&ct("submit",function(s){return i.onSubmit(s)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Hn([gJ]),ft,zi]}),n})();const yJ={provide:Wl,useExisting:Qn(()=>QI)};let QI=(()=>{class n extends Wl{set isDisabled(t){}constructor(t,i,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new it,this._ngModelWarningSent=!1,this._parent=t,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=qI(0,s)}ngOnChanges(t){this._added||this._setUpControl(),XI(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return $M(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return n._ngModelWarningSentOnce=!1,n.\u0275fac=function(t){return new(t||n)(D(Zs,13),D(vs,10),D(Jd,10),D(rl,10),D(YI,8))},n.\u0275dir=Ae({type:n,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Hn([yJ]),ft,zi]}),n})();function bV(n){return"number"==typeof n?n:parseInt(n,10)}function xV(n){return"number"==typeof n?n:parseFloat(n)}let Rh=(()=>{class n{constructor(){this._validator=UM}ngOnChanges(t){if(this.inputName in t){const i=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):UM,this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return null!=t}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,features:[zi]}),n})();const EJ={provide:vs,useExisting:Qn(()=>Sm),multi:!0};let Sm=(()=>{class n extends Rh{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=t=>xV(t),this.createValidator=t=>P3(t)}}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275dir=Ae({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(t,i){2&t&&Vt("max",i._enabled?i.max:null)},inputs:{max:"max"},features:[Hn([EJ]),ft]}),n})();const AJ={provide:vs,useExisting:Qn(()=>Cm),multi:!0};let Cm=(()=>{class n extends Rh{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=t=>xV(t),this.createValidator=t=>R3(t)}}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275dir=Ae({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(t,i){2&t&&Vt("min",i._enabled?i.min:null)},inputs:{min:"min"},features:[Hn([AJ]),ft]}),n})();const RJ={provide:vs,useExisting:Qn(()=>nR),multi:!0};let nR=(()=>{class n extends Rh{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=t=>bV(t),this.createValidator=t=>F3(t)}}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275dir=Ae({type:n,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(t,i){2&t&&Vt("minlength",i._enabled?i.minlength:null)},inputs:{minlength:"minlength"},features:[Hn([RJ]),ft]}),n})();const PJ={provide:vs,useExisting:Qn(()=>iR),multi:!0};let iR=(()=>{class n extends Rh{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=t=>bV(t),this.createValidator=t=>N3(t)}}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275dir=Ae({type:n,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(t,i){2&t&&Vt("maxlength",i._enabled?i.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Hn([PJ]),ft]}),n})(),CV=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[fV]}),n})();class EV extends WM{constructor(e,t,i){super(GI(t),WI(i,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[this._adjustIndex(e)]}push(e,t={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(e,t,i={}){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(e,t={}){let i=this._adjustIndex(e);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(e,t,i={}){let r=this._adjustIndex(e);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),t&&(this.controls.splice(r,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,t={}){nV(this,!1,e),e.forEach((i,r)=>{tV(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){null!=e&&(e.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e=[],t={}){this._forEachChild((i,r)=>{i.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(e=>e.getRawValue())}clear(e={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_adjustIndex(e){return e<0?e+this.length:e}_syncPendingControls(){let e=this.controls.reduce((t,i)=>!!i._syncPendingControls()||t,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((t,i)=>{e(t,i)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(t=>t.enabled&&e(t))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(const e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}_find(e){return this.at(e)??null}}function AV(n){return!!n&&(void 0!==n.asyncValidators||void 0!==n.validators||void 0!==n.updateOn)}let OJ=(()=>{class n{constructor(){this.useNonNullable=!1}get nonNullable(){const t=new n;return t.useNonNullable=!0,t}group(t,i=null){const r=this._reduceControls(t);let s={};return AV(i)?s=i:null!==i&&(s.validators=i.validator,s.asyncValidators=i.asyncValidator),new Ty(r,s)}record(t,i=null){const r=this._reduceControls(t);return new iV(r,i)}control(t,i,r){let s={};return this.useNonNullable?(AV(i)?s=i:(s.validators=i,s.asyncValidators=r),new ky(t,{...s,nonNullable:!0})):new ky(t,i,r)}array(t,i,r){const s=t.map(o=>this._createControl(o));return new EV(s,i,r)}_reduceControls(t){const i={};return Object.keys(t).forEach(r=>{i[r]=this._createControl(t[r])}),i}_createControl(t){return t instanceof ky||t instanceof WM?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),LJ=(()=>{class n{static withConfig(t){return{ngModule:n,providers:[{provide:Ih,useValue:t.callSetDisabledState??Dy}]}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[CV]}),n})(),FJ=(()=>{class n{static withConfig(t){return{ngModule:n,providers:[{provide:YI,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:Ih,useValue:t.callSetDisabledState??Dy}]}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[CV]}),n})();const NJ=["matFormFieldNotchedOutline",""],BJ=["*"],UJ=["textField"],VJ=["iconPrefixContainer"],zJ=["textPrefixContainer"];function HJ(n,e){1&n&&Fe(0,"span",19)}function GJ(n,e){if(1&n){const t=Wi();K(0,"label",17),ct("cdkObserveContent",function(){return Dn(t),In(be(2)._refreshOutlineNotchWidth())}),Kt(1,1),_e(2,HJ,1,0,"span",18),J()}if(2&n){const t=be(2);z("floating",t._shouldLabelFloat())("cdkObserveContentDisabled",!t._hasOutline())("id",t._labelId),Vt("for",t._control.id)("aria-owns",t._control.id),j(2),z("ngIf",!t.hideRequiredMarker&&t._control.required)}}function WJ(n,e){1&n&&_e(0,GJ,3,6,"label",16),2&n&&z("ngIf",be()._hasFloatingLabel())}function $J(n,e){1&n&&Fe(0,"div",20)}function jJ(n,e){}function XJ(n,e){1&n&&_e(0,jJ,0,0,"ng-template",22),2&n&&(be(2),z("ngTemplateOutlet",Vr(1)))}function qJ(n,e){if(1&n&&(K(0,"div",21),_e(1,XJ,1,1,"ng-template",9),J()),2&n){const t=be();z("matFormFieldNotchedOutlineOpen",t._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",t._labelWidth),j(1),z("ngIf",!t._forceDisplayInfixLabel())}}function YJ(n,e){1&n&&(K(0,"div",23,24),Kt(2,2),J())}function KJ(n,e){1&n&&(K(0,"div",25,26),Kt(2,3),J())}function ZJ(n,e){}function QJ(n,e){1&n&&_e(0,ZJ,0,0,"ng-template",22),2&n&&(be(),z("ngTemplateOutlet",Vr(1)))}function JJ(n,e){1&n&&(K(0,"div",27),Kt(1,4),J())}function eee(n,e){1&n&&(K(0,"div",28),Kt(1,5),J())}function tee(n,e){1&n&&Fe(0,"div",29)}function nee(n,e){1&n&&(K(0,"div",30),Kt(1,6),J()),2&n&&z("@transitionMessages",be()._subscriptAnimationState)}function iee(n,e){if(1&n&&(K(0,"mat-hint",34),Je(1),J()),2&n){const t=be(2);z("id",t._hintLabelId),j(1),$i(t.hintLabel)}}function ree(n,e){if(1&n&&(K(0,"div",31),_e(1,iee,2,2,"mat-hint",32),Kt(2,7),Fe(3,"div",33),Kt(4,8),J()),2&n){const t=be();z("@transitionMessages",t._subscriptAnimationState),j(1),z("ngIf",t.hintLabel)}}const see=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],oee=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let xa=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["mat-label"]]}),n})(),aee=0;const TV=new ge("MatError");let lee=(()=>{class n{constructor(t,i){this.id="mat-mdc-error-"+aee++,t||i.nativeElement.setAttribute("aria-live","polite")}}return n.\u0275fac=function(t){return new(t||n)(Ua("aria-live"),D(yt))},n.\u0275dir=Ae({type:n,selectors:[["mat-error"],["","matError",""]],hostAttrs:["aria-atomic","true",1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(t,i){2&t&&Nd("id",i.id)},inputs:{id:"id"},features:[Hn([{provide:TV,useExisting:n}])]}),n})(),cee=0,DV=(()=>{class n{constructor(){this.align="start",this.id="mat-mdc-hint-"+cee++}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(t,i){2&t&&(Nd("id",i.id),Vt("align",null),Pn("mat-mdc-form-field-hint-end","end"===i.align))},inputs:{align:"align",id:"id"}}),n})();const dee=new ge("MatPrefix"),uee=new ge("MatSuffix");let IV=(()=>{class n{constructor(t){this._elementRef=t,this.floating=!1}getWidth(){return function hee(n){if(null!==n.offsetParent)return n.scrollWidth;const t=n.cloneNode(!0);t.style.setProperty("position","absolute"),t.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(t);const i=t.scrollWidth;return t.remove(),i}(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}}return n.\u0275fac=function(t){return new(t||n)(D(yt))},n.\u0275dir=Ae({type:n,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(t,i){2&t&&Pn("mdc-floating-label--float-above",i.floating)},inputs:{floating:"floating"}}),n})();const RV="mdc-line-ripple--active",YM="mdc-line-ripple--deactivating";let PV=(()=>{class n{constructor(t,i){this._elementRef=t,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(YM);"opacity"===r.propertyName&&o&&s.remove(RV,YM)},i.runOutsideAngular(()=>{t.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const t=this._elementRef.nativeElement.classList;t.remove(YM),t.add(RV)}deactivate(){this._elementRef.nativeElement.classList.add(YM)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(pt))},n.\u0275dir=Ae({type:n,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),n})(),kV=(()=>{class n{constructor(t,i){this._elementRef=t,this._ngZone=i,this.labelWidth=0,this.open=!1}ngAfterViewInit(){const t=this._elementRef.nativeElement.querySelector(".mdc-floating-label");t?(this._elementRef.nativeElement.classList.add("mdc-notched-outline--upgraded"),"function"==typeof requestAnimationFrame&&(t.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>t.style.transitionDuration="")}))):this._elementRef.nativeElement.classList.add("mdc-notched-outline--no-label")}_getNotchWidth(){return this.open?this.labelWidth>0?`calc(${this.labelWidth}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`:"0px":null}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(pt))},n.\u0275cmp=ht({type:n,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(t,i){2&t&&Pn("mdc-notched-outline--notched",i.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:NJ,ngContentSelectors:BJ,decls:4,vars:2,consts:[[1,"mdc-notched-outline__leading"],[1,"mdc-notched-outline__notch"],[1,"mdc-notched-outline__trailing"]],template:function(t,i){1&t&&(Cr(),Fe(0,"div",0),K(1,"div",1),Kt(2),J(),Fe(3,"div",2)),2&t&&(j(1),Pc("width",i._getNotchWidth()))},encapsulation:2,changeDetection:0}),n})();const fee={transitionMessages:Gl("transitionMessages",[_o("enter",Ci({opacity:1,transform:"translateY(0%)"})),Ks("void => enter",[Ci({opacity:0,transform:"translateY(-5px)"}),go("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let rR=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n}),n})();const sR=new ge("MatFormField"),pee=new ge("MAT_FORM_FIELD_DEFAULT_OPTIONS");let OV=0,nu=(()=>{class n{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(t){this._hideRequiredMarker=Cn(t)}get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||"auto"}set floatLabel(t){t!==this._floatLabel&&(this._floatLabel=t,this._changeDetectorRef.markForCheck())}get appearance(){return this._appearance}set appearance(t){const i=this._appearance;this._appearance=t||this._defaults?.appearance||"fill","outline"===this._appearance&&this._appearance!==i&&(this._refreshOutlineNotchWidth(),this._needsOutlineLabelOffsetUpdateOnStable=!0)}get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||"fixed"}set subscriptSizing(t){this._subscriptSizing=t||this._defaults?.subscriptSizing||"fixed"}get hintLabel(){return this._hintLabel}set hintLabel(t){this._hintLabel=t,this._processHints()}get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(t){this._explicitFormFieldControl=t}constructor(t,i,r,s,o,a,l,c){this._elementRef=t,this._changeDetectorRef=i,this._ngZone=r,this._dir=s,this._platform=o,this._defaults=a,this._animationMode=l,this._document=c,this._hideRequiredMarker=!1,this.color="primary",this._appearance="fill",this._subscriptSizing=null,this._hintLabel="",this._hasIconPrefix=!1,this._hasTextPrefix=!1,this._hasIconSuffix=!1,this._hasTextSuffix=!1,this._labelId="mat-mdc-form-field-label-"+OV++,this._hintLabelId="mat-mdc-hint-"+OV++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Ue,this._isFocused=null,this._needsOutlineLabelOffsetUpdateOnStable=!1,a&&(a.appearance&&(this.appearance=a.appearance),this._hideRequiredMarker=Boolean(a?.hideRequiredMarker),a.color&&(this.color=a.color))}ngAfterViewInit(){this._updateFocusState(),this._refreshOutlineNotchWidth(),this._document?.fonts?.ready?this._document.fonts.ready.then(()=>{this._refreshOutlineNotchWidth(),this._changeDetectorRef.markForCheck()}):setTimeout(()=>this._refreshOutlineNotchWidth(),100),this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeControl(),this._initializeSubscript(),this._initializePrefixAndSuffix(),this._initializeOutlineLabelOffsetSubscriptions()}ngAfterContentChecked(){this._assertFormFieldControl()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}getLabelId(){return this._hasFloatingLabel()?this._labelId:null}getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(){const t=this._control;t.controlType&&this._elementRef.nativeElement.classList.add(`mat-mdc-form-field-type-${t.controlType}`),t.stateChanges.subscribe(()=>{this._updateFocusState(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),t.ngControl&&t.ngControl.valueChanges&&t.ngControl.valueChanges.pipe(et(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck())}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(t=>!t._isText),this._hasTextPrefix=!!this._prefixChildren.find(t=>t._isText),this._hasIconSuffix=!!this._suffixChildren.find(t=>!t._isText),this._hasTextSuffix=!!this._suffixChildren.find(t=>t._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),cs(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){}_updateFocusState(){this._control.focused&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!this._control.focused&&(this._isFocused||null===this._isFocused)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_initializeOutlineLabelOffsetSubscriptions(){this._prefixChildren.changes.subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(et(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(et(this._destroyed)).subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0)}_shouldAlwaysFloat(){return"always"===this.floatLabel}_hasOutline(){return"outline"===this.appearance}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel(){return!!this._labelChildNonStatic||!!this._labelChildStatic}_shouldLabelFloat(){return this._control.shouldLabelFloat||this._shouldAlwaysFloat()}_shouldForward(t){const i=this._control?this._control.ngControl:null;return i&&i[t]}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||(this._labelWidth=this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){}_syncDescribedByIds(){if(this._control){let t=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&t.push(...this._control.userAriaDescribedBy.split(" ")),"hint"===this._getDisplayedMessages()){const i=this._hintChildren?this._hintChildren.find(s=>"start"===s.align):null,r=this._hintChildren?this._hintChildren.find(s=>"end"===s.align):null;i?t.push(i.id):this._hintLabel&&t.push(this._hintLabelId),r&&t.push(r.id)}else this._errorChildren&&t.push(...this._errorChildren.map(i=>i.id));this._control.setDescribedByIds(t)}}_updateOutlineLabelOffset(){if(!this._platform.isBrowser||!this._hasOutline()||!this._floatingLabel)return;const t=this._floatingLabel.element;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return void(t.style.transform="");if(!this._isAttachedToDom())return void(this._needsOutlineLabelOffsetUpdateOnStable=!0);const i=this._iconPrefixContainer?.nativeElement,r=this._textPrefixContainer?.nativeElement,s=i?.getBoundingClientRect().width??0,o=r?.getBoundingClientRect().width??0;t.style.transform=`var(\n --mat-mdc-form-field-label-transform,\n translateY(-50%) translateX(calc(${"rtl"===this._dir.value?"-1":"1"} * (${s+o}px + var(--mat-mdc-form-field-label-offset-x, 0px))))\n )`}_isAttachedToDom(){const t=this._elementRef.nativeElement;if(t.getRootNode){const i=t.getRootNode();return i&&i!==t}return document.documentElement.contains(t)}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(ci),D(pt),D(tl),D(Fi),D(pee,8),D(rs,8),D(Ht))},n.\u0275cmp=ht({type:n,selectors:[["mat-form-field"]],contentQueries:function(t,i,r){if(1&t&&(Xi(r,xa,5),Xi(r,xa,7),Xi(r,rR,5),Xi(r,dee,5),Xi(r,uee,5),Xi(r,TV,5),Xi(r,DV,5)),2&t){let s;Lt(s=Ft())&&(i._labelChildNonStatic=s.first),Lt(s=Ft())&&(i._labelChildStatic=s.first),Lt(s=Ft())&&(i._formFieldControl=s.first),Lt(s=Ft())&&(i._prefixChildren=s),Lt(s=Ft())&&(i._suffixChildren=s),Lt(s=Ft())&&(i._errorChildren=s),Lt(s=Ft())&&(i._hintChildren=s)}},viewQuery:function(t,i){if(1&t&&(oi(UJ,5),oi(VJ,5),oi(zJ,5),oi(IV,5),oi(kV,5),oi(PV,5)),2&t){let r;Lt(r=Ft())&&(i._textField=r.first),Lt(r=Ft())&&(i._iconPrefixContainer=r.first),Lt(r=Ft())&&(i._textPrefixContainer=r.first),Lt(r=Ft())&&(i._floatingLabel=r.first),Lt(r=Ft())&&(i._notchedOutline=r.first),Lt(r=Ft())&&(i._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(t,i){2&t&&Pn("mat-mdc-form-field-label-always-float",i._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",i._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",i._hasIconSuffix)("mat-form-field-invalid",i._control.errorState)("mat-form-field-disabled",i._control.disabled)("mat-form-field-autofilled",i._control.autofilled)("mat-form-field-no-animations","NoopAnimations"===i._animationMode)("mat-form-field-appearance-fill","fill"==i.appearance)("mat-form-field-appearance-outline","outline"==i.appearance)("mat-form-field-hide-placeholder",i._hasFloatingLabel()&&!i._shouldLabelFloat())("mat-focused",i._control.focused)("mat-primary","accent"!==i.color&&"warn"!==i.color)("mat-accent","accent"===i.color)("mat-warn","warn"===i.color)("ng-untouched",i._shouldForward("untouched"))("ng-touched",i._shouldForward("touched"))("ng-pristine",i._shouldForward("pristine"))("ng-dirty",i._shouldForward("dirty"))("ng-valid",i._shouldForward("valid"))("ng-invalid",i._shouldForward("invalid"))("ng-pending",i._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[Hn([{provide:sR,useExisting:n}])],ngContentSelectors:oee,decls:18,vars:23,consts:[["labelTemplate",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],["textField",""],["class","mat-mdc-form-field-focus-overlay",4,"ngIf"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen","matFormFieldNotchedOutlineLabelWidth",4,"ngIf"],["class","mat-mdc-form-field-icon-prefix",4,"ngIf"],["class","mat-mdc-form-field-text-prefix",4,"ngIf"],[1,"mat-mdc-form-field-infix"],[3,"ngIf"],["class","mat-mdc-form-field-text-suffix",4,"ngIf"],["class","mat-mdc-form-field-icon-suffix",4,"ngIf"],["matFormFieldLineRipple","",4,"ngIf"],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align",3,"ngSwitch"],["class","mat-mdc-form-field-error-wrapper",4,"ngSwitchCase"],["class","mat-mdc-form-field-hint-wrapper",4,"ngSwitchCase"],["matFormFieldFloatingLabel","",3,"floating","cdkObserveContentDisabled","id","cdkObserveContent",4,"ngIf"],["matFormFieldFloatingLabel","",3,"floating","cdkObserveContentDisabled","id","cdkObserveContent"],["aria-hidden","true","class","mat-mdc-form-field-required-marker mdc-floating-label--required",4,"ngIf"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[1,"mat-mdc-form-field-focus-overlay"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen","matFormFieldNotchedOutlineLabelWidth"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-icon-prefix"],["iconPrefixContainer",""],[1,"mat-mdc-form-field-text-prefix"],["textPrefixContainer",""],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],[3,"id",4,"ngIf"],[1,"mat-mdc-form-field-hint-spacer"],[3,"id"]],template:function(t,i){1&t&&(Cr(see),_e(0,WJ,1,1,"ng-template",null,0,kc),K(2,"div",1,2),ct("click",function(s){return i._control.onContainerClick&&i._control.onContainerClick(s)}),_e(4,$J,1,0,"div",3),K(5,"div",4),_e(6,qJ,2,3,"div",5),_e(7,YJ,3,0,"div",6),_e(8,KJ,3,0,"div",7),K(9,"div",8),_e(10,QJ,1,1,"ng-template",9),Kt(11),J(),_e(12,JJ,2,0,"div",10),_e(13,eee,2,0,"div",11),J(),_e(14,tee,1,0,"div",12),J(),K(15,"div",13),_e(16,nee,2,1,"div",14),_e(17,ree,5,2,"div",15),J()),2&t&&(j(2),Pn("mdc-text-field--filled",!i._hasOutline())("mdc-text-field--outlined",i._hasOutline())("mdc-text-field--no-label",!i._hasFloatingLabel())("mdc-text-field--disabled",i._control.disabled)("mdc-text-field--invalid",i._control.errorState),j(2),z("ngIf",!i._hasOutline()&&!i._control.disabled),j(2),z("ngIf",i._hasOutline()),j(1),z("ngIf",i._hasIconPrefix),j(1),z("ngIf",i._hasTextPrefix),j(2),z("ngIf",!i._hasOutline()||i._forceDisplayInfixLabel()),j(2),z("ngIf",i._hasTextSuffix),j(1),z("ngIf",i._hasIconSuffix),j(1),z("ngIf",!i._hasOutline()),j(1),Pn("mat-mdc-form-field-subscript-dynamic-size","dynamic"===i.subscriptSizing),z("ngSwitch",i._getDisplayedMessages()),j(1),z("ngSwitchCase","error"),j(1),z("ngSwitchCase","hint"))},dependencies:[gi,Vv,Uv,aD,tU,DV,IV,kV,PV],styles:['.mdc-text-field{border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{height:28px;width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}}.mdc-text-field__affix{height:28px;opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px))*2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px, var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-floating-label{position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after,.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::after{border-bottom-width:2px}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{line-height:normal;pointer-events:all}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-text-field-wrapper::before{content:none}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}.cdk-high-contrast-active .mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:12px;box-sizing:content-box}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__affix{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea{transition:none}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}'],encapsulation:2,data:{animation:[fee.transitionMessages]},changeDetection:0}),n})(),KM=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[qn,va,aI,qn]}),n})();const NV=Sh({passive:!0});let _ee=(()=>{class n{constructor(t,i){this._platform=t,this._ngZone=i,this._monitoredElements=new Map}monitor(t){if(!this._platform.isBrowser)return Is;const i=Vc(t),r=this._monitoredElements.get(i);if(r)return r.subject;const s=new Ue,o="cdk-text-field-autofilled",a=l=>{"cdk-text-field-autofill-start"!==l.animationName||i.classList.contains(o)?"cdk-text-field-autofill-end"===l.animationName&&i.classList.contains(o)&&(i.classList.remove(o),this._ngZone.run(()=>s.next({target:l.target,isAutofilled:!1}))):(i.classList.add(o),this._ngZone.run(()=>s.next({target:l.target,isAutofilled:!0})))};return this._ngZone.runOutsideAngular(()=>{i.addEventListener("animationstart",a,NV),i.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(i,{subject:s,unlisten:()=>{i.removeEventListener("animationstart",a,NV)}}),s}stopMonitoring(t){const i=Vc(t),r=this._monitoredElements.get(i);r&&(r.unlisten(),r.subject.complete(),i.classList.remove("cdk-text-field-autofill-monitored"),i.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(i))}ngOnDestroy(){this._monitoredElements.forEach((t,i)=>this.stopMonitoring(i))}}return n.\u0275fac=function(t){return new(t||n)(Q(Fi),Q(pt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),vee=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({}),n})();const yee=new ge("MAT_INPUT_VALUE_ACCESSOR"),bee=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let xee=0;const wee=wU(class{constructor(n,e,t,i){this._defaultErrorStateMatcher=n,this._parentForm=e,this._parentFormGroup=t,this.ngControl=i,this.stateChanges=new Ue}});let Em=(()=>{class n extends wee{get disabled(){return this._disabled}set disabled(t){this._disabled=Cn(t),this.focused&&(this.focused=!1,this.stateChanges.next())}get id(){return this._id}set id(t){this._id=t||this._uid}get required(){return this._required??this.ngControl?.control?.hasValidator(FI.required)??!1}set required(t){this._required=Cn(t)}get type(){return this._type}set type(t){this._type=t||"text",this._validateType(),!this._isTextarea&&BB().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}get value(){return this._inputValueAccessor.value}set value(t){t!==this.value&&(this._inputValueAccessor.value=t,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(t){this._readonly=Cn(t)}constructor(t,i,r,s,o,a,l,c,u,h){super(a,s,o,r),this._elementRef=t,this._platform=i,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+xee++,this.focused=!1,this.stateChanges=new Ue,this.controlType="mat-input",this.autofilled=!1,this._disabled=!1,this._type="text",this._readonly=!1,this._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(g=>BB().has(g)),this._iOSKeyupListener=g=>{const b=g.target;!b.value&&0===b.selectionStart&&0===b.selectionEnd&&(b.setSelectionRange(1,1),b.setSelectionRange(0,0))};const p=this._elementRef.nativeElement,m=p.nodeName.toLowerCase();this._inputValueAccessor=l||p,this._previousNativeValue=this.value,this.id=this.id,i.IOS&&u.runOutsideAngular(()=>{t.nativeElement.addEventListener("keyup",this._iOSKeyupListener)}),this._isServer=!this._platform.isBrowser,this._isNativeSelect="select"===m,this._isTextarea="textarea"===m,this._isInFormField=!!h,this._isNativeSelect&&(this.controlType=p.multiple?"mat-native-select-multiple":"mat-native-select")}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(t=>{this.autofilled=t.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._platform.IOS&&this._elementRef.nativeElement.removeEventListener("keyup",this._iOSKeyupListener)}ngDoCheck(){this.ngControl&&(this.updateErrorState(),null!==this.ngControl.disabled&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(t){this._elementRef.nativeElement.focus(t)}_focusChanged(t){t!==this.focused&&(this.focused=t,this.stateChanges.next())}_onInput(){}_dirtyCheckNativeValue(){const t=this._elementRef.nativeElement.value;this._previousNativeValue!==t&&(this._previousNativeValue=t,this.stateChanges.next())}_dirtyCheckPlaceholder(){const t=this._getPlaceholder();if(t!==this._previousPlaceholder){const i=this._elementRef.nativeElement;this._previousPlaceholder=t,t?i.setAttribute("placeholder",t):i.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){bee.indexOf(this._type)}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let t=this._elementRef.nativeElement.validity;return t&&t.badInput}get empty(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}get shouldLabelFloat(){if(this._isNativeSelect){const t=this._elementRef.nativeElement,i=t.options[0];return this.focused||t.multiple||!this.empty||!!(t.selectedIndex>-1&&i&&i.label)}return this.focused||!this.empty}setDescribedByIds(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){const t=this._elementRef.nativeElement;return this._isNativeSelect&&(t.multiple||t.size>1)}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(Fi),D(Wl,10),D(Py,8),D(Mm,8),D(MU),D(yee,10),D(_ee),D(pt),D(sR,8))},n.\u0275dir=Ae({type:n,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:18,hostBindings:function(t,i){1&t&&ct("focus",function(){return i._focusChanged(!0)})("blur",function(){return i._focusChanged(!1)})("input",function(){return i._onInput()}),2&t&&(Nd("id",i.id)("disabled",i.disabled)("required",i.required),Vt("name",i.name||null)("readonly",i.readonly&&!i._isNativeSelect||null)("aria-invalid",i.empty&&i.required?null:i.errorState)("aria-required",i.required)("id",i.id),Pn("mat-input-server",i._isServer)("mat-mdc-form-field-textarea-control",i._isInFormField&&i._isTextarea)("mat-mdc-form-field-input-control",i._isInFormField)("mdc-text-field__input",i._isInFormField)("mat-mdc-native-select-inline",i._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly"},exportAs:["matInput"],features:[Hn([{provide:rR,useExisting:n}]),ft,zi]}),n})(),Mee=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[qn,KM,KM,vee,qn]}),n})();function See(n,e){if(1&n&&(K(0,"mat-label"),Je(1),J()),2&n){const t=be(2);j(1),$i(t.resource.name)}}function Cee(n,e){if(1&n){const t=Wi();K(0,"mat-form-field",1),_e(1,See,2,1,"mat-label",2),K(2,"input",3),ct("ngModelChange",function(r){return Dn(t),In(be().resource.data=r)})("change",function(){return Dn(t),In(be().changed.emit())}),J()()}if(2&n){const t=be();z("matTooltip",t.resourceDescription),j(1),z("ngIf",t.resource.name),j(1),z("max",t.resource.schema.max_value)("min",t.resource.schema.min_value)("step",t.resource.schema.value_interval)("disabled",t.disabled||void 0!==t.resource.schema.required_value)("ngModel",t.resource.data)}}let Eee=(()=>{class n{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new it}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=ht({type:n,selectors:[["app-integer-block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:1,vars:1,consts:[["appearance","fill","matTooltipPosition","above",3,"matTooltip",4,"ngIf"],["appearance","fill","matTooltipPosition","above",3,"matTooltip"],[4,"ngIf"],["matInput","","type","number",3,"max","min","step","disabled","ngModel","ngModelChange","change"]],template:function(t,i){1&t&&_e(0,Cee,3,7,"mat-form-field",0),2&t&&z("ngIf",i.resource)},dependencies:[gi,Wc,wm,eu,Cm,Sm,tu,nu,xa,Em,_s],changeDetection:0}),n})();function Aee(n,e){if(1&n&&(K(0,"mat-label"),Je(1),J()),2&n){const t=be(2);j(1),$i(t.resource.name)}}function Tee(n,e){if(1&n){const t=Wi();K(0,"mat-form-field",1),_e(1,Aee,2,1,"mat-label",2),K(2,"input",3),ct("ngModelChange",function(r){return Dn(t),In(be().resource.data=r)})("change",function(){return Dn(t),In(be().changed.emit())}),J()()}if(2&n){const t=be();z("matTooltip",t.resourceDescription),j(1),z("ngIf",t.resource.name),j(1),z("disabled",t.disabled||void 0!==t.resource.schema.required_value)("maxlength",t.maxLength)("minlength",t.minLength)("ngModel",t.resource.data)}}let Dee=(()=>{class n{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new it,this.minLength=null,this.maxLength=null}get resource(){return this._resource}set resource(t){this._resource=t,isNaN(+this._resource?.schema.length)||(this.minLength=this.maxLength=+this._resource?.schema.length)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=ht({type:n,selectors:[["app-string-block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:1,vars:1,consts:[["appearance","fill","matTooltipPosition","above",3,"matTooltip",4,"ngIf"],["appearance","fill","matTooltipPosition","above",3,"matTooltip"],[4,"ngIf"],["matInput","","type","text",3,"disabled","maxlength","minlength","ngModel","ngModelChange","change"]],template:function(t,i){1&t&&_e(0,Tee,3,6,"mat-form-field",0),2&t&&z("ngIf",i.resource)},dependencies:[gi,Wc,eu,nR,iR,tu,nu,xa,Em,_s],changeDetection:0}),n})();const $l=(n,e)=>n+(n.includes("__")?"/":"__")+e,Ph=function(){return[]};function Iee(n,e){if(1&n&&(K(0,"mat-panel-description"),Je(1," Click to view items ("),K(2,"b"),Je(3),J(),Je(4,") "),J()),2&n){const t=be(2);j(3),$i((t.resourceData||Xs(1,Ph)).length)}}function Ree(n,e){1&n&&(K(0,"mat-panel-description"),Je(1," Empty array "),J())}function Pee(n,e){}function kee(n,e){if(1&n){const t=Wi();K(0,"mat-expansion-panel",4),ct("opened",function(){return Dn(t),In(be().onContentsTrigger(!0))})("closed",function(){return Dn(t),In(be().onContentsTrigger(!1))}),K(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),Je(3),J(),_e(4,Iee,5,2,"mat-panel-description",1),_e(5,Ree,2,0,"mat-panel-description",1),J(),_e(6,Pee,0,0,"ng-template",6),J()}if(2&n){const t=be(),i=Vr(3);j(1),z("matTooltip",t.resourceDescription),j(2),nr(" ",t.name," "),j(1),z("ngIf",(t.resourceData||Xs(5,Ph)).length>0),j(1),z("ngIf",0==(t.resourceData||Xs(6,Ph)).length),j(1),z("ngTemplateOutlet",i)}}function Oee(n,e){}function Lee(n,e){if(1&n&&(uo(0),K(1,"h2",5),Je(2),J(),K(3,"div",7),_e(4,Oee,0,0,"ng-template",6),J(),ho()),2&n){const t=be(),i=Vr(3);j(1),z("matTooltip",t.resourceDescription),j(1),$i(t.name),j(2),z("ngTemplateOutlet",i)}}function Fee(n,e){}function Nee(n,e){if(1&n&&Fe(0,"app-editor",10),2&n){const t=be().$implicit,i=be(3);z("resource",i.children[i.pageIndex*i.pageSize+t])("disabled",i.disabled)}}function Bee(n,e){if(1&n&&(uo(0),_e(1,Nee,1,2,"app-editor",9),ho()),2&n){const t=e.$implicit,i=be(3);j(1),z("ngIf",i.pageIndex*i.pageSize+t0)}let oR=(()=>{class n{constructor(t,i){this.main=t,this.cdr=i,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new it,this.showAsCollapsable=!1,this.renderContents=!1,this.minPageSize=10,this.pageIndex=0,this.pageSize=0,this.pageSizeOptions=[10,25,50,100],this.children=[],this.renderIndexes=[],this.goToIndex=0,this.pageIndexes=[],this.destroyed$=new Ue}set resource(t){this._resource=t,this.showAsCollapsable=this._resource?.data?.length>5,this.buildChildren(),this.renderPage(0,this.minPageSize),this.updatePageIndexes()}get resource(){return this._resource}get resourceData(){return this._resource?.data}buildChildren(){this.children=(this.resourceData||[]).map((t,i)=>({id:$l(this._resource.id,i),name:""+i,data:t,schema:this._resource.schema.child_schema}))}get schema(){return this._resource?.schema}get name(){return this._resource?.name||null}ngAfterViewInit(){var t=this;this.main.dataBlockChange$.pipe(et(this.destroyed$),On(([i,r])=>!!this.resource&&i.startsWith(this.resource.id)&&!i.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var i=xt(function*([r,s]){const o=r.substring(t.resource.id.length+1);t.resourceData[+o]=s});return function(r){return i.apply(this,arguments)}}())}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}onContentsTrigger(t){void 0!==this.contentsTimeout&&(clearTimeout(this.contentsTimeout),this.contentsTimeout=void 0),t?(this.renderContents=!0,this.cdr.markForCheck()):this.contentsTimeout=setTimeout(()=>{this.contentsTimeout=void 0,this.renderContents=!1,this.cdr.markForCheck()},2e3)}renderPage(t,i){this.pageSize!==i&&(this.renderIndexes=new Array(i).fill(null).map((r,s)=>s)),this.goToIndex=this.pageIndex=t,this.pageSize=i,this.cdr.markForCheck()}updatePageIndexes(){this.goToIndex=this.pageIndex,this.pageIndexes=[];for(let t=0;t{class n{constructor(t,i){this.eelDelegate=t,this.main=i,this._resource$=new Ct(null),this.imageUrl$=new Ct(null),this.destroyed$=new Ue,this.changed=new it}set resource(t){this._resource$.next(t)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var t=this;return xt(function*(){t._resource$.pipe(et(t.destroyed$)).subscribe(function(){var i=xt(function*(r){if(r){const s=yield t.eelDelegate.serializeResource(r.id);t.imageUrl$.next(s.find(o=>o.endsWith(".png"))||null)}else t.imageUrl$.next(null)});return function(r){return i.apply(this,arguments)}}())})()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return n.\u0275fac=function(t){return new(t||n)(D(Hc),D(il))},n.\u0275cmp=ht({type:n,selectors:[["app-bitmap-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:8,consts:[[3,"resource","fieldBlacklist"],[3,"src",4,"ngIf"],[3,"src"]],template:function(t,i){1&t&&(Fe(0,"app-compound-block-ui",0),zt(1,"async"),_e(2,Xee,2,3,"img",1),zt(3,"async")),2&t&&(z("resource",Xt(1,3,i._resource$))("fieldBlacklist",Xs(7,qee)),j(2),z("ngIf",Xt(3,5,i.imageUrl$)))},dependencies:[gi,Gc,Vl],styles:["[_nghost-%COMP%]{width:100%;display:flex;justify-content:center;flex-direction:column;align-items:center;row-gap:1rem}img[_ngcontent-%COMP%]{min-width:10rem;max-width:100%;max-height:25rem;object-fit:contain;background-image:linear-gradient(45deg,#808080 25%,transparent 25%),linear-gradient(-45deg,#808080 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#808080 75%),linear-gradient(-45deg,transparent 75%,#808080 75%);background-size:16px 16px;background-color:#aaa}"],changeDetection:0}),n})();const Kee=function(n){return{"background-color":n}};function Zee(n,e){if(1&n&&Fe(0,"div",3),2&n){const t=e.$implicit,i=e.index,r=be();z("ngStyle",pw(2,Kee,"#"+r.lpad(t.toString(16),"0",8)))("matTooltip",i+": #"+t.toString(16))}}const Qee=function(){return["colors"]};let Jee=(()=>{class n{constructor(){this.resource=null,this.changed=new it}get resourceData(){return this.resource?.data}lpad(t,i,r){for(;t.length{class n{constructor(t){this.cdr=t,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new it,this.editorProps={showHeader:!1,height:"10rem",readonly:!1}}get resource(){return this._resource}set resource(t){this._resource=t,this.editor&&(this.editorProps.data=t?new Uint8Array(t.data):void 0,this.editorProps.height=Math.min(24,1.5*Math.ceil((t?.data||[]).length/8))+"rem",this.editor.$set({props:this.editorProps}),this.cdr.markForCheck())}ngAfterViewInit(){this.resource&&(this.editorProps.data=new Uint8Array(this.resource.data),this.editorProps.height=Math.min(24,1.5*Math.ceil(this.resource.data.length/8))+"rem"),this.editor=new HexEditor({target:this.editorDiv?.nativeElement,props:this.editorProps}),this.cdr.markForCheck()}ngOnDestroy(){this.editor&&this.editor.$destroy()}}return n.\u0275fac=function(t){return new(t||n)(D(ci))},n.\u0275cmp=ht({type:n,selectors:[["app-binary-block-ui"]],viewQuery:function(t,i){if(1&t&&oi(ete,5),2&t){let r;Lt(r=Ft())&&(i.editorDiv=r.first)}},inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:4,vars:2,consts:[["matTooltipPosition","above",3,"matTooltip"],["editor",""]],template:function(t,i){1&t&&(K(0,"h2",0),Je(1),J(),Fe(2,"div",null,1)),2&t&&(z("matTooltip",i.resourceDescription),j(1),$i(null==i.resource?null:i.resource.name))},dependencies:[_s],changeDetection:0}),n})();const nte=["picker"];function ite(n,e){if(1&n&&(K(0,"mat-label",8),Je(1),J()),2&n){const t=be();j(1),$i(null==t.resource?null:t.resource.name)}}const rte=function(n){return{transform:n}};let ste=(()=>{class n{constructor(t){this.cdr=t,this.resource=null,this.resourceDescription="",this.changed=new it,this.pi=Math.PI,this.dragging=!1}mousedown(t){this.dragging=!0,this.updateRotation(t)}mousemove(t){this.dragging&&this.updateRotation(t)}mouseout(){this.dragging=!1}updateRotation(t){const i=this.picker.nativeElement.getBoundingClientRect();let r=Math.atan2(t.clientY-i.top-i.height/2,t.clientX-i.left-i.width/2);t.shiftKey&&(r=15*Math.round(180*r/Math.PI/15)*Math.PI/180),this.resource.data=r,this.changed.emit(),this.cdr.markForCheck()}}return n.\u0275fac=function(t){return new(t||n)(D(ci))},n.\u0275cmp=ht({type:n,selectors:[["app-angle-block-ui"]],viewQuery:function(t,i){if(1&t&&oi(nte,5),2&t){let r;Lt(r=Ft())&&(i.picker=r.first)}},hostBindings:function(t,i){1&t&&ct("mousedown",function(s){return i.mousedown(s)})("mousemove",function(s){return i.mousemove(s)})("mouseup",function(){return i.mouseout()})("mouseleave",function(){return i.mouseout()})},inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},decls:14,vars:13,consts:[["id","wrapper","matTooltipPosition","above",3,"matTooltip"],[1,"circle-container"],["picker",""],[1,"ui-anglepicker-pointer",3,"ngStyle"],[1,"ui-anglepicker-dot"],[1,"ui-anglepicker-line"],["id","labels"],["id","name-span",4,"ngIf"],["id","name-span"]],template:function(t,i){1&t&&(K(0,"div",0)(1,"div",1,2)(3,"div",3),Fe(4,"div",4)(5,"div",5),J()(),K(6,"div",6),_e(7,ite,2,1,"mat-label",7),K(8,"mat-label"),Je(9),zt(10,"number"),J(),K(11,"mat-label"),Je(12),zt(13,"number"),J()()()),2&t&&(z("matTooltip",i.resourceDescription),j(3),z("ngStyle",pw(11,rte,"rotate("+((null==i.resource?null:i.resource.data)||0)+"rad)")),j(4),z("ngIf",null==i.resource?null:i.resource.name),j(2),nr("",b1(10,5,180*(null==i.resource?null:i.resource.data)/i.pi||0,"1.2-2")," deg"),j(3),nr("",b1(13,8,(null==i.resource?null:i.resource.data)||0,"1.2-2")," rad"))},dependencies:[gi,Ow,xa,_s,H2],styles:["#wrapper[_ngcontent-%COMP%]{display:flex;padding-bottom:1.34375em}#name-span[_ngcontent-%COMP%]{font-weight:500}.circle-container[_ngcontent-%COMP%]{width:52px;height:52px;background:rgba(0,0,0,.04);border:1px solid rgba(0,0,0,.6);border-radius:50%;position:relative;display:inline-block}.circle-container[_ngcontent-%COMP%] .ui-anglepicker-pointer[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;width:50%;margin:-2px 0 0 -2px;transform-origin:2px 2px}.circle-container[_ngcontent-%COMP%] .ui-anglepicker-pointer[_ngcontent-%COMP%] .ui-anglepicker-dot[_ngcontent-%COMP%]{height:4px;width:4px;position:absolute;background:#838383;border-radius:50%}.circle-container[_ngcontent-%COMP%] .ui-anglepicker-pointer[_ngcontent-%COMP%] .ui-anglepicker-line[_ngcontent-%COMP%]{margin-top:1.5px;margin-right:-2px;height:1px;background:#838383}#labels[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-left:1rem;min-width:6rem}"],changeDetection:0}),n})();class BV{constructor(){}deepEquals(e,t){if(null===e&&null!==t)return!1;if(null===t&&null!==e)return!1;if(!0===Array.isArray(e)){if(!1===Array.isArray(t))return!1;if(e.length!==t.length)return!1;{const i=new Set,r=new Set,s=new Set,o=new Set;for(const h of e)!0===Array.isArray(h)?i.add(h):"object"==typeof h?r.add(h):"function"==typeof h?o.add(JSON.stringify(""+h)):s.add(h);const a=new Set,l=new Set,c=new Set,u=new Set;for(const h of t)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?u.add(JSON.stringify(""+h)):c.add(h);if(s.size!==c.size)return!1;{let h=!0;for(const p of s)if(!1===c.has(p)){h=!1;break}if(!1===h)return!1;if(r.size===l.size){h=!0;for(const p of r){let m=!1;for(const g of l)if(!0===this.deepEquals(p,g)){m=!0;break}if(!1===m){h=!1;break}}if(!1===h)return!1;if(i.size===a.size){h=!0;for(const p of i){let m=!1;for(const g of a)if(!0===this.deepEquals(p,g)){m=!0;break}if(!1===m){h=!1;break}}if(!1===h)return!1;if(o.size===u.size){h=!0;for(const p of o)if(!1===u.has(p)){h=!1;break}return!1!==h}return!1}return!1}return!1}}}if("object"==typeof e&&null!==e){if("object"!=typeof t)return!1;{let i=!0;if(Object.keys(e).length===Object.keys(t).length){for(const[r,s]of Object.entries(e))if(i=this.deepEquals(s,t[r]),!1===i)break}else i=!1;return i}}return!0!==Array.isArray(t)&&("object"!=typeof t||null===t)&&("function"==typeof e?"function"==typeof t&&JSON.stringify(""+e)===JSON.stringify(""+t):JSON.stringify(e)===JSON.stringify(t))}}function ote(n,e){if(1&n&&(K(0,"mat-list-option",3),Je(1),J()),2&n){const t=e.$implicit,i=be();z("value",t)("selected",i.selectedValue==t),j(1),nr(" ",t," ")}}function ate(n,e){if(1&n&&(K(0,"mat-card"),Fe(1,"app-editor",4),J()),2&n){const t=be();j(1),z("resource",t.resources[t.selectedValue])}}let ZM=(()=>{class n{constructor(t){this.deep=t,this._resources={},this._selectedValue=null}get resources(){return this._resources}set resources(t){const i=!this._resources||!this.deep.deepEquals(Object.keys(this._resources),Object.keys(t));this._resources=t,i&&(this.selectedValue=Object.keys(t).length>0?Object.keys(t)[0]:null)}set selectedValue(t){this._selectedValue=t}get selectedValue(){return this._selectedValue}get keys(){return Object.keys(this.resources)}}return n.\u0275fac=function(t){return new(t||n)(D(BV))},n.\u0275cmp=ht({type:n,selectors:[["app-sidenav-res-list"]],inputs:{resources:"resources"},decls:3,vars:3,consts:[[3,"multiple","selectionChange"],[3,"value","selected",4,"ngFor","ngForOf"],[4,"ngIf"],[3,"value","selected"],[3,"resource"]],template:function(t,i){1&t&&(K(0,"mat-selection-list",0),ct("selectionChange",function(s){return i.selectedValue=s.source.selectedOptions.selected[0].value}),_e(1,ote,2,3,"mat-list-option",1),J(),_e(2,ate,2,1,"mat-card",2)),2&t&&(z("multiple",!1),j(1),z("ngForOf",i.keys),j(1),z("ngIf",i.selectedValue))},styles:["[_nghost-%COMP%]{display:flex;align-items:flex-start;column-gap:1rem;height:inherit;scroll-snap-align:start;scroll-margin:.5rem}[_nghost-%COMP%] mat-selection-list[_ngcontent-%COMP%]{height:100%;max-height:calc(100vh - 54px - 1rem);overflow-y:auto;max-width:33%;flex-shrink:0;padding:0}[_nghost-%COMP%] mat-selection-list[_ngcontent-%COMP%] mat-list-option[aria-selected=true][_ngcontent-%COMP%]{background-color:#e0e0e0}[_nghost-%COMP%] mat-selection-list[_ngcontent-%COMP%] mat-list-option[aria-selected=true][_ngcontent-%COMP%]:focus{background-color:unset}[_nghost-%COMP%] mat-selection-list[_ngcontent-%COMP%] .mdc-radio{display:none}[_nghost-%COMP%] mat-card[_ngcontent-%COMP%]{width:100%;height:100%;padding:1rem}"],changeDetection:0}),n})(),lte=(()=>{class n{constructor(){this._resource=null,this.resourceMap={},this.changed=new it}get resource(){return this._resource}set resource(t){this._resource=t,this.resourceMap={};const i=(this._resource?.schema.fields||[]).find(r=>"children"===r.name)?.schema.child_schema;if(i)for(let r=0;rthis._markSelected(s)):this._markSelected(t[0]),this._selectedToEmit.length=0)}select(...e){this._verifyValueAssignment(e),e.forEach(i=>this._markSelected(i));const t=this._hasQueuedChanges();return this._emitChangeEvent(),t}deselect(...e){this._verifyValueAssignment(e),e.forEach(i=>this._unmarkSelected(i));const t=this._hasQueuedChanges();return this._emitChangeEvent(),t}setSelection(...e){this._verifyValueAssignment(e);const t=this.selected,i=new Set(e);e.forEach(s=>this._markSelected(s)),t.filter(s=>!i.has(s)).forEach(s=>this._unmarkSelected(s));const r=this._hasQueuedChanges();return this._emitChangeEvent(),r}toggle(e){return this.isSelected(e)?this.deselect(e):this.select(e)}clear(e=!0){this._unmarkAll();const t=this._hasQueuedChanges();return e&&this._emitChangeEvent(),t}isSelected(e){return this._selection.has(this._getConcreteValue(e))}isEmpty(){return 0===this._selection.size}hasValue(){return!this.isEmpty()}sort(e){this._multiple&&this.selected&&this._selected.sort(e)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(e){e=this._getConcreteValue(e),this.isSelected(e)||(this._multiple||this._unmarkAll(),this.isSelected(e)||this._selection.add(e),this._emitChanges&&this._selectedToEmit.push(e))}_unmarkSelected(e){e=this._getConcreteValue(e),this.isSelected(e)&&(this._selection.delete(e),this._emitChanges&&this._deselectedToEmit.push(e))}_unmarkAll(){this.isEmpty()||this._selection.forEach(e=>this._unmarkSelected(e))}_verifyValueAssignment(e){}_hasQueuedChanges(){return!(!this._deselectedToEmit.length&&!this._selectedToEmit.length)}_getConcreteValue(e){if(this.compareWith){for(let t of this._selection)if(this.compareWith(e,t))return t;return e}return e}}let UV=(()=>{class n{constructor(){this._listeners=[]}notify(t,i){for(let r of this._listeners)r(t,i)}listen(t){return this._listeners.push(t),()=>{this._listeners=this._listeners.filter(i=>t!==i)}}ngOnDestroy(){this._listeners=[]}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const cte=["trigger"],dte=["panel"];function ute(n,e){if(1&n&&(K(0,"span",10),Je(1),J()),2&n){const t=be();j(1),$i(t.placeholder)}}function hte(n,e){if(1&n&&(K(0,"span",14),Je(1),J()),2&n){const t=be(2);j(1),$i(t.triggerValue)}}function fte(n,e){1&n&&Kt(0,0,["*ngSwitchCase","true"])}function pte(n,e){1&n&&(K(0,"span",11),_e(1,hte,2,1,"span",12),_e(2,fte,1,0,"ng-content",13),J()),2&n&&(z("ngSwitch",!!be().customTrigger),j(2),z("ngSwitchCase",!0))}function mte(n,e){if(1&n){const t=Wi();Lr(),es(),K(0,"div",15,16),ct("@transformPanel.done",function(r){return Dn(t),In(be()._panelDoneAnimatingStream.next(r.toState))})("keydown",function(r){return Dn(t),In(be()._handleKeydown(r))}),Kt(2,1),J()}if(2&n){const t=be();bL("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",t._getPanelTheme(),""),z("ngClass",t.panelClass)("@transformPanel","showing"),Vt("id",t.id+"-panel")("aria-multiselectable",t.multiple)("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby())}}const gte=[[["mat-select-trigger"]],"*"],_te=["mat-select-trigger","*"],vte={transformPanelWrap:Gl("transformPanelWrap",[Ks("* => void",wI("@transformPanel",[xI()],{optional:!0}))]),transformPanel:Gl("transformPanel",[_o("void",Ci({opacity:0,transform:"scale(1, 0.8)"})),Ks("void => showing",go("120ms cubic-bezier(0, 0, 0.2, 1)",Ci({opacity:1,transform:"scale(1, 1)"}))),Ks("* => void",go("100ms linear",Ci({opacity:0})))])};let VV=0;const zV=new ge("mat-select-scroll-strategy"),bte=new ge("MAT_SELECT_CONFIG"),xte={provide:zV,deps:[mo],useFactory:function yte(n){return()=>n.scrollStrategies.reposition()}},wte=new ge("MatSelectTrigger");class Mte{constructor(e,t){this.source=e,this.value=t}}const Ste=vI(xU(TM(wU(class{constructor(n,e,t,i,r){this._elementRef=n,this._defaultErrorStateMatcher=e,this._parentForm=t,this._parentFormGroup=i,this.ngControl=r,this.stateChanges=new Ue}}))));let Cte=(()=>{class n extends Ste{get focused(){return this._focused||this._panelOpen}get placeholder(){return this._placeholder}set placeholder(t){this._placeholder=t,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(FI.required)??!1}set required(t){this._required=Cn(t),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(t){this._multiple=Cn(t)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(t){this._disableOptionCentering=Cn(t)}get compareWith(){return this._compareWith}set compareWith(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(t){this._assignValue(t)&&this._onChange(t)}get typeaheadDebounceInterval(){return this._typeaheadDebounceInterval}set typeaheadDebounceInterval(t){this._typeaheadDebounceInterval=Ys(t)}get id(){return this._id}set id(t){this._id=t||this._uid,this.stateChanges.next()}constructor(t,i,r,s,o,a,l,c,u,h,p,m,g,b){super(o,s,l,c,h),this._viewportRuler=t,this._changeDetectorRef=i,this._ngZone=r,this._dir=a,this._parentFormField=u,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(y,v)=>y===v,this._uid="mat-select-"+VV++,this._triggerAriaLabelledBy=null,this._destroy=new Ue,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+VV++,this._panelDoneAnimatingStream=new Ue,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this._multiple=!1,this._disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.optionSelectionChanges=jv(()=>{const y=this.options;return y?y.changes.pipe(No(y),gs(()=>cs(...y.map(v=>v.onSelectionChange)))):this._ngZone.onStable.pipe(Li(1),gs(()=>this.optionSelectionChanges))}),this.openedChange=new it,this._openedStream=this.openedChange.pipe(On(y=>y),Ye(()=>{})),this._closedStream=this.openedChange.pipe(On(y=>!y),Ye(()=>{})),this.selectionChange=new it,this.valueChange=new it,this.ngControl&&(this.ngControl.valueAccessor=this),null!=b?.typeaheadDebounceInterval&&(this._typeaheadDebounceInterval=b.typeaheadDebounceInterval),this._scrollStrategyFactory=m,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(p)||0,this.id=this.id}ngOnInit(){this._selectionModel=new aR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(qd(),et(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(et(this._destroy)).subscribe(t=>{t.added.forEach(i=>i.select()),t.removed.forEach(i=>i.deselect())}),this.options.changes.pipe(No(null),et(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){const t=this._getTriggerAriaLabelledby(),i=this.ngControl;if(t!==this._triggerAriaLabelledBy){const r=this._elementRef.nativeElement;this._triggerAriaLabelledBy=t,t?r.setAttribute("aria-labelledby",t):r.removeAttribute("aria-labelledby")}i&&(this._previousControl!==i.control&&(void 0!==this._previousControl&&null!==i.disabled&&i.disabled!==this.disabled&&(this.disabled=i.disabled),this._previousControl=i.control),this.updateErrorState())}ngOnChanges(t){(t.disabled||t.userAriaDescribedBy)&&this.stateChanges.next(),t.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck())}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}writeValue(t){this._assignValue(t)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){const t=this._selectionModel.selected.map(i=>i.viewValue);return this._isRtl()&&t.reverse(),t.join(", ")}return this._selectionModel.selected[0].viewValue}_isRtl(){return!!this._dir&&"rtl"===this._dir.value}_handleKeydown(t){this.disabled||(this.panelOpen?this._handleOpenKeydown(t):this._handleClosedKeydown(t))}_handleClosedKeydown(t){const i=t.keyCode,r=40===i||38===i||37===i||39===i,s=13===i||32===i,o=this._keyManager;if(!o.isTyping()&&s&&!nl(t)||(this.multiple||t.altKey)&&r)t.preventDefault(),this.open();else if(!this.multiple){const a=this.selected;o.onKeydown(t);const l=this.selected;l&&a!==l&&this._liveAnnouncer.announce(l.viewValue,1e4)}}_handleOpenKeydown(t){const i=this._keyManager,r=t.keyCode,s=40===r||38===r,o=i.isTyping();if(s&&t.altKey)t.preventDefault(),this.close();else if(o||13!==r&&32!==r||!i.activeItem||nl(t))if(!o&&this._multiple&&65===r&&t.ctrlKey){t.preventDefault();const a=this.options.some(l=>!l.disabled&&!l.selected);this.options.forEach(l=>{l.disabled||(a?l.select():l.deselect())})}else{const a=i.activeItemIndex;i.onKeydown(t),this._multiple&&s&&t.shiftKey&&i.activeItem&&i.activeItemIndex!==a&&i.activeItem._selectViaInteraction()}else t.preventDefault(),i.activeItem._selectViaInteraction()}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(Li(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(t){if(this.options.forEach(i=>i.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&t)Array.isArray(t),t.forEach(i=>this._selectOptionByValue(i)),this._sortValues();else{const i=this._selectOptionByValue(t);i?this._keyManager.updateActiveItem(i):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(t){const i=this.options.find(r=>{if(this._selectionModel.isSelected(r))return!1;try{return null!=r.value&&this._compareWith(r.value,t)}catch{return!1}});return i&&this._selectionModel.select(i),i}_assignValue(t){return!!(t!==this._value||this._multiple&&Array.isArray(t))&&(this.options&&this._setSelectionByValue(t),this._value=t,!0)}_initKeyManager(){this._keyManager=new tK(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){const t=cs(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(et(t)).subscribe(i=>{this._onSelect(i.source,i.isUserInput),i.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),cs(...this.options.map(i=>i._stateChanges)).pipe(et(t)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(t,i){const r=this._selectionModel.isSelected(t);null!=t.value||this._multiple?(r!==t.selected&&(t.selected?this._selectionModel.select(t):this._selectionModel.deselect(t)),i&&this._keyManager.setActiveItem(t),this.multiple&&(this._sortValues(),i&&this.focus())):(t.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(t.value)),r!==this._selectionModel.isSelected(t)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){const t=this.options.toArray();this._selectionModel.sort((i,r)=>this.sortComparator?this.sortComparator(i,r,t):t.indexOf(i)-t.indexOf(r)),this.stateChanges.next()}}_propagateChanges(t){let i=null;i=this.multiple?this.selected.map(r=>r.value):this.selected?this.selected.value:t,this._value=i,this.valueChange.emit(i),this._onChange(i),this.selectionChange.emit(this._getChangeEvent(i)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0}focus(t){this._elementRef.nativeElement.focus(t)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;const t=this._parentFormField?.getLabelId();return this.ariaLabelledby?(t?t+" ":"")+this.ariaLabelledby:t}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;const t=this._parentFormField?.getLabelId();let i=(t?t+" ":"")+this._valueId;return this.ariaLabelledby&&(i+=" "+this.ariaLabelledby),i}_panelDoneAnimating(t){this.openedChange.emit(t)}setDescribedByIds(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this._panelOpen||!this.empty||this._focused&&!!this._placeholder}}return n.\u0275fac=function(t){return new(t||n)(D(gM),D(ci),D(pt),D(MU),D(yt),D(tl,8),D(Py,8),D(Mm,8),D(sR,8),D(Wl,10),Ua("tabindex"),D(zV),D(pI),D(bte,8))},n.\u0275dir=Ae({type:n,viewQuery:function(t,i){if(1&t&&(oi(cte,5),oi(dte,5),oi(QB,5)),2&t){let r;Lt(r=Ft())&&(i.trigger=r.first),Lt(r=Ft())&&(i.panel=r.first),Lt(r=Ft())&&(i._overlayDir=r.first)}},inputs:{userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:"typeaheadDebounceInterval",sortComparator:"sortComparator",id:"id"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},features:[ft,zi]}),n})(),Oy=(()=>{class n extends Cte{constructor(){super(...arguments),this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}ngOnInit(){super.ngOnInit(),this._viewportRuler.change().pipe(et(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(),this._changeDetectorRef.detectChanges())})}ngAfterViewInit(){this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin())}open(){this._overlayWidth=this._getOverlayWidth(),super.open(),this.stateChanges.next()}close(){super.close(),this.stateChanges.next()}_scrollOptionIntoView(t){const i=this.options.toArray()[t];if(i){const r=this.panel.nativeElement,s=function jK(n,e,t){if(t.length){let i=e.toArray(),r=t.toArray(),s=0;for(let o=0;ot+i?Math.max(0,n-i+e):t}(o.offsetTop,o.offsetHeight,r.scrollTop,r.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(t){return new Mte(this,t)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof oI?this._preferredOverlayOrigin.elementRef:this._preferredOverlayOrigin||this._elementRef).nativeElement.getBoundingClientRect().width}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=Cn(t),this._syncParentProperties()}_syncParentProperties(){if(this.options)for(const t of this.options)t._changeDetectorRef.markForCheck()}}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275cmp=ht({type:n,selectors:[["mat-select"]],contentQueries:function(t,i,r){if(1&t&&(Xi(r,wte,5),Xi(r,vm,5),Xi(r,RU,5)),2&t){let s;Lt(s=Ft())&&(i.customTrigger=s.first),Lt(s=Ft())&&(i.options=s),Lt(s=Ft())&&(i.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(t,i){1&t&&ct("keydown",function(s){return i._handleKeydown(s)})("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()}),2&t&&(Vt("id",i.id)("tabindex",i.tabIndex)("aria-controls",i.panelOpen?i.id+"-panel":null)("aria-expanded",i.panelOpen)("aria-label",i.ariaLabel||null)("aria-required",i.required.toString())("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-activedescendant",i._getAriaActiveDescendant()),Pn("mat-mdc-select-disabled",i.disabled)("mat-mdc-select-invalid",i.errorState)("mat-mdc-select-required",i.required)("mat-mdc-select-empty",i.empty)("mat-mdc-select-multiple",i.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",hideSingleSelectionIndicator:"hideSingleSelectionIndicator"},exportAs:["matSelect"],features:[Hn([{provide:rR,useExisting:n},{provide:IU,useExisting:n}]),ft],ngContentSelectors:_te,decls:11,vars:11,consts:[["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],[1,"mat-mdc-select-value",3,"ngSwitch"],["class","mat-mdc-select-placeholder mat-mdc-select-min-line",4,"ngSwitchCase"],["class","mat-mdc-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","backdropClick","attach","detach"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text",3,"ngSwitch"],["class","mat-mdc-select-min-line",4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(t,i){if(1&t&&(Cr(gte),K(0,"div",0,1),ct("click",function(){return i.toggle()}),K(3,"div",2),_e(4,ute,2,1,"span",3),_e(5,pte,3,2,"span",4),J(),K(6,"div",5)(7,"div",6),Lr(),K(8,"svg",7),Fe(9,"path",8),J()()()(),_e(10,mte,3,9,"ng-template",9),ct("backdropClick",function(){return i.close()})("attach",function(){return i._onAttached()})("detach",function(){return i.close()})),2&t){const r=Vr(1);Vt("aria-owns",i.panelOpen?i.id+"-panel":null),j(3),z("ngSwitch",i.empty),Vt("id",i._valueId),j(1),z("ngSwitchCase",!0),j(1),z("ngSwitchCase",!1),j(5),z("cdkConnectedOverlayPanelClass",i._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",i._scrollStrategy)("cdkConnectedOverlayOrigin",i._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",i.panelOpen)("cdkConnectedOverlayPositions",i._positions)("cdkConnectedOverlayWidth",i._overlayWidth)}},dependencies:[Bv,Uv,aD,B2,QB,oI],styles:['.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}.mat-mdc-select{display:inline-block;width:100%;outline:none}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:translateY(-8px)}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-select-arrow{width:10px;height:5px;position:relative}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}.mdc-menu-surface.mat-mdc-select-panel{width:100%;max-height:275px;position:static;outline:0;margin:0;padding:8px 0;list-style-type:none}.mdc-menu-surface.mat-mdc-select-panel:focus{outline:none}.cdk-high-contrast-active .mdc-menu-surface.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) .mdc-menu-surface.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above .mdc-menu-surface.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}'],encapsulation:2,data:{animation:[vte.transformPanel]},changeDetection:0}),n})(),HV=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({providers:[xte],imports:[va,pm,bI,qn,my,KM,bI,qn]}),n})();function Ete(n,e){if(1&n&&(K(0,"mat-label"),Je(1),J()),2&n){const t=be(3);j(1),$i(t.resource.name)}}function Ate(n,e){if(1&n&&(K(0,"mat-option",6),Je(1),J()),2&n){const t=e.$implicit,i=be(3);z("value",t[1])("disabled",i.disabled),j(1),nr(" ",t[1]," ")}}function Tte(n,e){if(1&n){const t=Wi();K(0,"mat-form-field",3),_e(1,Ete,2,1,"mat-label",0),K(2,"mat-select",4),ct("valueChange",function(r){return Dn(t),In(be(2).resource.data=r)})("selectionChange",function(){return Dn(t),In(be(2).changed.emit())}),_e(3,Ate,2,3,"mat-option",5),J()()}if(2&n){const t=be(2);z("matTooltip",t.resourceDescription),j(1),z("ngIf",t.resource.name),j(1),z("value",t.resource.data)("disabled",t.disabled),j(1),z("ngForOf",t.resource.schema.enum_names)}}function Dte(n,e){if(1&n&&(K(0,"mat-label"),Je(1),J()),2&n){const t=be(3);j(1),$i(t.resource.name)}}function Ite(n,e){if(1&n){const t=Wi();K(0,"mat-form-field",3),_e(1,Dte,2,1,"mat-label",0),K(2,"input",7),ct("ngModelChange",function(r){return Dn(t),In(be(2).resource.data=r)})("change",function(){return Dn(t),In(be(2).changed.emit())}),J()()}if(2&n){const t=be(2);z("matTooltip",t.resourceDescription),j(1),z("ngIf",t.resource.name),j(1),z("min",0)("max",256*(t.resource.schema.length||1)-1)("ngModel",t.resource.data)}}function Rte(n,e){if(1&n&&(uo(0),_e(1,Tte,4,5,"mat-form-field",1),_e(2,Ite,3,5,"ng-template",null,2,kc),ho()),2&n){const t=Vr(3),i=be();j(1),z("ngIf",i.isKnownEnumValue(i.resource.data))("ngIfElse",t)}}let Pte=(()=>{class n{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new it}isKnownEnumValue(t){return!!this.resource?.schema.enum_names.find(([i,r])=>r==t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=ht({type:n,selectors:[["app-enum-block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:1,vars:1,consts:[[4,"ngIf"],["appearance","fill","matTooltipPosition","above",3,"matTooltip",4,"ngIf","ngIfElse"],["unknownEnum",""],["appearance","fill","matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled","valueChange","selectionChange"],[3,"value","disabled",4,"ngFor","ngForOf"],[3,"value","disabled"],["matInput","","type","number",3,"min","max","ngModel","ngModelChange","change"]],template:function(t,i){1&t&&_e(0,Rte,4,2,"ng-container",0),2&t&&z("ngIf",i.resource)},dependencies:[Fo,gi,Wc,wm,eu,Cm,Sm,tu,nu,xa,Em,_s,Oy,vm],changeDetection:0}),n})();const kte=["*"],Lte=["unscopedContent"];function Fte(n,e){1&n&&Kt(0,4)}function Nte(n,e){if(1&n&&(K(0,"div",11),Fe(1,"input",12),K(2,"div",13),Lr(),K(3,"svg",14),Fe(4,"path",15),J(),es(),Fe(5,"div",16),J()()),2&n){const t=be();Pn("mdc-checkbox--disabled",t.disabled),j(1),z("checked",t.selected)("disabled",t.disabled)}}function Bte(n,e){if(1&n&&(K(0,"div",17),Fe(1,"input",18),K(2,"div",19),Fe(3,"div",20)(4,"div",21),J()()),2&n){const t=be();Pn("mdc-radio--disabled",t.disabled),j(1),z("checked",t.selected)("disabled",t.disabled)}}function Ute(n,e){}function Vte(n,e){if(1&n&&(K(0,"span",22),_e(1,Ute,0,0,"ng-template",23),J()),2&n){be();const t=Vr(3);j(1),z("ngTemplateOutlet",t)}}function zte(n,e){}function Hte(n,e){if(1&n&&(K(0,"span",24),_e(1,zte,0,0,"ng-template",23),J()),2&n){be();const t=Vr(5);j(1),z("ngTemplateOutlet",t)}}function Gte(n,e){}function Wte(n,e){1&n&&_e(0,Gte,0,0,"ng-template",23),2&n&&(be(),z("ngTemplateOutlet",Vr(1)))}function $te(n,e){}function jte(n,e){if(1&n&&(K(0,"span",25),_e(1,$te,0,0,"ng-template",23),J()),2&n){be();const t=Vr(3);j(1),z("ngTemplateOutlet",t)}}function Xte(n,e){}function qte(n,e){if(1&n&&(K(0,"span",25),_e(1,Xte,0,0,"ng-template",23),J()),2&n){be();const t=Vr(5);j(1),z("ngTemplateOutlet",t)}}function Yte(n,e){}function Kte(n,e){1&n&&_e(0,Yte,0,0,"ng-template",23),2&n&&(be(),z("ngTemplateOutlet",Vr(1)))}const Zte=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],Qte=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],GV=new ge("ListOption");let Jte=(()=>{class n{constructor(t){this._elementRef=t}}return n.\u0275fac=function(t){return new(t||n)(D(yt))},n.\u0275dir=Ae({type:n,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),n})(),ene=(()=>{class n{constructor(t){this._elementRef=t}}return n.\u0275fac=function(t){return new(t||n)(D(yt))},n.\u0275dir=Ae({type:n,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),n})(),WV=(()=>{class n{constructor(t){this._listOption=t}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return n.\u0275fac=function(t){return new(t||n)(D(GV,8))},n.\u0275dir=Ae({type:n,hostVars:4,hostBindings:function(t,i){2&t&&Pn("mdc-list-item__start",i._isAlignedAtStart())("mdc-list-item__end",!i._isAlignedAtStart())}}),n})(),tne=(()=>{class n extends WV{}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275dir=Ae({type:n,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[ft]}),n})(),nne=(()=>{class n extends WV{}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275dir=Ae({type:n,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[ft]}),n})();const ine=new ge("MAT_LIST_CONFIG");let lR=(()=>{class n{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Ot(ine,{optional:!0})}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=Cn(t)}get disabled(){return this._disabled}set disabled(t){this._disabled=Cn(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,hostVars:1,hostBindings:function(t,i){2&t&&Vt("aria-disabled",i.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),n})(),$V=(()=>{class n{set lines(t){this._explicitLines=Ys(t,null),this._updateItemLines(!1)}get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(t){this._disableRipple=Cn(t)}get disabled(){return this._disabled||!!this._listBase?.disabled}set disabled(t){this._disabled=Cn(t)}get rippleDisabled(){return this.disableRipple||!!this.rippleConfig.disabled}constructor(t,i,r,s,o,a){this._elementRef=t,this._ngZone=i,this._listBase=r,this._platform=s,this._explicitLines=null,this._disableRipple=!1,this._disabled=!1,this._subscriptions=new un,this._rippleRenderer=null,this._hasUnscopedTextContent=!1,this.rippleConfig=o||{},this._hostElement=this._elementRef.nativeElement,this._isButtonElement="button"===this._hostElement.nodeName.toLowerCase(),this._noopAnimations="NoopAnimations"===a,r&&!r._isNonInteractive&&this._initInteractiveListItem(),this._isButtonElement&&!this._hostElement.hasAttribute("type")&&this._hostElement.setAttribute("type","button")}ngAfterViewInit(){this._monitorProjectedLinesAndTitle(),this._updateItemLines(!0)}ngOnDestroy(){this._subscriptions.unsubscribe(),null!==this._rippleRenderer&&this._rippleRenderer._removeTriggerEvents()}_hasIconOrAvatar(){return!(!this._avatars.length&&!this._icons.length)}_initInteractiveListItem(){this._hostElement.classList.add("mat-mdc-list-item-interactive"),this._rippleRenderer=new _m(this,this._ngZone,this._hostElement,this._platform),this._rippleRenderer.setupTriggerEvents(this._hostElement)}_monitorProjectedLinesAndTitle(){this._ngZone.runOutsideAngular(()=>{this._subscriptions.add(cs(this._lines.changes,this._titles.changes).subscribe(()=>this._updateItemLines(!1)))})}_updateItemLines(t){if(!this._lines||!this._titles||!this._unscopedContent)return;t&&this._checkDomForUnscopedTextContent();const i=this._explicitLines??this._inferLinesFromContent(),r=this._unscopedContent.nativeElement;if(this._hostElement.classList.toggle("mat-mdc-list-item-single-line",i<=1),this._hostElement.classList.toggle("mdc-list-item--with-one-line",i<=1),this._hostElement.classList.toggle("mdc-list-item--with-two-lines",2===i),this._hostElement.classList.toggle("mdc-list-item--with-three-lines",3===i),this._hasUnscopedTextContent){const s=0===this._titles.length&&1===i;r.classList.toggle("mdc-list-item__primary-text",s),r.classList.toggle("mdc-list-item__secondary-text",!s)}else r.classList.remove("mdc-list-item__primary-text"),r.classList.remove("mdc-list-item__secondary-text")}_inferLinesFromContent(){let t=this._titles.length+this._lines.length;return this._hasUnscopedTextContent&&(t+=1),t}_checkDomForUnscopedTextContent(){this._hasUnscopedTextContent=Array.from(this._unscopedContent.nativeElement.childNodes).filter(t=>t.nodeType!==t.COMMENT_NODE).some(t=>!(!t.textContent||!t.textContent.trim()))}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(pt),D(lR,8),D(Fi),D(yI,8),D(rs,8))},n.\u0275dir=Ae({type:n,contentQueries:function(t,i,r){if(1&t&&(Xi(r,tne,4),Xi(r,nne,4)),2&t){let s;Lt(s=Ft())&&(i._avatars=s),Lt(s=Ft())&&(i._icons=s)}},hostVars:4,hostBindings:function(t,i){2&t&&(Vt("aria-disabled",i.disabled)("disabled",i._isButtonElement&&i.disabled||null),Pn("mdc-list-item--disabled",i.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),n})();const jV=new ge("SelectionList");let QM=(()=>{class n extends $V{get checkboxPosition(){return this.togglePosition}set checkboxPosition(t){this.togglePosition=t}get color(){return this._color||this._selectionList.color}set color(t){this._color=t}get value(){return this._value}set value(t){this.selected&&t!==this.value&&this._inputsInitialized&&(this.selected=!1),this._value=t}get selected(){return this._selectionList.selectedOptions.isSelected(this)}set selected(t){const i=Cn(t);i!==this._selected&&(this._setSelected(i),(i||this._selectionList.multiple)&&this._selectionList._reportValueChange())}constructor(t,i,r,s,o,a,l){super(t,i,r,s,a,l),this._selectionList=r,this._changeDetectorRef=o,this.selectedChange=new it,this.togglePosition="after",this._selected=!1,this._inputsInitialized=!1}ngOnInit(){const t=this._selectionList;t._value&&t._value.some(r=>t.compareWith(this._value,r))&&this._setSelected(!0);const i=this._selected;Promise.resolve().then(()=>{(this._selected||i)&&(this.selected=!0,this._changeDetectorRef.markForCheck())}),this._inputsInitialized=!0}ngOnDestroy(){super.ngOnDestroy(),this.selected&&Promise.resolve().then(()=>{this.selected=!1})}toggle(){this.selected=!this.selected}focus(){this._hostElement.focus()}getLabel(){return(this._titles?.get(0)?._elementRef.nativeElement||this._unscopedContent?.nativeElement)?.textContent||""}_hasCheckboxAt(t){return this._selectionList.multiple&&this._getTogglePosition()===t}_hasRadioAt(t){return!this._selectionList.multiple&&this._getTogglePosition()===t&&!this._selectionList.hideSingleSelectionIndicator}_hasIconsOrAvatarsAt(t){return this._hasProjected("icons",t)||this._hasProjected("avatars",t)}_hasProjected(t,i){return this._getTogglePosition()!==i&&("avatars"===t?0!==this._avatars.length:0!==this._icons.length)}_handleBlur(){this._selectionList._onTouched()}_getTogglePosition(){return this.togglePosition||"after"}_setSelected(t){return t!==this._selected&&(this._selected=t,t?this._selectionList.selectedOptions.select(this):this._selectionList.selectedOptions.deselect(this),this.selectedChange.emit(t),this._changeDetectorRef.markForCheck(),!0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_toggleOnInteraction(){this.disabled||(this._selectionList.multiple?(this.selected=!this.selected,this._selectionList._emitChangeEvent([this])):this.selected||(this.selected=!0,this._selectionList._emitChangeEvent([this])))}_setTabindex(t){this._hostElement.setAttribute("tabindex",t+"")}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(pt),D(jV),D(Fi),D(ci),D(yI,8),D(rs,8))},n.\u0275cmp=ht({type:n,selectors:[["mat-list-option"]],contentQueries:function(t,i,r){if(1&t&&(Xi(r,ene,5),Xi(r,Jte,5)),2&t){let s;Lt(s=Ft())&&(i._lines=s),Lt(s=Ft())&&(i._titles=s)}},viewQuery:function(t,i){if(1&t&&oi(Lte,5),2&t){let r;Lt(r=Ft())&&(i._unscopedContent=r.first)}},hostAttrs:["role","option",1,"mat-mdc-list-item","mat-mdc-list-option","mdc-list-item"],hostVars:25,hostBindings:function(t,i){1&t&&ct("blur",function(){return i._handleBlur()})("click",function(){return i._toggleOnInteraction()}),2&t&&(Vt("aria-selected",i.selected),Pn("mdc-list-item--selected",i.selected&&!i._selectionList.multiple&&i._selectionList.hideSingleSelectionIndicator)("mdc-list-item--with-leading-avatar",i._hasProjected("avatars","before"))("mdc-list-item--with-leading-icon",i._hasProjected("icons","before"))("mdc-list-item--with-trailing-icon",i._hasProjected("icons","after"))("mat-mdc-list-option-with-trailing-avatar",i._hasProjected("avatars","after"))("mdc-list-item--with-leading-checkbox",i._hasCheckboxAt("before"))("mdc-list-item--with-trailing-checkbox",i._hasCheckboxAt("after"))("mdc-list-item--with-leading-radio",i._hasRadioAt("before"))("mdc-list-item--with-trailing-radio",i._hasRadioAt("after"))("mat-accent","primary"!==i.color&&"warn"!==i.color)("mat-warn","warn"===i.color)("_mat-animation-noopable",i._noopAnimations))},inputs:{togglePosition:"togglePosition",checkboxPosition:"checkboxPosition",color:"color",value:"value",selected:"selected"},outputs:{selectedChange:"selectedChange"},exportAs:["matListOption"],features:[Hn([{provide:$V,useExisting:n},{provide:GV,useExisting:n}]),ft],ngContentSelectors:Qte,decls:20,vars:6,consts:[["icons",""],["checkbox",""],["radio",""],["class","mdc-list-item__start mat-mdc-list-option-checkbox-before",4,"ngIf"],["class","mdc-list-item__start mat-mdc-list-option-radio-before",4,"ngIf"],[3,"ngIf"],[1,"mdc-list-item__content"],[1,"mat-mdc-list-item-unscoped-content",3,"cdkObserveContent"],["unscopedContent",""],["class","mdc-list-item__end",4,"ngIf"],[1,"mat-mdc-focus-indicator"],[1,"mdc-checkbox"],["type","checkbox",1,"mdc-checkbox__native-control",3,"checked","disabled"],[1,"mdc-checkbox__background"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],[1,"mdc-radio"],["type","radio",1,"mdc-radio__native-control",3,"checked","disabled"],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],[1,"mdc-list-item__start","mat-mdc-list-option-checkbox-before"],[3,"ngTemplateOutlet"],[1,"mdc-list-item__start","mat-mdc-list-option-radio-before"],[1,"mdc-list-item__end"]],template:function(t,i){1&t&&(Cr(Zte),_e(0,Fte,1,0,"ng-template",null,0,kc),_e(2,Nte,6,4,"ng-template",null,1,kc),_e(4,Bte,5,4,"ng-template",null,2,kc),_e(6,Vte,2,1,"span",3),_e(7,Hte,2,1,"span",4),_e(8,Wte,1,1,"ng-template",5),K(9,"span",6),Kt(10),Kt(11,1),K(12,"span",7,8),ct("cdkObserveContent",function(){return i._updateItemLines(!0)}),Kt(14,2),J()(),_e(15,jte,2,1,"span",9),_e(16,qte,2,1,"span",9),_e(17,Kte,1,1,"ng-template",5),Kt(18,3),Fe(19,"div",10)),2&t&&(j(6),z("ngIf",i._hasCheckboxAt("before")),j(1),z("ngIf",i._hasRadioAt("before")),j(1),z("ngIf",i._hasIconsOrAvatarsAt("before")),j(7),z("ngIf",i._hasCheckboxAt("after")),j(1),z("ngIf",i._hasRadioAt("after")),j(1),z("ngIf",i._hasIconsOrAvatarsAt("after")))},dependencies:[tU,gi,Vv],styles:['.mat-mdc-list-option-with-trailing-avatar.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mat-mdc-list-option-with-trailing-avatar.mdc-list-item,.mat-mdc-list-option-with-trailing-avatar.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mat-mdc-list-option-with-trailing-avatar .mdc-list-item__end{margin-left:16px;margin-right:16px}[dir=rtl] .mat-mdc-list-option-with-trailing-avatar .mdc-list-item__end,.mat-mdc-list-option-with-trailing-avatar .mdc-list-item__end[dir=rtl]{margin-left:16px;margin-right:16px}.mat-mdc-list-option-with-trailing-avatar .mdc-list-item__end{width:40px;height:40px}.mat-mdc-list-option-with-trailing-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mat-mdc-list-option-with-trailing-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mat-mdc-list-option-with-trailing-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mat-mdc-list-option-with-trailing-avatar .mdc-list-item__end{border-radius:50%}.mat-mdc-list-option .mdc-touch-target-wrapper{display:inline}.mat-mdc-list-option .mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}.mat-mdc-list-option .mdc-checkbox[hidden]{display:none}.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{border-color:CanvasText}}.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{border-color:CanvasText}}@media all and (-ms-high-contrast: none){.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__focus-ring{display:none}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-list-option .mdc-checkbox__mixedmark{margin:0 1px}}.mat-mdc-list-option .mdc-checkbox--disabled{cursor:default;pointer-events:none}.mat-mdc-list-option .mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color}.mat-mdc-list-option .mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0}.mdc-checkbox--upgraded .mat-mdc-list-option .mdc-checkbox__checkmark{opacity:1}.mat-mdc-list-option .mdc-checkbox__checkmark-path{stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mat-mdc-list-option .mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0}.mat-mdc-list-option .mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mat-mdc-list-option .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mat-mdc-list-option .mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mat-mdc-list-option .mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mat-mdc-list-option .mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mat-mdc-list-option .mdc-checkbox--touch{margin:calc((var(--mdc-checkbox-state-layer-size, 48px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mat-mdc-list-option .mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);width:var(--mdc-checkbox-state-layer-size, 48px);height:var(--mdc-checkbox-state-layer-size, 48px)}.mat-mdc-list-option .mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{opacity:1}.mat-mdc-list-option .mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-mdc-list-option .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mat-mdc-list-option .mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0}.mat-mdc-list-option .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mat-mdc-list-option .mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mat-mdc-list-option .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color}.mat-mdc-list-option .mdc-radio[hidden]{display:none}.mat-mdc-list-option .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-list-option .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:""}.mat-mdc-list-option .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%}.mat-mdc-list-option .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%}.mat-mdc-list-option .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1}.mat-mdc-list-option .mdc-radio--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mat-mdc-list-option .mdc-radio--touch .mdc-radio__native-control{top:calc((40px - 48px) / 2);right:calc((40px - 48px) / 2);left:calc((40px - 48px) / 2);width:48px;height:48px}.mat-mdc-list-option .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mat-mdc-list-option .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mat-mdc-list-option .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mat-mdc-list-option .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{border-color:CanvasText}}.mat-mdc-list-option .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mat-mdc-list-option .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mat-mdc-list-option .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mat-mdc-list-option .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{border-color:CanvasText}}.mat-mdc-list-option .mdc-radio--disabled{cursor:default;pointer-events:none}.mat-mdc-list-option .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5)}.mat-mdc-list-option .mdc-radio__native-control:disabled+.mdc-radio__background,.mat-mdc-list-option [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background{cursor:default}.mat-mdc-list-option .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}@media all and (-ms-high-contrast: none){.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox .mdc-checkbox__focus-ring{display:none}}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__background{transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__mixedmark{transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__background::before{transition:opacity 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__outer-circle{transition:border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__inner-circle{transition:transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:focus+.mdc-radio__background::before{transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option .mdc-checkbox{padding:calc((40px - 18px) / 2);padding:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2);margin:calc((40px - 40px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.38);border-color:var(--mdc-checkbox-disabled-unselected-icon-color, rgba(0, 0, 0, 0.38));background-color:transparent}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:rgba(0, 0, 0, 0.38);background-color:var(--mdc-checkbox-disabled-selected-icon-color, rgba(0, 0, 0, 0.38))}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-selected-checkmark-color, #fff)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-selected-checkmark-color, #fff)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-disabled-selected-checkmark-color, #fff)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-disabled-selected-checkmark-color, #fff)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:#018786;border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:#018786;border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:#018786;border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mat-mdc-list-option .mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mat-mdc-list-option .mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__background{top:calc((40px - 18px) / 2);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2);left:calc((40px - 18px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control{top:calc((40px - 40px) / 2);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);right:calc((40px - 40px) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);left:calc((40px - 40px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);width:40px;width:var(--mdc-checkbox-state-layer-size, 40px);height:40px;height:var(--mdc-checkbox-state-layer-size, 40px)}.mat-mdc-list-option .mdc-radio{padding:calc((40px - 20px) / 2);padding:calc((var(--mdc-radio-state-layer-size, 40px) - 20px) / 2)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:#000;border-color:var(--mdc-radio-disabled-selected-icon-color, #000)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:#000;border-color:var(--mdc-radio-disabled-selected-icon-color, #000)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{opacity:0.38;opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{opacity:0.38;opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:#000;border-color:var(--mdc-radio-disabled-unselected-icon-color, #000)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{opacity:0.38;opacity:var(--mdc-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:#6200ee;border-color:var(--mdc-radio-selected-icon-color, #6200ee)}.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:#6200ee;border-color:var(--mdc-radio-selected-icon-color, #6200ee)}.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:#000;border-color:var(--mdc-radio-unselected-icon-color, #000)}.mat-mdc-list-option .mdc-radio .mdc-radio__background::before{top:calc(-1 * (40px - 20px) / 2);top:calc(-1 * (var(--mdc-radio-state-layer-size, 40px) - 20px) / 2);left:calc(-1 * (40px - 20px) / 2);left:calc(-1 * (var(--mdc-radio-state-layer-size, 40px) - 20px) / 2);width:40px;width:var(--mdc-radio-state-layer-size, 40px);height:40px;height:var(--mdc-radio-state-layer-size, 40px)}.mat-mdc-list-option .mdc-radio .mdc-radio__native-control{top:calc((40px - 40px) / 2);top:calc((var(--mdc-radio-state-layer-size, 40px) - var(--mdc-radio-state-layer-size, 40px)) / 2);right:calc((40px - 40px) / 2);right:calc((var(--mdc-radio-state-layer-size, 40px) - var(--mdc-radio-state-layer-size, 40px)) / 2);left:calc((40px - 40px) / 2);left:calc((var(--mdc-radio-state-layer-size, 40px) - var(--mdc-radio-state-layer-size, 40px)) / 2);width:40px;width:var(--mdc-radio-state-layer-size, 40px);height:40px;height:var(--mdc-radio-state-layer-size, 40px)}.mat-mdc-list-option .mdc-checkbox__native-control,.mat-mdc-list-option .mdc-radio__native-control{display:none}.cdk-high-contrast-active .mat-mdc-list-option.mdc-list-item--selected::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}.cdk-high-contrast-active .mat-mdc-list-option.mdc-list-item--selected [dir=rtl]::after{right:auto;left:16px}'],encapsulation:2,changeDetection:0}),n})();const rne={provide:rl,useExisting:Qn(()=>JM),multi:!0};class sne{constructor(e,t){this.source=e,this.options=t}}let JM=(()=>{class n extends lR{get multiple(){return this._multiple}set multiple(t){const i=Cn(t);i!==this._multiple&&(this._multiple=i,this.selectedOptions=new aR(this._multiple,this.selectedOptions.selected))}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=Cn(t)}constructor(t,i){super(),this._element=t,this._ngZone=i,this._initialized=!1,this._destroyed=new Ue,this._onChange=r=>{},this.selectionChange=new it,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new aR(this._multiple),this._onTouched=()=>{},this._selectionListDisabled=!1,this._handleFocusout=()=>{setTimeout(()=>{this._containsFocus()||this._resetActiveOption()})},this._handleFocusin=r=>{if(this.disabled)return;const s=this._items.toArray().findIndex(o=>o._elementRef.nativeElement.contains(r.target));s>-1?this._setActiveOption(s):this._resetActiveOption()},this._isNonInteractive=!1}ngAfterViewInit(){this._initialized=!0,this._setupRovingTabindex(),this._ngZone.runOutsideAngular(()=>{this._element.nativeElement.addEventListener("focusin",this._handleFocusin),this._element.nativeElement.addEventListener("focusout",this._handleFocusout)}),this._value&&this._setOptionsFromValues(this._value),this._watchForSelectionChange()}ngOnChanges(t){const i=t.disabled,r=t.disableRipple,s=t.hideSingleSelectionIndicator;(r&&!r.firstChange||i&&!i.firstChange||s&&!s.firstChange)&&this._markOptionsForCheck()}ngOnDestroy(){this._keyManager?.destroy(),this._element.nativeElement.removeEventListener("focusin",this._handleFocusin),this._element.nativeElement.removeEventListener("focusout",this._handleFocusout),this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=!0}focus(t){this._element.nativeElement.focus(t)}selectAll(){return this._setAllOptionsSelected(!0)}deselectAll(){return this._setAllOptionsSelected(!1)}_reportValueChange(){if(this.options&&!this._isDestroyed){const t=this._getSelectedOptionValues();this._onChange(t),this._value=t}}_emitChangeEvent(t){this.selectionChange.emit(new sne(this,t))}writeValue(t){this._value=t,this.options&&this._setOptionsFromValues(t||[])}setDisabledState(t){this.disabled=t}get disabled(){return this._selectionListDisabled}set disabled(t){this._selectionListDisabled=Cn(t),this._selectionListDisabled&&this._keyManager?.setActiveItem(-1)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}_watchForSelectionChange(){this.selectedOptions.changed.pipe(et(this._destroyed)).subscribe(t=>{for(let i of t.added)i.selected=!0;for(let i of t.removed)i.selected=!1;this._containsFocus()||this._resetActiveOption()})}_setOptionsFromValues(t){this.options.forEach(i=>i._setSelected(!1)),t.forEach(i=>{const r=this.options.find(s=>!s.selected&&this.compareWith(s.value,i));r&&r._setSelected(!0)})}_getSelectedOptionValues(){return this.options.filter(t=>t.selected).map(t=>t.value)}_markOptionsForCheck(){this.options&&this.options.forEach(t=>t._markForCheck())}_setAllOptionsSelected(t,i){const r=[];return this.options.forEach(s=>{(!i||!s.disabled)&&s._setSelected(t)&&r.push(s)}),r.length&&this._reportValueChange(),r}get options(){return this._items}_handleKeydown(t){const i=this._keyManager.activeItem;if(13!==t.keyCode&&32!==t.keyCode||this._keyManager.isTyping()||!i||i.disabled)if(65===t.keyCode&&this.multiple&&!this._keyManager.isTyping()&&nl(t,"ctrlKey")){const r=this.options.some(s=>!s.disabled&&!s.selected);t.preventDefault(),this._emitChangeEvent(this._setAllOptionsSelected(r,!0))}else this._keyManager.onKeydown(t);else t.preventDefault(),i._toggleOnInteraction()}_setupRovingTabindex(){this._keyManager=new lU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(t=>this._setActiveOption(t)),this._items.changes.pipe(et(this._destroyed)).subscribe(()=>{const t=this._keyManager.activeItem;(!t||!this._items.toArray().indexOf(t))&&this._resetActiveOption()})}_setActiveOption(t){this._items.forEach((i,r)=>i._setTabindex(r===t?0:-1)),this._keyManager.updateActiveItem(t)}_resetActiveOption(){if(this.disabled)return void this._setActiveOption(-1);const t=this._items.find(i=>i.selected&&!i.disabled)||this._items.first;this._setActiveOption(t?this._items.toArray().indexOf(t):-1)}_containsFocus(){const t=mM();return t&&this._element.nativeElement.contains(t)}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(pt))},n.\u0275cmp=ht({type:n,selectors:[["mat-selection-list"]],contentQueries:function(t,i,r){if(1&t&&Xi(r,QM,5),2&t){let s;Lt(s=Ft())&&(i._items=s)}},hostAttrs:["role","listbox",1,"mat-mdc-selection-list","mat-mdc-list-base","mdc-list"],hostVars:1,hostBindings:function(t,i){1&t&&ct("keydown",function(s){return i._handleKeydown(s)}),2&t&&Vt("aria-multiselectable",i.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[Hn([rne,{provide:lR,useExisting:n},{provide:jV,useExisting:n}]),ft,zi],ngContentSelectors:kte,decls:1,vars:0,template:function(t,i){1&t&&(Cr(),Kt(0))},styles:['@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-list-divider::after{content:"";display:block;border-bottom-width:1px;border-bottom-style:solid}}.mdc-list{margin:0;padding:8px 0;list-style-type:none}.mdc-list:focus{outline:none}.mdc-list-item__wrapper{display:block}.mdc-list-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;align-items:stretch;cursor:pointer}.mdc-list-item:focus{outline:none}.mdc-list-item.mdc-list-item--with-one-line{height:48px}.mdc-list-item.mdc-list-item--with-two-lines{height:64px}.mdc-list-item.mdc-list-item--with-three-lines{height:88px}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__start{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--disabled,.mdc-list-item.mdc-list-item--non-interactive{cursor:auto}.mdc-list-item:not(.mdc-list-item--selected):focus::before,.mdc-list-item.mdc-ripple-upgraded--background-focused::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-list-item:not(.mdc-list-item--selected):focus::before,.mdc-list-item.mdc-ripple-upgraded--background-focused::before{border-color:CanvasText}}.mdc-list-item.mdc-list-item--selected::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:3px double rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-list-item.mdc-list-item--selected::before{border-color:CanvasText}}.mdc-list-item.mdc-list-item--selected:focus::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:3px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-list-item.mdc-list-item--selected:focus::before{border-color:CanvasText}}a.mdc-list-item{color:inherit;text-decoration:none}.mdc-list-item__start{fill:currentColor;flex-shrink:0;pointer-events:none}.mdc-list-item__end{flex-shrink:0;pointer-events:none}.mdc-list-item__content{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;align-self:center;flex:1;pointer-events:none}.mdc-list-item--with-two-lines .mdc-list-item__content,.mdc-list-item--with-three-lines .mdc-list-item__content{align-self:stretch}.mdc-list-item__content[for]{pointer-events:none}.mdc-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-three-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-three-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-three-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item__secondary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal}.mdc-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-list-item--with-three-lines .mdc-list-item__secondary-text{white-space:normal;line-height:20px}.mdc-list-item--with-overline .mdc-list-item__secondary-text{white-space:nowrap;line-height:auto}.mdc-list-item__overline-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-three-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-three-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-three-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-avatar.mdc-list-item,.mdc-list-item--with-leading-avatar.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-avatar .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-avatar .mdc-list-item__start,.mdc-list-item--with-leading-avatar .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-avatar .mdc-list-item__start{border-radius:50%}.mdc-list-item--with-leading-icon.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-icon.mdc-list-item,.mdc-list-item--with-leading-icon.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-icon .mdc-list-item__start{margin-left:16px;margin-right:32px}[dir=rtl] .mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--with-leading-icon .mdc-list-item__start[dir=rtl]{margin-left:32px;margin-right:16px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-thumbnail.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-thumbnail.mdc-list-item,.mdc-list-item--with-leading-thumbnail.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-thumbnail .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-thumbnail .mdc-list-item__start,.mdc-list-item--with-leading-thumbnail .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-image.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-image.mdc-list-item,.mdc-list-item--with-leading-image.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-image .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-image .mdc-list-item__start,.mdc-list-item--with-leading-image .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-image.mdc-list-item--with-one-line{height:72px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-video.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-video.mdc-list-item,.mdc-list-item--with-leading-video.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-video .mdc-list-item__start{margin-left:0;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-video .mdc-list-item__start,.mdc-list-item--with-leading-video .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-video.mdc-list-item--with-one-line{height:72px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-checkbox.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-checkbox.mdc-list-item,.mdc-list-item--with-leading-checkbox.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:8px;margin-right:24px}[dir=rtl] .mdc-list-item--with-leading-checkbox .mdc-list-item__start,.mdc-list-item--with-leading-checkbox .mdc-list-item__start[dir=rtl]{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-radio.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-radio.mdc-list-item,.mdc-list-item--with-leading-radio.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-radio .mdc-list-item__start{margin-left:8px;margin-right:24px}[dir=rtl] .mdc-list-item--with-leading-radio .mdc-list-item__start,.mdc-list-item--with-leading-radio .mdc-list-item__start[dir=rtl]{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-switch.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-switch.mdc-list-item,.mdc-list-item--with-leading-switch.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-switch .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-switch .mdc-list-item__start,.mdc-list-item--with-leading-switch .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-trailing-icon.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-icon.mdc-list-item,.mdc-list-item--with-trailing-icon.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-icon .mdc-list-item__end{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-icon .mdc-list-item__end,.mdc-list-item--with-trailing-icon .mdc-list-item__end[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:flex-start;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-meta.mdc-list-item,.mdc-list-item--with-trailing-meta.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-meta .mdc-list-item__end{margin-left:28px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-meta .mdc-list-item__end,.mdc-list-item--with-trailing-meta .mdc-list-item__end[dir=rtl]{margin-left:16px;margin-right:28px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-trailing-meta .mdc-list-item__end{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-caption-font-family);font-size:var(--mdc-typography-caption-font-size);line-height:var(--mdc-typography-caption-line-height);font-weight:var(--mdc-typography-caption-font-weight);letter-spacing:var(--mdc-typography-caption-letter-spacing);text-decoration:var(--mdc-typography-caption-text-decoration);text-transform:var(--mdc-typography-caption-text-transform)}.mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item,.mdc-list-item--with-trailing-checkbox.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:24px;margin-right:8px}[dir=rtl] .mdc-list-item--with-trailing-checkbox .mdc-list-item__end,.mdc-list-item--with-trailing-checkbox .mdc-list-item__end[dir=rtl]{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-radio.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item,.mdc-list-item--with-trailing-radio.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-radio .mdc-list-item__end{margin-left:24px;margin-right:8px}[dir=rtl] .mdc-list-item--with-trailing-radio .mdc-list-item__end,.mdc-list-item--with-trailing-radio .mdc-list-item__end[dir=rtl]{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-radio.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-switch.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-switch.mdc-list-item,.mdc-list-item--with-trailing-switch.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-switch .mdc-list-item__end{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-switch .mdc-list-item__end,.mdc-list-item--with-trailing-switch .mdc-list-item__end[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-switch.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item--with-overline.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-overline.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-list-item--with-overline.mdc-list-item--with-three-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-overline.mdc-list-item--with-three-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-list-item{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-list-item,.mdc-list-item[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-list-group .mdc-deprecated-list{padding:0}.mdc-list-group__subheader{margin:calc((3rem - 1.5rem)/2) 16px}.mdc-list-divider{padding:0;background-clip:content-box}.mdc-list-divider.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset{padding-left:16px;padding-right:auto}[dir=rtl] .mdc-list-divider.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset,.mdc-list-divider.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset[dir=rtl]{padding-left:auto;padding-right:16px}.mdc-list-divider.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset{padding-left:auto;padding-right:16px}[dir=rtl] .mdc-list-divider.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset,.mdc-list-divider.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset[dir=rtl]{padding-left:16px;padding-right:auto}.mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset{padding-left:0px;padding-right:auto}[dir=rtl] .mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset[dir=rtl]{padding-left:auto;padding-right:0px}[dir=rtl] .mdc-list-divider,.mdc-list-divider[dir=rtl]{padding:0}.mdc-list-item{background-color:var(--mdc-list-list-item-container-color)}.mdc-list-item.mdc-list-item--selected{background-color:var(--mdc-list-list-item-selected-container-color)}.mdc-list-item--with-one-line{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-one-line.mdc-list-item--with-leading-avatar,.mdc-list-item--with-one-line.mdc-list-item--with-leading-icon,.mdc-list-item--with-one-line.mdc-list-item--with-leading-thumbnail,.mdc-list-item--with-one-line.mdc-list-item--with-leading-checkbox,.mdc-list-item--with-one-line.mdc-list-item--with-leading-radio,.mdc-list-item--with-one-line.mdc-list-item--with-leading-switch{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-one-line.mdc-list-item--with-leading-image,.mdc-list-item--with-one-line.mdc-list-item--with-leading-video{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-two-lines{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-two-lines.mdc-list-item--with-leading-avatar,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-icon,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-thumbnail,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-checkbox,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-radio,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-switch,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-image,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-video{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-three-lines{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item.mdc-list-item--with-one-line{height:var(--mdc-list-list-item-one-line-container-height)}.mdc-list-item.mdc-list-item--with-two-lines{height:var(--mdc-list-list-item-two-line-container-height)}.mdc-list-item.mdc-list-item--with-three-lines{height:var(--mdc-list-list-item-three-line-container-height)}.mdc-list-item__primary-text{color:var(--mdc-list-list-item-label-text-color)}.mdc-list-item__primary-text{font-family:var(--mdc-list-list-item-label-text-font);line-height:var(--mdc-list-list-item-label-text-line-height);font-size:var(--mdc-list-list-item-label-text-size);font-weight:var(--mdc-list-list-item-label-text-weight);letter-spacing:var(--mdc-list-list-item-label-text-tracking)}.mdc-list-item__secondary-text{color:var(--mdc-list-list-item-supporting-text-color)}.mdc-list-item__secondary-text{font-family:var(--mdc-list-list-item-supporting-text-font);line-height:var(--mdc-list-list-item-supporting-text-line-height);font-size:var(--mdc-list-list-item-supporting-text-size);font-weight:var(--mdc-list-list-item-supporting-text-weight);letter-spacing:var(--mdc-list-list-item-supporting-text-tracking)}.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mdc-list-list-item-leading-icon-color)}.mdc-list-item--with-leading-icon .mdc-list-item__start{width:var(--mdc-list-list-item-leading-icon-size);height:var(--mdc-list-list-item-leading-icon-size)}.mdc-list-item--with-leading-icon .mdc-list-item__start>i{font-size:var(--mdc-list-list-item-leading-icon-size)}.mdc-list-item--with-leading-icon .mdc-list-item__start .mdc-list-item__icon{font-size:var(--mdc-list-list-item-leading-icon-size);width:var(--mdc-list-list-item-leading-icon-size);height:var(--mdc-list-list-item-leading-icon-size)}.mdc-list-item--with-leading-avatar .mdc-list-item__start{width:var(--mdc-list-list-item-leading-avatar-size);height:var(--mdc-list-list-item-leading-avatar-size)}.mdc-list-item.mdc-list-item--with-trailing-meta .mdc-list-item__end{color:var(--mdc-list-list-item-trailing-supporting-text-color)}.mdc-list-item--with-trailing-meta .mdc-list-item__end{font-family:var(--mdc-list-list-item-trailing-supporting-text-font);line-height:var(--mdc-list-list-item-trailing-supporting-text-line-height);font-size:var(--mdc-list-list-item-trailing-supporting-text-size);font-weight:var(--mdc-list-list-item-trailing-supporting-text-weight);letter-spacing:var(--mdc-list-list-item-trailing-supporting-text-tracking)}.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-trailing-icon-color)}.mdc-list-item--with-trailing-icon .mdc-list-item__end{width:var(--mdc-list-list-item-trailing-icon-size);height:var(--mdc-list-list-item-trailing-icon-size)}.mdc-list-item--with-trailing-icon .mdc-list-item__end>i{font-size:var(--mdc-list-list-item-trailing-icon-size)}.mdc-list-item--with-trailing-icon .mdc-list-item__end .mdc-list-item__icon{font-size:var(--mdc-list-list-item-trailing-icon-size);width:var(--mdc-list-list-item-trailing-icon-size);height:var(--mdc-list-list-item-trailing-icon-size)}.mdc-list-item--selected.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-selected-trailing-icon-color)}.mdc-list-item--disabled .mdc-list-item__start,.mdc-list-item--disabled .mdc-list-item__content,.mdc-list-item--disabled .mdc-list-item__end{opacity:1}.mdc-list-item--disabled .mdc-list-item__primary-text,.mdc-list-item--disabled .mdc-list-item__secondary-text,.mdc-list-item--disabled .mdc-list-item__overline-text{opacity:var(--mdc-list-list-item-disabled-label-text-opacity)}.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mdc-list-list-item-disabled-leading-icon-color)}.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start{opacity:var(--mdc-list-list-item-disabled-leading-icon-opacity)}.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-disabled-trailing-icon-color)}.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end{opacity:var(--mdc-list-list-item-disabled-trailing-icon-opacity)}.mdc-list-item:hover .mdc-list-item__primary-text{color:var(--mdc-list-list-item-hover-label-text-color)}.mdc-list-item--with-leading-icon:hover .mdc-list-item__start{color:var(--mdc-list-list-item-hover-leading-icon-color)}.mdc-list-item--with-trailing-icon:hover .mdc-list-item__end{color:var(--mdc-list-list-item-hover-trailing-icon-color)}.mdc-list-item:focus .mdc-list-item__primary-text{color:var(--mdc-list-list-item-focus-label-text-color)}.mdc-list-item.mdc-list-item--disabled .mdc-list-item__primary-text{color:var(--mdc-list-list-item-disabled-label-text-color)}.mdc-list-item:hover::before{background-color:var(--mdc-list-list-item-hover-state-layer-color);opacity:var(--mdc-list-list-item-hover-state-layer-opacity)}.mdc-list-item.mdc-list-item--disabled::before{background-color:var(--mdc-list-list-item-disabled-state-layer-color);opacity:var(--mdc-list-list-item-disabled-state-layer-opacity)}.mdc-list-item:focus::before{background-color:var(--mdc-list-list-item-focus-state-layer-color);opacity:var(--mdc-list-list-item-focus-state-layer-opacity)}.mdc-list-item--disabled .mdc-radio,.mdc-list-item--disabled .mdc-checkbox{opacity:var(--mdc-list-list-item-disabled-label-text-opacity)}.mdc-list-item--with-leading-avatar .mat-mdc-list-item-avatar{border-radius:var(--mdc-list-list-item-leading-avatar-shape);background-color:var(--mdc-list-list-item-leading-avatar-color)}.mat-mdc-list-base{--mdc-list-list-item-container-shape:0;--mdc-list-list-item-leading-avatar-shape:50%;--mdc-list-list-item-container-color:transparent;--mdc-list-list-item-selected-container-color:transparent;--mdc-list-list-item-leading-avatar-color:transparent;--mdc-list-list-item-leading-icon-size:24px;--mdc-list-list-item-leading-avatar-size:40px;--mdc-list-list-item-trailing-icon-size:24px;--mdc-list-list-item-disabled-state-layer-color:transparent;--mdc-list-list-item-disabled-state-layer-opacity:0;--mdc-list-list-item-disabled-label-text-opacity:0.38;--mdc-list-list-item-disabled-leading-icon-opacity:0.38;--mdc-list-list-item-disabled-trailing-icon-opacity:0.38}.cdk-high-contrast-active a.mdc-list-item--activated::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}.cdk-high-contrast-active a.mdc-list-item--activated [dir=rtl]::after{right:auto;left:16px}.mat-mdc-list-base{display:block}.mat-mdc-list-base .mdc-list-item__start,.mat-mdc-list-base .mdc-list-item__end,.mat-mdc-list-base .mdc-list-item__content{pointer-events:auto}.mat-mdc-list-item,.mat-mdc-list-option{width:100%;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-list-item:not(.mat-mdc-list-item-interactive),.mat-mdc-list-option:not(.mat-mdc-list-item-interactive){cursor:default}.mat-mdc-list-item .mat-divider-inset,.mat-mdc-list-option .mat-divider-inset{position:absolute;left:0;right:0;bottom:0}.mat-mdc-list-item .mat-mdc-list-item-avatar~.mat-divider-inset,.mat-mdc-list-option .mat-mdc-list-item-avatar~.mat-divider-inset{margin-left:72px}[dir=rtl] .mat-mdc-list-item .mat-mdc-list-item-avatar~.mat-divider-inset,[dir=rtl] .mat-mdc-list-option .mat-mdc-list-item-avatar~.mat-divider-inset{margin-right:72px}.mat-mdc-list-item-interactive::before{top:0;left:0;right:0;bottom:0;position:absolute;content:"";opacity:0;pointer-events:none}.mat-mdc-list-item>.mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-list-item:focus>.mat-mdc-focus-indicator::before{content:""}.mat-mdc-list-item.mdc-list-item--with-three-lines .mat-mdc-list-item-line.mdc-list-item__secondary-text{white-space:nowrap;line-height:normal}.mat-mdc-list-item.mdc-list-item--with-three-lines .mat-mdc-list-item-unscoped-content.mdc-list-item__secondary-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}mat-action-list button{background:none;color:inherit;border:none;font:inherit;outline:inherit;-webkit-tap-highlight-color:rgba(0,0,0,0);text-align:left}[dir=rtl] mat-action-list button{text-align:right}mat-action-list button::-moz-focus-inner{border:0}'],encapsulation:2,changeDetection:0}),n})(),one=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[aI,va,qn,IM,DU,n3]}),n})();function ane(n,e){if(1&n&&(K(0,"mat-label"),Je(1),J()),2&n){const t=be(2);j(1),$i(t.resource.name)}}function lne(n,e){if(1&n&&(K(0,"mat-list-option",5),Je(1),J()),2&n){const t=e.$implicit,i=be(2);z("value",t.key)("selected",i.resource.data[t.key])("disabled",i.disabled),j(1),nr(" ",t.key," ")}}function cne(n,e){if(1&n){const t=Wi();uo(0,1),_e(1,ane,2,1,"mat-label",2),K(2,"mat-selection-list",3),ct("selectionChange",function(r){return Dn(t),In(be().onSelection(r))}),_e(3,lne,2,4,"mat-list-option",4),zt(4,"keyvalue"),J(),ho()}if(2&n){const t=be();z("matTooltip",t.resourceDescription),j(1),z("ngIf",t.resource.name),j(1),z("disabled",t.disabled),j(1),z("ngForOf",Xt(4,4,t.resource.data))}}let dne=(()=>{class n{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new it}onSelection(t){for(const i of t.options)this.resource.data[i.value]=i.selected;this.changed.emit()}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=ht({type:n,selectors:[["app-flags-block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:1,vars:1,consts:[["matTooltipPosition","above",3,"matTooltip",4,"ngIf"],["matTooltipPosition","above",3,"matTooltip"],[4,"ngIf"],[3,"disabled","selectionChange"],[3,"value","selected","disabled",4,"ngFor","ngForOf"],[3,"value","selected","disabled"]],template:function(t,i){1&t&&_e(0,cne,5,6,"ng-container",0),2&t&&z("ngIf",i.resource)},dependencies:[Fo,gi,xa,_s,JM,QM,V2],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),n})();class cR{constructor(e=!1,t=kh.instance){this.parentClock=t,this.tickSub=null,this._tick$=new Ue,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,e&&this.start()}get tick$(){return this._tick$.pipe(Ye(([e,t])=>[t,t-e]))}get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get elapsedTime(){return this.isPaused?this.pausedAt-this.startedAt:this.parentClock.elapsedTime-this.startedAt}createChildClock(e){return new cR(e,this)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks())}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(Ye(([e,t])=>[this.oldRelativeTime,e-this.startedAt]),Ii(([e,t])=>this.oldRelativeTime=t)).subscribe(this._tick$)}stopListeningTicks(){var e;null===(e=this.tickSub)||void 0===e||e.unsubscribe(),this.tickSub=null}}class kh{constructor(){this._tick$=new Ue;let e=this.elapsedTime;dt(void 0,LB).pipe(function une(n){let t,e=1/0;return null!=n&&("object"==typeof n?({count:e=1/0,delay:t}=n):e=n),e<=0?()=>Is:Gn((i,r)=>{let o,s=0;const a=()=>{if(o?.unsubscribe(),o=null,null!=t){const c="number"==typeof t?hM(t):lr(t(s)),u=Un(r,()=>{u.unsubscribe(),l()});c.subscribe(u)}else l()},l=()=>{let c=!1;o=i.subscribe(Un(r,void 0,()=>{++s[e,this.elapsedTime]),Ii(([t,i])=>e=i)).subscribe(this._tick$)}static get instance(){return kh._instance||(kh._instance=new kh),kh._instance}get tick$(){return this._tick$.pipe(Ye(([e,t])=>[t,t-e]))}get elapsedTime(){return(typeof performance>"u"?Date:performance).now()}createChildClock(e){return new cR(e,this)}}const hne={transparent:!1,background:0,size:"fullscreen",antialias:!0};class fne{constructor(e,t,i={}){this.scene=e,this.canvas=t,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},hne),i||{})}}class Ly{constructor(e){this.data=e,this.adjacent=new Set}static fromArray(e,t=!1){const i=new Ly(e[0]);let r=i;for(let s=1;si.map(r=>new Ly(r)));for(let i=0;i0&&t[i][r].addAdjacent(t[i][r-1]),i>0&&t[i][r].addAdjacent(t[i-1][r]);return t[0][0]}addAdjacent(e){return!this.adjacent.has(e)&&(this.adjacent.add(e),e.adjacent.add(this),!0)}removeAdjacent(e){return!!this.adjacent.has(e)&&(this.adjacent.delete(e),e.adjacent.delete(this),!0)}addEdge(e,t){return!!this.removeAdjacent(t)&&(this.addAdjacent(e),e.addAdjacent(t),!0)}removeEdge(e,t){return!(!e.adjacent.has(this)||!e.adjacent.has(t))&&(e.removeAdjacent(this),e.removeAdjacent(t),this.addAdjacent(t))}walkRead(e){const t=new Set,i=[[this,e]];for(t.add(this);i.length;){const r=i.shift(),[s,o]=r;if(0!==o){const a=Array.from(s.adjacent).filter(l=>!t.has(l));for(const l of a)t.add(l),i.push([l,o-1])}}return t}walkReadPreserveDepth(e){const t=new Set,i=[],r=[[this,e]];for(t.add(this);r.length;){const s=r.shift(),[o,a]=s,l=e-a;if(i[l]||(i[l]=new Set),i[l].add(o),0!==a){const c=Array.from(o.adjacent).filter(u=>!t.has(u));for(const u of c)t.add(u),r.push([u,a-1])}}return i}nodes(){return Array.from(this.walkRead(-1))}}var jl=(()=>{return(n=jl||(jl={}))[n.INPUT_CONTROLLERS=0]="INPUT_CONTROLLERS",n[n.PHYSICS_SIMULATION=200]="PHYSICS_SIMULATION",n[n.OBJECTS_BINDING=400]="OBJECTS_BINDING",n[n.ANIMATION_MIXERS=600]="ANIMATION_MIXERS",n[n.CONTROLLERS=800]="CONTROLLERS",n[n.RENDERING=1e3]="RENDERING",n[n.POST_RENDERING=1200]="POST_RENDERING",jl;var n})();let Fy=(()=>{class n{constructor(){this.tick$=new Ue,this._world=null,this._name="e0x"+(n.default_name_counter++).toString(16),this._active=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Ue,this._onRemoved$=new Ue}get world(){return this._world}get name(){return this._name}set name(t){this._name=t}get active(){return this._active}set active(t){this._active=t}get children(){return[...this._children]}addChildren(...t){for(const i of t)i.parent&&i.parent.removeChildren([i]),i.parent=this;if(this._children.push(...t),this._world)for(const i of t)this._world.addEntity(i)}removeChildren(t,i=!1){this._children=this._children.filter(r=>!t.includes(r));for(const r of t)r.parent=null,this._world&&this._world.removeEntity(r,i)}get components(){return[...this._components]}addComponents(...t){for(const i of t)i.entity&&i.entity.removeComponents([i]),i.entity=this;if(this._components.push(...t),this._world)for(const i of t)i.addToWorld(this._world)}removeComponents(t,i=!1){this._components=this._components.filter(r=>!t.includes(r));for(const r of t)r.entity=null,this._world&&r.removeFromWorld(this._world,i)}onSpawned(t){this._world=t;for(const i of this._components)i.addToWorld(t);for(const i of this._children)t.addEntity(i);this._onSpawned$.next()}onRemoved(){const t=this._world;this._world=null;for(const i of this._children)t.removeEntity(i);for(const i of this._components)i.removeFromWorld(t,!1);this._onRemoved$.next()}dispose(){this.world&&this.world.removeEntity(this,!1),this._onSpawned$.complete(),this._onRemoved$.complete(),this.tick$.complete();for(const t of this._children)t.dispose();for(const t of this._components)t.dispose()}}return n.default_name_counter=0,n})();class pne extends Fy{constructor(e){super(),this.tickOrder=e}}function eS(n,e=jl.CONTROLLERS){const t=new pne(e);return n.addEntity(t),t.tick$.pipe(Gd(()=>{n.removeEntity(t,!0)}))}class mne extends Fy{constructor(e){super(),this.renderer=e,this.tickOrder=jl.RENDERING,this._rendererSize$=new Ct(null),this.addComponents(e),this.tick$.subscribe(()=>{this.renderer.render()})}get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}onSpawned(e){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),cs(ba(window,"resize").pipe(fM(100)),ba(window,"orientationchange")).pipe(et(this._onRemoved$),Ye(()=>({x:window.innerWidth,y:window.innerHeight})),No({x:window.innerWidth,y:window.innerHeight})).subscribe(t=>{this._rendererSize$.next("function"==typeof this.rendererOptions.size?this.rendererOptions.size(t):t)})):this.rendererOptions.size instanceof Sn||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(et(this._onRemoved$)).subscribe(t=>{this._rendererSize$.next(t)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(et(this._onRemoved$),qd((t,i)=>t?.x==i?.x&&t?.y==i?.y)).subscribe(t=>{t&&this.renderer.resizeRenderer(t)}),super.onSpawned(e)}dispose(){super.dispose(),this._rendererSize$.complete()}}const dR=n=>{n.updateVisibility?n.updateVisibility():XV(n)},XV=n=>{for(const e of n.children)dR(e)};class gne extends Fy{constructor(){super(...arguments),this._visible=!0}get visible(){return this._visible}get worldVisible(){let e=this;for(;;){if(!1===e.visible)return!1;if(!e.parent)break;e=e.parent}return!0}set visible(e){this._visible=e,this.updateVisibility()}updateVisibility(){XV(this)}addChildren(...e){super.addChildren(...e);for(const t of e)dR(t)}removeChildren(e,t=!1){if(super.removeChildren(e,t),!t)for(const i of e)dR(i)}}class uR{constructor(){this._running=!1,this.stop$=new Ue}get running(){return this._running}start(...e){this.running||(this.startInternal(...e),this._running=!0)}stop(...e){this.running&&(this.stop$.next(),this.stopInternal(...e),this._running=!1)}stopInternal(...e){}}class _ne extends uR{constructor(e,t){super(),this.keyboard=e,this.keymap=t,this._output$=new Ue}get output$(){return this._output$.asObservable()}startInternal(){const e=[[],[],[],[]];this.keymap.includes("wasd")&&(e[0].push("KeyW"),e[1].push("KeyA"),e[2].push("KeyS"),e[3].push("KeyD")),this.keymap.includes("arrows")&&(e[0].push("ArrowUp"),e[1].push("ArrowLeft"),e[2].push("ArrowDown"),e[3].push("ArrowRight")),Vd(e.map(t=>this.keyboard.bindMany(...t))).pipe(et(this.stop$),Ye(t=>{const i={};if(t.includes(!0)){const[r,s,o,a]=t;r!=o&&(i.upDown=r),s!=a&&(i.leftRight=s)}return i})).subscribe(t=>this._output$.next(t))}}const tS=new Sn(ls);class vne extends uR{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,this.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement],this.handleKeys=this.handleKeys.bind(this),this.resetAllKeys=this.resetAllKeys.bind(this),this.onPointerLockChange=this.onPointerLockChange.bind(this)}startInternal(){window.addEventListener("keydown",this.handleKeys),window.addEventListener("keyup",this.handleKeys),window.addEventListener("blur",this.resetAllKeys),document.addEventListener("pointerlockchange",this.onPointerLockChange)}stopInternal(){window.removeEventListener("keydown",this.handleKeys),window.removeEventListener("keyup",this.handleKeys),window.removeEventListener("blur",this.resetAllKeys),document.addEventListener("pointerlockchange",this.onPointerLockChange),this.resetAllKeys()}bind(e){this.bindings[e]||(this.bindings[e]=[]);const t=new Ct(!1);return this.bindings[e].push(t),t.pipe(qd(),Gd(()=>{this.bindings[e].splice(this.bindings[e].indexOf(t),1),t.complete()}))}bindMany(...e){if(0==e.length)return console.warn("[KeyboardController] bindMany called without any key code"),tS;if(1==e.length)return this.bind(e[0]);const t=[];for(const i of e){this.bindings[i]||(this.bindings[i]=[]);const r=new Ct(!1);this.bindings[i].push(r),t.push(r)}return Vd(t).pipe(Gd(()=>{for(let i=0;ii.includes(!0)),qd())}emulateKeyDown(e){if(this.running)for(const t of this.bindings[e]||[])t.next(!0)}emulateKeyUp(e){if(this.running)for(const t of this.bindings[e]||[])t.next(!1)}emulateKeyPress(e){this.emulateKeyDown(e),this.emulateKeyUp(e)}handleKeys(e){if("keydown"!=e.type&&"keyup"!=e.type)return;const t="keydown"==e.type;if(t&&this.skipKeyDownsOnExternalFocus&&document.activeElement)for(const i of this.externalFocusBlacklist)if(document.activeElement instanceof i)return;for(const i of this.bindings[e.code]||[])i.next(t)}onPointerLockChange(){document.pointerLockElement||this.resetAllKeys()}resetAllKeys(){for(const e in this.bindings)for(const t of this.bindings[e]||[])t.next(!1)}}class Tr{static get O(){return{x:0,y:0}}static get X(){return{x:1,y:0}}static get Y(){return{x:0,y:1}}static get nX(){return{x:-1,y:0}}static get nY(){return{x:0,y:-1}}static clone(e){return{x:e.x,y:e.y}}static add(e,t){return{x:e.x+t.x,y:e.y+t.y}}static sub(e,t){return{x:e.x-t.x,y:e.y-t.y}}static avg(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}static lenSq(e){return e.x*e.x+e.y*e.y}static len(e){return Math.sqrt(e.x*e.x+e.y*e.y)}static dist(e,t){return Tr.len(Tr.sub(e,t))}static norm(e){const t=Tr.len(e);return{x:e.x/t,y:e.y/t}}static scalarMult(e,t){return{x:e.x*t,y:e.y*t}}static lerp(e,t,i){return{x:e.x+i*(t.x-e.x),y:e.y+i*(t.y-e.y)}}static angle(e,t){const i=e.x*t.x+e.y*t.y,r=Math.sqrt(e.x**2+e.y**2)*Math.sqrt(t.x**2+t.y**2);return Math.acos(i/r)}}const bne={pointerLock:!1};var ys=(()=>{return(n=ys||(ys={}))[n.NONE=0]="NONE",n[n.DRAG=1]="DRAG",n[n.DRAG_MIDDLE_BUTTON=2]="DRAG_MIDDLE_BUTTON",n[n.DRAG_RIGHT_BUTTON=3]="DRAG_RIGHT_BUTTON",n[n.DRAG_TOUCH_TWO_FINGERS=4]="DRAG_TOUCH_TWO_FINGERS",ys;var n})();class Am extends uR{constructor(e={}){super(),this._wheel$=null,this._delta$=new Ue,this._position$=new Ct(Tr.O),this._multiTouchPositions$=new Ct([]),this.stopped$=new Ue,this._state$=new Ct(ys.NONE),this.options=Object.assign(Object.assign({},bne),e),this.canvasClickListener=this.canvasClickListener.bind(this)}static isTouchDevice(){return"createTouch"in document||!!navigator.userAgent.match(/(iPhone|iPod|iPad)/)||!!navigator.userAgent.match(/Android/)}get delta$(){return this._delta$.asObservable()}get position(){return this._position$.getValue()}get position$(){return this._position$.asObservable()}get wheel$(){return this._wheel$||(this._wheel$=ba(this._element,"wheel",{passive:!1}).pipe(et(this.stopped$),Gd(()=>this._wheel$=null),Ii(e=>e.preventDefault()),Ye(e=>e.deltaY),Tu())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(gs(e=>e==ys.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:tS),Ye(e=>e.map(t=>({x:t.x,y:t.y}))),function yne(){return Gn((n,e)=>{let t,i=!1;n.subscribe(Un(e,r=>{const s=t;t=r,i&&e.next([s,r]),i=!0}))})}(),On(([e,t])=>e.length>1&&t.length>1),Ye(([e,t])=>({centerPointDelta:Tr.sub(Tr.scalarMult(t.reduce((i,r)=>Tr.add(i,r),Tr.O),1/t.length),Tr.scalarMult(e.reduce((i,r)=>Tr.add(i,r),Tr.O),1/t.length)),angleDelta:Tr.angle(t[1],t[0])-Tr.angle(e[1],e[0]),distanceDelta:Tr.dist(t[1],t[0])-Tr.dist(e[1],e[0])})))}get _element(){return this.options.canvas||window}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(ys.NONE);const e=[ys.DRAG,ys.DRAG_MIDDLE_BUTTON,ys.DRAG_RIGHT_BUTTON],t=[ys.NONE,ys.DRAG,ys.DRAG_TOUCH_TWO_FINGERS],i=[],r={};ba(this._element,"mousemove").pipe(et(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),ba(this._element,"pointermove").pipe(et(this.stopped$)).subscribe(o=>{o instanceof PointerEvent?("touch"===o.pointerType&&(r[o.pointerId]={x:o.pageX,y:o.pageY}),this._position$.next({x:o.pageX,y:o.pageY}),this._multiTouchPositions$.next(Object.values(r))):this._position$.next({x:o.clientX,y:o.clientY}),this._delta$.next({x:o.movementX,y:o.movementY})}),!Am.isTouchDevice()&&this.options.pointerLock&&this.options.canvas&&this.options.canvas.addEventListener("click",this.canvasClickListener);const s=o=>{delete r[o.pointerId];for(let a=0;a{0===i.length&&(this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),this._element.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)),i.push(o),"touch"===o.pointerType?(r[o.pointerId]={x:o.pageX,y:o.pageY},this._state$.next(t[Math.min(i.length,2)])):this._state$.next(e[o.button]||ys.NONE)}),ba(this._element,"contextmenu").pipe(et(this.stopped$)).subscribe(o=>{o.preventDefault()})}stopInternal(e=!0){this.stopped$.next(),e&&this.options.canvas&&(this.options.canvas.removeEventListener("click",this.canvasClickListener),document.exitPointerLock())}canvasClickListener(){this.options.canvas.requestPointerLock()}}class xne{static lookAt(e,t,i){let r=_t.sub(e,t);r=0===_t.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):_t.norm(r);let s=_t.cross(i,r);0===_t.lenSq(s)&&(r=1===Math.abs(i.z)?Object.assign(Object.assign({},r),{x:r.x+1e-4}):Object.assign(Object.assign({},r),{z:r.z+1e-4}),r=_t.norm(r),s=_t.cross(i,r)),s=_t.norm(s);let o=_t.cross(r,s);return[s.x,s.y,s.z,0,o.x,o.y,o.z,0,r.x,r.y,r.z,0]}}class zr{static get O(){return{x:0,y:0,z:0,w:1}}static clone(e){return{x:e.x,y:e.y,z:e.z,w:e.w}}static add(e,t){const i=e.w+t.w,r=e.x+t.x,s=e.y+t.y,o=e.z+t.z,a=Math.sqrt(i*i+r*r+s*s+o*o);return{w:i/a,x:r/a,y:s/a,z:o/a}}static mult(e,t){return{w:e.w*t.w-e.x*t.x-e.y*t.y-e.z*t.z,x:e.w*t.x+e.x*t.w+e.y*t.z-e.z*t.y,y:e.w*t.y-e.x*t.z+e.y*t.w+e.z*t.x,z:e.w*t.z+e.x*t.y-e.y*t.x+e.z*t.w}}static conjugate(e){return{x:-e.x,y:-e.y,z:-e.z,w:e.w}}static opposite(e){return{x:-e.x,y:-e.y,z:-e.z,w:-e.w}}static combineRotations(...e){let t={w:1,x:0,y:0,z:0};for(const i of e)t=this.mult(t,i);return t}static lerp(e,t,i){return{x:e.x+i*(t.x-e.x),y:e.y+i*(t.y-e.y),z:e.z+i*(t.z-e.z),w:e.w+i*(t.w-e.w)}}static slerp(e,t,i){let s=Math.acos(e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w),o=Math.sin(s),a=e.x*Math.sin((1-i)*s)/o+t.x*Math.sin(i*s)/o,l=e.y*Math.sin((1-i)*s)/o+t.y*Math.sin(i*s)/o,c=e.z*Math.sin((1-i)*s)/o+t.z*Math.sin(i*s)/o,u=e.w*Math.sin((1-i)*s)/o+t.w*Math.sin(i*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(u)?zr.clone(e):{x:a,y:l,z:c,w:u}}static fromAngle(e,t){const i=t/2,r=Math.sin(i);return Object.assign(Object.assign({},_t.scalarMult(e,r)),{w:Math.cos(i)})}static fromMatrix4(e){const t=e[0],i=e[4],r=e[8],s=e[1],o=e[5],a=e[9],l=e[2],c=e[6],u=e[10],h=t+o+u;if(h>0){const p=.5/Math.sqrt(h+1);return{x:(c-a)*p,y:(r-l)*p,z:(s-i)*p,w:.25/p}}if(t>o&&t>u){const p=2*Math.sqrt(1+t-o-u);return{x:.25*p,y:(i+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>u){const p=2*Math.sqrt(1+o-t-u);return{x:(i+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+u-t-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-i)/p}}}static fromEuler(e){const t=e.x,i=e.y,r=e.z,s=Math.cos(.5*r),o=Math.sin(.5*r),a=Math.cos(.5*i),l=Math.sin(.5*i),c=Math.cos(.5*t),u=Math.sin(.5*t);return{w:c*a*s+u*l*o,x:u*a*s-c*l*o,y:c*l*s+u*a*o,z:c*a*o-u*l*s}}static toEuler(e){const t=e.w,i=e.x,r=e.y,s=e.z,c=2*(t*r-s*i);return{x:Math.atan2(2*(t*i+r*s),1-2*(i*i+r*r)),y:Math.abs(c)>=1?Math.sign(c)*Math.PI/2:Math.asin(c),z:Math.atan2(2*(t*s+i*r),1-2*(r*r+s*s))}}static lookAt(e,t,i=_t.Z){return this.fromMatrix4(xne.lookAt(e,t,i))}static rotAround(e,t,i){const r=Math.sin(i/2),s={w:Math.cos(i/2),x:t.x*r,y:t.y*r,z:t.z*r};return this.mult(s,e)}}class _t{static get O(){return{x:0,y:0,z:0}}static get X(){return{x:1,y:0,z:0}}static get Y(){return{x:0,y:1,z:0}}static get Z(){return{x:0,y:0,z:1}}static get nX(){return{x:-1,y:0,z:0}}static get nY(){return{x:0,y:-1,z:0}}static get nZ(){return{x:0,y:0,z:-1}}static clone(e){return{x:e.x,y:e.y,z:e.z}}static add(e,t){return{x:e.x+t.x,y:e.y+t.y,z:e.z+t.z}}static sub(e,t){return{x:e.x-t.x,y:e.y-t.y,z:e.z-t.z}}static avg(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2,z:(e.z+t.z)/2}}static lenSq(e){return e.x*e.x+e.y*e.y+e.z*e.z}static len(e){return Math.sqrt(e.x*e.x+e.y*e.y+e.z*e.z)}static dist(e,t){return _t.len(_t.sub(e,t))}static cross(e,t){const i=e.x,r=e.y,s=e.z,o=t.x,a=t.y,l=t.z;return{x:r*l-s*a,y:s*o-i*l,z:i*a-r*o}}static norm(e){const t=_t.len(e);return 0===t?e:{x:e.x/t,y:e.y/t,z:e.z/t}}static scalarMult(e,t){return{x:e.x*t,y:e.y*t,z:e.z*t}}static lerp(e,t,i){return{x:e.x+i*(t.x-e.x),y:e.y+i*(t.y-e.y),z:e.z+i*(t.z-e.z)}}static angle(e,t){const i=e.x*t.x+e.y*t.y+e.z*t.z,r=Math.sqrt(e.x**2+e.y**2+e.z**2)*Math.sqrt(t.x**2+t.y**2+t.z**2);return Math.acos(i/r)}static rot(e,t){const{x:i,y:r,z:s}=e;return{x:t.w*t.w*i+2*t.y*t.w*s-2*t.z*t.w*r+t.x*t.x*i+2*t.y*t.x*r+2*t.z*t.x*s-t.y*t.y*i-t.z*t.z*i,y:2*t.x*t.y*i+t.y*t.y*r+2*t.z*t.y*s+2*t.w*t.z*i-t.z*t.z*r+t.w*t.w*r-2*t.x*t.w*s-t.x*t.x*r,z:2*t.x*t.z*i+2*t.y*t.z*r+t.z*t.z*s-2*t.w*t.y*i-t.y*t.y*s+2*t.w*t.x*r-t.x*t.x*s+t.w*t.w*s}}static rotAround(e,t,i){return this.rot(e,zr.fromAngle(t,i))}static toSpherical(e){const t=Math.sqrt(e.x*e.x+e.y*e.y+e.z*e.z);return{radius:t,theta:0==t?0:Math.atan2(e.y,e.x),phi:0==t?0:Math.atan2(Math.sqrt(e.x*e.x+e.y*e.y),e.z)}}static fromSpherical(e){return{x:e.radius*Math.sin(e.phi)*Math.cos(e.theta),y:e.radius*Math.sin(e.phi)*Math.sin(e.theta),z:e.radius*Math.cos(e.phi)}}}var Ny=function(n,e,t,i){return new(t||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})};let nS=(()=>{class n{constructor(t,i){this.visualScene=t,this.physicsWorld=i,this.worldClock=kh.instance.createChildClock(!1),this.keyboardInput=new vne,this.name="w0x"+(n.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],n._documentWorlds.push(this),this.keyboardInput.start(),window.ggstatic&&(window.ggstatic.registerConsoleCommand(this,"show_debugger",(...r)=>Ny(this,void 0,void 0,function*(){return window.ggstatic.showDebugControls=["1","true","+"].includes(r[0]),""+window.ggstatic.showDebugControls}),"args: [0 or 1]; turn on/off debug panel. Default value is 0"),window.ggstatic.registerConsoleCommand(this,"show_stats",(...r)=>Ny(this,void 0,void 0,function*(){return window.ggstatic.showStats=["1","true","+"].includes(r[0]),""+window.ggstatic.showStats}),"args: [0 or 1]; turn on/off stats. Default value is 0"),window.ggstatic.registerConsoleCommand(this,"ph_timescale",(...r)=>Ny(this,void 0,void 0,function*(){return this.physicsWorld.timeScale=+r[0],JSON.stringify(this.physicsWorld.timeScale)}),"args: [float]; change time scale of physics engine. Default value is 1.0"),window.ggstatic.registerConsoleCommand(this,"dr_drawphysics",(...r)=>Ny(this,void 0,void 0,function*(){return this.physicsDebugViewActive=["1","true","+"].includes(r[0]),""+this.physicsWorld.physicsDebugViewActive}),"args: [0 or 1]; turn on/off physics debug view. Default value is 0"))}static get documentWorlds(){return[...n._documentWorlds]}init(){return Ny(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]),this.worldClock.tick$.subscribe(([t,i])=>{let r=0;for(;r=jl.PHYSICS_SIMULATION);r++)this.tickListeners[r].active&&this.tickListeners[r].tick$.next([t,i]);for(this.physicsWorld.simulate(i);ri.tickOrder-r.tickOrder),t.onSpawned(this))}removeEntity(t,i=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(r=>r===t),1),this.tickListeners.splice(this.tickListeners.findIndex(r=>r===t),1),t.onRemoved()}i&&t.dispose()}get physicsDebugViewActive(){return this.physicsWorld.physicsDebugViewActive}set physicsDebugViewActive(t){if(this.physicsDebugViewActive!==t)if(t){const i=this.visualScene.debugPhysicsDrawerClass;if(!i)throw new Error("Debug drawer is not available");this.physicsWorld.startDebugger(this,new i)}else this.physicsWorld.stopDebugger(this)}}return n.default_name_counter=0,n._documentWorlds=[],n})();class Mne extends fne{}class qV extends gne{}class iu extends qV{constructor(e,t=null){if(super(),this.object3D=e,this.objectBody=t,this.tickOrder=jl.OBJECTS_BINDING,this._position=_t.O,this._rotation=zr.O,t)this.tick$.subscribe(()=>{this.runTransformBinding(t,e)}),this.runTransformBinding(t,e),this.name=t.name;else{if(!e)throw new Error("Cannot create entity without a mesh and a body");this._position=e.position,this._rotation=e.rotation,this.name=e.name}t&&this.addComponents(t),e&&this.addComponents(e)}get position(){return this._position}set position(e){this.object3D&&(this.object3D.position=e),this.objectBody&&(this.objectBody.position=e),this._position=e}get rotation(){return this._rotation}set rotation(e){this.object3D&&(this.object3D.rotation=e),this.objectBody&&(this.objectBody.rotation=e),this._rotation=e}updateVisibility(){this.object3D&&(this.object3D.visible=this.worldVisible),super.updateVisibility()}runTransformBinding(e,t){const i=e.position,r=e.rotation;t&&(t.position=i,t.rotation=r),this._position=i,this._rotation=r}}const KV={leading:!0,trailing:!1};function ZV(n,e=dy,t=KV){const i=hM(n,e);return function Sne(n,e=KV){return Gn((t,i)=>{const{leading:r,trailing:s}=e;let o=!1,a=null,l=null,c=!1;const u=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&i.complete())},h=()=>{l=null,c&&i.complete()},p=g=>l=lr(n(g)).subscribe(Un(i,u,h)),m=()=>{if(o){o=!1;const g=a;a=null,i.next(g),!c&&p(g)}};t.subscribe(Un(i,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&i.complete()}))})}(()=>i,t)}class By extends Ly{static fromMapArray(e,t=!1){const i=new By(e[0]);let r=i;for(let s=1;si.map(r=>new By(r)));for(let i=0;i0&&t[i][r].addAdjacent(t[i][r-1]),i>0&&t[i][r].addAdjacent(t[i-1][r]);return t[0][0]}getNearestDummy(e,t){let i=1/0,r=this;return e.forEach(s=>{let o=Math.sqrt(Math.pow(t.x-s.data.position.x,2)+Math.pow(t.y-s.data.position.y,2)+Math.pow(t.z-s.data.position.z,2));ot?this.tick$.pipe(No(null),ZV(1e3),Ye(()=>t.position)):tS),Ye(t=>this.mapGraph.getNearestDummy(this.mapGraphNodes,t)),Ii(t=>this._nearestDummy$.next(t)),qd()).subscribe(t=>{let r,i=new Set;if(this.options.inertia>0){r=new Set;const s=t.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let o=0;or.add(a.data)),o<=this.options.loadDepth&&s[o].forEach(a=>i.add(a.data))}else t.walkRead(this.options.loadDepth).forEach(s=>i.add(s.data)),r=i;for(const s of this.loaded.keys())r.has(s)?i.delete(s):this.disposeChunk(s);Promise.all(Array.from(i.keys()).map(s=>this.loadChunk(s))).then(()=>this._initialLoadComplete$.next(!0))})}onRemoved(){super.onRemoved(),this.loaderCursorEntity$.next(null)}loadChunk(e){return function(n,e,t,i){return new(t||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})}(this,void 0,void 0,function*(){const t=yield this.world.loader.loadGgGlb(e.path,Object.assign({position:e.position,rotation:e.rotation||zr.O},e.loadOptions)),i=[...t.entities,...(t.props||[]).map(r=>r.entities).reduce((r,s)=>(r.push(...s),r),[])];return this.loaded.set(e,i),this.addChildren(...i),this._chunkLoaded$.next([t,{position:e.position,rotation:e.rotation||zr.O}]),[i,t]})}disposeChunk(e){this.loaded.has(e)&&(this.removeChildren(this.loaded.get(e),!0),this.loaded.delete(e))}}class Tne extends mne{get position(){return this.renderer.camera.position}set position(e){this.renderer.camera.position=e}get rotation(){return this.renderer.camera.rotation}set rotation(e){this.renderer.camera.rotation=e}get camera(){return this.renderer.camera}}var JV=function(n,e,t,i){return new(t||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})};const ez={keymap:"wasd",movementOptions:{speed:.5},mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class Ine extends Fy{constructor(e,t,i={}){super(),this.keyboard=e,this.camera=t,this.tickOrder=jl.INPUT_CONTROLLERS,this.options=Object.assign(Object.assign({},ez),i),i.mouseOptions&&(this.options.movementOptions=Object.assign(Object.assign({},ez.movementOptions),i.mouseOptions)),this.mouseInput=new Am(i.mouseOptions),this.directionsInput=new _ne(e,this.options.keymap)}onSpawned(e){const t=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return JV(this,void 0,void 0,function*(){yield t.onSpawned.call(this,e);let i={direction:{},rest:[]};const r=["KeyE","KeyQ"];this.camera.camera.supportsFov&&r.push("KeyZ","KeyC"),r.push("ShiftLeft"),this.directionsInput.output$.pipe(et(this._onRemoved$)).subscribe(a=>{i.direction=a}),Vd(r.map(a=>this.keyboard.bind(a))).pipe(et(this._onRemoved$)).subscribe(a=>{i.rest=a});let s=Tr.O,o=Am.isTouchDevice();this.mouseInput.delta$.pipe(et(this._onRemoved$),On(()=>o||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)).subscribe(a=>{s=Tr.add(s,a)}),this.camera.tick$.pipe(et(this._onRemoved$)).subscribe(()=>{let a=i;this.options.ignoreKeyboardUnlessPointerLocked&&!this.mouseInput.isPointerLocked&&(a={direction:{},rest:[!1,!1,!1,!1,!1]});let l=Object.assign({},_t.O);const[c,u,h,p,m]=a.rest;void 0!==a.direction.upDown&&(l.z=a.direction.upDown?-1:1),void 0!==a.direction.leftRight&&(l.x=a.direction.leftRight?-1:1),c!=u&&(l.y=u?-1:1),h!=p&&(this.camera.camera.fov+=h?1:-1);let g=this.options.movementOptions.speed;if(m&&(g*=2.5),this.camera.position=_t.add(this.camera.position,_t.rot(_t.scalarMult(_t.norm(l),g),this.camera.rotation)),0!=s.x||0!=s.y){const b=_t.toSpherical(_t.rot({x:0,y:0,z:-1},this.camera.rotation));b.theta-=s.x/300,b.phi+=s.y/300,b.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,b.phi)),this.camera.rotation=zr.lookAt(this.camera.position,_t.add(this.camera.position,_t.fromSpherical(b))),s=Tr.O}}),yield this.mouseInput.start(),yield this.directionsInput.start()})}onRemoved(){const e=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return JV(this,void 0,void 0,function*(){yield e.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var tz=function(n,e,t,i){return new(t||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})};const Rne={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class Pne extends Fy{constructor(e,t={}){super(),this.camera=e,this.tickOrder=jl.INPUT_CONTROLLERS,this.spherical={phi:0,radius:10,theta:0},this.target=_t.O,this.options=Object.assign(Object.assign({},Rne),t),this.mouseInput=new Am(this.options.mouseOptions)}get radius(){return this.spherical.radius}set radius(e){this.spherical.radius=e}get phi(){return this.spherical.phi}set phi(e){this.spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,e))}get theta(){return this.spherical.theta}set theta(e){this.spherical.theta=e}onSpawned(e){const t=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return tz(this,void 0,void 0,function*(){yield t.onSpawned.call(this,e),this.spherical=_t.toSpherical(_t.sub(this.camera.position,this.target)),this.options.orbiting&&this.mouseInput.delta$.pipe(et(this._onRemoved$),On(()=>this.mouseInput.state==ys.DRAG)).subscribe(r=>{this.spherical.theta-=r.x*this.options.orbiting.sensitivityX*Math.PI/900,this.spherical.phi-=r.y*this.options.orbiting.sensitivityY*Math.PI/900,this.spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.spherical.phi))}),this.options.zooming&&this.mouseInput.wheel$.pipe(et(this._onRemoved$)).subscribe(r=>{0!=r&&(this.spherical.radius*=Math.pow(.95,this.options.zooming.sensitivity*(r>0?-1:1)))});const i=r=>{const s=_t.fromSpherical(this.spherical),o=_t.rotAround(s,{x:-Math.sin(this.spherical.theta),y:Math.cos(this.spherical.theta),z:0},Math.PI/2),a=_t.rotAround(s,_t.norm(o),Math.PI/2);this.target=_t.add(this.target,_t.add(_t.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),_t.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(et(this._onRemoved$),On(()=>this.mouseInput.state==ys.DRAG_RIGHT_BUTTON)).subscribe(r=>{i(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(et(this._onRemoved$),On(()=>this.mouseInput.state==ys.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this.spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),Am.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(et(this._onRemoved$)).subscribe(r=>{this.options.dollying&&(this.spherical.radius*=Math.pow(.95,this.options.dollying.sensitivity*r.distanceDelta/10)),this.options.panning&&i(r.centerPointDelta)}),this.camera.tick$.pipe(et(this._onRemoved$),Ye(()=>this.spherical)).subscribe(r=>{this.camera.position=_t.add(this.target,_t.fromSpherical(r)),this.camera.rotation=zr.lookAt(this.camera.position,this.target)}),yield this.mouseInput.start()})}onRemoved(){const e=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return tz(this,void 0,void 0,function*(){yield e.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class One{randomColor(){return Math.floor(256*Math.random())<<16|Math.floor(256*Math.random())<<8|Math.floor(256*Math.random())}createPlane(e={}){return this.createPrimitive({shape:"PLANE"},e)}createBox(e,t={}){return this.createPrimitive({shape:"BOX",dimensions:e},t)}createCapsule(e,t,i={}){return this.createPrimitive({shape:"CAPSULE",radius:e,centersDistance:t},i)}createCylinder(e,t,i={}){return this.createPrimitive({shape:"CYLINDER",radius:e,height:t},i)}createCone(e,t,i={}){return this.createPrimitive({shape:"CONE",radius:e,height:t},i)}createSphere(e,t={}){return this.createPrimitive({shape:"SPHERE",radius:e},t)}}var pR=function(n,e,t,i){return new(t||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})},ru=(()=>{return(n=ru||(ru={}))[n.Nothing=0]="Nothing",n[n.Files=1]="Files",n[n.Entities=2]="Entities",ru;var n})();const nz={cachingStrategy:ru.Nothing,position:_t.O,rotation:zr.O,loadProps:!0},iz=n=>({meta:n.meta,resources:n.resources.map(({object3D:e,body:t})=>({object3D:e&&e.clone(),body:t&&t.clone()}))});class Lne{constructor(e){this.world=e,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(e,t=!1){return pR(this,void 0,void 0,function*(){if(t&&this.filesCache.has(e))return this.filesCache.get(e);const i=Promise.all([fetch(`${e}.glb`).then(s=>s.arrayBuffer()),fetch(`${e}.meta`).then(s=>s.text()).then(s=>JSON.parse(s))]);t&&this.filesCache.set(e,i);const r=yield i;return t&&this.filesCache.set(e,r),r})}loadGgGlbResources(e,t=ru.Nothing){return pR(this,void 0,void 0,function*(){if(t==ru.Entities&&this.loadResultCache.has(e)){const l=this.loadResultCache.get(e),c=l instanceof Promise?yield l:l;return iz(c)}const[i,r]=yield this.loadGgGlbFiles(e,t==ru.Files);if(!i)throw new Error("GLB not found");const[s,o]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(i,r),this.world.physicsWorld.loader.loadFromGgGlb(i,r)]),a={resources:[],meta:r};if(!s)return a;if(0==o.length)a.resources.push({object3D:s,body:null});else if(1==o.length)a.resources.push({object3D:s,body:o[0]});else{for(const l of o)a.resources.push({object3D:s.popChild(l.name),body:l});s.isEmpty()||a.resources.push({object3D:s,body:null})}return t==ru.Entities&&this.loadResultCache.set(e,iz(a)),a})}loadGgGlb(e,t=nz){return pR(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},nz),t),{resources:r,meta:s}=yield this.loadGgGlbResources(e,i.cachingStrategy),o={entities:r.map(({object3D:a,body:l})=>new iu(a,l)),meta:s};return i.loadProps&&(o.props=yield Promise.all(s.dummies.filter(a=>a.is_prop||a.is_scene).map(a=>this.loadGgGlb(a.is_prop?(i.propsPath||e.substring(0,e.lastIndexOf("/")+1))+a.prop_id:a.scene_id,{loadProps:!!a.is_scene,position:_t.add(_t.rot(a.position,i.rotation),i.position),rotation:zr.combineRotations(a.rotation,i.rotation)})))),o.entities.forEach(a=>{a.position=_t.add(_t.rot(_t.clone(a.position),i.rotation),i.position),a.rotation=zr.mult(zr.clone(a.rotation),i.rotation)}),o})}}class rz extends nS{constructor(e,t){super(e,t),this.visualScene=e,this.physicsWorld=t,this.loader=new Lne(this),window.ggstatic&&window.ggstatic.registerConsoleCommand(this,"ph_gravity",(...i)=>function(n,e,t,i){return new(t||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})}(this,void 0,void 0,function*(){return 1==i.length&&(i=["0","0",""+-+i[0]]),i.length>0&&(this.physicsWorld.gravity={x:+i[0],y:+i[1],z:+i[2]}),JSON.stringify(this.physicsWorld.gravity)}),'args: [float] or [float float float]; change 3D world gravity vector. 1 argument means {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}addPrimitiveRigidBody(e,t=_t.O,i=zr.O,r={}){const s=new iu(this.visualScene.factory.createPrimitive(e.shape,r),this.physicsWorld.factory.createRigidBody(e));return s.position=t,s.rotation=i,this.addEntity(s),s}addRenderer(e,t,i){const r=new Tne(this.visualScene.createRenderer(e,t,i));return this.addEntity(r),r}}class Bne{constructor(){this.output="\n \u2584\u2588\u2588\u2588\u2588 \u2584\u2588\u2588\u2588\u2588 \u2588 \u2588\u2591\u2593\u2588\u2588\u2588\u2588\u2588 \u2584\u2584\u2584\u2584 \n \u2588\u2588\u2592 \u2580\u2588\u2592 \u2588\u2588\u2592 \u2580\u2588\u2592 \u2593\u2588\u2591 \u2588 \u2591\u2588\u2591\u2593\u2588 \u2580 \u2593\u2588\u2588\u2588\u2588\u2588\u2584 \n \u2592\u2588\u2588\u2591\u2584\u2584\u2584\u2591\u2592\u2588\u2588\u2591\u2584\u2584\u2584\u2591 \u2592\u2588\u2591 \u2588 \u2591\u2588 \u2592\u2588\u2588\u2588 \u2592\u2588\u2588\u2592 \u2584\u2588\u2588\n \u2591\u2593\u2588 \u2588\u2588\u2593\u2591\u2593\u2588 \u2588\u2588\u2593 \u2591\u2588\u2591 \u2588 \u2591\u2588 \u2592\u2593\u2588 \u2584 \u2592\u2588\u2588\u2591\u2588\u2580 \n \u2591\u2592\u2593\u2588\u2588\u2588\u2580\u2592\u2591\u2592\u2593\u2588\u2588\u2588\u2580\u2592 \u2591\u2591\u2588\u2588\u2592\u2588\u2588\u2593 \u2591\u2592\u2588\u2588\u2588\u2588\u2592\u2591\u2593\u2588 \u2580\u2588\u2593\n \u2591\u2592 \u2592 \u2591\u2592 \u2592 \u2591 \u2593\u2591\u2592 \u2592 \u2591\u2591 \u2592\u2591 \u2591\u2591\u2592\u2593\u2588\u2588\u2588\u2580\u2592\n \u2591 \u2591 \u2591 \u2591 \u2592 \u2591 \u2591 \u2591 \u2591 \u2591\u2592\u2591\u2592 \u2591 \n \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \n \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \n \u2591 \n >>> https://github.com/AndyGura/gg-web-engine <<<\nWelcome to GG web engine UI console. \nEnter command in input below.\n\nList of available commands: ".replace(/ /g," ")+'ls_commands',this.commandHistory=[],this.currentCommandIndex=0,this.elements=null}get isUIShown(){return!!this.elements}createUI(){if(this.elements)return;const e=document.createElement("div");e.innerHTML="\n
\n CONSOLE\n X\n
\n
\n ",e.style.position="absolute",e.style.zIndex="1000",e.style.backgroundColor="#343434",e.style.width="640px",e.style.height="480px",e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="stretch",e.style.padding="0.1rem",e.style.rowGap="3px",e.style.fontSize="14px",e.style.fontFamily="monospace",e.style.fontWeight="bold",e.style.color="white",e.style.textAlign="left",document.body.append(e),this.elements={main:e,input:document.getElementById("gg-console-input"),output:document.getElementById("gg-console-output")},document.getElementById("gg-console-close-icon").onmousedown=()=>this.destroyUI(),this.elements.input.onkeydown=t=>{13===t?.keyCode?(t.preventDefault(),this.onInput().then()):38===t?.keyCode?(t.preventDefault(),this.onUsePreviousCommand()):40===t?.keyCode&&(t.preventDefault(),this.onUseNextCommand())},this.elements.input.oninput=t=>{var i;let r=(null===(i=this.elements)||void 0===i?void 0:i.input.value)||"";if(r.length>0&&null===t.data&&(r=r.substring(0,r.length-1)),""===r.trim())return;let s=window.ggstatic.availableCommands.find(o=>o[0].startsWith(r));s&&(this.elements.input.value=s[0],this.elements.input.setSelectionRange(r.length,this.elements.input.value.length))},this.stdout(),this.setupDragging(),setTimeout(()=>this.elements.input.focus(),20)}destroyUI(){this.elements&&(document.body.removeChild(this.elements.main),this.elements=null)}onUsePreviousCommand(){0!==this.commandHistory.length&&(this.currentCommandIndex--,this.currentCommandIndex<0&&(this.currentCommandIndex+=this.commandHistory.length),this.elements.input.value=this.commandHistory[this.currentCommandIndex%this.commandHistory.length])}onUseNextCommand(){0!==this.commandHistory.length&&(this.currentCommandIndex++,this.elements.input.value=this.commandHistory[this.currentCommandIndex%this.commandHistory.length])}onInput(){return n=this,e=void 0,i=function*(){const e=this.elements.input.value;this.elements.input.value="",this.stdout("\n> "+e),this.stdout("\n"+(yield window.ggstatic.console(e))),this.commandHistory.push(e),this.currentCommandIndex=this.commandHistory.length},new((t=void 0)||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())});var n,e,t,i}stdout(e=""){this.output+=e,this.elements.output.innerHTML=this.output.replace(/\n/g,"
"),this.elements.output.scrollTop=this.elements.output.scrollHeight}setupDragging(){let e=0,t=0;const r=o=>{if(!this.elements)return void s();o.preventDefault();const a=e-o.clientX,l=t-o.clientY;e=o.clientX,t=o.clientY,this.elements.main.style.left=this.elements.main.offsetLeft-a+"px",this.elements.main.style.top=this.elements.main.offsetTop-l+"px"},s=()=>{document.onmouseup=null,document.onmousemove=null};document.getElementById("gg-console-header").onmousedown=o=>{(o=o||window.event).preventDefault(),e=o.clientX,t=o.clientY,document.onmouseup=s,document.onmousemove=r}}}var Une=qr(738),Vne=qr.n(Une);class zne{constructor(){this.ui={stats:null,debugControlsContainer:null},this.statsRemoved$=new Ue,this.currentWorld=null,this.debugControlsRemoved$=new Ue}get showStats(){return!!this.ui.stats}setShowStats(e,t){if(t===this.showStats){if(!t||this.currentWorld===e)return;this.setShowStats(this.currentWorld,!1)}if(this.currentWorld=e,t){const i=new(Vne());this.ui.stats=i,i.dom.style.left="unset",i.dom.style.right="0",i.showPanel(0),document.body.appendChild(i.dom),eS(e,-1).pipe(et(this.statsRemoved$)).subscribe(()=>{i?.begin()}),eS(e,1e4).pipe(et(this.statsRemoved$)).subscribe(()=>{i?.end()})}else this.statsRemoved$.next(),document.body.removeChild(this.ui.stats.dom),this.ui.stats.end(),this.ui.stats=null}get showDebugControls(){return!!this.ui.debugControlsContainer}setShowDebugControls(e,t){if(t===this.showDebugControls){if(!t||this.currentWorld===e)return;this.setShowDebugControls(this.currentWorld,!1)}if(this.currentWorld=e,t){const i=document.createElement("div");this.ui.debugControlsContainer=i;const r="style='display:flex;align-items:center;margin:0.25rem;'";i.style.cssText="position:fixed;top:48px;right:0;opacity:0.9;z-index:9999;background-color:#333;color:white;display:flex;flex-direction:column",i.innerHTML=`\n
\n \n \n
`,document.body.appendChild(i),ba(document.getElementById("physics_debugger_checkbox_id"),"change").pipe(et(this.debugControlsRemoved$)).subscribe(s=>{try{this.currentWorld.physicsDebugViewActive=s.target.checked}catch(o){console.error(o)}s.target.checked=this.currentWorld.physicsDebugViewActive})}else this.debugControlsRemoved$.next(),document.body.removeChild(this.ui.debugControlsContainer),this.ui.debugControlsContainer=null}}var Uy=function(n,e,t,i){return new(t||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})};class Tm{constructor(){this.debuggerUI=new zne,this.consoleUI=new Bne,this._devConsoleEnabled=!1,this.consoleKeyPressEventListener=e=>{"Backquote"===e.code&&(e.preventDefault(),this.consoleUI.isUIShown?this.consoleUI.destroyUI():this.consoleUI.createUI())},this._selectedWorld=null,this.consoleCommands=new Map,this.registerConsoleCommand(null,"ls_commands",()=>Uy(this,void 0,void 0,function*(){return this.availableCommands.map(([e,t])=>`${e}${t.doc?'\t// '+t.doc+"":""}`).sort().join("\n\n")}),"no args; print all available commands"),this.registerConsoleCommand(null,"ls_worlds",()=>Uy(this,void 0,void 0,function*(){return nS.documentWorlds.map(e=>e===this.selectedWorld?`* ${e.name}`:` ${e.name}`).join("\n")}),"no args; print all available worlds"),this.registerConsoleCommand(null,"select_world",(...e)=>Uy(this,void 0,void 0,function*(){var t;for(const i of nS.documentWorlds)if(i.name===e[0]){this._selectedWorld=i;break}return(null===(t=this.selectedWorld)||void 0===t?void 0:t.name)||"null"}),"args: [string]; select world by name")}static get instance(){return Tm._instance||(Tm._instance=new Tm),Tm._instance}get devConsoleEnabled(){return this._devConsoleEnabled}set devConsoleEnabled(e){this._devConsoleEnabled!==e&&(this._devConsoleEnabled=e,e?addEventListener("keypress",this.consoleKeyPressEventListener):(removeEventListener("keypress",this.consoleKeyPressEventListener),this.consoleUI.isUIShown&&this.consoleUI.destroyUI()))}get showStats(){return this.debuggerUI.showStats}set showStats(e){this.debuggerUI.setShowStats(this.selectedWorld,e)}get showDebugControls(){return this.debuggerUI.showDebugControls}set showDebugControls(e){this.debuggerUI.setShowDebugControls(this.selectedWorld,e)}get selectedWorld(){return this._selectedWorld||nS.documentWorlds[0]||null}get availableCommands(){let e=this.consoleCommands.get(null)||{};return this.selectedWorld&&(e=Object.assign(Object.assign({},this.consoleCommands.get(this.selectedWorld)||{}),e)),Object.entries(e)}registerConsoleCommand(e,t,i,r){let s={};this.consoleCommands.has(e)?s=this.consoleCommands.get(e):this.consoleCommands.set(e,s),s[t]={handler:i,doc:r}}deregisterWorldCommands(e){this.consoleCommands.delete(e)}console(e){return Uy(this,void 0,void 0,function*(){const t=e.split("\n");let i=[];for(const r of t){const s=r.split(" ");i.push(yield this.runConsoleCommand(s.splice(0,1)[0],s))}return i.join("\n")})}runConsoleCommand(e,t){return Uy(this,void 0,void 0,function*(){let i=(this.consoleCommands.get(null)||{})[e];if(!i&&(i=(this.consoleCommands.get(this.selectedWorld)||{})[e],!i))return`Unrecognized command: ${e}`;try{return yield i.handler(...t)}catch(r){return`${r}`}})}}window.ggstatic=Tm.instance;const Hne=0,sz=1,Gne=2,oz=1,az=2,$c=3,Xl=0,vo=1,Vo=2,su=0,Dm=1,lz=2,cz=3,dz=4,Wne=5,Oh=100,$ne=101,jne=102,uz=103,hz=104,Xne=200,qne=201,Yne=202,Kne=203,gR=204,_R=205,Zne=206,Qne=207,Jne=208,eie=209,tie=210,nie=211,iie=212,rie=213,sie=214,oie=0,aie=1,lie=2,iS=3,cie=4,die=5,uie=6,hie=7,rS=0,fie=1,pie=2,ou=0,mie=1,gie=2,_ie=3,vie=4,yie=5,bie=6,fz="attached",jc=301,Lh=302,sS=303,oS=304,Vy=306,ql=1e3,qi=1001,zy=1002,Ni=1003,aS=1004,Hy=1005,Yi=1006,yR=1007,Xc=1008,au=1009,wie=1010,Mie=1011,bR=1012,pz=1013,lu=1014,Yl=1015,Gy=1016,mz=1017,gz=1018,Fh=1020,Sie=1021,zo=1023,Cie=1024,Eie=1025,Nh=1026,Im=1027,Aie=1028,_z=1029,Tie=1030,vz=1031,yz=1033,xR=33776,wR=33777,MR=33778,SR=33779,bz=35840,xz=35841,wz=35842,Mz=35843,Sz=36196,Cz=37492,Ez=37496,Az=37808,Tz=37809,Dz=37810,Iz=37811,Rz=37812,Pz=37813,kz=37814,Oz=37815,Lz=37816,Fz=37817,Nz=37818,Bz=37819,Uz=37820,Vz=37821,CR=36492,zz=36494,Hz=36495,Die=36283,Gz=36284,Wz=36285,$z=36286,Wy=2300,Rm=2301,kie=0,Xz=1,TR=2,cu=3001,Lie=3201,Bh=0,Fie=1,wa="",Ei="srgb",Hr="srgb-linear",DR="display-p3",cS="display-p3-linear",dS="linear",Ai="srgb",uS="rec709",hS="p3",Om=7680,Nie=512,Bie=513,Uie=514,Kz=515,Vie=516,zie=517,Hie=518,Gie=519,Zz="300 es",IR=1035,Kl=2e3;class Lm{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const i=this._listeners;void 0===i[e]&&(i[e]=[]),-1===i[e].indexOf(t)&&i[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const i=this._listeners;return void 0!==i[e]&&-1!==i[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const r=this._listeners[e];if(void 0!==r){const s=r.indexOf(t);-1!==s&&r.splice(s,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const i=this._listeners[e.type];if(void 0!==i){e.target=this;const r=i.slice(0);for(let s=0,o=r.length;s>8&255]+bs[n>>16&255]+bs[n>>24&255]+"-"+bs[255&e]+bs[e>>8&255]+"-"+bs[e>>16&15|64]+bs[e>>24&255]+"-"+bs[63&t|128]+bs[t>>8&255]+"-"+bs[t>>16&255]+bs[t>>24&255]+bs[255&i]+bs[i>>8&255]+bs[i>>16&255]+bs[i>>24&255]).toLowerCase()}function Ki(n,e,t){return Math.max(e,Math.min(t,n))}function RR(n,e){return(n%e+e)%e}function jy(n,e,t){return(1-t)*n+t*e}function PR(n){return 0==(n&n-1)&&0!==n}function pS(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function yo(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function mn(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(4294967295*n);case Uint16Array:return Math.round(65535*n);case Uint8Array:return Math.round(255*n);case Int32Array:return Math.round(2147483647*n);case Int16Array:return Math.round(32767*n);case Int8Array:return Math.round(127*n);default:throw new Error("Invalid component type.")}}const rre_radToDeg=function tre(n){return n*Fm};class Ce{constructor(e=0,t=0){Ce.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){const t=this.x,i=this.y,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6],this.y=r[1]*t+r[4]*i+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(Ki(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),r=Math.sin(t),s=this.x-e.x,o=this.y-e.y;return this.x=s*i-o*r+e.x,this.y=s*r+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class wn{constructor(e,t,i,r,s,o,a,l,c){wn.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,t,i,r,s,o,a,l,c)}set(e,t,i,r,s,o,a,l,c){const u=this.elements;return u[0]=e,u[1]=r,u[2]=a,u[3]=t,u[4]=s,u[5]=l,u[6]=i,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const 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){const i=e.elements,r=t.elements,s=this.elements,o=i[0],a=i[3],l=i[6],c=i[1],u=i[4],h=i[7],p=i[2],m=i[5],g=i[8],b=r[0],y=r[3],v=r[6],M=r[1],x=r[4],S=r[7],P=r[2],A=r[5],R=r[8];return s[0]=o*b+a*M+l*P,s[3]=o*y+a*x+l*A,s[6]=o*v+a*S+l*R,s[1]=c*b+u*M+h*P,s[4]=c*y+u*x+h*A,s[7]=c*v+u*S+h*R,s[2]=p*b+m*M+g*P,s[5]=p*y+m*x+g*A,s[8]=p*v+m*S+g*R,this}multiplyScalar(e){const 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(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return t*o*u-t*a*c-i*s*u+i*a*l+r*s*c-r*o*l}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=u*o-a*c,p=a*l-u*s,m=c*s-o*l,g=t*h+i*p+r*m;if(0===g)return this.set(0,0,0,0,0,0,0,0,0);const b=1/g;return e[0]=h*b,e[1]=(r*c-u*i)*b,e[2]=(a*i-r*o)*b,e[3]=p*b,e[4]=(u*t-r*l)*b,e[5]=(r*s-a*t)*b,e[6]=m*b,e[7]=(i*l-c*t)*b,e[8]=(o*t-i*s)*b,this}transpose(){let e;const 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){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,r,s,o,a){const l=Math.cos(s),c=Math.sin(s);return this.set(i*l,i*c,-i*(l*o+c*a)+o+e,-r*c,r*l,-r*(-c*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(kR.makeScale(e,t)),this}rotate(e){return this.premultiply(kR.makeRotation(-e)),this}translate(e,t){return this.premultiply(kR.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){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<9;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}const kR=new wn;function Jz(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}function Xy(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function ore(){const n=Xy("canvas");return n.style.display="block",n}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const eH={};function qy(n){n in eH||(eH[n]=!0,console.warn(n))}const tH=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),nH=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),mS={[Hr]:{transfer:dS,primaries:uS,toReference:n=>n,fromReference:n=>n},[Ei]:{transfer:Ai,primaries:uS,toReference:n=>n.convertSRGBToLinear(),fromReference:n=>n.convertLinearToSRGB()},[cS]:{transfer:dS,primaries:hS,toReference:n=>n.applyMatrix3(nH),fromReference:n=>n.applyMatrix3(tH)},[DR]:{transfer:Ai,primaries:hS,toReference:n=>n.convertSRGBToLinear().applyMatrix3(nH),fromReference:n=>n.applyMatrix3(tH).convertLinearToSRGB()}},are=new Set([Hr,cS]),ii={enabled:!0,_workingColorSpace:Hr,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(n){if(!are.has(n))throw new Error(`Unsupported working color space, "${n}".`);this._workingColorSpace=n},convert:function(n,e,t){return!1!==this.enabled&&e!==t&&e&&t?(0,mS[t].fromReference)((0,mS[e].toReference)(n)):n},fromWorkingColorSpace:function(n,e){return this.convert(n,this._workingColorSpace,e)},toWorkingColorSpace:function(n,e){return this.convert(n,e,this._workingColorSpace)},getPrimaries:function(n){return mS[n].primaries},getTransfer:function(n){return n===wa?dS:mS[n].transfer}};function Bm(n){return n<.04045?.0773993808*n:Math.pow(.9478672986*n+.0521327014,2.4)}function OR(n){return n<.0031308?12.92*n:1.055*Math.pow(n,.41666)-.055}let Um;class iH{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===Um&&(Um=Xy("canvas")),Um.width=e.width,Um.height=e.height;const i=Um.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=Um}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=Xy("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height),s=r.data;for(let o=0;o{class n extends Lm{constructor(t=n.DEFAULT_IMAGE,i=n.DEFAULT_MAPPING,r=qi,s=qi,o=Yi,a=Xc,l=zo,c=au,u=n.DEFAULT_ANISOTROPY,h=wa){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:cre++}),this.uuid=Ho(),this.name="",this.source=new Vm(t),this.mipmaps=[],this.mapping=i,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=u,this.format=l,this.internalFormat=null,this.type=c,this.offset=new Ce(0,0),this.repeat=new Ce(1,1),this.center=new Ce(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,"string"==typeof h?this.colorSpace=h:(qy("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=h===cu?Ei:wa),this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}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)}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.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}toJSON(t){const i=void 0===t||"string"==typeof t;if(!i&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];const r={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(r.userData=this.userData),i||(t.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(300!==this.mapping)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case ql:t.x=t.x-Math.floor(t.x);break;case qi:t.x=t.x<0?0:1;break;case zy:t.x=1===Math.abs(Math.floor(t.x)%2)?Math.ceil(t.x)-t.x:t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case ql:t.y=t.y-Math.floor(t.y);break;case qi:t.y=t.y<0?0:1;break;case zy:t.y=1===Math.abs(Math.floor(t.y)%2)?Math.ceil(t.y)-t.y:t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){!0===t&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return qy("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Ei?cu:3e3}set encoding(t){qy("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=t===cu?Ei:wa}}return n.DEFAULT_IMAGE=null,n.DEFAULT_MAPPING=300,n.DEFAULT_ANISOTROPY=1,n})();class ai{constructor(e=0,t=0,i=0,r=1){ai.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,r){return this.x=e,this.y=t,this.z=i,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?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){const t=this.x,i=this.y,r=this.z,s=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*r+o[12]*s,this.y=o[1]*t+o[5]*i+o[9]*r+o[13]*s,this.z=o[2]*t+o[6]*i+o[10]*r+o[14]*s,this.w=o[3]*t+o[7]*i+o[11]*r+o[15]*s,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,r,s;const l=e.elements,c=l[0],u=l[4],h=l[8],p=l[1],m=l[5],g=l[9],b=l[2],y=l[6],v=l[10];if(Math.abs(u-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-y)<.01){if(Math.abs(u+p)<.1&&Math.abs(h+b)<.1&&Math.abs(g+y)<.1&&Math.abs(c+m+v-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const x=(c+1)/2,S=(m+1)/2,P=(v+1)/2,A=(u+p)/4,R=(h+b)/4,V=(g+y)/4;return x>S&&x>P?x<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(x),r=A/i,s=R/i):S>P?S<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(S),i=A/r,s=V/r):P<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(P),i=R/s,r=V/s),this.set(i,r,s,t),this}let M=Math.sqrt((y-g)*(y-g)+(h-b)*(h-b)+(p-u)*(p-u));return Math.abs(M)<.001&&(M=1),this.x=(y-g)/M,this.y=(h-b)/M,this.z=(p-u)/M,this.w=Math.acos((c+m+v-1)/2),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=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class dre extends Lm{constructor(e=1,t=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new ai(0,0,e,t),this.scissorTest=!1,this.viewport=new ai(0,0,e,t);const r={width:e,height:t,depth:1};void 0!==i.encoding&&(qy("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),i.colorSpace=i.encoding===cu?Ei:wa),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Yi,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},i),this.texture=new sl(r,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=i.generateMipmaps,this.texture.internalFormat=i.internalFormat,this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.depthTexture=i.depthTexture,this.samples=i.samples}setSize(e,t,i=1){(this.width!==e||this.height!==t||this.depth!==i)&&(this.width=e,this.height=t,this.depth=i,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=i,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.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new Vm(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Vh extends dre{constructor(e=1,t=1,i={}){super(e,t,i),this.isWebGLRenderTarget=!0}}class FR extends sl{constructor(e=null,t=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=Ni,this.minFilter=Ni,this.wrapR=qi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class rH extends sl{constructor(e=null,t=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=Ni,this.minFilter=Ni,this.wrapR=qi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Qs{constructor(e=0,t=0,i=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=r}static slerpFlat(e,t,i,r,s,o,a){let l=i[r+0],c=i[r+1],u=i[r+2],h=i[r+3];const p=s[o+0],m=s[o+1],g=s[o+2],b=s[o+3];if(0===a)return e[t+0]=l,e[t+1]=c,e[t+2]=u,void(e[t+3]=h);if(1===a)return e[t+0]=p,e[t+1]=m,e[t+2]=g,void(e[t+3]=b);if(h!==b||l!==p||c!==m||u!==g){let y=1-a;const v=l*p+c*m+u*g+h*b,M=v>=0?1:-1,x=1-v*v;if(x>Number.EPSILON){const P=Math.sqrt(x),A=Math.atan2(P,v*M);y=Math.sin(y*A)/P,a=Math.sin(a*A)/P}const S=a*M;if(l=l*y+p*S,c=c*y+m*S,u=u*y+g*S,h=h*y+b*S,y===1-a){const P=1/Math.sqrt(l*l+c*c+u*u+h*h);l*=P,c*=P,u*=P,h*=P}}e[t]=l,e[t+1]=c,e[t+2]=u,e[t+3]=h}static multiplyQuaternionsFlat(e,t,i,r,s,o){const a=i[r],l=i[r+1],c=i[r+2],u=i[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return e[t]=a*g+u*h+l*m-c*p,e[t+1]=l*g+u*p+c*h-a*m,e[t+2]=c*g+u*m+a*p-l*h,e[t+3]=u*g-a*h-l*p-c*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,r){return this._x=e,this._y=t,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const i=e._x,r=e._y,s=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(i/2),u=a(r/2),h=a(s/2),p=l(i/2),m=l(r/2),g=l(s/2);switch(o){case"XYZ":this._x=p*u*h+c*m*g,this._y=c*m*h-p*u*g,this._z=c*u*g+p*m*h,this._w=c*u*h-p*m*g;break;case"YXZ":this._x=p*u*h+c*m*g,this._y=c*m*h-p*u*g,this._z=c*u*g-p*m*h,this._w=c*u*h+p*m*g;break;case"ZXY":this._x=p*u*h-c*m*g,this._y=c*m*h+p*u*g,this._z=c*u*g+p*m*h,this._w=c*u*h-p*m*g;break;case"ZYX":this._x=p*u*h-c*m*g,this._y=c*m*h+p*u*g,this._z=c*u*g-p*m*h,this._w=c*u*h+p*m*g;break;case"YZX":this._x=p*u*h+c*m*g,this._y=c*m*h+p*u*g,this._z=c*u*g-p*m*h,this._w=c*u*h-p*m*g;break;case"XZY":this._x=p*u*h-c*m*g,this._y=c*m*h-p*u*g,this._z=c*u*g+p*m*h,this._w=c*u*h+p*m*g;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return!0===t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],r=t[4],s=t[8],o=t[1],a=t[5],l=t[9],c=t[2],u=t[6],h=t[10],p=i+a+h;if(p>0){const m=.5/Math.sqrt(p+1);this._w=.25/m,this._x=(u-l)*m,this._y=(s-c)*m,this._z=(o-r)*m}else if(i>a&&i>h){const m=2*Math.sqrt(1+i-a-h);this._w=(u-l)/m,this._x=.25*m,this._y=(r+o)/m,this._z=(s+c)/m}else if(a>h){const m=2*Math.sqrt(1+a-i-h);this._w=(s-c)/m,this._x=(r+o)/m,this._y=.25*m,this._z=(l+u)/m}else{const m=2*Math.sqrt(1+h-i-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+u)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Ki(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(0===i)return this;const r=Math.min(1,t/i);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(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){const i=e._x,r=e._y,s=e._z,o=e._w,a=t._x,l=t._y,c=t._z,u=t._w;return this._x=i*u+o*a+r*c-s*l,this._y=r*u+o*l+s*a-i*c,this._z=s*u+o*c+i*l-r*a,this._w=o*u-i*a-r*l-s*c,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const i=this._x,r=this._y,s=this._z,o=this._w;let a=o*e._w+i*e._x+r*e._y+s*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=r,this._z=s,this;const l=1-a*a;if(l<=Number.EPSILON){const m=1-t;return this._w=m*o+t*this._w,this._x=m*i+t*this._x,this._y=m*r+t*this._y,this._z=m*s+t*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),h=Math.sin((1-t)*u)/c,p=Math.sin(t*u)/c;return this._w=o*h+this._w*p,this._x=i*h+this._x*p,this._y=r*h+this._y*p,this._z=s*h+this._z*p,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=Math.random(),t=Math.sqrt(1-e),i=Math.sqrt(e),r=2*Math.PI*Math.random(),s=2*Math.PI*Math.random();return this.set(t*Math.cos(r),i*Math.sin(s),i*Math.cos(s),t*Math.sin(r))}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}}class N{constructor(e=0,t=0,i=0){N.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return void 0===i&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(sH.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(sH.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6]*r,this.y=s[1]*t+s[4]*i+s[7]*r,this.z=s[2]*t+s[5]*i+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=e.elements,o=1/(s[3]*t+s[7]*i+s[11]*r+s[15]);return this.x=(s[0]*t+s[4]*i+s[8]*r+s[12])*o,this.y=(s[1]*t+s[5]*i+s[9]*r+s[13])*o,this.z=(s[2]*t+s[6]*i+s[10]*r+s[14])*o,this}applyQuaternion(e){const t=this.x,i=this.y,r=this.z,s=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*r-a*i),u=2*(a*t-s*r),h=2*(s*i-o*t);return this.x=t+l*c+o*h-a*u,this.y=i+l*u+a*c-s*h,this.z=r+l*h+s*u-o*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*r,this.y=s[1]*t+s[5]*i+s[9]*r,this.z=s[2]*t+s[6]*i+s[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=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,r=e.y,s=e.z,o=t.x,a=t.y,l=t.z;return this.x=r*l-s*a,this.y=s*o-i*l,this.z=i*a-r*o,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return NR.copy(this).projectOnVector(e),this.sub(NR)}reflect(e){return this.sub(NR.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(Ki(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+i*i+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}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(){const e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(t),this.y=i*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const NR=new N,sH=new Qs;class xs{constructor(e=new N(1/0,1/0,1/0),t=new N(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.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.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,ol),ol.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Yy),_S.subVectors(this.max,Yy),zm.subVectors(e.a,Yy),Hm.subVectors(e.b,Yy),Gm.subVectors(e.c,Yy),du.subVectors(Hm,zm),uu.subVectors(Gm,Hm),zh.subVectors(zm,Gm);let t=[0,-du.z,du.y,0,-uu.z,uu.y,0,-zh.z,zh.y,du.z,0,-du.x,uu.z,0,-uu.x,zh.z,0,-zh.x,-du.y,du.x,0,-uu.y,uu.x,0,-zh.y,zh.x,0];return!(!BR(t,zm,Hm,Gm,_S)||(t=[1,0,0,0,1,0,0,0,1],!BR(t,zm,Hm,Gm,_S)))&&(vS.crossVectors(du,uu),t=[vS.x,vS.y,vS.z],BR(t,zm,Hm,Gm,_S))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,ol).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(ol).length()),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()||(qc[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),qc[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),qc[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),qc[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),qc[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),qc[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),qc[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),qc[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(qc)),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)}}const qc=[new N,new N,new N,new N,new N,new N,new N,new N],ol=new N,gS=new xs,zm=new N,Hm=new N,Gm=new N,du=new N,uu=new N,zh=new N,Yy=new N,_S=new N,vS=new N,Hh=new N;function BR(n,e,t,i,r){for(let s=0,o=n.length-3;s<=o;s+=3){Hh.fromArray(n,s);const a=r.x*Math.abs(Hh.x)+r.y*Math.abs(Hh.y)+r.z*Math.abs(Hh.z),l=e.dot(Hh),c=t.dot(Hh),u=i.dot(Hh);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const ure=new xs,Ky=new N,UR=new N;class ws{constructor(e=new N,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){const i=this.center;void 0!==t?i.copy(t):ure.setFromPoints(e).getCenter(i);let r=0;for(let s=0,o=e.length;sthis.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;Ky.subVectors(e,this.center);const t=Ky.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),r=.5*(i-this.radius);this.center.addScaledVector(Ky,r/i),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(UR.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Ky.copy(e.center).add(UR)),this.expandByPoint(Ky.copy(e.center).sub(UR))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Yc=new N,VR=new N,yS=new N,hu=new N,zR=new N,bS=new N,HR=new N;class Zy{constructor(e=new N,t=new N(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,Yc)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Yc.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Yc.copy(this.origin).addScaledVector(this.direction,t),Yc.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){VR.copy(e).add(t).multiplyScalar(.5),yS.copy(t).sub(e).normalize(),hu.copy(this.origin).sub(VR);const s=.5*e.distanceTo(t),o=-this.direction.dot(yS),a=hu.dot(this.direction),l=-hu.dot(yS),c=hu.lengthSq(),u=Math.abs(1-o*o);let h,p,m,g;if(u>0)if(h=o*l-a,p=o*a-l,g=s*u,h>=0)if(p>=-g)if(p<=g){const b=1/u;h*=b,p*=b,m=h*(h+o*p+2*a)+p*(o*h+p+2*l)+c}else p=s,h=Math.max(0,-(o*p+a)),m=-h*h+p*(p+2*l)+c;else p=-s,h=Math.max(0,-(o*p+a)),m=-h*h+p*(p+2*l)+c;else p<=-g?(h=Math.max(0,-(-o*s+a)),p=h>0?-s:Math.min(Math.max(-s,-l),s),m=-h*h+p*(p+2*l)+c):p<=g?(h=0,p=Math.min(Math.max(-s,-l),s),m=p*(p+2*l)+c):(h=Math.max(0,-(o*s+a)),p=h>0?s:Math.min(Math.max(-s,-l),s),m=-h*h+p*(p+2*l)+c);else p=o>0?-s:s,h=Math.max(0,-(o*p+a)),m=-h*h+p*(p+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,h),r&&r.copy(VR).addScaledVector(yS,p),m}intersectSphere(e,t){Yc.subVectors(e.center,this.origin);const i=Yc.dot(this.direction),r=Yc.dot(Yc)-i*i,s=e.radius*e.radius;if(r>s)return null;const o=Math.sqrt(s-r),a=i-o,l=i+o;return l<0?null:this.at(a<0?l:a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return null===i?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,r,s,o,a,l;const c=1/this.direction.x,u=1/this.direction.y,h=1/this.direction.z,p=this.origin;return c>=0?(i=(e.min.x-p.x)*c,r=(e.max.x-p.x)*c):(i=(e.max.x-p.x)*c,r=(e.min.x-p.x)*c),u>=0?(s=(e.min.y-p.y)*u,o=(e.max.y-p.y)*u):(s=(e.max.y-p.y)*u,o=(e.min.y-p.y)*u),i>o||s>r||((s>i||isNaN(i))&&(i=s),(o=0?(a=(e.min.z-p.z)*h,l=(e.max.z-p.z)*h):(a=(e.max.z-p.z)*h,l=(e.min.z-p.z)*h),i>l||a>r)||((a>i||i!=i)&&(i=a),(l=0?i:r,t)}intersectsBox(e){return null!==this.intersectBox(e,Yc)}intersectTriangle(e,t,i,r,s){zR.subVectors(t,e),bS.subVectors(i,e),HR.crossVectors(zR,bS);let a,o=this.direction.dot(HR);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}hu.subVectors(this.origin,e);const l=a*this.direction.dot(bS.crossVectors(hu,bS));if(l<0)return null;const c=a*this.direction.dot(zR.cross(hu));if(c<0||l+c>o)return null;const u=-a*hu.dot(HR);return u<0?null:this.at(u/o,s)}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)}}class kt{constructor(e,t,i,r,s,o,a,l,c,u,h,p,m,g,b,y){kt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==e&&this.set(e,t,i,r,s,o,a,l,c,u,h,p,m,g,b,y)}set(e,t,i,r,s,o,a,l,c,u,h,p,m,g,b,y){const v=this.elements;return v[0]=e,v[4]=t,v[8]=i,v[12]=r,v[1]=s,v[5]=o,v[9]=a,v[13]=l,v[2]=c,v[6]=u,v[10]=h,v[14]=p,v[3]=m,v[7]=g,v[11]=b,v[15]=y,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 kt).fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,r=1/Wm.setFromMatrixColumn(e,0).length(),s=1/Wm.setFromMatrixColumn(e,1).length(),o=1/Wm.setFromMatrixColumn(e,2).length();return t[0]=i[0]*r,t[1]=i[1]*r,t[2]=i[2]*r,t[3]=0,t[4]=i[4]*s,t[5]=i[5]*s,t[6]=i[6]*s,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,r=e.y,s=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(r),c=Math.sin(r),u=Math.cos(s),h=Math.sin(s);if("XYZ"===e.order){const p=o*u,m=o*h,g=a*u,b=a*h;t[0]=l*u,t[4]=-l*h,t[8]=c,t[1]=m+g*c,t[5]=p-b*c,t[9]=-a*l,t[2]=b-p*c,t[6]=g+m*c,t[10]=o*l}else if("YXZ"===e.order){const p=l*u,m=l*h,g=c*u,b=c*h;t[0]=p+b*a,t[4]=g*a-m,t[8]=o*c,t[1]=o*h,t[5]=o*u,t[9]=-a,t[2]=m*a-g,t[6]=b+p*a,t[10]=o*l}else if("ZXY"===e.order){const p=l*u,m=l*h,g=c*u,b=c*h;t[0]=p-b*a,t[4]=-o*h,t[8]=g+m*a,t[1]=m+g*a,t[5]=o*u,t[9]=b-p*a,t[2]=-o*c,t[6]=a,t[10]=o*l}else if("ZYX"===e.order){const p=o*u,m=o*h,g=a*u,b=a*h;t[0]=l*u,t[4]=g*c-m,t[8]=p*c+b,t[1]=l*h,t[5]=b*c+p,t[9]=m*c-g,t[2]=-c,t[6]=a*l,t[10]=o*l}else if("YZX"===e.order){const p=o*l,m=o*c,g=a*l,b=a*c;t[0]=l*u,t[4]=b-p*h,t[8]=g*h+m,t[1]=h,t[5]=o*u,t[9]=-a*u,t[2]=-c*u,t[6]=m*h+g,t[10]=p-b*h}else if("XZY"===e.order){const p=o*l,m=o*c,g=a*l,b=a*c;t[0]=l*u,t[4]=-h,t[8]=c*u,t[1]=p*h+b,t[5]=o*u,t[9]=m*h-g,t[2]=g*h-m,t[6]=a*u,t[10]=b*h+p}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(hre,e,fre)}lookAt(e,t,i){const r=this.elements;return Go.subVectors(e,t),0===Go.lengthSq()&&(Go.z=1),Go.normalize(),fu.crossVectors(i,Go),0===fu.lengthSq()&&(1===Math.abs(i.z)?Go.x+=1e-4:Go.z+=1e-4,Go.normalize(),fu.crossVectors(i,Go)),fu.normalize(),xS.crossVectors(Go,fu),r[0]=fu.x,r[4]=xS.x,r[8]=Go.x,r[1]=fu.y,r[5]=xS.y,r[9]=Go.y,r[2]=fu.z,r[6]=xS.z,r[10]=Go.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,s=this.elements,o=i[0],a=i[4],l=i[8],c=i[12],u=i[1],h=i[5],p=i[9],m=i[13],g=i[2],b=i[6],y=i[10],v=i[14],M=i[3],x=i[7],S=i[11],P=i[15],A=r[0],R=r[4],V=r[8],E=r[12],k=r[1],Z=r[5],ue=r[9],Me=r[13],W=r[2],ne=r[6],$=r[10],ee=r[14],ie=r[3],se=r[7],ve=r[11],Se=r[15];return s[0]=o*A+a*k+l*W+c*ie,s[4]=o*R+a*Z+l*ne+c*se,s[8]=o*V+a*ue+l*$+c*ve,s[12]=o*E+a*Me+l*ee+c*Se,s[1]=u*A+h*k+p*W+m*ie,s[5]=u*R+h*Z+p*ne+m*se,s[9]=u*V+h*ue+p*$+m*ve,s[13]=u*E+h*Me+p*ee+m*Se,s[2]=g*A+b*k+y*W+v*ie,s[6]=g*R+b*Z+y*ne+v*se,s[10]=g*V+b*ue+y*$+v*ve,s[14]=g*E+b*Me+y*ee+v*Se,s[3]=M*A+x*k+S*W+P*ie,s[7]=M*R+x*Z+S*ne+P*se,s[11]=M*V+x*ue+S*$+P*ve,s[15]=M*E+x*Me+S*ee+P*Se,this}multiplyScalar(e){const 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(){const e=this.elements,t=e[0],i=e[4],r=e[8],s=e[12],o=e[1],a=e[5],l=e[9],c=e[13],u=e[2],h=e[6],p=e[10],m=e[14];return e[3]*(+s*l*h-r*c*h-s*a*p+i*c*p+r*a*m-i*l*m)+e[7]*(+t*l*m-t*c*p+s*o*p-r*o*m+r*c*u-s*l*u)+e[11]*(+t*c*h-t*a*m-s*o*h+i*o*m+s*a*u-i*c*u)+e[15]*(-r*a*u-t*l*h+t*a*p+r*o*h-i*o*p+i*l*u)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=e[9],p=e[10],m=e[11],g=e[12],b=e[13],y=e[14],v=e[15],M=h*y*c-b*p*c+b*l*m-a*y*m-h*l*v+a*p*v,x=g*p*c-u*y*c-g*l*m+o*y*m+u*l*v-o*p*v,S=u*b*c-g*h*c+g*a*m-o*b*m-u*a*v+o*h*v,P=g*h*l-u*b*l-g*a*p+o*b*p+u*a*y-o*h*y,A=t*M+i*x+r*S+s*P;if(0===A)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const R=1/A;return e[0]=M*R,e[1]=(b*p*s-h*y*s-b*r*m+i*y*m+h*r*v-i*p*v)*R,e[2]=(a*y*s-b*l*s+b*r*c-i*y*c-a*r*v+i*l*v)*R,e[3]=(h*l*s-a*p*s-h*r*c+i*p*c+a*r*m-i*l*m)*R,e[4]=x*R,e[5]=(u*y*s-g*p*s+g*r*m-t*y*m-u*r*v+t*p*v)*R,e[6]=(g*l*s-o*y*s-g*r*c+t*y*c+o*r*v-t*l*v)*R,e[7]=(o*p*s-u*l*s+u*r*c-t*p*c-o*r*m+t*l*m)*R,e[8]=S*R,e[9]=(g*h*s-u*b*s-g*i*m+t*b*m+u*i*v-t*h*v)*R,e[10]=(o*b*s-g*a*s+g*i*c-t*b*c-o*i*v+t*a*v)*R,e[11]=(u*a*s-o*h*s-u*i*c+t*h*c+o*i*m-t*a*m)*R,e[12]=P*R,e[13]=(u*b*r-g*h*r+g*i*p-t*b*p-u*i*y+t*h*y)*R,e[14]=(g*a*r-o*b*r-g*i*l+t*b*l+o*i*y-t*a*y)*R,e[15]=(o*h*r-u*a*r+u*i*l-t*h*l-o*i*p+t*a*p)*R,this}scale(e){const t=this.elements,i=e.x,r=e.y,s=e.z;return t[0]*=i,t[4]*=r,t[8]*=s,t[1]*=i,t[5]*=r,t[9]*=s,t[2]*=i,t[6]*=r,t[10]*=s,t[3]*=i,t[7]*=r,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements;return Math.sqrt(Math.max(e[0]*e[0]+e[1]*e[1]+e[2]*e[2],e[4]*e[4]+e[5]*e[5]+e[6]*e[6],e[8]*e[8]+e[9]*e[9]+e[10]*e[10]))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),r=Math.sin(t),s=1-i,o=e.x,a=e.y,l=e.z,c=s*o,u=s*a;return this.set(c*o+i,c*a-r*l,c*l+r*a,0,c*a+r*l,u*a+i,u*l-r*o,0,c*l-r*a,u*l+r*o,s*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,r,s,o){return this.set(1,i,s,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,i){const r=this.elements,s=t._x,o=t._y,a=t._z,l=t._w,c=s+s,u=o+o,h=a+a,p=s*c,m=s*u,g=s*h,b=o*u,y=o*h,v=a*h,M=l*c,x=l*u,S=l*h,P=i.x,A=i.y,R=i.z;return r[0]=(1-(b+v))*P,r[1]=(m+S)*P,r[2]=(g-x)*P,r[3]=0,r[4]=(m-S)*A,r[5]=(1-(p+v))*A,r[6]=(y+M)*A,r[7]=0,r[8]=(g+x)*R,r[9]=(y-M)*R,r[10]=(1-(p+b))*R,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,i){const r=this.elements;let s=Wm.set(r[0],r[1],r[2]).length();const o=Wm.set(r[4],r[5],r[6]).length(),a=Wm.set(r[8],r[9],r[10]).length();this.determinant()<0&&(s=-s),e.x=r[12],e.y=r[13],e.z=r[14],al.copy(this);const c=1/s,u=1/o,h=1/a;return al.elements[0]*=c,al.elements[1]*=c,al.elements[2]*=c,al.elements[4]*=u,al.elements[5]*=u,al.elements[6]*=u,al.elements[8]*=h,al.elements[9]*=h,al.elements[10]*=h,t.setFromRotationMatrix(al),i.x=s,i.y=o,i.z=a,this}makePerspective(e,t,i,r,s,o,a=Kl){const l=this.elements,c=2*s/(t-e),u=2*s/(i-r),h=(t+e)/(t-e),p=(i+r)/(i-r);let m,g;if(a===Kl)m=-(o+s)/(o-s),g=-2*o*s/(o-s);else{if(2001!==a)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);m=-o/(o-s),g=-o*s/(o-s)}return l[0]=c,l[4]=0,l[8]=h,l[12]=0,l[1]=0,l[5]=u,l[9]=p,l[13]=0,l[2]=0,l[6]=0,l[10]=m,l[14]=g,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,i,r,s,o,a=Kl){const l=this.elements,c=1/(t-e),u=1/(i-r),h=1/(o-s),p=(t+e)*c,m=(i+r)*u;let g,b;if(a===Kl)g=(o+s)*h,b=-2*h;else{if(2001!==a)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);g=s*h,b=-1*h}return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-p,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-m,l[2]=0,l[6]=0,l[10]=b,l[14]=-g,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<16;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const Wm=new N,al=new kt,hre=new N(0,0,0),fre=new N(1,1,1),fu=new N,xS=new N,Go=new N,oH=new kt,aH=new Qs;let pre=(()=>{class n{constructor(t=0,i=0,r=0,s=n.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=i,this._z=r,this._order=s}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,i,r,s=this._order){return this._x=t,this._y=i,this._z=r,this._order=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,i=this._order,r=!0){const s=t.elements,o=s[0],a=s[4],l=s[8],c=s[1],u=s[5],h=s[9],p=s[2],m=s[6],g=s[10];switch(i){case"XYZ":this._y=Math.asin(Ki(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(m,u),this._z=0);break;case"YXZ":this._x=Math.asin(-Ki(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,g),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-p,o),this._z=0);break;case"ZXY":this._x=Math.asin(Ki(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-Ki(p,-1,1)),Math.abs(p)<.9999999?(this._x=Math.atan2(m,g),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u));break;case"YZX":this._z=Math.asin(Ki(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,u),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(l,g));break;case"XZY":this._z=Math.asin(-Ki(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,u),this._y=Math.atan2(l,o)):(this._x=Math.atan2(-h,g),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+i)}return this._order=i,!0===r&&this._onChangeCallback(),this}setFromQuaternion(t,i,r){return oH.makeRotationFromQuaternion(t),this.setFromRotationMatrix(oH,i,r)}setFromVector3(t,i=this._order){return this.set(t.x,t.y,t.z,i)}reorder(t){return aH.setFromEuler(this),this.setFromQuaternion(aH,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],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],i=0){return t[i]=this._x,t[i+1]=this._y,t[i+2]=this._z,t[i+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}return n.DEFAULT_ORDER="XYZ",n})();class GR{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<{class n extends Lm{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:mre++}),this.uuid=Ho(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=n.DEFAULT_UP.clone();const t=new N,i=new pre,r=new Qs,s=new N(1,1,1);i._onChange(function o(){r.setFromEuler(i,!1)}),r._onChange(function a(){i.setFromQuaternion(r,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:i},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:s},modelViewMatrix:{value:new kt},normalMatrix:{value:new wn}}),this.matrix=new kt,this.matrixWorld=new kt,this.matrixAutoUpdate=n.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=n.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new GR,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,i){this.quaternion.setFromAxisAngle(t,i)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,i){return $m.setFromAxisAngle(t,i),this.quaternion.multiply($m),this}rotateOnWorldAxis(t,i){return $m.setFromAxisAngle(t,i),this.quaternion.premultiply($m),this}rotateX(t){return this.rotateOnAxis(cH,t)}rotateY(t){return this.rotateOnAxis(dH,t)}rotateZ(t){return this.rotateOnAxis(uH,t)}translateOnAxis(t,i){return lH.copy(t).applyQuaternion(this.quaternion),this.position.add(lH.multiplyScalar(i)),this}translateX(t){return this.translateOnAxis(cH,t)}translateY(t){return this.translateOnAxis(dH,t)}translateZ(t){return this.translateOnAxis(uH,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(Kc.copy(this.matrixWorld).invert())}lookAt(t,i,r){t.isVector3?wS.copy(t):wS.set(t,i,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Qy.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Kc.lookAt(Qy,wS,this.up):Kc.lookAt(wS,Qy,this.up),this.quaternion.setFromRotationMatrix(Kc),s&&(Kc.extractRotation(s.matrixWorld),$m.setFromRotationMatrix(Kc),this.quaternion.premultiply($m.invert()))}add(t){if(arguments.length>1){for(let i=0;i1){for(let r=0;r0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(s.matrixAutoUpdate=!1),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(s.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.visibility=this._visibility,s.active=this._active,s.bounds=this._bounds.map(l=>({boxInitialized:l.boxInitialized,boxMin:l.box.min.toArray(),boxMax:l.box.max.toArray(),sphereInitialized:l.sphereInitialized,sphereRadius:l.sphere.radius,sphereCenter:l.sphere.center.toArray()})),s.maxGeometryCount=this._maxGeometryCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(t),null!==this.boundingSphere&&(s.boundingSphere={center:s.boundingSphere.center.toArray(),radius:s.boundingSphere.radius}),null!==this.boundingBox&&(s.boundingBox={min:s.boundingBox.min.toArray(),max:s.boundingBox.max.toArray()})),this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(s.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=o(t.geometries,this.geometry);const l=this.geometry.parameters;if(void 0!==l&&void 0!==l.shapes){const c=l.shapes;if(Array.isArray(c))for(let u=0,h=c.length;u0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),u.length>0&&(r.textures=u),h.length>0&&(r.images=h),p.length>0&&(r.shapes=p),m.length>0&&(r.skeletons=m),g.length>0&&(r.animations=g),b.length>0&&(r.nodes=b)}return r.object=s,r;function a(l){const c=[];for(const u in l){const h=l[u];delete h.metadata,c.push(h)}return c}}clone(t){return(new this.constructor).copy(this,t)}copy(t,i=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),!0===i)for(let r=0;r0?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,t,i,r,s){ll.subVectors(r,t),Zc.subVectors(i,t),WR.subVectors(e,t);const o=ll.dot(ll),a=ll.dot(Zc),l=ll.dot(WR),c=Zc.dot(Zc),u=Zc.dot(WR),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*u)*p,g=(o*u-a*l)*p;return s.set(1-m-g,g,m)}static containsPoint(e,t,i,r){return null!==this.getBarycoord(e,t,i,r,Qc)&&Qc.x>=0&&Qc.y>=0&&Qc.x+Qc.y<=1}static getUV(e,t,i,r,s,o,a,l){return!1===MS&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),MS=!0),this.getInterpolation(e,t,i,r,s,o,a,l)}static getInterpolation(e,t,i,r,s,o,a,l){return null===this.getBarycoord(e,t,i,r,Qc)?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,Qc.x),l.addScaledVector(o,Qc.y),l.addScaledVector(a,Qc.z),l)}static isFrontFacing(e,t,i,r){return ll.subVectors(i,t),Zc.subVectors(e,t),ll.cross(Zc).dot(r)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,i,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return ll.subVectors(this.c,this.b),Zc.subVectors(this.a,this.b),.5*ll.cross(Zc).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Wo.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Wo.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,i,r,s){return!1===MS&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),MS=!0),Wo.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}getInterpolation(e,t,i,r,s){return Wo.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}containsPoint(e){return Wo.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Wo.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,r=this.b,s=this.c;let o,a;jm.subVectors(r,i),Xm.subVectors(s,i),$R.subVectors(e,i);const l=jm.dot($R),c=Xm.dot($R);if(l<=0&&c<=0)return t.copy(i);jR.subVectors(e,r);const u=jm.dot(jR),h=Xm.dot(jR);if(u>=0&&h<=u)return t.copy(r);const p=l*h-u*c;if(p<=0&&l>=0&&u<=0)return o=l/(l-u),t.copy(i).addScaledVector(jm,o);XR.subVectors(e,s);const m=jm.dot(XR),g=Xm.dot(XR);if(g>=0&&m<=g)return t.copy(s);const b=m*c-l*g;if(b<=0&&c>=0&&g<=0)return a=c/(c-g),t.copy(i).addScaledVector(Xm,a);const y=u*g-m*h;if(y<=0&&h-u>=0&&m-g>=0)return hH.subVectors(s,r),a=(h-u)/(h-u+(m-g)),t.copy(r).addScaledVector(hH,a);const v=1/(y+b+p);return o=b*v,a=p*v,t.copy(i).addScaledVector(jm,o).addScaledVector(Xm,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const fH={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},pu={h:0,s:0,l:0},SS={h:0,s:0,l:0};function qR(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+6*(e-n)*t:t<.5?e:t<2/3?n+6*(e-n)*(2/3-t):n}class We{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(void 0===t&&void 0===i){const r=e;r&&r.isColor?this.copy(r):"number"==typeof r?this.setHex(r):"string"==typeof r&&this.setStyle(r)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Ei){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,ii.toWorkingColorSpace(this,t),this}setRGB(e,t,i,r=ii.workingColorSpace){return this.r=e,this.g=t,this.b=i,ii.toWorkingColorSpace(this,r),this}setHSL(e,t,i,r=ii.workingColorSpace){if(e=RR(e,1),t=Ki(t,0,1),i=Ki(i,0,1),0===t)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+t):i+t-i*t,o=2*i-s;this.r=qR(o,s,e+1/3),this.g=qR(o,s,e),this.b=qR(o,s,e-1/3)}return ii.toWorkingColorSpace(this,r),this}setStyle(e,t=Ei){function i(s){void 0!==s&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const a=r[2];switch(r[1]){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,t);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,t);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=r[1],o=s.length;if(3===o)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(6===o)return this.setHex(parseInt(s,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Ei){const i=fH[e.toLowerCase()];return void 0!==i?this.setHex(i,t):console.warn("THREE.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=Bm(e.r),this.g=Bm(e.g),this.b=Bm(e.b),this}copyLinearToSRGB(e){return this.r=OR(e.r),this.g=OR(e.g),this.b=OR(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Ei){return ii.fromWorkingColorSpace(Ms.copy(this),e),65536*Math.round(Ki(255*Ms.r,0,255))+256*Math.round(Ki(255*Ms.g,0,255))+Math.round(Ki(255*Ms.b,0,255))}getHexString(e=Ei){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=ii.workingColorSpace){ii.fromWorkingColorSpace(Ms.copy(this),t);const i=Ms.r,r=Ms.g,s=Ms.b,o=Math.max(i,r,s),a=Math.min(i,r,s);let l,c;const u=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=u<=.5?h/(o+a):h/(2-o-a),o){case i:l=(r-s)/h+(r0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const i=e[t];if(void 0===i){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[t]=i:console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`)}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function r(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),void 0!==this.sheen&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearcoat&&(i.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(i.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(i.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),void 0!==this.anisotropy&&(i.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(i.combine=this.combine)),void 0!==this.envMapIntensity&&(i.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(i.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(i.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(i.size=this.size),null!==this.shadowSide&&(i.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Dm&&(i.blending=this.blending),this.side!==Xl&&(i.side=this.side),!0===this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),!0===this.transparent&&(i.transparent=!0),this.blendSrc!==gR&&(i.blendSrc=this.blendSrc),this.blendDst!==_R&&(i.blendDst=this.blendDst),this.blendEquation!==Oh&&(i.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(i.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(i.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==iS&&(i.depthFunc=this.depthFunc),!1===this.depthTest&&(i.depthTest=this.depthTest),!1===this.depthWrite&&(i.depthWrite=this.depthWrite),!1===this.colorWrite&&(i.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(i.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(i.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(i.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Om&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Om&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Om&&(i.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(i.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(i.rotation=this.rotation),!0===this.polygonOffset&&(i.polygonOffset=!0),0!==this.polygonOffsetFactor&&(i.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(i.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(i.linewidth=this.linewidth),void 0!==this.dashSize&&(i.dashSize=this.dashSize),void 0!==this.gapSize&&(i.gapSize=this.gapSize),void 0!==this.scale&&(i.scale=this.scale),!0===this.dithering&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),!0===this.alphaHash&&(i.alphaHash=!0),!0===this.alphaToCoverage&&(i.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(i.premultipliedAlpha=!0),!0===this.forceSinglePass&&(i.forceSinglePass=!0),!0===this.wireframe&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(i.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(i.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(i.flatShading=!0),!1===this.visible&&(i.visible=!1),!1===this.toneMapped&&(i.toneMapped=!1),!1===this.fog&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData),t){const s=r(e.textures),o=r(e.images);s.length>0&&(i.textures=s),o.length>0&&(i.images=o)}return i}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(null!==t){const r=t.length;i=new Array(r);for(let s=0;s!==r;++s)i[s]=t[s].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}class as extends bo{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new We(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.combine=rS,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.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}}const gr=new N,CS=new Ce;class _i{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=i,this.usage=35044,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Yl,this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}get updateRange(){return console.warn("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let r=0,s=this.itemSize;r0&&(e.userData=this.userData),void 0!==this.parameters){const l=this.parameters;for(const c in l)void 0!==l[c]&&(e[c]=l[c]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const l in i)e.data.attributes[l]=i[l].toJSON(e.data);const r={};let s=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let h=0,p=c.length;h0&&(r[l]=u,s=!0)}s&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return null!==a&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),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;const t={};this.name=e.name;const i=e.index;null!==i&&this.setIndex(i.clone(t));const r=e.attributes;for(const c in r)this.setAttribute(c,r[c].clone(t));const s=e.morphAttributes;for(const c in s){const u=[],h=s[c];for(let p=0,m=h.length;p0){const r=t[i[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s(e.far-e.near)**2))&&(gH.copy(s).invert(),Gh.copy(e.ray).applyMatrix4(gH),(null===i.boundingBox||!1!==Gh.intersectsBox(i.boundingBox))&&this._computeIntersections(e,t,Gh)))}_computeIntersections(e,t,i){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,u=s.attributes.uv1,h=s.attributes.normal,p=s.groups,m=s.drawRange;if(null!==a)if(Array.isArray(o))for(let g=0,b=p.length;gt.far?null:{distance:c,point:PS.clone(),object:n}}(n,e,t,i,Ym,Km,Zm,RS);if(u){r&&(TS.fromBufferAttribute(r,a),DS.fromBufferAttribute(r,l),IS.fromBufferAttribute(r,c),u.uv=Wo.getInterpolation(RS,Ym,Km,Zm,TS,DS,IS,new Ce)),s&&(TS.fromBufferAttribute(s,a),DS.fromBufferAttribute(s,l),IS.fromBufferAttribute(s,c),u.uv1=Wo.getInterpolation(RS,Ym,Km,Zm,TS,DS,IS,new Ce),u.uv2=u.uv1),o&&(vH.fromBufferAttribute(o,a),yH.fromBufferAttribute(o,l),bH.fromBufferAttribute(o,c),u.normal=Wo.getInterpolation(RS,Ym,Km,Zm,vH,yH,bH,new N),u.normal.dot(i.direction)>0&&u.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new N,materialIndex:0};Wo.getNormal(Ym,Km,Zm,h.normal),u.face=h}return u}class Wh extends cn{constructor(e=1,t=1,i=1,r=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:r,heightSegments:s,depthSegments:o};const a=this;r=Math.floor(r),s=Math.floor(s),o=Math.floor(o);const l=[],c=[],u=[],h=[];let p=0,m=0;function g(b,y,v,M,x,S,P,A,R,V,E){const k=S/R,Z=P/V,ue=S/2,Me=P/2,W=A/2,ne=R+1,$=V+1;let ee=0,ie=0;const se=new N;for(let ve=0;ve<$;ve++){const Se=ve*Z-Me;for(let Oe=0;Oe0?1:-1,u.push(se.x,se.y,se.z),h.push(Oe/R),h.push(1-ve/V),ee+=1}for(let ve=0;ve0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const i={};for(const r in this.extensions)!0===this.extensions[r]&&(i[r]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class ZR extends Gr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new kt,this.projectionMatrix=new kt,this.projectionMatrixInverse=new kt,this.coordinateSystem=Kl}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}class _r extends ZR{constructor(e=50,t=1,i=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*Fm*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*Uh*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*Fm*Math.atan(Math.tan(.5*Uh*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,i,r,s,o){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*Uh*this.fov)/this.zoom,i=2*t,r=this.aspect*i,s=-.5*r;const o=this.view;if(null!==this.view&&this.view.enabled){const l=o.fullWidth,c=o.fullHeight;s+=o.offsetX*r/l,t-=o.offsetY*i/c,r*=o.width/l,i*=o.height/c}const a=this.filmOffset;0!==a&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+r,t,t-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}class Tre extends Gr{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new _r(-90,1,e,t);r.layers=this.layers,this.add(r);const s=new _r(-90,1,e,t);s.layers=this.layers,this.add(s);const o=new _r(-90,1,e,t);o.layers=this.layers,this.add(o);const a=new _r(-90,1,e,t);a.layers=this.layers,this.add(a);const l=new _r(-90,1,e,t);l.layers=this.layers,this.add(l);const c=new _r(-90,1,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,r,s,o,a,l]=t;for(const c of t)this.remove(c);if(e===Kl)i.up.set(0,1,0),i.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),s.up.set(0,0,-1),s.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else{if(2001!==e)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);i.up.set(0,-1,0),i.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),s.up.set(0,0,1),s.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1)}for(const c of t)this.add(c),c.updateMatrixWorld()}update(e,t){null===this.parent&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,o,a,l,c,u]=this.children,h=e.getRenderTarget(),p=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),g=e.xr.enabled;e.xr.enabled=!1;const b=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,r),e.render(t,s),e.setRenderTarget(i,1,r),e.render(t,o),e.setRenderTarget(i,2,r),e.render(t,a),e.setRenderTarget(i,3,r),e.render(t,l),e.setRenderTarget(i,4,r),e.render(t,c),i.texture.generateMipmaps=b,e.setRenderTarget(i,5,r),e.render(t,u),e.setRenderTarget(h,p,m),e.xr.enabled=g,i.texture.needsPMREMUpdate=!0}}class OS extends sl{constructor(e,t,i,r,s,o,a,l,c,u){super(e=void 0!==e?e:[],t=void 0!==t?t:jc,i,r,s,o,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class Dre extends Vh{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},r=[i,i,i,i,i,i];void 0!==t.encoding&&(qy("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===cu?Ei:wa),this.texture=new OS(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:Yi}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const i_uniforms={tEquirect:{value:null}},i_vertexShader="\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",i_fragmentShader="\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",r=new Wh(5,5,5),s=new mu({name:"CubemapFromEquirect",uniforms:Qm(i_uniforms),vertexShader:i_vertexShader,fragmentShader:i_fragmentShader,side:vo,blending:su});s.uniforms.tEquirect.value=t;const o=new Yn(r,s),a=t.minFilter;return t.minFilter===Xc&&(t.minFilter=Yi),new Tre(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,i,r){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,i,r);e.setRenderTarget(s)}}const QR=new N,Ire=new N,Rre=new wn;class $h{constructor(e=new N(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,r){return this.normal.set(e,t,i),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const r=QR.subVectors(i,t).cross(Ire.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const i=e.delta(QR),r=this.normal.dot(i);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/r;return s<0||s>1?null:t.copy(e.start).addScaledVector(i,s)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||Rre.getNormalMatrix(e),r=this.coplanarPoint(QR).applyMatrix4(e),s=this.normal.applyMatrix3(i).normalize();return this.constant=-r.dot(s),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const jh=new ws,LS=new N;class FS{constructor(e=new $h,t=new $h,i=new $h,r=new $h,s=new $h,o=new $h){this.planes=[e,t,i,r,s,o]}set(e,t,i,r,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(r),a[4].copy(s),a[5].copy(o),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=Kl){const i=this.planes,r=e.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],u=r[5],h=r[6],p=r[7],m=r[8],g=r[9],b=r[10],y=r[11],v=r[12],M=r[13],x=r[14],S=r[15];if(i[0].setComponents(l-s,p-c,y-m,S-v).normalize(),i[1].setComponents(l+s,p+c,y+m,S+v).normalize(),i[2].setComponents(l+o,p+u,y+g,S+M).normalize(),i[3].setComponents(l-o,p-u,y-g,S-M).normalize(),i[4].setComponents(l-a,p-h,y-b,S-x).normalize(),t===Kl)i[5].setComponents(l+a,p+h,y+b,S+x).normalize();else{if(2001!==t)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);i[5].setComponents(a,h,b,x).normalize()}return this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),jh.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),jh.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(jh)}intersectsSprite(e){return jh.center.set(0,0,0),jh.radius=.7071067811865476,jh.applyMatrix4(e.matrixWorld),this.intersectsSphere(jh)}intersectsSphere(e){const t=this.planes,i=e.center,r=-e.radius;for(let s=0;s<6;s++)if(t[s].distanceToPoint(i)0?e.max.x:e.min.x,LS.y=r.normal.y>0?e.max.y:e.min.y,LS.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(LS)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function wH(){let n=null,e=!1,t=null,i=null;function r(s,o){t(s,o),i=n.requestAnimationFrame(r)}return{start:function(){!0!==e&&null!==t&&(i=n.requestAnimationFrame(r),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(s){t=s},setContext:function(s){n=s}}}function Pre(n,e){const t=e.isWebGL2,i=new WeakMap;return{get:function o(c){return c.isInterleavedBufferAttribute&&(c=c.data),i.get(c)},remove:function a(c){c.isInterleavedBufferAttribute&&(c=c.data);const u=i.get(c);u&&(n.deleteBuffer(u.buffer),i.delete(c))},update:function l(c,u){if(c.isGLBufferAttribute){const p=i.get(c);return void((!p||p.version 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn sRGBTransferOETF( value );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor *= toneMappingExposure;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\treturn color;\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"},He={common:{diffuse:{value:new We(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new Ce(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new We(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new We(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new We(16777215)},opacity:{value:1},center:{value:new Ce(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},Zl={basic:{uniforms:Js([He.common,He.specularmap,He.envmap,He.aomap,He.lightmap,He.fog]),vertexShader:vn.meshbasic_vert,fragmentShader:vn.meshbasic_frag},lambert:{uniforms:Js([He.common,He.specularmap,He.envmap,He.aomap,He.lightmap,He.emissivemap,He.bumpmap,He.normalmap,He.displacementmap,He.fog,He.lights,{emissive:{value:new We(0)}}]),vertexShader:vn.meshlambert_vert,fragmentShader:vn.meshlambert_frag},phong:{uniforms:Js([He.common,He.specularmap,He.envmap,He.aomap,He.lightmap,He.emissivemap,He.bumpmap,He.normalmap,He.displacementmap,He.fog,He.lights,{emissive:{value:new We(0)},specular:{value:new We(1118481)},shininess:{value:30}}]),vertexShader:vn.meshphong_vert,fragmentShader:vn.meshphong_frag},standard:{uniforms:Js([He.common,He.envmap,He.aomap,He.lightmap,He.emissivemap,He.bumpmap,He.normalmap,He.displacementmap,He.roughnessmap,He.metalnessmap,He.fog,He.lights,{emissive:{value:new We(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:vn.meshphysical_vert,fragmentShader:vn.meshphysical_frag},toon:{uniforms:Js([He.common,He.aomap,He.lightmap,He.emissivemap,He.bumpmap,He.normalmap,He.displacementmap,He.gradientmap,He.fog,He.lights,{emissive:{value:new We(0)}}]),vertexShader:vn.meshtoon_vert,fragmentShader:vn.meshtoon_frag},matcap:{uniforms:Js([He.common,He.bumpmap,He.normalmap,He.displacementmap,He.fog,{matcap:{value:null}}]),vertexShader:vn.meshmatcap_vert,fragmentShader:vn.meshmatcap_frag},points:{uniforms:Js([He.points,He.fog]),vertexShader:vn.points_vert,fragmentShader:vn.points_frag},dashed:{uniforms:Js([He.common,He.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:vn.linedashed_vert,fragmentShader:vn.linedashed_frag},depth:{uniforms:Js([He.common,He.displacementmap]),vertexShader:vn.depth_vert,fragmentShader:vn.depth_frag},normal:{uniforms:Js([He.common,He.bumpmap,He.normalmap,He.displacementmap,{opacity:{value:1}}]),vertexShader:vn.meshnormal_vert,fragmentShader:vn.meshnormal_frag},sprite:{uniforms:Js([He.sprite,He.fog]),vertexShader:vn.sprite_vert,fragmentShader:vn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:vn.background_vert,fragmentShader:vn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:vn.backgroundCube_vert,fragmentShader:vn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:vn.cube_vert,fragmentShader:vn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:vn.equirect_vert,fragmentShader:vn.equirect_frag},distanceRGBA:{uniforms:Js([He.common,He.displacementmap,{referencePosition:{value:new N},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:vn.distanceRGBA_vert,fragmentShader:vn.distanceRGBA_frag},shadow:{uniforms:Js([He.lights,He.fog,{color:{value:new We(0)},opacity:{value:1}}]),vertexShader:vn.shadow_vert,fragmentShader:vn.shadow_frag}};Zl.physical={uniforms:Js([Zl.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new Ce(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new We(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new Ce},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new We(0)},specularColor:{value:new We(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new Ce},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:vn.meshphysical_vert,fragmentShader:vn.meshphysical_frag};const NS={r:0,b:0,g:0};function Poe(n,e,t,i,r,s,o){const a=new We(0);let c,u,l=!0===s?0:1,h=null,p=0,m=null;function b(y,v){y.getRGB(NS,xH(n)),i.buffers.color.setClear(NS.r,NS.g,NS.b,v,o)}return{getClearColor:function(){return a},setClearColor:function(y,v=1){a.set(y),l=v,b(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(y){l=y,b(a,l)},render:function g(y,v){let M=!1,x=!0===v.isScene?v.background:null;x&&x.isTexture&&(x=(v.backgroundBlurriness>0?t:e).get(x)),null===x?b(a,l):x&&x.isColor&&(b(x,1),M=!0);const S=n.xr.getEnvironmentBlendMode();"additive"===S?i.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===S&&i.buffers.color.setClear(0,0,0,0,o),(n.autoClear||M)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),x&&(x.isCubeTexture||x.mapping===Vy)?(void 0===u&&(u=new Yn(new Wh(1,1,1),new mu({name:"BackgroundCubeMaterial",uniforms:Qm(Zl.backgroundCube.uniforms),vertexShader:Zl.backgroundCube.vertexShader,fragmentShader:Zl.backgroundCube.fragmentShader,side:vo,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(P,A,R){this.matrixWorld.copyPosition(R.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(u)),u.material.uniforms.envMap.value=x,u.material.uniforms.flipEnvMap.value=x.isCubeTexture&&!1===x.isRenderTargetTexture?-1:1,u.material.uniforms.backgroundBlurriness.value=v.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,u.material.toneMapped=ii.getTransfer(x.colorSpace)!==Ai,(h!==x||p!==x.version||m!==n.toneMapping)&&(u.material.needsUpdate=!0,h=x,p=x.version,m=n.toneMapping),u.layers.enableAll(),y.unshift(u,u.geometry,u.material,0,0,null)):x&&x.isTexture&&(void 0===c&&(c=new Yn(new tg(2,2),new mu({name:"BackgroundMaterial",uniforms:Qm(Zl.background.uniforms),vertexShader:Zl.background.vertexShader,fragmentShader:Zl.background.fragmentShader,side:Xl,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(c)),c.material.uniforms.t2D.value=x,c.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,c.material.toneMapped=ii.getTransfer(x.colorSpace)!==Ai,!0===x.matrixAutoUpdate&&x.updateMatrix(),c.material.uniforms.uvTransform.value.copy(x.matrix),(h!==x||p!==x.version||m!==n.toneMapping)&&(c.material.needsUpdate=!0,h=x,p=x.version,m=n.toneMapping),c.layers.enableAll(),y.unshift(c,c.geometry,c.material,0,0,null))}}}function koe(n,e,t,i){const r=n.getParameter(n.MAX_VERTEX_ATTRIBS),s=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||null!==s,a={},l=y(null);let c=l,u=!1;function m(W){return i.isWebGL2?n.bindVertexArray(W):s.bindVertexArrayOES(W)}function g(W){return i.isWebGL2?n.deleteVertexArray(W):s.deleteVertexArrayOES(W)}function y(W){const ne=[],$=[],ee=[];for(let ie=0;ie=0){const me=ie[Oe];let Ve=se[Oe];if(void 0===Ve&&("instanceMatrix"===Oe&&W.instanceMatrix&&(Ve=W.instanceMatrix),"instanceColor"===Oe&&W.instanceColor&&(Ve=W.instanceColor)),void 0===me||me.attribute!==Ve||Ve&&me.data!==Ve.data)return!0;ve++}return c.attributesNum!==ve||c.index!==ee}(W,ee,$,ie),se&&function M(W,ne,$,ee){const ie={},se=ne.attributes;let ve=0;const Se=$.getAttributes();for(const Oe in Se)if(Se[Oe].location>=0){let me=se[Oe];void 0===me&&("instanceMatrix"===Oe&&W.instanceMatrix&&(me=W.instanceMatrix),"instanceColor"===Oe&&W.instanceColor&&(me=W.instanceColor));const Ve={};Ve.attribute=me,me&&me.data&&(Ve.data=me.data),ie[Oe]=Ve,ve++}c.attributes=ie,c.attributesNum=ve,c.index=ee}(W,ee,$,ie)}else{const ve=!0===ne.wireframe;(c.geometry!==ee.id||c.program!==$.id||c.wireframe!==ve)&&(c.geometry=ee.id,c.program=$.id,c.wireframe=ve,se=!0)}null!==ie&&t.update(ie,n.ELEMENT_ARRAY_BUFFER),(se||u)&&(u=!1,function V(W,ne,$,ee){if(!1===i.isWebGL2&&(W.isInstancedMesh||ee.isInstancedBufferGeometry)&&null===e.get("ANGLE_instanced_arrays"))return;x();const ie=ee.attributes,se=$.getAttributes(),ve=ne.defaultAttributeValues;for(const Se in se){const Oe=se[Se];if(Oe.location>=0){let le=ie[Se];if(void 0===le&&("instanceMatrix"===Se&&W.instanceMatrix&&(le=W.instanceMatrix),"instanceColor"===Se&&W.instanceColor&&(le=W.instanceColor)),void 0!==le){const me=le.normalized,Ve=le.itemSize,rt=t.get(le);if(void 0===rt)continue;const Be=rt.buffer,mt=rt.type,gt=rt.bytesPerElement,tt=!0===i.isWebGL2&&(mt===n.INT||mt===n.UNSIGNED_INT||le.gpuType===pz);if(le.isInterleavedBufferAttribute){const Rt=le.data,H=Rt.stride,ze=le.offset;if(Rt.isInstancedInterleavedBuffer){for(let we=0;we0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";R="mediump"}return"mediump"===R&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&"WebGL2RenderingContext"===n.constructor.name;let a=void 0!==t.precision?t.precision:"highp";const l=s(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const c=o||e.has("WEBGL_draw_buffers"),u=!0===t.logarithmicDepthBuffer,h=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),p=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),m=n.getParameter(n.MAX_TEXTURE_SIZE),g=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),b=n.getParameter(n.MAX_VERTEX_ATTRIBS),y=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),v=n.getParameter(n.MAX_VARYING_VECTORS),M=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),x=p>0,S=o||e.has("OES_texture_float");return{isWebGL2:o,drawBuffers:c,getMaxAnisotropy:function r(){if(void 0!==i)return i;if(!0===e.has("EXT_texture_filter_anisotropic")){const R=e.get("EXT_texture_filter_anisotropic");i=n.getParameter(R.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i},getMaxPrecision:s,precision:a,logarithmicDepthBuffer:u,maxTextures:h,maxVertexTextures:p,maxTextureSize:m,maxCubemapSize:g,maxAttributes:b,maxVertexUniforms:y,maxVaryings:v,maxFragmentUniforms:M,vertexTextures:x,floatFragmentTextures:S,floatVertexTextures:x&&S,maxSamples:o?n.getParameter(n.MAX_SAMPLES):0}}function Foe(n){const e=this;let t=null,i=0,r=!1,s=!1;const o=new $h,a=new wn,l={value:null,needsUpdate:!1};function u(h,p,m,g){const b=null!==h?h.length:0;let y=null;if(0!==b){if(y=l.value,!0!==g||null===y){const v=m+4*b,M=p.matrixWorldInverse;a.getNormalMatrix(M),(null===y||y.length0),e.numPlanes=i,e.numIntersection=0}();else{const M=s?0:i,x=4*M;let S=v.clippingState||null;l.value=S,S=u(g,p,x,m);for(let P=0;P!==x;++P)S[P]=t[P];v.clippingState=S,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Noe(n){let e=new WeakMap;function t(o,a){return a===sS?o.mapping=jc:a===oS&&(o.mapping=Lh),o}function r(o){const a=o.target;a.removeEventListener("dispose",r);const l=e.get(a);void 0!==l&&(e.delete(a),l.dispose())}return{get:function i(o){if(o&&o.isTexture){const a=o.mapping;if(a===sS||a===oS){if(e.has(o))return t(e.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new Dre(l.height/2);return c.fromEquirectangularTexture(n,o),e.set(o,c),o.addEventListener("dispose",r),t(c.texture,o.mapping)}return null}}}return o},dispose:function s(){e=new WeakMap}}}class BS extends ZR{constructor(e=-1,t=1,i=1,r=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=r,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,i,r,s,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let s=i-e,o=i+e,a=r+t,l=r-t;if(null!==this.view&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=u*this.view.offsetY,l=a-u*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}const MH=[.125,.215,.35,.446,.526,.582],JR=new BS,SH=new We;let eP=null,tP=0,nP=0;const qh=(1+Math.sqrt(5))/2,ig=1/qh,CH=[new N(1,1,1),new N(-1,1,1),new N(1,1,-1),new N(-1,1,-1),new N(0,qh,ig),new N(0,qh,-ig),new N(ig,0,qh),new N(-ig,0,qh),new N(qh,ig,0),new N(-qh,ig,0)];class EH{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,r=100){eP=this._renderer.getRenderTarget(),tP=this._renderer.getActiveCubeFace(),nP=this._renderer.getActiveMipmapLevel(),this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,i,r,s),t>0&&this._blur(s,0,0,t),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=DH(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=TH(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;en-4?l=MH[o-n+4-1]:0===o&&(l=0),i.push(l);const c=1/(a-2),u=-c,h=1+c,p=[u,u,h,u,h,h,u,u,h,h,u,h],m=6,g=6,b=3,y=2,v=1,M=new Float32Array(b*g*m),x=new Float32Array(y*g*m),S=new Float32Array(v*g*m);for(let A=0;A2?0:-1;M.set([R,V,0,R+2/3,V,0,R+2/3,V+1,0,R,V,0,R+2/3,V+1,0,R,V+1,0],b*g*A),x.set(p,y*g*A),S.set([A,A,A,A,A,A],v*g*A)}const P=new cn;P.setAttribute("position",new _i(M,b)),P.setAttribute("uv",new _i(x,y)),P.setAttribute("faceIndex",new _i(S,v)),e.push(P),r>4&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}(s)),this._blurMaterial=function Uoe(n,e,t){const i=new Float32Array(20),r=new N(0,1,0);return new mu({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:su,depthTest:!1,depthWrite:!1})}(s,e,t)}return r}_compileMaterial(e){const t=new Yn(this._lodPlanes[0],e);this._renderer.compile(t,JR)}_sceneToCubeUV(e,t,i,r){const a=new _r(90,1,t,i),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],u=this._renderer,h=u.autoClear,p=u.toneMapping;u.getClearColor(SH),u.toneMapping=ou,u.autoClear=!1;const m=new as({name:"PMREM.Background",side:vo,depthWrite:!1,depthTest:!1}),g=new Yn(new Wh,m);let b=!1;const y=e.background;y?y.isColor&&(m.color.copy(y),e.background=null,b=!0):(m.color.copy(SH),b=!0);for(let v=0;v<6;v++){const M=v%3;0===M?(a.up.set(0,l[v],0),a.lookAt(c[v],0,0)):1===M?(a.up.set(0,0,l[v]),a.lookAt(0,c[v],0)):(a.up.set(0,l[v],0),a.lookAt(0,0,c[v]));const x=this._cubeSize;US(r,M*x,v>2?x:0,x,x),u.setRenderTarget(r),b&&u.render(g,a),u.render(e,a)}g.geometry.dispose(),g.material.dispose(),u.toneMapping=p,u.autoClear=h,e.background=y}_textureToCubeUV(e,t){const i=this._renderer,r=e.mapping===jc||e.mapping===Lh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=DH()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=TH());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Yn(this._lodPlanes[0],s);s.uniforms.envMap.value=e;const l=this._cubeSize;US(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,JR)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let r=1;r20&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${y} samples when the maximum is set to 20`);const v=[];let M=0;for(let R=0;R<20;++R){const V=R/b,E=Math.exp(-V*V/2);v.push(E),0===R?M+=E:Rx-4?r-x+4:0),4*(this._cubeSize-S),3*S,2*S),l.setRenderTarget(t),l.render(h,JR)}}function AH(n,e,t){const i=new Vh(n,e,t);return i.texture.mapping=Vy,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function US(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function TH(){return new mu({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:su,depthTest:!1,depthWrite:!1})}function DH(){return new mu({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:su,depthTest:!1,depthWrite:!1})}function Voe(n){let e=new WeakMap,t=null;function s(a){const l=a.target;l.removeEventListener("dispose",s);const c=e.get(l);void 0!==c&&(e.delete(l),c.dispose())}return{get:function i(a){if(a&&a.isTexture){const l=a.mapping,c=l===sS||l===oS,u=l===jc||l===Lh;if(c||u){if(a.isRenderTargetTexture&&!0===a.needsPMREMUpdate){a.needsPMREMUpdate=!1;let h=e.get(a);return null===t&&(t=new EH(n)),h=c?t.fromEquirectangular(a,h):t.fromCubemap(a,h),e.set(a,h),h.texture}if(e.has(a))return e.get(a).texture;{const h=a.image;if(c&&h&&h.height>0||u&&h&&function r(a){let l=0;for(let u=0;u<6;u++)void 0!==a[u]&&l++;return 6===l}(h)){null===t&&(t=new EH(n));const p=c?t.fromEquirectangular(a):t.fromCubemap(a);return e.set(a,p),a.addEventListener("dispose",s),p.texture}return null}}}return a},dispose:function o(){e=new WeakMap,null!==t&&(t.dispose(),t=null)}}}function zoe(n){const e={};function t(i){if(void 0!==e[i])return e[i];let r;switch(i){case"WEBGL_depth_texture":r=n.getExtension("WEBGL_depth_texture")||n.getExtension("MOZ_WEBGL_depth_texture")||n.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("MOZ_EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=n.getExtension("WEBGL_compressed_texture_s3tc")||n.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||n.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=n.getExtension("WEBGL_compressed_texture_pvrtc")||n.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=n.getExtension(i)}return e[i]=r,r}return{has:function(i){return null!==t(i)},init:function(i){i.isWebGL2?(t("EXT_color_buffer_float"),t("WEBGL_clip_cull_distance")):(t("WEBGL_depth_texture"),t("OES_texture_float"),t("OES_texture_half_float"),t("OES_texture_half_float_linear"),t("OES_standard_derivatives"),t("OES_element_index_uint"),t("OES_vertex_array_object"),t("ANGLE_instanced_arrays")),t("OES_texture_float_linear"),t("EXT_color_buffer_half_float"),t("WEBGL_multisampled_render_to_texture")},get:function(i){const r=t(i);return null===r&&console.warn("THREE.WebGLRenderer: "+i+" extension not supported."),r}}}function Hoe(n,e,t,i){const r={},s=new WeakMap;function o(h){const p=h.target;null!==p.index&&e.remove(p.index);for(const g in p.attributes)e.remove(p.attributes[g]);for(const g in p.morphAttributes){const b=p.morphAttributes[g];for(let y=0,v=b.length;ye.maxTextureSize&&(k=Math.ceil(E/e.maxTextureSize),E=e.maxTextureSize);const Z=new Float32Array(E*k*4*g),ue=new FR(Z,E,k,g);ue.type=Yl,ue.needsUpdate=!0;const Me=4*V;for(let ne=0;ne0)return n;const r=e*t;let s=FH[r];if(void 0===s&&(s=new Float32Array(r),FH[r]=s),0!==e){i.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(s,a)}return s}function Dr(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t":" "} ${a}: ${t[o]}`)}return i.join("\n")}(n.getShaderSource(e),o)}return r}function Gae(n,e){const t=function Hae(n){const e=ii.getPrimaries(ii.workingColorSpace),t=ii.getPrimaries(n);let i;switch(e===t?i="":e===hS&&t===uS?i="LinearDisplayP3ToLinearSRGB":e===uS&&t===hS&&(i="LinearSRGBToLinearDisplayP3"),n){case Hr:case cS:return[i,"LinearTransferOETF"];case Ei:case DR:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",n),[i,"LinearTransferOETF"]}}(e);return`vec4 ${n}( vec4 value ) { return ${t[0]}( ${t[1]}( value ) ); }`}function Wae(n,e){let t;switch(e){case mie:t="Linear";break;case gie:t="Reinhard";break;case _ie:t="OptimizedCineon";break;case vie:t="ACESFilmic";break;case bie:t="AgX";break;case yie:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+n+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function sg(n){return""!==n}function WH(n,e){const t=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return n.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,t).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function $H(n,e){return n.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const Yae=/^[ \t]*#include +<([\w\d./]+)>/gm;function sP(n){return n.replace(Yae,Zae)}const Kae=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function Zae(n,e){let t=vn[e];if(void 0===t){const i=Kae.get(e);if(void 0===i)throw new Error("Can not resolve #include <"+e+">");t=vn[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i)}return sP(t)}const Qae=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function jH(n){return n.replace(Qae,Jae)}function Jae(n,e,t,i){let r="";for(let s=parseInt(e);s0&&(v+="\n"),M=[m,"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,b].filter(sg).join("\n"),M.length>0&&(M+="\n")):(v=[XH(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,b,t.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",t.batching?"#define USE_BATCHING":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+u:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&!1===t.flatShading?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&!1===t.flatShading?"#define USE_MORPHNORMALS":"",t.morphColors&&t.isWebGL2?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(sg).join("\n"),M=[m,XH(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,b,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+c:"",t.envMap?"#define "+u:"",t.envMap?"#define "+h:"",p?"#define CUBEUV_TEXEL_WIDTH "+p.texelWidth:"",p?"#define CUBEUV_TEXEL_HEIGHT "+p.texelHeight:"",p?"#define CUBEUV_MAX_MIP "+p.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&!1===t.flatShading?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==ou?"#define TONE_MAPPING":"",t.toneMapping!==ou?vn.tonemapping_pars_fragment:"",t.toneMapping!==ou?Wae("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",vn.colorspace_pars_fragment,Gae("linearToOutputTexel",t.outputColorSpace),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"","\n"].filter(sg).join("\n")),o=sP(o),o=WH(o,t),o=$H(o,t),a=sP(a),a=WH(a,t),a=$H(a,t),o=jH(o),a=jH(a),t.isWebGL2&&!0!==t.isRawShaderMaterial&&(x="#version 300 es\n",v=[g,"precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+v,M=["precision mediump sampler2DArray;","#define varying in",t.glslVersion===Zz?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===Zz?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+M);const P=x+M+a,A=HH(r,r.VERTEX_SHADER,x+v+o),R=HH(r,r.FRAGMENT_SHADER,P);function V(ue){if(n.debug.checkShaderErrors){const Me=r.getProgramInfoLog(y).trim(),W=r.getShaderInfoLog(A).trim(),ne=r.getShaderInfoLog(R).trim();let $=!0,ee=!0;if(!1===r.getProgramParameter(y,r.LINK_STATUS))if($=!1,"function"==typeof n.debug.onShaderError)n.debug.onShaderError(r,y,A,R);else{const ie=GH(r,A,"vertex"),se=GH(r,R,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(y,r.VALIDATE_STATUS)+"\n\nProgram Info Log: "+Me+"\n"+ie+"\n"+se)}else""!==Me?console.warn("THREE.WebGLProgram: Program Info Log:",Me):(""===W||""===ne)&&(ee=!1);ee&&(ue.diagnostics={runnable:$,programLog:Me,vertexShader:{log:W,prefix:v},fragmentShader:{log:ne,prefix:M}})}r.deleteShader(A),r.deleteShader(R),E=new zS(r,y),k=function qae(n,e){const t={},i=n.getProgramParameter(e,n.ACTIVE_ATTRIBUTES);for(let r=0;r0,Pe=E.clearcoat>0,Ie=E.iridescence>0,De=E.sheen>0,vt=E.transmission>0,je=re&&!!E.anisotropyMap,at=Pe&&!!E.clearcoatMap,Bt=Pe&&!!E.clearcoatNormalMap,gn=Pe&&!!E.clearcoatRoughnessMap,Re=Ie&&!!E.iridescenceMap,Kn=Ie&&!!E.iridescenceThicknessMap,Ln=De&&!!E.sheenColorMap,on=De&&!!E.sheenRoughnessMap,Pt=!!E.specularMap,ut=!!E.specularColorMap,yn=!!E.specularIntensityMap,si=vt&&!!E.transmissionMap,Qi=vt&&!!E.thicknessMap,Ge=!!E.alphaMap,qe=!!E.extensions,qt=!!ne.attributes.uv1,Ut=!!ne.attributes.uv2,yi=!!ne.attributes.uv3;let bi=ou;return E.toneMapped&&(null===Be||!0===Be.isXRRenderTarget)&&(bi=n.toneMapping),{isWebGL2:u,shaderID:se,shaderType:E.type,shaderName:E.name,vertexShader:le,fragmentShader:me,defines:E.defines,customVertexShaderID:Ve,customFragmentShaderID:rt,isRawShaderMaterial:!0===E.isRawShaderMaterial,glslVersion:E.glslVersion,precision:m,batching:!0===Me.isBatchedMesh,instancing:mt,instancingColor:mt&&null!==Me.instanceColor,supportsVertexTextures:p,outputColorSpace:null===Be?n.outputColorSpace:!0===Be.isXRRenderTarget?Be.texture.colorSpace:Hr,map:tt,matcap:!!E.matcap,envMap:H,envMapMode:H&&ee.mapping,envMapCubeUVHeight:ie,aoMap:ze,lightMap:we,bumpMap:Le,normalMap:xe,displacementMap:p&&Et,emissiveMap:nt,normalMapObjectSpace:xe&&E.normalMapType===Fie,normalMapTangentSpace:xe&&E.normalMapType===Bh,metalnessMap:L,roughnessMap:I,anisotropy:re,anisotropyMap:je,clearcoat:Pe,clearcoatMap:at,clearcoatNormalMap:Bt,clearcoatRoughnessMap:gn,iridescence:Ie,iridescenceMap:Re,iridescenceThicknessMap:Kn,sheen:De,sheenColorMap:Ln,sheenRoughnessMap:on,specularMap:Pt,specularColorMap:ut,specularIntensityMap:yn,transmission:vt,transmissionMap:si,thicknessMap:Qi,gradientMap:!!E.gradientMap,opaque:!1===E.transparent&&E.blending===Dm,alphaMap:Ge,alphaTest:E.alphaTest>0,alphaHash:!!E.alphaHash,combine:E.combine,mapUv:tt&&b(E.map.channel),aoMapUv:ze&&b(E.aoMap.channel),lightMapUv:we&&b(E.lightMap.channel),bumpMapUv:Le&&b(E.bumpMap.channel),normalMapUv:xe&&b(E.normalMap.channel),displacementMapUv:Et&&b(E.displacementMap.channel),emissiveMapUv:nt&&b(E.emissiveMap.channel),metalnessMapUv:L&&b(E.metalnessMap.channel),roughnessMapUv:I&&b(E.roughnessMap.channel),anisotropyMapUv:je&&b(E.anisotropyMap.channel),clearcoatMapUv:at&&b(E.clearcoatMap.channel),clearcoatNormalMapUv:Bt&&b(E.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:gn&&b(E.clearcoatRoughnessMap.channel),iridescenceMapUv:Re&&b(E.iridescenceMap.channel),iridescenceThicknessMapUv:Kn&&b(E.iridescenceThicknessMap.channel),sheenColorMapUv:Ln&&b(E.sheenColorMap.channel),sheenRoughnessMapUv:on&&b(E.sheenRoughnessMap.channel),specularMapUv:Pt&&b(E.specularMap.channel),specularColorMapUv:ut&&b(E.specularColorMap.channel),specularIntensityMapUv:yn&&b(E.specularIntensityMap.channel),transmissionMapUv:si&&b(E.transmissionMap.channel),thicknessMapUv:Qi&&b(E.thicknessMap.channel),alphaMapUv:Ge&&b(E.alphaMap.channel),vertexTangents:!!ne.attributes.tangent&&(xe||re),vertexColors:E.vertexColors,vertexAlphas:!0===E.vertexColors&&!!ne.attributes.color&&4===ne.attributes.color.itemSize,vertexUv1s:qt,vertexUv2s:Ut,vertexUv3s:yi,pointsUvs:!0===Me.isPoints&&!!ne.attributes.uv&&(tt||Ge),fog:!!W,useFog:!0===E.fog,fogExp2:W&&W.isFogExp2,flatShading:!0===E.flatShading,sizeAttenuation:!0===E.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===Me.isSkinnedMesh,morphTargets:void 0!==ne.morphAttributes.position,morphNormals:void 0!==ne.morphAttributes.normal,morphColors:void 0!==ne.morphAttributes.color,morphTargetsCount:Se,morphTextureStride:Oe,numDirLights:k.directional.length,numPointLights:k.point.length,numSpotLights:k.spot.length,numSpotLightMaps:k.spotLightMap.length,numRectAreaLights:k.rectArea.length,numHemiLights:k.hemi.length,numDirLightShadows:k.directionalShadowMap.length,numPointLightShadows:k.pointShadowMap.length,numSpotLightShadows:k.spotShadowMap.length,numSpotLightShadowsWithMaps:k.numSpotLightShadowsWithMaps,numLightProbes:k.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:E.dithering,shadowMapEnabled:n.shadowMap.enabled&&Z.length>0,shadowMapType:n.shadowMap.type,toneMapping:bi,useLegacyLights:n._useLegacyLights,decodeVideoTexture:tt&&!0===E.map.isVideoTexture&&ii.getTransfer(E.map.colorSpace)===Ai,premultipliedAlpha:E.premultipliedAlpha,doubleSided:E.side===Vo,flipSided:E.side===vo,useDepthPacking:E.depthPacking>=0,depthPacking:E.depthPacking||0,index0AttributeName:E.index0AttributeName,extensionDerivatives:qe&&!0===E.extensions.derivatives,extensionFragDepth:qe&&!0===E.extensions.fragDepth,extensionDrawBuffers:qe&&!0===E.extensions.drawBuffers,extensionShaderTextureLOD:qe&&!0===E.extensions.shaderTextureLOD,extensionClipCullDistance:qe&&E.extensions.clipCullDistance&&i.has("WEBGL_clip_cull_distance"),rendererExtensionFragDepth:u||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||i.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:E.customProgramCacheKey()}},getProgramCacheKey:function v(E){const k=[];if(E.shaderID?k.push(E.shaderID):(k.push(E.customVertexShaderID),k.push(E.customFragmentShaderID)),void 0!==E.defines)for(const Z in E.defines)k.push(Z),k.push(E.defines[Z]);return!1===E.isRawShaderMaterial&&(function M(E,k){E.push(k.precision),E.push(k.outputColorSpace),E.push(k.envMapMode),E.push(k.envMapCubeUVHeight),E.push(k.mapUv),E.push(k.alphaMapUv),E.push(k.lightMapUv),E.push(k.aoMapUv),E.push(k.bumpMapUv),E.push(k.normalMapUv),E.push(k.displacementMapUv),E.push(k.emissiveMapUv),E.push(k.metalnessMapUv),E.push(k.roughnessMapUv),E.push(k.anisotropyMapUv),E.push(k.clearcoatMapUv),E.push(k.clearcoatNormalMapUv),E.push(k.clearcoatRoughnessMapUv),E.push(k.iridescenceMapUv),E.push(k.iridescenceThicknessMapUv),E.push(k.sheenColorMapUv),E.push(k.sheenRoughnessMapUv),E.push(k.specularMapUv),E.push(k.specularColorMapUv),E.push(k.specularIntensityMapUv),E.push(k.transmissionMapUv),E.push(k.thicknessMapUv),E.push(k.combine),E.push(k.fogExp2),E.push(k.sizeAttenuation),E.push(k.morphTargetsCount),E.push(k.morphAttributeCount),E.push(k.numDirLights),E.push(k.numPointLights),E.push(k.numSpotLights),E.push(k.numSpotLightMaps),E.push(k.numHemiLights),E.push(k.numRectAreaLights),E.push(k.numDirLightShadows),E.push(k.numPointLightShadows),E.push(k.numSpotLightShadows),E.push(k.numSpotLightShadowsWithMaps),E.push(k.numLightProbes),E.push(k.shadowMapType),E.push(k.toneMapping),E.push(k.numClippingPlanes),E.push(k.numClipIntersection),E.push(k.depthPacking)}(k,E),function x(E,k){a.disableAll(),k.isWebGL2&&a.enable(0),k.supportsVertexTextures&&a.enable(1),k.instancing&&a.enable(2),k.instancingColor&&a.enable(3),k.matcap&&a.enable(4),k.envMap&&a.enable(5),k.normalMapObjectSpace&&a.enable(6),k.normalMapTangentSpace&&a.enable(7),k.clearcoat&&a.enable(8),k.iridescence&&a.enable(9),k.alphaTest&&a.enable(10),k.vertexColors&&a.enable(11),k.vertexAlphas&&a.enable(12),k.vertexUv1s&&a.enable(13),k.vertexUv2s&&a.enable(14),k.vertexUv3s&&a.enable(15),k.vertexTangents&&a.enable(16),k.anisotropy&&a.enable(17),k.alphaHash&&a.enable(18),k.batching&&a.enable(19),E.push(a.mask),a.disableAll(),k.fog&&a.enable(0),k.useFog&&a.enable(1),k.flatShading&&a.enable(2),k.logarithmicDepthBuffer&&a.enable(3),k.skinning&&a.enable(4),k.morphTargets&&a.enable(5),k.morphNormals&&a.enable(6),k.morphColors&&a.enable(7),k.premultipliedAlpha&&a.enable(8),k.shadowMapEnabled&&a.enable(9),k.useLegacyLights&&a.enable(10),k.doubleSided&&a.enable(11),k.flipSided&&a.enable(12),k.useDepthPacking&&a.enable(13),k.dithering&&a.enable(14),k.transmission&&a.enable(15),k.sheen&&a.enable(16),k.opaque&&a.enable(17),k.pointsUvs&&a.enable(18),k.decodeVideoTexture&&a.enable(19),E.push(a.mask)}(k,E),k.push(n.outputColorSpace)),k.push(E.customProgramCacheKey),k.join()},getUniforms:function S(E){const k=g[E.type];let Z;return Z=k?Cre.clone(Zl[k].uniforms):E.uniforms,Z},acquireProgram:function P(E,k){let Z;for(let ue=0,Me=c.length;ue0?i.push(v):!0===m.transparent?r.push(v):t.push(v)},unshift:function l(h,p,m,g,b,y){const v=o(h,p,m,g,b,y);m.transmission>0?i.unshift(v):!0===m.transparent?r.unshift(v):t.unshift(v)},finish:function u(){for(let h=e,p=n.length;h1&&t.sort(h||ule),i.length>1&&i.sort(p||qH),r.length>1&&r.sort(p||qH)}}}function hle(){let n=new WeakMap;return{get:function e(i,r){const s=n.get(i);let o;return void 0===s?(o=new YH,n.set(i,[o])):r>=s.length?(o=new YH,s.push(o)):o=s[r],o},dispose:function t(){n=new WeakMap}}}function fle(){const n={};return{get:function(e){if(void 0!==n[e.id])return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new N,color:new We};break;case"SpotLight":t={position:new N,direction:new N,color:new We,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new N,color:new We,distance:0,decay:0};break;case"HemisphereLight":t={direction:new N,skyColor:new We,groundColor:new We};break;case"RectAreaLight":t={color:new We,position:new N,halfWidth:new N,halfHeight:new N}}return n[e.id]=t,t}}}let mle=0;function gle(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function _le(n,e){const t=new fle,i=function ple(){const n={};return{get:function(e){if(void 0!==n[e.id])return n[e.id];let t;switch(e.type){case"DirectionalLight":case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ce};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ce,shadowCameraNear:1,shadowCameraFar:1e3}}return n[e.id]=t,t}}}(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let u=0;u<9;u++)r.probe.push(new N);const s=new N,o=new kt,a=new kt;return{setup:function l(u,h){let p=0,m=0,g=0;for(let ue=0;ue<9;ue++)r.probe[ue].set(0,0,0);let b=0,y=0,v=0,M=0,x=0,S=0,P=0,A=0,R=0,V=0,E=0;u.sort(gle);const k=!0===h?Math.PI:1;for(let ue=0,Me=u.length;ue0&&(e.isWebGL2?!0===n.has("OES_texture_float_linear")?(r.rectAreaLTC1=He.LTC_FLOAT_1,r.rectAreaLTC2=He.LTC_FLOAT_2):(r.rectAreaLTC1=He.LTC_HALF_1,r.rectAreaLTC2=He.LTC_HALF_2):!0===n.has("OES_texture_float_linear")?(r.rectAreaLTC1=He.LTC_FLOAT_1,r.rectAreaLTC2=He.LTC_FLOAT_2):!0===n.has("OES_texture_half_float_linear")?(r.rectAreaLTC1=He.LTC_HALF_1,r.rectAreaLTC2=He.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=p,r.ambient[1]=m,r.ambient[2]=g;const Z=r.hash;(Z.directionalLength!==b||Z.pointLength!==y||Z.spotLength!==v||Z.rectAreaLength!==M||Z.hemiLength!==x||Z.numDirectionalShadows!==S||Z.numPointShadows!==P||Z.numSpotShadows!==A||Z.numSpotMaps!==R||Z.numLightProbes!==E)&&(r.directional.length=b,r.spot.length=v,r.rectArea.length=M,r.point.length=y,r.hemi.length=x,r.directionalShadow.length=S,r.directionalShadowMap.length=S,r.pointShadow.length=P,r.pointShadowMap.length=P,r.spotShadow.length=A,r.spotShadowMap.length=A,r.directionalShadowMatrix.length=S,r.pointShadowMatrix.length=P,r.spotLightMatrix.length=A+R-V,r.spotLightMap.length=R,r.numSpotLightShadowsWithMaps=V,r.numLightProbes=E,Z.directionalLength=b,Z.pointLength=y,Z.spotLength=v,Z.rectAreaLength=M,Z.hemiLength=x,Z.numDirectionalShadows=S,Z.numPointShadows=P,Z.numSpotShadows=A,Z.numSpotMaps=R,Z.numLightProbes=E,r.version=mle++)},setupView:function c(u,h){let p=0,m=0,g=0,b=0,y=0;const v=h.matrixWorldInverse;for(let M=0,x=u.length;M=a.length?(l=new KH(n,e),a.push(l)):l=a[o],l},dispose:function r(){t=new WeakMap}}}class ZH extends bo{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class QH extends bo{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const yle="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",ble="uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}";function xle(n,e,t){let i=new FS;const r=new Ce,s=new Ce,o=new ai,a=new ZH({depthPacking:Lie}),l=new QH,c={},u=t.maxTextureSize,h={[Xl]:vo,[vo]:Xl,[Vo]:Vo},p=new mu({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Ce},radius:{value:4}},vertexShader:yle,fragmentShader:ble}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new cn;g.setAttribute("position",new _i(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Yn(g,p),y=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=oz;let v=this.type;function M(A,R){const V=e.update(b);p.defines.VSM_SAMPLES!==A.blurSamples&&(p.defines.VSM_SAMPLES=A.blurSamples,m.defines.VSM_SAMPLES=A.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===A.mapPass&&(A.mapPass=new Vh(r.x,r.y)),p.uniforms.shadow_pass.value=A.map.texture,p.uniforms.resolution.value=A.mapSize,p.uniforms.radius.value=A.radius,n.setRenderTarget(A.mapPass),n.clear(),n.renderBufferDirect(R,null,V,p,b,null),m.uniforms.shadow_pass.value=A.mapPass.texture,m.uniforms.resolution.value=A.mapSize,m.uniforms.radius.value=A.radius,n.setRenderTarget(A.map),n.clear(),n.renderBufferDirect(R,null,V,m,b,null)}function x(A,R,V,E){let k=null;const Z=!0===V.isPointLight?A.customDistanceMaterial:A.customDepthMaterial;if(void 0!==Z)k=Z;else if(k=!0===V.isPointLight?l:a,n.localClippingEnabled&&!0===R.clipShadows&&Array.isArray(R.clippingPlanes)&&0!==R.clippingPlanes.length||R.displacementMap&&0!==R.displacementScale||R.alphaMap&&R.alphaTest>0||R.map&&R.alphaTest>0){const ue=k.uuid,Me=R.uuid;let W=c[ue];void 0===W&&(W={},c[ue]=W);let ne=W[Me];void 0===ne&&(ne=k.clone(),W[Me]=ne,R.addEventListener("dispose",P)),k=ne}return k.visible=R.visible,k.wireframe=R.wireframe,k.side=E===$c?null!==R.shadowSide?R.shadowSide:R.side:null!==R.shadowSide?R.shadowSide:h[R.side],k.alphaMap=R.alphaMap,k.alphaTest=R.alphaTest,k.map=R.map,k.clipShadows=R.clipShadows,k.clippingPlanes=R.clippingPlanes,k.clipIntersection=R.clipIntersection,k.displacementMap=R.displacementMap,k.displacementScale=R.displacementScale,k.displacementBias=R.displacementBias,k.wireframeLinewidth=R.wireframeLinewidth,k.linewidth=R.linewidth,!0===V.isPointLight&&!0===k.isMeshDistanceMaterial&&(n.properties.get(k).light=V),k}function S(A,R,V,E,k){if(!1===A.visible)return;if(A.layers.test(R.layers)&&(A.isMesh||A.isLine||A.isPoints)&&(A.castShadow||A.receiveShadow&&k===$c)&&(!A.frustumCulled||i.intersectsObject(A))){A.modelViewMatrix.multiplyMatrices(V.matrixWorldInverse,A.matrixWorld);const Me=e.update(A),W=A.material;if(Array.isArray(W)){const ne=Me.groups;for(let $=0,ee=ne.length;$u||r.y>u)&&(r.x>u&&(s.x=Math.floor(u/se.x),r.x=s.x*se.x,ie.mapSize.x=s.x),r.y>u&&(s.y=Math.floor(u/se.y),r.y=s.y*se.y,ie.mapSize.y=s.y)),null===ie.map||!0===Me||!0===W){const Se=this.type!==$c?{minFilter:Ni,magFilter:Ni}:{};null!==ie.map&&ie.map.dispose(),ie.map=new Vh(r.x,r.y,Se),ie.map.texture.name=ee.name+".shadowMap",ie.camera.updateProjectionMatrix()}n.setRenderTarget(ie.map),n.clear();const ve=ie.getViewportCount();for(let Se=0;Se=1):-1!==ve.indexOf("OpenGL ES")&&(se=parseFloat(/^OpenGL ES (\d)/.exec(ve)[1]),ie=se>=2);let Se=null,Oe={};const le=n.getParameter(n.SCISSOR_BOX),me=n.getParameter(n.VIEWPORT),Ve=(new ai).fromArray(le),rt=(new ai).fromArray(me);function Be(X,Xe,qe,qt){const Ut=new Uint8Array(4),yi=n.createTexture();n.bindTexture(X,yi),n.texParameteri(X,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(X,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let bi=0;bi"u")&&/OculusBrowser/g.test(navigator.userAgent),u=new WeakMap;let h;const p=new WeakMap;let m=!1;try{m=typeof OffscreenCanvas<"u"&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch{}function g(L,I){return m?new OffscreenCanvas(L,I):Xy("canvas")}function b(L,I,re,Pe){let Ie=1;if((L.width>Pe||L.height>Pe)&&(Ie=Pe/Math.max(L.width,L.height)),Ie<1||!0===I){if(typeof HTMLImageElement<"u"&&L instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&L instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&L instanceof ImageBitmap){const De=I?pS:Math.floor,vt=De(Ie*L.width),je=De(Ie*L.height);void 0===h&&(h=g(vt,je));const at=re?g(vt,je):h;return at.width=vt,at.height=je,at.getContext("2d").drawImage(L,0,0,vt,je),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+L.width+"x"+L.height+") to ("+vt+"x"+je+")."),at}return"data"in L&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+L.width+"x"+L.height+")."),L}return L}function y(L){return PR(L.width)&&PR(L.height)}function M(L,I){return L.generateMipmaps&&I&&L.minFilter!==Ni&&L.minFilter!==Yi}function x(L){n.generateMipmap(L)}function S(L,I,re,Pe,Ie=!1){if(!1===a)return I;if(null!==L){if(void 0!==n[L])return n[L];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+L+"'")}let De=I;if(I===n.RED&&(re===n.FLOAT&&(De=n.R32F),re===n.HALF_FLOAT&&(De=n.R16F),re===n.UNSIGNED_BYTE&&(De=n.R8)),I===n.RED_INTEGER&&(re===n.UNSIGNED_BYTE&&(De=n.R8UI),re===n.UNSIGNED_SHORT&&(De=n.R16UI),re===n.UNSIGNED_INT&&(De=n.R32UI),re===n.BYTE&&(De=n.R8I),re===n.SHORT&&(De=n.R16I),re===n.INT&&(De=n.R32I)),I===n.RG&&(re===n.FLOAT&&(De=n.RG32F),re===n.HALF_FLOAT&&(De=n.RG16F),re===n.UNSIGNED_BYTE&&(De=n.RG8)),I===n.RGBA){const vt=Ie?dS:ii.getTransfer(Pe);re===n.FLOAT&&(De=n.RGBA32F),re===n.HALF_FLOAT&&(De=n.RGBA16F),re===n.UNSIGNED_BYTE&&(De=vt===Ai?n.SRGB8_ALPHA8:n.RGBA8),re===n.UNSIGNED_SHORT_4_4_4_4&&(De=n.RGBA4),re===n.UNSIGNED_SHORT_5_5_5_1&&(De=n.RGB5_A1)}return(De===n.R16F||De===n.R32F||De===n.RG16F||De===n.RG32F||De===n.RGBA16F||De===n.RGBA32F)&&e.get("EXT_color_buffer_float"),De}function P(L,I,re){return!0===M(L,re)||L.isFramebufferTexture&&L.minFilter!==Ni&&L.minFilter!==Yi?Math.log2(Math.max(I.width,I.height))+1:void 0!==L.mipmaps&&L.mipmaps.length>0?L.mipmaps.length:L.isCompressedTexture&&Array.isArray(L.image)?I.mipmaps.length:1}function A(L){return L===Ni||L===aS||L===Hy?n.NEAREST:n.LINEAR}function R(L){const I=L.target;I.removeEventListener("dispose",R),function E(L){const I=i.get(L);if(void 0===I.__webglInit)return;const re=L.source,Pe=p.get(re);if(Pe){const Ie=Pe[I.__cacheKey];Ie.usedTimes--,0===Ie.usedTimes&&k(L),0===Object.keys(Pe).length&&p.delete(re)}i.remove(L)}(I),I.isVideoTexture&&u.delete(I)}function V(L){const I=L.target;I.removeEventListener("dispose",V),function Z(L){const I=L.texture,re=i.get(L),Pe=i.get(I);if(void 0!==Pe.__webglTexture&&(n.deleteTexture(Pe.__webglTexture),o.memory.textures--),L.depthTexture&&L.depthTexture.dispose(),L.isWebGLCubeRenderTarget)for(let Ie=0;Ie<6;Ie++){if(Array.isArray(re.__webglFramebuffer[Ie]))for(let De=0;De0&&re.__version!==L.version){const Pe=L.image;if(null===Pe)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==Pe.complete)return void Ve(re,L,I);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}t.bindTexture(n.TEXTURE_2D,re.__webglTexture,n.TEXTURE0+I)}const ve={[ql]:n.REPEAT,[qi]:n.CLAMP_TO_EDGE,[zy]:n.MIRRORED_REPEAT},Se={[Ni]:n.NEAREST,[aS]:n.NEAREST_MIPMAP_NEAREST,[Hy]:n.NEAREST_MIPMAP_LINEAR,[Yi]:n.LINEAR,[yR]:n.LINEAR_MIPMAP_NEAREST,[Xc]:n.LINEAR_MIPMAP_LINEAR},Oe={[Nie]:n.NEVER,[Gie]:n.ALWAYS,[Bie]:n.LESS,[Kz]:n.LEQUAL,[Uie]:n.EQUAL,[Hie]:n.GEQUAL,[Vie]:n.GREATER,[zie]:n.NOTEQUAL};function le(L,I,re){if(re?(n.texParameteri(L,n.TEXTURE_WRAP_S,ve[I.wrapS]),n.texParameteri(L,n.TEXTURE_WRAP_T,ve[I.wrapT]),(L===n.TEXTURE_3D||L===n.TEXTURE_2D_ARRAY)&&n.texParameteri(L,n.TEXTURE_WRAP_R,ve[I.wrapR]),n.texParameteri(L,n.TEXTURE_MAG_FILTER,Se[I.magFilter]),n.texParameteri(L,n.TEXTURE_MIN_FILTER,Se[I.minFilter])):(n.texParameteri(L,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(L,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),(L===n.TEXTURE_3D||L===n.TEXTURE_2D_ARRAY)&&n.texParameteri(L,n.TEXTURE_WRAP_R,n.CLAMP_TO_EDGE),(I.wrapS!==qi||I.wrapT!==qi)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(L,n.TEXTURE_MAG_FILTER,A(I.magFilter)),n.texParameteri(L,n.TEXTURE_MIN_FILTER,A(I.minFilter)),I.minFilter!==Ni&&I.minFilter!==Yi&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),I.compareFunction&&(n.texParameteri(L,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(L,n.TEXTURE_COMPARE_FUNC,Oe[I.compareFunction])),!0===e.has("EXT_texture_filter_anisotropic")){const Pe=e.get("EXT_texture_filter_anisotropic");if(I.magFilter===Ni||I.minFilter!==Hy&&I.minFilter!==Xc||I.type===Yl&&!1===e.has("OES_texture_float_linear")||!1===a&&I.type===Gy&&!1===e.has("OES_texture_half_float_linear"))return;(I.anisotropy>1||i.get(I).__currentAnisotropy)&&(n.texParameterf(L,Pe.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(I.anisotropy,r.getMaxAnisotropy())),i.get(I).__currentAnisotropy=I.anisotropy)}}function me(L,I){let re=!1;void 0===L.__webglInit&&(L.__webglInit=!0,I.addEventListener("dispose",R));const Pe=I.source;let Ie=p.get(Pe);void 0===Ie&&(Ie={},p.set(Pe,Ie));const De=function ne(L){const I=[];return I.push(L.wrapS),I.push(L.wrapT),I.push(L.wrapR||0),I.push(L.magFilter),I.push(L.minFilter),I.push(L.anisotropy),I.push(L.internalFormat),I.push(L.format),I.push(L.type),I.push(L.generateMipmaps),I.push(L.premultiplyAlpha),I.push(L.flipY),I.push(L.unpackAlignment),I.push(L.colorSpace),I.join()}(I);if(De!==L.__cacheKey){void 0===Ie[De]&&(Ie[De]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,re=!0),Ie[De].usedTimes++;const vt=Ie[L.__cacheKey];void 0!==vt&&(Ie[L.__cacheKey].usedTimes--,0===vt.usedTimes&&k(I)),L.__cacheKey=De,L.__webglTexture=Ie[De].texture}return re}function Ve(L,I,re){let Pe=n.TEXTURE_2D;(I.isDataArrayTexture||I.isCompressedArrayTexture)&&(Pe=n.TEXTURE_2D_ARRAY),I.isData3DTexture&&(Pe=n.TEXTURE_3D);const Ie=me(L,I),De=I.source;t.bindTexture(Pe,L.__webglTexture,n.TEXTURE0+re);const vt=i.get(De);if(De.version!==vt.__version||!0===Ie){t.activeTexture(n.TEXTURE0+re);const je=ii.getPrimaries(ii.workingColorSpace),at=I.colorSpace===wa?null:ii.getPrimaries(I.colorSpace),Bt=I.colorSpace===wa||je===at?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,I.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,I.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,Bt);const gn=function v(L){return!a&&(L.wrapS!==qi||L.wrapT!==qi||L.minFilter!==Ni&&L.minFilter!==Yi)}(I)&&!1===y(I.image);let Re=b(I.image,gn,!1,r.maxTextureSize);Re=nt(I,Re);const Kn=y(Re)||a,Ln=s.convert(I.format,I.colorSpace);let ut,on=s.convert(I.type),Pt=S(I.internalFormat,Ln,on,I.colorSpace,I.isVideoTexture);le(Pe,I,Kn);const yn=I.mipmaps,si=a&&!0!==I.isVideoTexture&&Pt!==Sz,Qi=void 0===vt.__version||!0===Ie,En=P(I,Re,Kn);if(I.isDepthTexture)Pt=n.DEPTH_COMPONENT,a?Pt=I.type===Yl?n.DEPTH_COMPONENT32F:I.type===lu?n.DEPTH_COMPONENT24:I.type===Fh?n.DEPTH24_STENCIL8:n.DEPTH_COMPONENT16:I.type===Yl&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),I.format===Nh&&Pt===n.DEPTH_COMPONENT&&I.type!==bR&&I.type!==lu&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),I.type=lu,on=s.convert(I.type)),I.format===Im&&Pt===n.DEPTH_COMPONENT&&(Pt=n.DEPTH_STENCIL,I.type!==Fh&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),I.type=Fh,on=s.convert(I.type))),Qi&&(si?t.texStorage2D(n.TEXTURE_2D,1,Pt,Re.width,Re.height):t.texImage2D(n.TEXTURE_2D,0,Pt,Re.width,Re.height,0,Ln,on,null));else if(I.isDataTexture)if(yn.length>0&&Kn){si&&Qi&&t.texStorage2D(n.TEXTURE_2D,En,Pt,yn[0].width,yn[0].height);for(let Ge=0,X=yn.length;Ge>=1,X>>=1}}else if(yn.length>0&&Kn){si&&Qi&&t.texStorage2D(n.TEXTURE_2D,En,Pt,yn[0].width,yn[0].height);for(let Ge=0,X=yn.length;Ge>De),Re=Math.max(1,I.height>>De);Ie===n.TEXTURE_3D||Ie===n.TEXTURE_2D_ARRAY?t.texImage3D(Ie,De,at,gn,Re,I.depth,0,vt,je,null):t.texImage2D(Ie,De,at,gn,Re,0,vt,je,null)}t.bindFramebuffer(n.FRAMEBUFFER,L),xe(I)?l.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,Pe,Ie,i.get(re).__webglTexture,0,Le(I)):(Ie===n.TEXTURE_2D||Ie>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&Ie<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,Pe,Ie,i.get(re).__webglTexture,De),t.bindFramebuffer(n.FRAMEBUFFER,null)}function mt(L,I,re){if(n.bindRenderbuffer(n.RENDERBUFFER,L),I.depthBuffer&&!I.stencilBuffer){let Pe=!0===a?n.DEPTH_COMPONENT24:n.DEPTH_COMPONENT16;if(re||xe(I)){const Ie=I.depthTexture;Ie&&Ie.isDepthTexture&&(Ie.type===Yl?Pe=n.DEPTH_COMPONENT32F:Ie.type===lu&&(Pe=n.DEPTH_COMPONENT24));const De=Le(I);xe(I)?l.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,De,Pe,I.width,I.height):n.renderbufferStorageMultisample(n.RENDERBUFFER,De,Pe,I.width,I.height)}else n.renderbufferStorage(n.RENDERBUFFER,Pe,I.width,I.height);n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,L)}else if(I.depthBuffer&&I.stencilBuffer){const Pe=Le(I);re&&!1===xe(I)?n.renderbufferStorageMultisample(n.RENDERBUFFER,Pe,n.DEPTH24_STENCIL8,I.width,I.height):xe(I)?l.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,Pe,n.DEPTH24_STENCIL8,I.width,I.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,I.width,I.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,L)}else{const Pe=!0===I.isWebGLMultipleRenderTargets?I.texture:[I.texture];for(let Ie=0;Ie0&&!0===e.has("WEBGL_multisampled_render_to_texture")&&!1!==I.__useRenderToTexture}function nt(L,I){const re=L.colorSpace,Pe=L.format,Ie=L.type;return!0===L.isCompressedTexture||!0===L.isVideoTexture||L.format===IR||re!==Hr&&re!==wa&&(ii.getTransfer(re)===Ai?!1===a?!0===e.has("EXT_sRGB")&&Pe===zo?(L.format=IR,L.minFilter=Yi,L.generateMipmaps=!1):I=iH.sRGBToLinear(I):(Pe!==zo||Ie!==au)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",re)),I}this.allocateTextureUnit=function W(){const L=ue;return L>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+L+" texture units while this GPU supports only "+r.maxTextures),ue+=1,L},this.resetTextureUnits=function Me(){ue=0},this.setTexture2D=$,this.setTexture2DArray=function ee(L,I){const re=i.get(L);L.version>0&&re.__version!==L.version?Ve(re,L,I):t.bindTexture(n.TEXTURE_2D_ARRAY,re.__webglTexture,n.TEXTURE0+I)},this.setTexture3D=function ie(L,I){const re=i.get(L);L.version>0&&re.__version!==L.version?Ve(re,L,I):t.bindTexture(n.TEXTURE_3D,re.__webglTexture,n.TEXTURE0+I)},this.setTextureCube=function se(L,I){const re=i.get(L);L.version>0&&re.__version!==L.version?function rt(L,I,re){if(6!==I.image.length)return;const Pe=me(L,I),Ie=I.source;t.bindTexture(n.TEXTURE_CUBE_MAP,L.__webglTexture,n.TEXTURE0+re);const De=i.get(Ie);if(Ie.version!==De.__version||!0===Pe){t.activeTexture(n.TEXTURE0+re);const vt=ii.getPrimaries(ii.workingColorSpace),je=I.colorSpace===wa?null:ii.getPrimaries(I.colorSpace),at=I.colorSpace===wa||vt===je?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,I.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,I.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,at);const Bt=I.isCompressedTexture||I.image[0].isCompressedTexture,gn=I.image[0]&&I.image[0].isDataTexture,Re=[];for(let Ge=0;Ge<6;Ge++)Re[Ge]=Bt||gn?gn?I.image[Ge].image:I.image[Ge]:b(I.image[Ge],!1,!0,r.maxCubemapSize),Re[Ge]=nt(I,Re[Ge]);const Kn=Re[0],Ln=y(Kn)||a,on=s.convert(I.format,I.colorSpace),Pt=s.convert(I.type),ut=S(I.internalFormat,on,Pt,I.colorSpace),yn=a&&!0!==I.isVideoTexture,si=void 0===De.__version||!0===Pe;let En,Qi=P(I,Kn,Ln);if(le(n.TEXTURE_CUBE_MAP,I,Ln),Bt){yn&&si&&t.texStorage2D(n.TEXTURE_CUBE_MAP,Qi,ut,Kn.width,Kn.height);for(let Ge=0;Ge<6;Ge++){En=Re[Ge].mipmaps;for(let X=0;X0&&Qi++,t.texStorage2D(n.TEXTURE_CUBE_MAP,Qi,ut,Re[0].width,Re[0].height));for(let Ge=0;Ge<6;Ge++)if(gn){yn?t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Ge,0,0,0,Re[Ge].width,Re[Ge].height,on,Pt,Re[Ge].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Ge,0,ut,Re[Ge].width,Re[Ge].height,0,on,Pt,Re[Ge].data);for(let X=0;X0){re.__webglFramebuffer[je]=[];for(let at=0;at0){re.__webglFramebuffer=[];for(let je=0;je0&&!1===xe(L)){const je=De?I:[I];re.__webglMultisampledFramebuffer=n.createFramebuffer(),re.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,re.__webglMultisampledFramebuffer);for(let at=0;at0)for(let at=0;at0)for(let at=0;at0&&!1===xe(L)){const I=L.isWebGLMultipleRenderTargets?L.texture:[L.texture],re=L.width,Pe=L.height;let Ie=n.COLOR_BUFFER_BIT;const De=[],vt=L.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,je=i.get(L),at=!0===L.isWebGLMultipleRenderTargets;if(at)for(let Bt=0;Btm+g?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&p<=m-g&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==l&&e.gripSpace&&(s=t.getPose(e.gripSpace,i),null!==s&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));null!==a&&(r=t.getPose(e.targetRaySpace,i),null===r&&null!==s&&(r=s),null!==r&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(Ele)))}return null!==a&&(a.visible=null!==r),null!==l&&(l.visible=null!==s),null!==c&&(c.visible=null!==o),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){const i=new jo;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class Ale extends Lm{constructor(e,t){super();const i=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,u=null,h=null,p=null,m=null,g=null;const b=t.getContextAttributes();let y=null,v=null;const M=[],x=[],S=new Ce;let P=null;const A=new _r;A.layers.enable(1),A.viewport=new ai;const R=new _r;R.layers.enable(2),R.viewport=new ai;const V=[A,R],E=new Cle;E.layers.enable(1),E.layers.enable(2);let k=null,Z=null;function ue(le){const me=x.indexOf(le.inputSource);if(-1===me)return;const Ve=M[me];void 0!==Ve&&(Ve.update(le.inputSource,le.frame,c||o),Ve.dispatchEvent({type:le.type,data:le.inputSource}))}function Me(){r.removeEventListener("select",ue),r.removeEventListener("selectstart",ue),r.removeEventListener("selectend",ue),r.removeEventListener("squeeze",ue),r.removeEventListener("squeezestart",ue),r.removeEventListener("squeezeend",ue),r.removeEventListener("end",Me),r.removeEventListener("inputsourceschange",W);for(let le=0;le=0&&(x[rt]=null,M[rt].disconnect(Ve))}for(let me=0;me=x.length){x.push(Ve),rt=mt;break}if(null===x[mt]){x[mt]=Ve,rt=mt;break}}if(-1===rt)break}const Be=M[rt];Be&&Be.connect(Ve)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(le){let me=M[le];return void 0===me&&(me=new oP,M[le]=me),me.getTargetRaySpace()},this.getControllerGrip=function(le){let me=M[le];return void 0===me&&(me=new oP,M[le]=me),me.getGripSpace()},this.getHand=function(le){let me=M[le];return void 0===me&&(me=new oP,M[le]=me),me.getHandSpace()},this.setFramebufferScaleFactor=function(le){s=le,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(le){a=le,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(le){c=le},this.getBaseLayer=function(){return null!==p?p:m},this.getBinding=function(){return h},this.getFrame=function(){return g},this.getSession=function(){return r},this.setSession=function(){var le=xt(function*(me){if(r=me,null!==r){if(y=e.getRenderTarget(),r.addEventListener("select",ue),r.addEventListener("selectstart",ue),r.addEventListener("selectend",ue),r.addEventListener("squeeze",ue),r.addEventListener("squeezestart",ue),r.addEventListener("squeezeend",ue),r.addEventListener("end",Me),r.addEventListener("inputsourceschange",W),!0!==b.xrCompatible&&(yield t.makeXRCompatible()),P=e.getPixelRatio(),e.getSize(S),void 0===r.renderState.layers||!1===e.capabilities.isWebGL2)m=new XRWebGLLayer(r,t,{antialias:void 0!==r.renderState.layers||b.antialias,alpha:!0,depth:b.depth,stencil:b.stencil,framebufferScaleFactor:s}),r.updateRenderState({baseLayer:m}),e.setPixelRatio(1),e.setSize(m.framebufferWidth,m.framebufferHeight,!1),v=new Vh(m.framebufferWidth,m.framebufferHeight,{format:zo,type:au,colorSpace:e.outputColorSpace,stencilBuffer:b.stencil});else{let Ve=null,rt=null,Be=null;b.depth&&(Be=b.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,Ve=b.stencil?Im:Nh,rt=b.stencil?Fh:lu);const mt={colorFormat:t.RGBA8,depthFormat:Be,scaleFactor:s};h=new XRWebGLBinding(r,t),p=h.createProjectionLayer(mt),r.updateRenderState({layers:[p]}),e.setPixelRatio(1),e.setSize(p.textureWidth,p.textureHeight,!1),v=new Vh(p.textureWidth,p.textureHeight,{format:zo,type:au,depthTexture:new IH(p.textureWidth,p.textureHeight,rt,void 0,void 0,void 0,void 0,void 0,void 0,Ve),stencilBuffer:b.stencil,colorSpace:e.outputColorSpace,samples:b.antialias?4:0}),e.properties.get(v).__ignoreDepthValues=p.ignoreDepthValues}v.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),Oe.setContext(r),Oe.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}});return function(me){return le.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode};const ne=new N,$=new N;function ie(le,me){null===me?le.matrixWorld.copy(le.matrix):le.matrixWorld.multiplyMatrices(me.matrixWorld,le.matrix),le.matrixWorldInverse.copy(le.matrixWorld).invert()}this.updateCamera=function(le){if(null===r)return;E.near=R.near=A.near=le.near,E.far=R.far=A.far=le.far,(k!==E.near||Z!==E.far)&&(r.updateRenderState({depthNear:E.near,depthFar:E.far}),k=E.near,Z=E.far);const me=le.parent,Ve=E.cameras;ie(E,me);for(let rt=0;rt0&&(y.alphaTest.value=v.alphaTest);const M=e.get(v).envMap;if(M&&(y.envMap.value=M,y.flipEnvMap.value=M.isCubeTexture&&!1===M.isRenderTargetTexture?-1:1,y.reflectivity.value=v.reflectivity,y.ior.value=v.ior,y.refractionRatio.value=v.refractionRatio),v.lightMap){y.lightMap.value=v.lightMap;const x=!0===n._useLegacyLights?Math.PI:1;y.lightMapIntensity.value=v.lightMapIntensity*x,t(v.lightMap,y.lightMapTransform)}v.aoMap&&(y.aoMap.value=v.aoMap,y.aoMapIntensity.value=v.aoMapIntensity,t(v.aoMap,y.aoMapTransform))}return{refreshFogUniforms:function i(y,v){v.color.getRGB(y.fogColor.value,xH(n)),v.isFog?(y.fogNear.value=v.near,y.fogFar.value=v.far):v.isFogExp2&&(y.fogDensity.value=v.density)},refreshMaterialUniforms:function r(y,v,M,x,S){v.isMeshBasicMaterial||v.isMeshLambertMaterial?s(y,v):v.isMeshToonMaterial?(s(y,v),function h(y,v){v.gradientMap&&(y.gradientMap.value=v.gradientMap)}(y,v)):v.isMeshPhongMaterial?(s(y,v),function u(y,v){y.specular.value.copy(v.specular),y.shininess.value=Math.max(v.shininess,1e-4)}(y,v)):v.isMeshStandardMaterial?(s(y,v),function p(y,v){y.metalness.value=v.metalness,v.metalnessMap&&(y.metalnessMap.value=v.metalnessMap,t(v.metalnessMap,y.metalnessMapTransform)),y.roughness.value=v.roughness,v.roughnessMap&&(y.roughnessMap.value=v.roughnessMap,t(v.roughnessMap,y.roughnessMapTransform)),e.get(v).envMap&&(y.envMapIntensity.value=v.envMapIntensity)}(y,v),v.isMeshPhysicalMaterial&&function m(y,v,M){y.ior.value=v.ior,v.sheen>0&&(y.sheenColor.value.copy(v.sheenColor).multiplyScalar(v.sheen),y.sheenRoughness.value=v.sheenRoughness,v.sheenColorMap&&(y.sheenColorMap.value=v.sheenColorMap,t(v.sheenColorMap,y.sheenColorMapTransform)),v.sheenRoughnessMap&&(y.sheenRoughnessMap.value=v.sheenRoughnessMap,t(v.sheenRoughnessMap,y.sheenRoughnessMapTransform))),v.clearcoat>0&&(y.clearcoat.value=v.clearcoat,y.clearcoatRoughness.value=v.clearcoatRoughness,v.clearcoatMap&&(y.clearcoatMap.value=v.clearcoatMap,t(v.clearcoatMap,y.clearcoatMapTransform)),v.clearcoatRoughnessMap&&(y.clearcoatRoughnessMap.value=v.clearcoatRoughnessMap,t(v.clearcoatRoughnessMap,y.clearcoatRoughnessMapTransform)),v.clearcoatNormalMap&&(y.clearcoatNormalMap.value=v.clearcoatNormalMap,t(v.clearcoatNormalMap,y.clearcoatNormalMapTransform),y.clearcoatNormalScale.value.copy(v.clearcoatNormalScale),v.side===vo&&y.clearcoatNormalScale.value.negate())),v.iridescence>0&&(y.iridescence.value=v.iridescence,y.iridescenceIOR.value=v.iridescenceIOR,y.iridescenceThicknessMinimum.value=v.iridescenceThicknessRange[0],y.iridescenceThicknessMaximum.value=v.iridescenceThicknessRange[1],v.iridescenceMap&&(y.iridescenceMap.value=v.iridescenceMap,t(v.iridescenceMap,y.iridescenceMapTransform)),v.iridescenceThicknessMap&&(y.iridescenceThicknessMap.value=v.iridescenceThicknessMap,t(v.iridescenceThicknessMap,y.iridescenceThicknessMapTransform))),v.transmission>0&&(y.transmission.value=v.transmission,y.transmissionSamplerMap.value=M.texture,y.transmissionSamplerSize.value.set(M.width,M.height),v.transmissionMap&&(y.transmissionMap.value=v.transmissionMap,t(v.transmissionMap,y.transmissionMapTransform)),y.thickness.value=v.thickness,v.thicknessMap&&(y.thicknessMap.value=v.thicknessMap,t(v.thicknessMap,y.thicknessMapTransform)),y.attenuationDistance.value=v.attenuationDistance,y.attenuationColor.value.copy(v.attenuationColor)),v.anisotropy>0&&(y.anisotropyVector.value.set(v.anisotropy*Math.cos(v.anisotropyRotation),v.anisotropy*Math.sin(v.anisotropyRotation)),v.anisotropyMap&&(y.anisotropyMap.value=v.anisotropyMap,t(v.anisotropyMap,y.anisotropyMapTransform))),y.specularIntensity.value=v.specularIntensity,y.specularColor.value.copy(v.specularColor),v.specularColorMap&&(y.specularColorMap.value=v.specularColorMap,t(v.specularColorMap,y.specularColorMapTransform)),v.specularIntensityMap&&(y.specularIntensityMap.value=v.specularIntensityMap,t(v.specularIntensityMap,y.specularIntensityMapTransform))}(y,v,S)):v.isMeshMatcapMaterial?(s(y,v),function g(y,v){v.matcap&&(y.matcap.value=v.matcap)}(y,v)):v.isMeshDepthMaterial?s(y,v):v.isMeshDistanceMaterial?(s(y,v),function b(y,v){const M=e.get(v).light;y.referencePosition.value.setFromMatrixPosition(M.matrixWorld),y.nearDistance.value=M.shadow.camera.near,y.farDistance.value=M.shadow.camera.far}(y,v)):v.isMeshNormalMaterial?s(y,v):v.isLineBasicMaterial?(function o(y,v){y.diffuse.value.copy(v.color),y.opacity.value=v.opacity,v.map&&(y.map.value=v.map,t(v.map,y.mapTransform))}(y,v),v.isLineDashedMaterial&&function a(y,v){y.dashSize.value=v.dashSize,y.totalSize.value=v.dashSize+v.gapSize,y.scale.value=v.scale}(y,v)):v.isPointsMaterial?function l(y,v,M,x){y.diffuse.value.copy(v.color),y.opacity.value=v.opacity,y.size.value=v.size*M,y.scale.value=.5*x,v.map&&(y.map.value=v.map,t(v.map,y.uvTransform)),v.alphaMap&&(y.alphaMap.value=v.alphaMap,t(v.alphaMap,y.alphaMapTransform)),v.alphaTest>0&&(y.alphaTest.value=v.alphaTest)}(y,v,M,x):v.isSpriteMaterial?function c(y,v){y.diffuse.value.copy(v.color),y.opacity.value=v.opacity,y.rotation.value=v.rotation,v.map&&(y.map.value=v.map,t(v.map,y.mapTransform)),v.alphaMap&&(y.alphaMap.value=v.alphaMap,t(v.alphaMap,y.alphaMapTransform)),v.alphaTest>0&&(y.alphaTest.value=v.alphaTest)}(y,v):v.isShadowMaterial?(y.color.value.copy(v.color),y.opacity.value=v.opacity):v.isShaderMaterial&&(v.uniformsNeedUpdate=!1)}}}function Dle(n,e,t,i){let r={},s={},o=[];const a=t.isWebGL2?n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS):0;function m(M,x,S,P){const A=M.value,R=x+"_"+S;if(void 0===P[R])return P[R]="number"==typeof A||"boolean"==typeof A?A:A.clone(),!0;{const V=P[R];if("number"==typeof A||"boolean"==typeof A){if(V!==A)return P[R]=A,!0}else if(!1===V.equals(A))return V.copy(A),!0}return!1}function b(M){const x={boundary:0,storage:0};return"number"==typeof M||"boolean"==typeof M?(x.boundary=4,x.storage=4):M.isVector2?(x.boundary=8,x.storage=8):M.isVector3||M.isColor?(x.boundary=16,x.storage=12):M.isVector4?(x.boundary=16,x.storage=16):M.isMatrix3?(x.boundary=48,x.storage=48):M.isMatrix4?(x.boundary=64,x.storage=64):M.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",M),x}function y(M){const x=M.target;x.removeEventListener("dispose",y);const S=o.indexOf(x.__bindingPointIndex);o.splice(S,1),n.deleteBuffer(r[x.id]),delete r[x.id],delete s[x.id]}return{bind:function l(M,x){i.uniformBlockBinding(M,x.program)},update:function c(M,x){let S=r[M.id];void 0===S&&(function g(M){const x=M.uniforms;let S=0;for(let R=0,V=x.length;R0&&(S+=16-A),M.__size=S,M.__cache={}}(M),S=function u(M){const x=function h(){for(let M=0;M0),_n=!!de.morphAttributes.position,or=!!de.morphAttributes.normal,Yo=!!de.morphAttributes.color;let Xr=ou;he.toneMapped&&(null===R||!0===R.isXRRenderTarget)&&(Xr=x.toneMapping);const id=de.morphAttributes.position||de.morphAttributes.normal||de.morphAttributes.color,Ui=void 0!==id?id.length:0,An=nt.get(he),Dk=y.state.lights;!0!==me||!0!==Ve&&F===E||gn.setState(he,F,F===E&&he.id===V);let Ji=!1;he.version===An.__version?(An.needsLights&&An.lightsStateVersion!==Dk.state.version||An.outputColorSpace!==Gt||ce.isBatchedMesh&&!1===An.batching||!ce.isBatchedMesh&&!0===An.batching||ce.isInstancedMesh&&!1===An.instancing||!ce.isInstancedMesh&&!0===An.instancing||ce.isSkinnedMesh&&!1===An.skinning||!ce.isSkinnedMesh&&!0===An.skinning||ce.isInstancedMesh&&!0===An.instancingColor&&null===ce.instanceColor||ce.isInstancedMesh&&!1===An.instancingColor&&null!==ce.instanceColor||An.envMap!==Zt||!0===he.fog&&An.fog!==st||void 0!==An.numClippingPlanes&&(An.numClippingPlanes!==gn.numPlanes||An.numIntersection!==gn.numIntersection)||An.vertexAlphas!==Mn||An.vertexTangents!==dn||An.morphTargets!==_n||An.morphNormals!==or||An.morphColors!==Yo||An.toneMapping!==Xr||!0===Le.isWebGL2&&An.morphTargetsCount!==Ui)&&(Ji=!0):(Ji=!0,An.__version=he.version);let gf=An.currentProgram;!0===Ji&&(gf=qC(he,te,ce));let PG=!1,Eb=!1,Ik=!1;const Cs=gf.getUniforms(),_f=An.uniforms;if(xe.useProgram(gf.program)&&(PG=!0,Eb=!0,Ik=!0),he.id!==V&&(V=he.id,Eb=!0),PG||E!==F){Cs.setValue(H,"projectionMatrix",F.projectionMatrix),Cs.setValue(H,"viewMatrix",F.matrixWorldInverse);const Da=Cs.map.cameraPosition;void 0!==Da&&Da.setValue(H,gt.setFromMatrixPosition(F.matrixWorld)),Le.logarithmicDepthBuffer&&Cs.setValue(H,"logDepthBufFC",2/(Math.log(F.far+1)/Math.LN2)),(he.isMeshPhongMaterial||he.isMeshToonMaterial||he.isMeshLambertMaterial||he.isMeshBasicMaterial||he.isMeshStandardMaterial||he.isShaderMaterial)&&Cs.setValue(H,"isOrthographic",!0===F.isOrthographicCamera),E!==F&&(E=F,Eb=!0,Ik=!0)}if(ce.isSkinnedMesh){Cs.setOptional(H,ce,"bindMatrix"),Cs.setOptional(H,ce,"bindMatrixInverse");const Da=ce.skeleton;Da&&(Le.floatVertexTextures?(null===Da.boneTexture&&Da.computeBoneTexture(),Cs.setValue(H,"boneTexture",Da.boneTexture,L)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}ce.isBatchedMesh&&(Cs.setOptional(H,ce,"batchingTexture"),Cs.setValue(H,"batchingTexture",ce._matricesTexture,L));const Rk=de.morphAttributes;if((void 0!==Rk.position||void 0!==Rk.normal||void 0!==Rk.color&&!0===Le.isWebGL2)&&Ln.update(ce,de,gf),(Eb||An.receiveShadow!==ce.receiveShadow)&&(An.receiveShadow=ce.receiveShadow,Cs.setValue(H,"receiveShadow",ce.receiveShadow)),he.isMeshGouraudMaterial&&null!==he.envMap&&(_f.envMap.value=Zt,_f.flipEnvMap.value=Zt.isCubeTexture&&!1===Zt.isRenderTargetTexture?-1:1),Eb&&(Cs.setValue(H,"toneMappingExposure",x.toneMappingExposure),An.needsLights&&function Rme(F,te){F.ambientLightColor.needsUpdate=te,F.lightProbe.needsUpdate=te,F.directionalLights.needsUpdate=te,F.directionalLightShadows.needsUpdate=te,F.pointLights.needsUpdate=te,F.pointLightShadows.needsUpdate=te,F.spotLights.needsUpdate=te,F.spotLightShadows.needsUpdate=te,F.rectAreaLights.needsUpdate=te,F.hemisphereLights.needsUpdate=te}(_f,Ik),st&&!0===he.fog&&je.refreshFogUniforms(_f,st),je.refreshMaterialUniforms(_f,he,ee,$,rt),zS.upload(H,IG(An),_f,L)),he.isShaderMaterial&&!0===he.uniformsNeedUpdate&&(zS.upload(H,IG(An),_f,L),he.uniformsNeedUpdate=!1),he.isSpriteMaterial&&Cs.setValue(H,"center",ce.center),Cs.setValue(H,"modelViewMatrix",ce.modelViewMatrix),Cs.setValue(H,"normalMatrix",ce.normalMatrix),Cs.setValue(H,"modelMatrix",ce.matrixWorld),he.isShaderMaterial||he.isRawShaderMaterial){const Da=he.uniformsGroups;for(let Pk=0,kme=Da.length;Pk{function st(){he.forEach(function(wt){nt.get(wt).currentProgram.isReady()&&he.delete(wt)}),0!==he.size?setTimeout(st,10):ce(F)}null!==we.get("KHR_parallel_shader_compile")?st():setTimeout(st,10)})};let bi=null;function to(){no.stop()}function xi(){no.start()}const no=new wH;function nc(F,te,de,he){if(!1===F.visible)return;if(F.layers.test(te.layers))if(F.isGroup)de=F.renderOrder;else if(F.isLOD)!0===F.autoUpdate&&F.update(te);else if(F.isLight)y.pushLight(F),F.castShadow&&y.pushShadow(F);else if(F.isSprite){if(!F.frustumCulled||le.intersectsSprite(F)){he&>.setFromMatrixPosition(F.matrixWorld).applyMatrix4(Be);const wt=De.update(F),Gt=F.material;Gt.visible&&b.push(F,wt,Gt,de,gt.z,null)}}else if((F.isMesh||F.isLine||F.isPoints)&&(!F.frustumCulled||le.intersectsObject(F))){const wt=De.update(F),Gt=F.material;if(he&&(void 0!==F.boundingSphere?(null===F.boundingSphere&&F.computeBoundingSphere(),gt.copy(F.boundingSphere.center)):(null===wt.boundingSphere&&wt.computeBoundingSphere(),gt.copy(wt.boundingSphere.center)),gt.applyMatrix4(F.matrixWorld).applyMatrix4(Be)),Array.isArray(Gt)){const Zt=wt.groups;for(let Mn=0,dn=Zt.length;Mn0&&function Dme(F,te,de,he){if(null!==(!0===de.isScene?de.overrideMaterial:null))return;const st=Le.isWebGL2;null===rt&&(rt=new Vh(1,1,{generateMipmaps:!0,type:we.has("EXT_color_buffer_half_float")?Gy:au,minFilter:Xc,samples:st?4:0})),x.getDrawingBufferSize(mt),st?rt.setSize(mt.x,mt.y):rt.setSize(pS(mt.x),pS(mt.y));const wt=x.getRenderTarget();x.setRenderTarget(rt),x.getClearColor(Me),W=x.getClearAlpha(),W<1&&x.setClearColor(16777215,.5),x.clear();const Gt=x.toneMapping;x.toneMapping=ou,XC(F,de,he),L.updateMultisampleRenderTarget(rt),L.updateRenderTargetMipmap(rt);let Zt=!1;for(let Mn=0,dn=te.length;Mn0&&XC(ce,te,de),st.length>0&&XC(st,te,de),wt.length>0&&XC(wt,te,de),xe.buffers.depth.setTest(!0),xe.buffers.depth.setMask(!0),xe.buffers.color.setMask(!0),xe.setPolygonOffset(!1)}function XC(F,te,de){const he=!0===te.isScene?te.overrideMaterial:null;for(let ce=0,st=F.length;ce0?M[M.length-1]:null,v.pop(),b=v.length>0?v[v.length-1]:null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.getActiveCubeFace=function(){return P},this.getActiveMipmapLevel=function(){return A},this.getRenderTarget=function(){return R},this.setRenderTargetTextures=function(F,te,de){nt.get(F.texture).__webglTexture=te,nt.get(F.depthTexture).__webglTexture=de;const he=nt.get(F);he.__hasExternalTextures=!0,he.__hasExternalTextures&&(he.__autoAllocateDepthBuffer=void 0===de,he.__autoAllocateDepthBuffer||!0===we.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),he.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(F,te){const de=nt.get(F);de.__webglFramebuffer=te,de.__useDefaultFramebuffer=void 0===te},this.setRenderTarget=function(F,te=0,de=0){R=F,P=te,A=de;let he=!0,ce=null,st=!1,wt=!1;if(F){const Zt=nt.get(F);void 0!==Zt.__useDefaultFramebuffer?(xe.bindFramebuffer(H.FRAMEBUFFER,null),he=!1):void 0===Zt.__webglFramebuffer?L.setupRenderTarget(F):Zt.__hasExternalTextures&&L.rebindTextures(F,nt.get(F.texture).__webglTexture,nt.get(F.depthTexture).__webglTexture);const Mn=F.texture;(Mn.isData3DTexture||Mn.isDataArrayTexture||Mn.isCompressedArrayTexture)&&(wt=!0);const dn=nt.get(F).__webglFramebuffer;F.isWebGLCubeRenderTarget?(ce=Array.isArray(dn[te])?dn[te][de]:dn[te],st=!0):ce=Le.isWebGL2&&F.samples>0&&!1===L.useMultisampledRTT(F)?nt.get(F).__webglMultisampledFramebuffer:Array.isArray(dn)?dn[de]:dn,k.copy(F.viewport),Z.copy(F.scissor),ue=F.scissorTest}else k.copy(ve).multiplyScalar(ee).floor(),Z.copy(Se).multiplyScalar(ee).floor(),ue=Oe;if(xe.bindFramebuffer(H.FRAMEBUFFER,ce)&&Le.drawBuffers&&he&&xe.drawBuffers(F,ce),xe.viewport(k),xe.scissor(Z),xe.setScissorTest(ue),st){const Zt=nt.get(F.texture);H.framebufferTexture2D(H.FRAMEBUFFER,H.COLOR_ATTACHMENT0,H.TEXTURE_CUBE_MAP_POSITIVE_X+te,Zt.__webglTexture,de)}else if(wt){const Zt=nt.get(F.texture);H.framebufferTextureLayer(H.FRAMEBUFFER,H.COLOR_ATTACHMENT0,Zt.__webglTexture,de||0,te||0)}V=-1},this.readRenderTargetPixels=function(F,te,de,he,ce,st,wt){if(!F||!F.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Gt=nt.get(F).__webglFramebuffer;if(F.isWebGLCubeRenderTarget&&void 0!==wt&&(Gt=Gt[wt]),Gt){xe.bindFramebuffer(H.FRAMEBUFFER,Gt);try{const Zt=F.texture,Mn=Zt.format,dn=Zt.type;if(Mn!==zo&&ut.convert(Mn)!==H.getParameter(H.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const _n=dn===Gy&&(we.has("EXT_color_buffer_half_float")||Le.isWebGL2&&we.has("EXT_color_buffer_float"));if(!(dn===au||ut.convert(dn)===H.getParameter(H.IMPLEMENTATION_COLOR_READ_TYPE)||dn===Yl&&(Le.isWebGL2||we.has("OES_texture_float")||we.has("WEBGL_color_buffer_float"))||_n))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");te>=0&&te<=F.width-he&&de>=0&&de<=F.height-ce&&H.readPixels(te,de,he,ce,ut.convert(Mn),ut.convert(dn),st)}finally{const Zt=null!==R?nt.get(R).__webglFramebuffer:null;xe.bindFramebuffer(H.FRAMEBUFFER,Zt)}}},this.copyFramebufferToTexture=function(F,te,de=0){const he=Math.pow(2,-de),ce=Math.floor(te.image.width*he),st=Math.floor(te.image.height*he);L.setTexture2D(te,0),H.copyTexSubImage2D(H.TEXTURE_2D,de,0,0,F.x,F.y,ce,st),xe.unbindTexture()},this.copyTextureToTexture=function(F,te,de,he=0){const ce=te.image.width,st=te.image.height,wt=ut.convert(de.format),Gt=ut.convert(de.type);L.setTexture2D(de,0),H.pixelStorei(H.UNPACK_FLIP_Y_WEBGL,de.flipY),H.pixelStorei(H.UNPACK_PREMULTIPLY_ALPHA_WEBGL,de.premultiplyAlpha),H.pixelStorei(H.UNPACK_ALIGNMENT,de.unpackAlignment),te.isDataTexture?H.texSubImage2D(H.TEXTURE_2D,he,F.x,F.y,ce,st,wt,Gt,te.image.data):te.isCompressedTexture?H.compressedTexSubImage2D(H.TEXTURE_2D,he,F.x,F.y,te.mipmaps[0].width,te.mipmaps[0].height,wt,te.mipmaps[0].data):H.texSubImage2D(H.TEXTURE_2D,he,F.x,F.y,wt,Gt,te.image),0===he&&de.generateMipmaps&&H.generateMipmap(H.TEXTURE_2D),xe.unbindTexture()},this.copyTextureToTexture3D=function(F,te,de,he,ce=0){if(x.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const st=F.max.x-F.min.x+1,wt=F.max.y-F.min.y+1,Gt=F.max.z-F.min.z+1,Zt=ut.convert(he.format),Mn=ut.convert(he.type);let dn;if(he.isData3DTexture)L.setTexture3D(he,0),dn=H.TEXTURE_3D;else{if(!he.isDataArrayTexture&&!he.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");L.setTexture2DArray(he,0),dn=H.TEXTURE_2D_ARRAY}H.pixelStorei(H.UNPACK_FLIP_Y_WEBGL,he.flipY),H.pixelStorei(H.UNPACK_PREMULTIPLY_ALPHA_WEBGL,he.premultiplyAlpha),H.pixelStorei(H.UNPACK_ALIGNMENT,he.unpackAlignment);const _n=H.getParameter(H.UNPACK_ROW_LENGTH),or=H.getParameter(H.UNPACK_IMAGE_HEIGHT),Yo=H.getParameter(H.UNPACK_SKIP_PIXELS),Xr=H.getParameter(H.UNPACK_SKIP_ROWS),id=H.getParameter(H.UNPACK_SKIP_IMAGES),Ui=de.isCompressedTexture?de.mipmaps[ce]:de.image;H.pixelStorei(H.UNPACK_ROW_LENGTH,Ui.width),H.pixelStorei(H.UNPACK_IMAGE_HEIGHT,Ui.height),H.pixelStorei(H.UNPACK_SKIP_PIXELS,F.min.x),H.pixelStorei(H.UNPACK_SKIP_ROWS,F.min.y),H.pixelStorei(H.UNPACK_SKIP_IMAGES,F.min.z),de.isDataTexture||de.isData3DTexture?H.texSubImage3D(dn,ce,te.x,te.y,te.z,st,wt,Gt,Zt,Mn,Ui.data):de.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),H.compressedTexSubImage3D(dn,ce,te.x,te.y,te.z,st,wt,Gt,Zt,Ui.data)):H.texSubImage3D(dn,ce,te.x,te.y,te.z,st,wt,Gt,Zt,Mn,Ui),H.pixelStorei(H.UNPACK_ROW_LENGTH,_n),H.pixelStorei(H.UNPACK_IMAGE_HEIGHT,or),H.pixelStorei(H.UNPACK_SKIP_PIXELS,Yo),H.pixelStorei(H.UNPACK_SKIP_ROWS,Xr),H.pixelStorei(H.UNPACK_SKIP_IMAGES,id),0===ce&&he.generateMipmaps&&H.generateMipmap(dn),xe.unbindTexture()},this.initTexture=function(F){F.isCubeTexture?L.setTextureCube(F,0):F.isData3DTexture?L.setTexture3D(F,0):F.isDataArrayTexture||F.isCompressedArrayTexture?L.setTexture2DArray(F,0):L.setTexture2D(F,0),xe.unbindTexture()},this.resetState=function(){P=0,A=0,R=null,xe.reset(),yn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Kl}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===DR?"display-p3":"srgb",t.unpackColorSpace=ii.workingColorSpace===cS?"display-p3":"srgb"}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Ei?cu:3e3}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===cu?Ei:Hr}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}(class Ile extends JH{}).prototype.isWebGL1Renderer=!0;class HS extends Gr{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t}}class cP{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=35044,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=Ho()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}get updateRange(){return console.warn("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}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.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let r=0,s=this.stride;rl)continue;p.applyMatrix4(this.matrixWorld);const V=e.ray.origin.distanceTo(p);Ve.far||t.push({distance:V,point:h.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}else for(let x=Math.max(0,o.start),S=Math.min(y.count,o.start+o.count)-1;xl)continue;p.applyMatrix4(this.matrixWorld);const A=e.ray.origin.distanceTo(p);Ae.far||t.push({distance:A,point:h.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const r=t[i[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s0){const r=t[i[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sr.far)return;s.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:o})}}class Ql{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let i,r=this.getPoint(0),s=0;t.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),s+=i.distanceTo(r),t.push(s),r=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const i=this.getLengths();let r=0;const s=i.length;let o;o=t||e*i[s-1];let c,a=0,l=s-1;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),c=i[r]-o,c<0)a=r+1;else{if(!(c>0)){l=r;break}l=r-1}if(r=l,i[r]===o)return r/(s-1);const u=i[r];return(r+(o-u)/(i[r+1]-u))/(s-1)}getTangent(e,t){let r=e-1e-4,s=e+1e-4;r<0&&(r=0),s>1&&(s=1);const o=this.getPoint(r),a=this.getPoint(s),l=t||(o.isVector2?new Ce:new N);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){const i=new N,r=[],s=[],o=[],a=new N,l=new kt;for(let m=0;m<=e;m++)r[m]=this.getTangentAt(m/e,new N);s[0]=new N,o[0]=new N;let c=Number.MAX_VALUE;const u=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);u<=c&&(c=u,i.set(1,0,0)),h<=c&&(c=h,i.set(0,1,0)),p<=c&&i.set(0,0,1),a.crossVectors(r[0],i).normalize(),s[0].crossVectors(r[0],a),o[0].crossVectors(r[0],s[0]);for(let m=1;m<=e;m++){if(s[m]=s[m-1].clone(),o[m]=o[m-1].clone(),a.crossVectors(r[m-1],r[m]),a.length()>Number.EPSILON){a.normalize();const g=Math.acos(Ki(r[m-1].dot(r[m]),-1,1));s[m].applyMatrix4(l.makeRotationAxis(a,g))}o[m].crossVectors(r[m],s[m])}if(!0===t){let m=Math.acos(Ki(s[0].dot(s[e]),-1,1));m/=e,r[0].dot(a.crossVectors(s[0],s[e]))>0&&(m=-m);for(let g=1;g<=e;g++)s[g].applyMatrix4(l.makeRotationAxis(r[g],m*g)),o[g].crossVectors(r[g],s[g])}return{tangents:r,normals:s,binormals:o}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class vP extends Ql{constructor(e=0,t=0,i=1,r=1,s=0,o=2*Math.PI,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=r,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t){const i=t||new Ce,r=2*Math.PI;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)r;)s-=r;sr.length-2?r.length-1:o+1],h=r[o>r.length-3?r.length-1:o+2];return i.set(C4(a,l.x,c.x,u.x,h.x),C4(a,l.y,c.y,u.y,h.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t0?0:(Math.floor(Math.abs(a)/s)+1)*s:0===l&&a===s-1&&(a=s-2,l=1),this.closed||a>0?c=r[(a-1)%s]:(tC.subVectors(r[0],r[1]).add(r[0]),c=tC);const h=r[a%s],p=r[(a+1)%s];if(this.closed||a+2=i){const o=r[s]-i,a=this.curves[s],l=a.getLength();return a.getPointAt(0===l?0:1-o/l,t)}s++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let i=0,r=this.curves.length;i1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t0){const h=c.getPoint(0);h.equals(this.currentPoint)||this.lineTo(h.x,h.y)}this.curves.push(c);const u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class rC extends cn{constructor(e=[new Ce(0,-.5),new Ce(.5,0),new Ce(0,.5)],t=12,i=0,r=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:r},t=Math.floor(t),r=Ki(r,0,2*Math.PI);const s=[],o=[],a=[],l=[],c=[],u=1/t,h=new N,p=new Ce,m=new N,g=new N,b=new N;let y=0,v=0;for(let M=0;M<=e.length-1;M++)switch(M){case 0:y=e[M+1].x-e[M].x,v=e[M+1].y-e[M].y,m.x=1*v,m.y=-y,m.z=0*v,b.copy(m),m.normalize(),l.push(m.x,m.y,m.z);break;case e.length-1:l.push(b.x,b.y,b.z);break;default:y=e[M+1].x-e[M].x,v=e[M+1].y-e[M].y,m.x=1*v,m.y=-y,m.z=0*v,g.copy(m),m.x+=b.x,m.y+=b.y,m.z+=b.z,m.normalize(),l.push(m.x,m.y,m.z),b.copy(g)}for(let M=0;M<=t;M++){const x=i+M*u*r,S=Math.sin(x),P=Math.cos(x);for(let A=0;A<=e.length-1;A++)h.x=e[A].x*S,h.y=e[A].y,h.z=e[A].x*P,o.push(h.x,h.y,h.z),p.x=M/t,p.y=A/(e.length-1),a.push(p.x,p.y),c.push(l[3*A+0]*S,l[3*A+1],l[3*A+0]*P)}for(let M=0;M0&&x(!0),t>0&&x(!1)),this.setIndex(u),this.setAttribute("position",new ot(h,3)),this.setAttribute("normal",new ot(p,3)),this.setAttribute("uv",new ot(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new mg(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class oC extends mg{constructor(e=1,t=1,i=32,r=1,s=!1,o=0,a=2*Math.PI){super(0,e,t,i,r,s,o,a),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:i,heightSegments:r,openEnded:s,thetaStart:o,thetaLength:a}}static fromJSON(e){return new oC(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class fb extends cn{constructor(e=1,t=32,i=16,r=0,s=2*Math.PI,o=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:i,phiStart:r,phiLength:s,thetaStart:o,thetaLength:a},t=Math.max(3,Math.floor(t)),i=Math.max(2,Math.floor(i));const l=Math.min(o+a,Math.PI);let c=0;const u=[],h=new N,p=new N,m=[],g=[],b=[],y=[];for(let v=0;v<=i;v++){const M=[],x=v/i;let S=0;0===v&&0===o?S=.5/t:v===i&&l===Math.PI&&(S=-.5/t);for(let P=0;P<=t;P++){const A=P/t;h.x=-e*Math.cos(r+A*s)*Math.sin(o+x*a),h.y=e*Math.cos(o+x*a),h.z=e*Math.sin(r+A*s)*Math.sin(o+x*a),g.push(h.x,h.y,h.z),p.copy(h).normalize(),b.push(p.x,p.y,p.z),y.push(A+S,1-x),M.push(c++)}u.push(M)}for(let v=0;v0)&&m.push(u[v][M+1],S,A),(v!==i-1||l0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class pC extends bo{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new We(16777215),this.specular=new We(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new We(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Bh,this.normalScale=new Ce(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=rS,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,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.flatShading=e.flatShading,this.fog=e.fog,this}}function tf(n,e,t){return!n||!t&&n.constructor===e?n:"number"==typeof e.BYTES_PER_ELEMENT?new e(n):Array.prototype.slice.call(n)}function V4(n){const t=n.length,i=new Array(t);for(let r=0;r!==t;++r)i[r]=r;return i.sort(function e(r,s){return n[r]-n[s]}),i}function FP(n,e,t){const i=n.length,r=new n.constructor(i);for(let s=0,o=0;o!==i;++s){const a=t[s]*e;for(let l=0;l!==e;++l)r[o++]=n[a+l]}return r}function NP(n,e,t,i){let r=1,s=n[0];for(;void 0!==s&&void 0===s[i];)s=n[r++];if(void 0===s)return;let o=s[i];if(void 0!==o)if(Array.isArray(o))do{o=s[i],void 0!==o&&(e.push(s.time),t.push.apply(t,o)),s=n[r++]}while(void 0!==s);else if(void 0!==o.toArray)do{o=s[i],void 0!==o&&(e.push(s.time),o.toArray(t,t.length)),s=n[r++]}while(void 0!==s);else do{o=s[i],void 0!==o&&(e.push(s.time),t.push(o)),s=n[r++]}while(void 0!==s)}class mb{constructor(e,t,i,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(i),this.sampleValues=t,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let i=this._cachedIndex,r=t[i],s=t[i-1];e:{t:{let o;n:{i:if(!(e=s)break e;{const a=t[1];e=s)break t}o=i,i=0}}for(;i>>1;et;)--o;if(++o,0!==s||o!==r){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=i.slice(s,o),this.values=this.values.slice(s*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,r=this.values,s=i.length;0===s&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const l=i[a];if("number"==typeof l&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(null!==o&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(void 0!==r&&function U4(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}(r))for(let a=0,l=r.length;a!==l;++a){const c=r[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),i=this.getValueSize(),r=2302===this.getInterpolation(),s=e.length-1;let o=1;for(let a=1;a0){e[o]=e[s];for(let a=s*i,l=o*i,c=0;c!==i;++c)t[l+c]=t[a+c];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*i)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),r=new(0,this.constructor)(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}ec.prototype.TimeBufferType=Float32Array,ec.prototype.ValueBufferType=Float32Array,ec.prototype.DefaultInterpolation=Rm;class vg extends ec{}vg.prototype.ValueTypeName="bool",vg.prototype.ValueBufferType=Array,vg.prototype.DefaultInterpolation=Wy,vg.prototype.InterpolantFactoryMethodLinear=void 0,vg.prototype.InterpolantFactoryMethodSmooth=void 0;class H4 extends ec{}H4.prototype.ValueTypeName="color";class yg extends ec{}yg.prototype.ValueTypeName="number";class Oce extends mb{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-t)/(r-t);let c=e*a;for(let u=c+a;c!==u;c+=4)Qs.slerpFlat(s,0,o,c-a,o,c,l);return s}}class nf extends ec{InterpolantFactoryMethodLinear(e){return new Oce(this.times,this.values,this.getValueSize(),e)}}nf.prototype.ValueTypeName="quaternion",nf.prototype.DefaultInterpolation=Rm,nf.prototype.InterpolantFactoryMethodSmooth=void 0;class bg extends ec{}bg.prototype.ValueTypeName="string",bg.prototype.ValueBufferType=Array,bg.prototype.DefaultInterpolation=Wy,bg.prototype.InterpolantFactoryMethodLinear=void 0,bg.prototype.InterpolantFactoryMethodSmooth=void 0;class xg extends ec{}xg.prototype.ValueTypeName="vector";class gb{constructor(e,t=-1,i,r=2500){this.name=e,this.tracks=i,this.duration=t,this.blendMode=r,this.uuid=Ho(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,r=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(Fce(i[o]).scale(r));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const t=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=i.length;s!==o;++s)t.push(ec.toJSON(i[s]));return r}static CreateFromMorphTargetSequence(e,t,i,r){const s=t.length,o=[];for(let a=0;a1){const h=u[1];let p=r[h];p||(r[h]=p=[]),p.push(c)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],t,i));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(h,p,m,g,b){if(0!==m.length){const y=[],v=[];NP(m,y,v,g),0!==y.length&&b.push(new h(p,y,v))}},r=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let h=0;h{class n{constructor(t){this.manager=void 0!==t?t:W4,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,i){const r=this;return new Promise(function(s,o){r.load(t,s,i,o)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}}return n.DEFAULT_MATERIAL_NAME="__DEFAULT",n})();const td={};class Nce extends Error{constructor(e,t){super(e),this.response=t}}class Sa extends rf{constructor(e){super(e)}load(e,t,i,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const s=_u.get(e);if(void 0!==s)return this.manager.itemStart(e),setTimeout(()=>{t&&t(s),this.manager.itemEnd(e)},0),s;if(void 0!==td[e])return void td[e].push({onLoad:t,onProgress:i,onError:r});td[e]=[],td[e].push({onLoad:t,onProgress:i,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(200===c.status||0===c.status){if(0===c.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||void 0===c.body||void 0===c.body.getReader)return c;const u=td[e],h=c.body.getReader(),p=c.headers.get("Content-Length")||c.headers.get("X-File-Size"),m=p?parseInt(p):0,g=0!==m;let b=0;const y=new ReadableStream({start(v){!function M(){h.read().then(({done:x,value:S})=>{if(x)v.close();else{b+=S.byteLength;const P=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let A=0,R=u.length;A{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>(new DOMParser).parseFromString(u,a));case"json":return c.json();default:if(void 0===a)return c.text();{const h=/charset="?([^;"\s]*)"?/i.exec(a),p=h&&h[1]?h[1].toLowerCase():void 0,m=new TextDecoder(p);return c.arrayBuffer().then(g=>m.decode(g))}}}).then(c=>{_u.add(e,c);const u=td[e];delete td[e];for(let h=0,p=u.length;h{const u=td[e];if(void 0===u)throw this.manager.itemError(e),c;delete td[e];for(let h=0,p=u.length;h{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class mC extends rf{constructor(e){super(e)}load(e,t,i,r){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=_u.get(e);if(void 0!==o)return s.manager.itemStart(e),setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o;const a=Xy("img");function l(){u(),_u.add(e,this),t&&t(this),s.manager.itemEnd(e)}function c(h){u(),r&&r(h),s.manager.itemError(e),s.manager.itemEnd(e)}function u(){a.removeEventListener("load",l,!1),a.removeEventListener("error",c,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",c,!1),"data:"!==e.slice(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),s.manager.itemStart(e),a.src=e,a}}class gC extends rf{constructor(e){super(e)}load(e,t,i,r){const s=new sl,o=new mC(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){s.image=a,s.needsUpdate=!0,void 0!==t&&t(s)},i,r),s}}class _C extends Gr{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new We(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}const BP=new kt,$4=new N,j4=new N;class UP{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Ce(512,512),this.map=null,this.mapPass=null,this.matrix=new kt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new FS,this._frameExtents=new Ce(1,1),this._viewportCount=1,this._viewports=[new ai(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,i=this.matrix;$4.setFromMatrixPosition(e.matrixWorld),t.position.copy($4),j4.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(j4),t.updateMatrixWorld(),BP.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(BP),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(BP)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),(512!==this.mapSize.x||512!==this.mapSize.y)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class Uce extends UP{constructor(){super(new _r(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,i=2*Fm*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,s=e.distance||t.far;(i!==t.fov||r!==t.aspect||s!==t.far)&&(t.fov=i,t.aspect=r,t.far=s,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class X4 extends _C{constructor(e,t,i=0,r=Math.PI/3,s=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Gr.DEFAULT_UP),this.updateMatrix(),this.target=new Gr,this.distance=i,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Uce}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const q4=new kt,_b=new N,VP=new N;class Vce extends UP{constructor(){super(new _r(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Ce(4,2),this._viewportCount=6,this._viewports=[new ai(2,1,1,1),new ai(0,1,1,1),new ai(3,1,1,1),new ai(1,1,1,1),new ai(3,0,1,1),new ai(1,0,1,1)],this._cubeDirections=[new N(1,0,0),new N(-1,0,0),new N(0,0,1),new N(0,0,-1),new N(0,1,0),new N(0,-1,0)],this._cubeUps=[new N(0,1,0),new N(0,1,0),new N(0,1,0),new N(0,1,0),new N(0,0,1),new N(0,0,-1)]}updateMatrices(e,t=0){const i=this.camera,r=this.matrix,s=e.distance||i.far;s!==i.far&&(i.far=s,i.updateProjectionMatrix()),_b.setFromMatrixPosition(e.matrixWorld),i.position.copy(_b),VP.copy(i.position),VP.add(this._cubeDirections[t]),i.up.copy(this._cubeUps[t]),i.lookAt(VP),i.updateMatrixWorld(),r.makeTranslation(-_b.x,-_b.y,-_b.z),q4.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(q4)}}class Y4 extends _C{constructor(e,t,i=0,r=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=r,this.shadow=new Vce}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class zce extends UP{constructor(){super(new BS(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class K4 extends _C{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Gr.DEFAULT_UP),this.updateMatrix(),this.target=new Gr,this.shadow=new zce}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class zP extends _C{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class vu{static decodeText(e){if(typeof TextDecoder<"u")return(new TextDecoder).decode(e);let t="";for(let i=0,r=e.length;i"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,i,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=_u.get(e);if(void 0!==o)return s.manager.itemStart(e),o.then?void o.then(c=>{t&&t(c),s.manager.itemEnd(e)}).catch(c=>{r&&r(c)}):(setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o);const a={};a.credentials="anonymous"===this.crossOrigin?"same-origin":"include",a.headers=this.requestHeader;const l=fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(c){return _u.add(e,c),t&&t(c),s.manager.itemEnd(e),c}).catch(function(c){r&&r(c),_u.remove(e),s.manager.itemError(e),s.manager.itemEnd(e)});_u.add(e,l),s.manager.itemStart(e)}}const GP="\\[\\]\\.:\\/",Jce=new RegExp("["+GP+"]","g"),WP="[^"+GP+"]",ede="[^"+GP.replace("\\.","")+"]",sde=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",WP)+/(WCOD+)?/.source.replace("WCOD",ede)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",WP)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",WP)+"$"),ode=["material","materials","bones","map"];class ade{constructor(e,t,i){const r=i||vi.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const r=this._bindings[this._targetGroup.nCachedObjects_];void 0!==r&&r.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=i.length;r!==s;++r)i[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}let vi=(()=>{class n{constructor(t,i,r){this.path=i,this.parsedPath=r||n.parseTrackName(i),this.node=n.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,i,r){return t&&t.isAnimationObjectGroup?new n.Composite(t,i,r):new n(t,i,r)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(Jce,"")}static parseTrackName(t){const i=sde.exec(t);if(null===i)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const r={nodeName:i[2],objectName:i[3],objectIndex:i[4],propertyName:i[5],propertyIndex:i[6]},s=r.nodeName&&r.nodeName.lastIndexOf(".");if(void 0!==s&&-1!==s){const o=r.nodeName.substring(s+1);-1!==ode.indexOf(o)&&(r.nodeName=r.nodeName.substring(0,s),r.objectName=o)}if(null===r.propertyName||0===r.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return r}static findNode(t,i){if(void 0===i||""===i||"."===i||-1===i||i===t.name||i===t.uuid)return t;if(t.skeleton){const r=t.skeleton.getBoneByName(i);if(void 0!==r)return r}if(t.children){const r=function(o){for(let a=0;a=2.0 are supported.")));const c=new $de(s,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u=0&&void 0===a[h]&&console.warn('THREE.GLTFLoader: Unknown extension "'+h+'".')}}c.setExtensions(o),c.setPlugins(a),c.parse(i,r)}parseAsync(e,t){const i=this;return new Promise(function(r,s){i.parse(e,t,r,s)})}}function pde(){let n={};return{get:function(e){return n[e]},add:function(e,t){n[e]=t},remove:function(e){delete n[e]},removeAll:function(){n={}}}}const Bn={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class mde{constructor(e){this.parser=e,this.name=Bn.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let i=0,r=t.length;i=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,s.source,o)}}class Tde{constructor(e){this.parser=e,this.name=Bn.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,r=i.json,s=r.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],a=r.images[o.source];let l=i.textureLoader;if(a.uri){const c=i.options.manager.getHandler(a.uri);null!==c&&(l=c)}return this.detectSupport().then(function(c){if(c)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(1===t.height)}})),this.isSupported}}class Dde{constructor(e){this.parser=e,this.name=Bn.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,r=i.json,s=r.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],a=r.images[o.source];let l=i.textureLoader;if(a.uri){const c=i.options.manager.getHandler(a.uri);null!==c&&(l=c)}return this.detectSupport().then(function(c){if(c)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(1===t.height)}})),this.isSupported}}class Ide{constructor(e){this.name=Bn.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,i=t.bufferViews[e];if(i.extensions&&i.extensions[this.name]){const r=i.extensions[this.name],s=this.parser.getDependency("buffer",r.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(a){const u=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(u,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(u*h);return o.decodeGltfBuffer(new Uint8Array(m),u,h,p,r.mode,r.filter),m})})}return null}}class Rde{constructor(e){this.name=Bn.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,i=t.nodes[e];if(!i.extensions||!i.extensions[this.name]||void 0===i.mesh)return null;const r=t.meshes[i.mesh];for(const c of r.primitives)if(c.mode!==Ca.TRIANGLES&&c.mode!==Ca.TRIANGLE_STRIP&&c.mode!==Ca.TRIANGLE_FAN&&void 0!==c.mode)return null;const o=i.extensions[this.name].attributes,a=[],l={};for(const c in o)a.push(this.parser.getDependency("accessor",o[c]).then(u=>(l[c]=u,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(c=>{const u=c.pop(),h=u.isGroup?u.children:[u],p=c[0].count,m=[];for(const g of h){const b=new kt,y=new N,v=new Qs,M=new N(1,1,1),x=new p4(g.geometry,g.material,p);for(let S=0;S-1,s=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),this.textureLoader=typeof createImageBitmap>"u"||i||r&&s<98?new gC(this.options.manager):new qce(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Sa(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const i=this,r=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(o){const a={scene:o[0][r.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:r.asset,parser:i,userData:{}};return uf(s,a,r),xu(a,r),Promise.all(i._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){e(a)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],i=this.json.meshes||[];for(let r=0,s=t.length;r{const l=this.associations.get(o);null!=l&&this.associations.set(a,l);for(const[c,u]of o.children.entries())s(u,a.children[c])};return s(i,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let i=0;i=2&&y.setY(E,A[R*l+1]),l>=3&&y.setZ(E,A[R*l+2]),l>=4&&y.setW(E,A[R*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return y})}loadTexture(e){const t=this.json,s=t.textures[e].source,o=t.images[s];let a=this.textureLoader;if(o.uri){const l=this.options.manager.getHandler(o.uri);null!==l&&(a=l)}return this.loadTextureImage(e,s,a)}loadTextureImage(e,t,i){const r=this,s=this.json,o=s.textures[e],a=s.images[t],l=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const c=this.loadImageSource(t,i).then(function(u){u.flipY=!1,u.name=o.name||a.name||"",""===u.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(u.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return u.magFilter=b5[p.magFilter]||Yi,u.minFilter=b5[p.minFilter]||Xc,u.wrapS=x5[p.wrapS]||ql,u.wrapT=x5[p.wrapT]||ql,r.associations.set(u,{textures:e}),u}).catch(function(){return null});return this.textureCache[l]=c,c}loadImageSource(e,t){const r=this.json,s=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then(h=>h.clone());const o=r.images[e],a=self.URL||self.webkitURL;let l=o.uri||"",c=!1;if(void 0!==o.bufferView)l=this.getDependency("bufferView",o.bufferView).then(function(h){c=!0;const p=new Blob([h],{type:o.mimeType});return l=a.createObjectURL(p),l});else if(void 0===o.uri)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const u=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===t.isImageBitmapLoader&&(g=function(b){const y=new sl(b);y.needsUpdate=!0,p(y)}),t.load(vu.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),h.userData.mimeType=o.mimeType||function Gde(n){return n.search(/\.jpe?g($|\?)/i)>0||0===n.search(/^data\:image\/jpeg/)?"image/jpeg":n.search(/\.webp($|\?)/i)>0||0===n.search(/^data\:image\/webp/)?"image/webp":"image/png"}(o.uri),h}).catch(function(h){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),h});return this.sourceCache[e]=u,u}assignTexture(e,t,i,r){const s=this;return this.getDependency("texture",i.index).then(function(o){if(!o)return null;if(void 0!==i.texCoord&&i.texCoord>0&&((o=o.clone()).channel=i.texCoord),s.extensions[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==i.extensions?i.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),s.associations.set(o,l)}}return void 0!==r&&(o.colorSpace=r),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let i=e.material;const r=void 0===t.attributes.tangent,s=void 0!==t.attributes.color,o=void 0===t.attributes.normal;if(e.isPoints){const a="PointsMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new Qh,bo.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,l.sizeAttenuation=!1,this.cache.add(a,l)),i=l}else if(e.isLine){const a="LineBasicMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new $r,bo.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,this.cache.add(a,l)),i=l}if(r||s||o){let a="ClonedMaterial:"+i.uuid+":";r&&(a+="derivative-tangents:"),s&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=i.clone(),s&&(l.vertexColors=!0),o&&(l.flatShading=!0),r&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(i))),i=l}e.material=i}getMaterialType(){return pb}loadMaterial(e){const t=this,r=this.extensions,s=this.json.materials[e];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,t))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new We(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],Hr),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(t.assignTexture(a,"map",h.baseColorTexture,Ei)),a.metalness=void 0!==h.metallicFactor?h.metallicFactor:1,a.roughness=void 0!==h.roughnessFactor?h.roughnessFactor:1,void 0!==h.metallicRoughnessTexture&&(c.push(t.assignTexture(a,"metalnessMap",h.metallicRoughnessTexture)),c.push(t.assignTexture(a,"roughnessMap",h.metallicRoughnessTexture))),o=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(e)}),c.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(e,a)})))}!0===s.doubleSided&&(a.side=Vo);const u=s.alphaMode||"OPAQUE";if("BLEND"===u?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===u&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==as&&(c.push(t.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new Ce(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==as&&(c.push(t.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==as){const h=s.emissiveFactor;a.emissive=(new We).setRGB(h[0],h[1],h[2],Hr)}return void 0!==s.emissiveTexture&&o!==as&&c.push(t.assignTexture(a,"emissiveMap",s.emissiveTexture,Ei)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),xu(h,s),t.associations.set(h,{materials:e}),s.extensions&&uf(r,h,s),h})}createUniqueName(e){const t=vi.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,i=this.extensions,r=this.primitiveCache;function s(a){return i[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,t).then(function(l){return w5(l,a,t)})}const o=[];for(let a=0,l=e.length;a0&&zde(v,s),v.name=t.createUniqueName(s.name||"mesh_"+e),xu(v,s),y.extensions&&uf(r,v,y),t.assignFinalMaterial(v),h.push(v)}for(let m=0,g=h.length;m1?new jo:1===c.length?c[0]:new Gr,u!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof bo||p instanceof sl)&&h.set(p,m);return u.traverse(p=>{const m=r.associations.get(p);null!=m&&h.set(p,m)}),h})(s),s})}_createAnimationTracks(e,t,i,r,s){const o=[],a=e.name?e.name:e.uuid,l=[];let c;switch(bu[s.path]===bu.weights?e.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),bu[s.path]){case bu.weights:c=yg;break;case bu.rotation:c=nf;break;case bu.position:case bu.scale:c=xg;break;default:c=1===i.itemSize?yg:xg}const u=void 0!==r.interpolation?Bde[r.interpolation]:Rm,h=this._getArrayFromAccessor(i);for(let p=0,m=l.length;pi.name===e||i.userData.name===e);return t?(t.removeFromParent(),new cl(t)):null}getBoundings(){return(new xs).setFromObject(this.nativeMesh)}clone(){return new cl(this.nativeMesh.clone())}addToWorld(e){var t;null===(t=e.visualScene.nativeScene)||void 0===t||t.add(this.nativeMesh)}removeFromWorld(e){var t;null===(t=e.visualScene.nativeScene)||void 0===t||t.remove(this.nativeMesh)}dispose(){this.nativeMesh.traverse(e=>{e instanceof Yn&&this.disposeMesh(e)}),this.nativeMesh instanceof Yn&&this.disposeMesh(this.nativeMesh)}disposeMesh(e){e.geometry.dispose();const t=e.material instanceof Array?e.material:[e.material];for(const i of t)i.dispose()}}class Xde extends cl{constructor(e){super(e),this.nativeCamera=e}get supportsFov(){return this.nativeCamera instanceof _r||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(e){this.supportsFov&&(this.nativeCamera.fov=e,this.nativeCamera.updateProjectionMatrix())}}class qde extends One{createMaterial(e){let t=e.color||super.randomColor(),i=e.shading||"unlit";switch(i){case"unlit":return new as({color:t,map:e.diffuse||null});case"standart":return new pb({color:t,map:e.diffuse||null});case"phong":return new pC({color:t,map:e.diffuse||null});default:throw new Error(`"${i}" shading not implemented for three.js`)}}transformPrimitiveZUp(e){e.rotateX(Math.PI/2);const t=new jo;return t.add(e),t}createPrimitive(e,t={}){let i=null,r=this.createMaterial(t);switch(e.shape){case"PLANE":i=new Yn(new tg(1e4,1e4),r);break;case"BOX":i=new Yn(new Wh(e.dimensions.x,e.dimensions.y,e.dimensions.z),r);break;case"CAPSULE":i=this.transformPrimitiveZUp(new Yn(new sC(e.radius,e.centersDistance),r));break;case"CYLINDER":i=this.transformPrimitiveZUp(new Yn(new mg(e.radius,e.radius,e.height),r));break;case"CONE":i=this.transformPrimitiveZUp(new Yn(new oC(e.radius,e.height),r));break;case"SPHERE":i=new Yn(new fb(e.radius),r)}if(!i)throw new Error(`Primitive with shape "${e.shape}" not implemented`);return void 0!==t.castShadow&&(i.castShadow=t.castShadow),void 0!==t.receiveShadow&&(i.receiveShadow=t.receiveShadow),new cl(i)}createPerspectiveCamera(e={}){return new Xde(new _r(e.fov||75,e.aspectRatio||1,e.frustrum?e.frustrum.near:1,e.frustrum?e.frustrum.far:1e4))}}class Kde{constructor(){this.gltfLoader=new fde}loadFromGgGlb(e,t){return function(n,e,t,i){return new(t||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})}(this,void 0,void 0,function*(){const i=yield this.gltfLoader.parseAsync(e,"");return i.scene.traverse(r=>{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new cl(i.scene)})}}class Zde extends cl{constructor(){super(new pg(new cn,new $r({color:16711680,linewidth:.5}))),this.entity=null,this.debugBufferSize=3e6,this.index=0,this.lastMaxIndex=0,this.debugVertices=new Float32Array(this.debugBufferSize),this.debugColors=new Float32Array(this.debugBufferSize),this.nativeMesh.geometry.setAttribute("position",new _i(this.debugVertices,3)),this.nativeMesh.geometry.setAttribute("color",new _i(this.debugColors,3)),this.nativeMesh.frustumCulled=!1}drawContactPoint(e,t,i){this.setXYZ(this.debugVertices,this.index,e.x,e.y,e.z),this.setXYZ(this.debugColors,this.index++,i?.x||0,i?.y||0,i?.z||0),this.setXYZ(this.debugVertices,this.index,e.x+t.x,e.y+t.y,e.z+t.z),this.setXYZ(this.debugColors,this.index++,i?.x||0,i?.y||0,i?.z||0)}drawLine(e,t,i){this.setXYZ(this.debugVertices,this.index,e.x,e.y,e.z),this.setXYZ(this.debugColors,this.index++,i?.x||0,i?.y||0,i?.z||0),this.setXYZ(this.debugVertices,this.index,t.x,t.y,t.z),this.setXYZ(this.debugColors,this.index++,i?.x||0,i?.y||0,i?.z||0)}update(){this.index.01&&(this.camera.nativeCamera.aspect=e.x/e.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}class M5{constructor(){this._nativeScene=null,this.factory=new qde,this.loader=new Kde,this.debugPhysicsDrawerClass=Zde}get nativeScene(){return this._nativeScene}init(){return n=this,e=void 0,i=function*(){this._nativeScene=new HS},new((t=void 0)||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())});var n,e,t,i}createRenderer(e,t,i){return new Qde(this,e,t,i)}dispose(){this._nativeScene=new HS}}const eue=/^[og]\s*(.+)?/,tue=/^mtllib /,nue=/^usemtl /,iue=/^usemap /,S5=/\s+/,C5=new N,tk=new N,E5=new N,A5=new N,Ea=new N,CC=new We;function rue(){const n={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,t){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=!1!==t);const i=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:e||"",fromDeclaration:!1!==t,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(r,s){const o=this._finalize(!1);o&&(o.inherited||o.groupCount<=0)&&this.materials.splice(o.index,1);const a={index:this.materials.length,name:r||"",mtllib:Array.isArray(s)&&s.length>0?s[s.length-1]:"",smooth:void 0!==o?o.smooth:this.smooth,groupStart:void 0!==o?o.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(l){const c={index:"number"==typeof l?l:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return c.clone=this.clone.bind(c),c}};return this.materials.push(a),a},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(r){const s=this.currentMaterial();if(s&&-1===s.groupEnd&&(s.groupEnd=this.geometry.vertices.length/3,s.groupCount=s.groupEnd-s.groupStart,s.inherited=!1),r&&this.materials.length>1)for(let o=this.materials.length-1;o>=0;o--)this.materials[o].groupCount<=0&&this.materials.splice(o,1);return r&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),s}},i&&i.name&&"function"==typeof i.clone){const r=i.clone(0);r.inherited=!0,this.object.materials.push(r)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(e,t){const i=parseInt(e,10);return 3*(i>=0?i-1:i+t/3)},parseNormalIndex:function(e,t){const i=parseInt(e,10);return 3*(i>=0?i-1:i+t/3)},parseUVIndex:function(e,t){const i=parseInt(e,10);return 2*(i>=0?i-1:i+t/2)},addVertex:function(e,t,i){const r=this.vertices,s=this.object.geometry.vertices;s.push(r[e+0],r[e+1],r[e+2]),s.push(r[t+0],r[t+1],r[t+2]),s.push(r[i+0],r[i+1],r[i+2])},addVertexPoint:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,i){const r=this.normals,s=this.object.geometry.normals;s.push(r[e+0],r[e+1],r[e+2]),s.push(r[t+0],r[t+1],r[t+2]),s.push(r[i+0],r[i+1],r[i+2])},addFaceNormal:function(e,t,i){const r=this.vertices,s=this.object.geometry.normals;C5.fromArray(r,e),tk.fromArray(r,t),E5.fromArray(r,i),Ea.subVectors(E5,tk),A5.subVectors(C5,tk),Ea.cross(A5),Ea.normalize(),s.push(Ea.x,Ea.y,Ea.z),s.push(Ea.x,Ea.y,Ea.z),s.push(Ea.x,Ea.y,Ea.z)},addColor:function(e,t,i){const r=this.colors,s=this.object.geometry.colors;void 0!==r[e]&&s.push(r[e+0],r[e+1],r[e+2]),void 0!==r[t]&&s.push(r[t+0],r[t+1],r[t+2]),void 0!==r[i]&&s.push(r[i+0],r[i+1],r[i+2])},addUV:function(e,t,i){const r=this.uvs,s=this.object.geometry.uvs;s.push(r[e+0],r[e+1]),s.push(r[t+0],r[t+1]),s.push(r[i+0],r[i+1])},addDefaultUV:function(){const e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){const t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])},addFace:function(e,t,i,r,s,o,a,l,c){const u=this.vertices.length;let h=this.parseVertexIndex(e,u),p=this.parseVertexIndex(t,u),m=this.parseVertexIndex(i,u);if(this.addVertex(h,p,m),this.addColor(h,p,m),void 0!==a&&""!==a){const g=this.normals.length;h=this.parseNormalIndex(a,g),p=this.parseNormalIndex(l,g),m=this.parseNormalIndex(c,g),this.addNormal(h,p,m)}else this.addFaceNormal(h,p,m);if(void 0!==r&&""!==r){const g=this.uvs.length;h=this.parseUVIndex(r,g),p=this.parseUVIndex(s,g),m=this.parseUVIndex(o,g),this.addUV(h,p,m),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";const t=this.vertices.length;for(let i=0,r=e.length;i=7?(CC.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),t.colors.push(CC.r,CC.g,CC.b)):t.colors.push(void 0,void 0,void 0);break;case"vn":t.normals.push(parseFloat(h[1]),parseFloat(h[2]),parseFloat(h[3]));break;case"vt":t.uvs.push(parseFloat(h[1]),parseFloat(h[2]))}}else if("f"===u){const p=c.slice(1).trim().split(S5),m=[];for(let b=0,y=p.length;b0){const M=v.split("/");m.push(M)}}const g=m[0];for(let b=1,y=m.length-1;b1){const p=r[1].trim().toLowerCase();t.object.smooth="0"!==p&&"off"!==p}else t.object.smooth=!0;const h=t.object.currentMaterial();h&&(h.smooth=t.object.smooth)}else{if("\0"===c)continue;console.warn('THREE.OBJLoader: Unexpected line: "'+c+'"')}}t.finalize();const s=new jo;if(s.materialLibraries=[].concat(t.materialLibraries),1==!(1===t.objects.length&&0===t.objects[0].geometry.vertices.length))for(let a=0,l=t.objects.length;a0&&b.setAttribute("normal",new ot(u.normals,3)),u.colors.length>0&&(g=!0,b.setAttribute("color",new ot(u.colors,3))),!0===u.hasUVIndices&&b.setAttribute("uv",new ot(u.uvs,2));const y=[];for(let M=0,x=h.length;M1){for(let M=0,x=h.length;M0){const a=new Qh({size:1,sizeAttenuation:!1}),l=new cn;l.setAttribute("position",new ot(t.vertices,3)),t.colors.length>0&&void 0!==t.colors[0]&&(l.setAttribute("color",new ot(t.colors,3)),a.vertexColors=!0);const c=new ab(l,a);s.add(c)}return s}}class T5 extends rf{constructor(e){super(e)}load(e,t,i,r){const s=this,o=""===this.path?vu.extractUrlBase(e):this.path,a=new Sa(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(l){try{t(s.parse(l,o))}catch(c){r?r(c):console.error(c),s.manager.itemError(e)}},i,r)}setMaterialOptions(e){return this.materialOptions=e,this}parse(e,t){const i=e.split("\n");let r={};const s=/\s+/,o={};for(let l=0;l=0?c.substring(0,u):c;h=h.toLowerCase();let p=u>=0?c.substring(u+1):"";if(p=p.trim(),"newmtl"===h)r={name:p},o[p]=r;else if("ka"===h||"kd"===h||"ks"===h||"ke"===h){const m=p.split(s,3);r[h]=[parseFloat(m[0]),parseFloat(m[1]),parseFloat(m[2])]}else r[h]=p}const a=new sue(this.resourcePath||t,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class sue{constructor(e="",t={}){this.baseUrl=e,this.options=t,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin="anonymous",this.side=void 0!==this.options.side?this.options.side:Xl,this.wrap=void 0!==this.options.wrap?this.options.wrap:ql}setCrossOrigin(e){return this.crossOrigin=e,this}setManager(e){this.manager=e}setMaterials(e){this.materialsInfo=this.convert(e),this.materials={},this.materialsArray=[],this.nameLookup={}}convert(e){if(!this.options)return e;const t={};for(const i in e){const r=e[i],s={};t[i]=s;for(const o in r){let a=!0,l=r[o];const c=o.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(l=[l[0]/255,l[1]/255,l[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===l[0]&&0===l[1]&&0===l[2]&&(a=!1)}a&&(s[c]=l)}}return t}preload(){for(const e in this.materialsInfo)this.create(e)}getIndex(e){return this.nameLookup[e]}getAsArray(){let e=0;for(const t in this.materialsInfo)this.materialsArray[e]=this.create(t),this.nameLookup[t]=e,e++;return this.materialsArray}create(e){return void 0===this.materials[e]&&this.createMaterial_(e),this.materials[e]}createMaterial_(e){const t=this,i=this.materialsInfo[e],r={name:e,side:this.side};function o(a,l){if(r[a])return;const c=t.getTextureParams(l,r),u=t.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(t.baseUrl,c.url));u.repeat.copy(c.scale),u.offset.copy(c.offset),u.wrapS=t.wrap,u.wrapT=t.wrap,("map"===a||"emissiveMap"===a)&&(u.colorSpace=Ei),r[a]=u}for(const a in i){const l=i[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new We).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new We).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new We).fromArray(l).convertSRGBToLinear();break;case"map_kd":o("map",l);break;case"map_ks":o("specularMap",l);break;case"map_ke":o("emissiveMap",l);break;case"norm":o("normalMap",l);break;case"map_bump":case"bump":o("bumpMap",l);break;case"map_d":o("alphaMap",l),r.transparent=!0;break;case"ns":r.shininess=parseFloat(l);break;case"d":c=parseFloat(l),c<1&&(r.opacity=c,r.transparent=!0);break;case"tr":c=parseFloat(l),this.options&&this.options.invertTrProperty&&(c=1-c),c>0&&(r.opacity=1-c,r.transparent=!0)}}return this.materials[e]=new pC(r),this.materials[e]}getTextureParams(e,t){const i={scale:new Ce(1,1),offset:new Ce(0,0)},r=e.split(/\s+/);let s;return s=r.indexOf("-bm"),s>=0&&(t.bumpScale=parseFloat(r[s+1]),r.splice(s,2)),s=r.indexOf("-s"),s>=0&&(i.scale.set(parseFloat(r[s+1]),parseFloat(r[s+2])),r.splice(s,4)),s=r.indexOf("-o"),s>=0&&(i.offset.set(parseFloat(r[s+1]),parseFloat(r[s+2])),r.splice(s,4)),i.url=r.join(" ").trim(),i}loadTexture(e,t,i,r,s){const o=void 0!==this.manager?this.manager:W4;let a=o.getHandler(e);null===a&&(a=new gC(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(e,i,r,s);return void 0!==t&&(l.mapping=t),l}}const oue=["determinateSpinner"];function aue(n,e){if(1&n&&(Lr(),K(0,"svg",11),Fe(1,"circle",12),J()),2&n){const t=be();Vt("viewBox",t._viewBox()),j(1),Pc("stroke-dasharray",t._strokeCircumference(),"px")("stroke-dashoffset",t._strokeCircumference()/2,"px")("stroke-width",t._circleStrokeWidth(),"%"),Vt("r",t._circleRadius())}}const lue=DM(class{constructor(n){this._elementRef=n}},"primary"),cue=new ge("mat-progress-spinner-default-options",{providedIn:"root",factory:function due(){return{diameter:D5}}}),D5=100;let EC=(()=>{class n extends lue{constructor(t,i,r){super(t),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=D5,this._noopAnimations="NoopAnimations"===i&&!!r&&!r._forceAnimations,r&&(r.color&&(this.color=this.defaultColor=r.color),r.diameter&&(this.diameter=r.diameter),r.strokeWidth&&(this.strokeWidth=r.strokeWidth))}get value(){return"determinate"===this.mode?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,Ys(t)))}get diameter(){return this._diameter}set diameter(t){this._diameter=Ys(t)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(t){this._strokeWidth=Ys(t)}_circleRadius(){return(this.diameter-10)/2}_viewBox(){const t=2*this._circleRadius()+this.strokeWidth;return`0 0 ${t} ${t}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return"determinate"===this.mode?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(rs,8),D(cue))},n.\u0275cmp=ht({type:n,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(t,i){if(1&t&&oi(oue,5),2&t){let r;Lt(r=Ft())&&(i._determinateCircle=r.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:12,hostBindings:function(t,i){2&t&&(Vt("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===i.mode?i.value:null)("mode",i.mode),Pc("width",i.diameter,"px")("height",i.diameter,"px"),Pn("_mat-animation-noopable",i._noopAnimations)("mdc-circular-progress--indeterminate","indeterminate"===i.mode))},inputs:{color:"color",mode:"mode",value:"value",diameter:"diameter",strokeWidth:"strokeWidth"},exportAs:["matProgressSpinner"],features:[ft],decls:14,vars:11,consts:[["circle",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["determinateSpinner",""],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(t,i){if(1&t&&(_e(0,aue,2,8,"ng-template",null,0,kc),K(2,"div",1,2),Lr(),K(4,"svg",3),Fe(5,"circle",4),J()(),es(),K(6,"div",5)(7,"div",6)(8,"div",7),Mv(9,8),J(),K(10,"div",9),Mv(11,8),J(),K(12,"div",10),Mv(13,8),J()()()),2&t){const r=Vr(1);j(4),Vt("viewBox",i._viewBox()),j(1),Pc("stroke-dasharray",i._strokeCircumference(),"px")("stroke-dashoffset",i._strokeDashOffset(),"px")("stroke-width",i._circleStrokeWidth(),"%"),Vt("r",i._circleRadius()),j(4),z("ngTemplateOutlet",r),j(2),z("ngTemplateOutlet",r),j(2),z("ngTemplateOutlet",r)}},dependencies:[Vv],styles:["@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-color-1-fade-in-out{from{opacity:.99}25%{opacity:.99}26%{opacity:0}89%{opacity:0}90%{opacity:.99}to{opacity:.99}}@keyframes mdc-circular-progress-color-2-fade-in-out{from{opacity:0}15%{opacity:0}25%{opacity:.99}50%{opacity:.99}51%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-3-fade-in-out{from{opacity:0}40%{opacity:0}50%{opacity:.99}75%{opacity:.99}76%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-4-fade-in-out{from{opacity:0}65%{opacity:0}75%{opacity:.99}90%{opacity:.99}to{opacity:0}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}.mdc-circular-progress{display:inline-flex;position:relative;direction:ltr;line-height:0;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{animation:mdc-circular-progress-container-rotate 1568.2352941176ms linear infinite}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-1{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-1-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-2{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-2-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-3{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-3-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-4{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-4-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--closed{opacity:0}.mat-mdc-progress-spinner{display:block;overflow:hidden;line-height:0}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mdc-circular-progress-active-indicator-color, transparent)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-1 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-2 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-3 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-4 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}"],encapsulation:2,changeDetection:0}),n})(),hue=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[va,qn]}),n})();const fue=["previewCanvasContainer"],pue=["previewCanvas"];function mue(n,e){if(1&n){const t=Wi();K(0,"div")(1,"label",8),Je(2),J(),K(3,"input",9),ct("change",function(r){return In(Dn(t).$implicit.visible=r.currentTarget.checked)}),J()()}if(2&n){const t=e.$implicit;j(1),z("for","visibility_"+t.name),j(1),$i(t.name),j(1),z("id","visibility_"+t.name)("checked",t.visible)}}function gue(n,e){if(1&n&&(uo(0),K(1,"h4"),Je(2,"Objects visibility"),J(),_e(3,mue,4,4,"div",7),ho()),2&n){const t=be();j(3),z("ngForOf",t.meshes)}}function _ue(n,e){1&n&&Fe(0,"mat-spinner",10)}const yb=n=>{n.colorSpace="srgb",n.anisotropy=8,n.magFilter=Ni,n.minFilter=Ni};let I5=(()=>{class n{constructor(t){this.cdr=t,this.visibilityControls=!0,this.groupFunction=null,this._paths$=new Ct(null),this.destroyed$=new Ue,this.entity=null,this.meshes=[]}get paths(){return this._paths$.getValue()}set paths(t){this._paths$.next(t)}ngAfterViewInit(){var t=this;return xt(function*(){var s;t.world=new rz(new M5,{init:(s=xt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield t.world.init(),t.world.visualScene.nativeScene.add(new zP(16777215,2));let i=new Ct({x:1,y:1});t.renderer=t.world.addRenderer(t.world.visualScene.factory.createPerspectiveCamera(),t.previewCanvas.nativeElement,{size:i.asObservable(),background:11184810}),t.controller=new Pne(t.renderer,{mouseOptions:{canvas:t.previewCanvas.nativeElement}}),t.world.addEntity(t.controller);const r=()=>{i.next({x:t.previewCanvasContainer.nativeElement.clientWidth,y:t.previewCanvasContainer.nativeElement.clientHeight})};new ResizeObserver(r).observe(t.previewCanvasContainer.nativeElement),r(),t.world.start(),t._paths$.pipe(et(t.destroyed$)).subscribe(function(){var s=xt(function*(o){if(t.entity&&(t.world.removeEntity(t.entity),t.entity.dispose(),t.entity=null,t.meshes=[],t.cdr.markForCheck()),o){const[a,l]=o,c=new nk,h=yield(new T5).loadAsync(l);h.preload(),c.setMaterials(h);const p=yield c.loadAsync(a);if(t.groupFunction){const b={};for(const y of p.children){const v=t.groupFunction(y.name);b[v]||(b[v]=[]),b[v].push(y)}for(const y of Object.keys(b)){const v=new jo;v.add(...b[y]),v.name=y,p.remove(...b[y]),p.add(v)}}t.meshes=p.children,p.traverse(b=>{if(b instanceof Yn){const y=b.material instanceof Array?b.material:[b.material];for(const v of y)v.transparent=!0,v.alphaTest=.5,v instanceof as&&v.map&&(v.map.wrapS=qi,v.map.wrapT=qi,yb(v.map),v.map.needsUpdate=!0)}}),t.entity=new iu(new cl(p),null),t.world.addEntity(t.entity);let m={min:{x:-5,y:-5,z:-5},max:{x:5,y:5,z:5}};const g=t.entity.object3D.getBoundings();!isNaN(g.min.x)&&!isNaN(g.max.x)&&(m=g),t.controller.target=_t.scalarMult(_t.add(m.min,m.max),.5),t.controller.radius=_t.dist(m.min,m.max),t.controller.theta=-1.32,t.controller.phi=1.22,t.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return n.\u0275fac=function(t){return new(t||n)(D(ci))},n.\u0275cmp=ht({type:n,selectors:[["app-obj-viewer"]],viewQuery:function(t,i){if(1&t&&(oi(fue,5),oi(pue,5)),2&t){let r;Lt(r=Ft())&&(i.previewCanvasContainer=r.first),Lt(r=Ft())&&(i.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction"},decls:7,vars:2,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],[4,"ngFor","ngForOf"],[3,"for"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(t,i){1&t&&(K(0,"div",0,1),Fe(2,"canvas",2,3),K(4,"div",4),_e(5,gue,4,1,"ng-container",5),J(),_e(6,_ue,1,0,"mat-spinner",6),J()),2&t&&(j(5),z("ngIf",i.visibilityControls),j(1),z("ngIf",!i.entity))},dependencies:[Fo,gi,EC],styles:[".previewCanvasContainer[_ngcontent-%COMP%]{width:100%;height:calc(100vh - 14rem);position:relative;overflow:hidden;margin:0 0 16px;display:flex;align-items:center;justify-content:space-around}.previewCanvasContainer[_ngcontent-%COMP%] canvas[_ngcontent-%COMP%]{position:absolute}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%]{position:absolute;right:0;top:0;padding:5px;display:flex;flex-direction:column;row-gap:10px;background-color:#333;color:#fff;max-height:calc(100% - 8px);overflow-y:auto}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%]:empty{display:none}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%;display:flex}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),n})();function vue(n,e){if(1&n&&(Lr(),Fe(0,"circle",3),zt(1,"async"),zt(2,"async")),2&n){const t=be();let i,r;Vt("cx",(null==(i=Xt(1,3,t.mapPointer$))?null:i.x)||0)("cy",(null==(r=Xt(2,5,t.mapPointer$))?null:r.y)||0)("r",10)}}const yue=function(){return{"stroke-width":3}};let bue=(()=>{class n{constructor(t){this.ref=t,this._roadSpline$=new Ct([]),this._pointer$=new Ct(null),this.splineClosed=!1,this.svgSize$=new Ct({x:100,y:100}),this.scalingSquare$=new Ct({x:0,y:0,width:100,height:100}),this.mapPolyline$=new Ct(""),this.mapPointer$=new Ct(null),this.destroyed$=new Ue}set roadSpline(t){this._roadSpline$.next(t)}set pointer(t){this._pointer$.next(t)}ngAfterViewInit(){this._roadSpline$.pipe(et(this.destroyed$),Ye(i=>{let r={x:Number.MAX_SAFE_INTEGER,y:Number.MAX_SAFE_INTEGER},s={x:Number.MIN_SAFE_INTEGER,y:Number.MIN_SAFE_INTEGER};i.forEach(a=>{r={x:Math.min(r.x,a.x),y:Math.min(r.y,a.z)},s={x:Math.max(s.x,a.x),y:Math.max(s.y,a.z)}});const o_x=s.x-r.x,o_y=s.y-r.y;return{x:r.x-.1*o_x,y:r.y-.1*o_y,width:1.2*o_x,height:1.2*o_y}})).subscribe(this.scalingSquare$),Vd([this._roadSpline$,this.scalingSquare$,this.svgSize$]).pipe(et(this.destroyed$),Ye(([i,r,s])=>{const o=i.map(a=>({x:(a.x-r.x)*s.x/r.width,y:(r.y-a.z)*s.y/r.height+s.y}));return this.splineClosed&&o.length&&o.push(o[0]),o.map(a=>Math.round(a.x)+","+Math.round(a.y)).join(" ")})).subscribe(this.mapPolyline$),Vd([this._pointer$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(et(this.destroyed$),Ye(([i,r,s])=>i?{x:(i.x-r.x)*s.x/r.width,y:(r.y-i.y)*s.y/r.height+s.y}:null)).subscribe(this.mapPointer$);const t=()=>{this.svgSize$.next({x:this.ref.nativeElement.clientWidth,y:this.ref.nativeElement.clientHeight})};new ResizeObserver(t).observe(this.ref.nativeElement),t()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return n.\u0275fac=function(t){return new(t||n)(D(yt))},n.\u0275cmp=ht({type:n,selectors:[["app-tri-minimap"]],inputs:{roadSpline:"roadSpline",pointer:"pointer",splineClosed:"splineClosed"},decls:8,vars:13,consts:[["shape-rendering","geometricPrecision"],[2,"fill","none","stroke","#333333",3,"ngStyle"],["fill","#e30","stroke","black","stroke-width","3",4,"ngIf"],["fill","#e30","stroke","black","stroke-width","3"]],template:function(t,i){if(1&t&&(Lr(),K(0,"svg",0),zt(1,"async"),zt(2,"async"),Fe(3,"polyline",1),zt(4,"async"),Je(5," cars "),_e(6,vue,3,7,"circle",2),zt(7,"async"),J()),2&t){let r;Vt("viewBox","0 0 "+(null==(r=Xt(1,4,i.svgSize$))?null:r.x)+" "+(null==(r=Xt(2,6,i.svgSize$))?null:r.y)),j(3),z("ngStyle",Xs(12,yue)),Vt("points",Xt(4,8,i.mapPolyline$)),j(3),z("ngIf",Xt(7,10,i.mapPointer$))}},dependencies:[gi,Ow,Vl],styles:["[_nghost-%COMP%]{overflow:auto}svg[_ngcontent-%COMP%]{width:100%;height:100%}"],changeDetection:0}),n})();const xue=["previewCanvasContainer"],wue=["previewCanvas"];function Mue(n,e){if(1&n&&(K(0,"mat-option",19),Je(1),J()),2&n){const t=e.$implicit;z("value",t),j(1),nr(" ",t," ")}}function Sue(n,e){if(1&n){const t=Wi();uo(0),K(1,"mat-form-field",1)(2,"mat-label"),Je(3,"Custom FAM path"),J(),Fe(4,"input",20,21),zt(6,"async"),J(),K(7,"button",22),ct("click",function(){Dn(t);const r=Vr(5);return In(be().onFamSelected(r.value))}),Je(8,"LOAD"),J(),ho()}if(2&n){const t=be();j(4),z("value",Xt(6,1,t.previewFamLocation$))}}function Cue(n,e){1&n&&Fe(0,"mat-spinner",23),2&n&&z("diameter",40)}function Eue(n,e){1&n&&Fe(0,"mat-spinner",24)}const Aue=function(){return["loop_chunk","num_chunks","unk0","unk1","position","unknowns0","chunks_size","rail_tex_id","num_prop_descr","num_props","unk2","unk3","prop_descr","props"]};var hf=(()=>{return(n=hf||(hf={})).ThreeModel="model",n.Bitmap="bitmap",n.TwoSidedBitmap="two_sided_bitmap",hf;var n})();class Tue extends Ane{constructor(e,t,i){super(e,{loadDepth:40,inertia:2}),this.mapGraph=e,this.famPath=t,this.hideUnknownEntities$=i,this.textureLoader=new gC,this.terrainMaterials={},this.objLoader=new nk,this.resource=null,this.isOpenedTrack=!1,this._placeholder=null,this._placeholderPromise=null,this.unknownEntities=new Set,this._placeholderTerrain=null,this._placeholderTerrainPromise=null}onSpawned(e){super.onSpawned(e),this.hideUnknownEntities$.pipe(qd(),et(this._onRemoved$)).subscribe(t=>{for(const i of this.unknownEntities)i.visible=!t})}getPlaceholderTexture(){var e=this;return xt(function*(){return e._placeholder?e._placeholder:(e._placeholderPromise||(e._placeholderPromise=e.textureLoader.loadAsync("assets/placeholder_texture.png")),e._placeholderPromise)})()}getPlaceholderTerrainTexture(){var e=this;return xt(function*(){return e._placeholderTerrain?e._placeholderTerrain:(e._placeholderTerrainPromise||(e._placeholderTerrainPromise=e.textureLoader.loadAsync("assets/placeholder_texture.png").then(t=>(t.wrapS=ql,t.wrapT=qi,yb(t),t.flipY=!0,t))),e._placeholderTerrainPromise)})()}loadChunk(e){var t=this;return xt(function*(){const i=yield t.objLoader.loadAsync(e.path+".obj");i.position.set(e.position.x,e.position.y,e.position.z),i.traverse(l=>{l instanceof Yn&&(l.material=t.getTerrainMaterial((l.userData.name||l.name).substr((l.userData.name||l.name).lastIndexOf("_")+1).split(".")[0]))});let r=+e.path.split("_")[e.path.split("_").length-1],s=(t.resource.data.props||[]).filter(l=>l.road_point_idx>=4*r&&l.road_point_idx<4*(r+1)).map(l=>({...l,...t.resource.data.prop_descr[l.prop_descr_idx],position:_t.add({x:l.position.x,y:l.position.z,z:l.position.y},{x:t.resource.data.road_spline[l.road_point_idx].position.x,y:t.resource.data.road_spline[l.road_point_idx].position.z,z:t.resource.data.road_spline[l.road_point_idx].position.y}),rotation:zr.fromAngle(_t.nZ,l.rotation+t.resource.data.road_spline[l.road_point_idx].orientation)}));const o=(yield Promise.all(s.map(l=>t.loadPropInternal(l)))).filter(l=>!!l),a=new iu(new cl(i));return t.addChildren(a,...o),t.loaded.set(e,[a,...o]),[[a,...o],null]})()}disposeChunk(e){for(const t of this.loaded.get(e)||[])this.unknownEntities.delete(t);super.disposeChunk(e)}getTerrainMaterial(e){return this.terrainMaterials[e]||(this.terrainMaterials[e]=new as({side:Vo,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/background/${e}.png`).then(t=>{t.wrapS=ql,t.wrapT=qi,yb(t),t.flipY=!0,this.terrainMaterials[e].map=t,this.terrainMaterials[e].needsUpdate=!0,this.terrainMaterials[e].visible=!0}).catch(t=>{console.warn(`Problem with loading terrain material ${e}`),this.getPlaceholderTerrainTexture().then(i=>{this.terrainMaterials[e].map=i,this.terrainMaterials[e].needsUpdate=!0,this.terrainMaterials[e].visible=!0})}):this.getPlaceholderTerrainTexture().then(t=>{this.terrainMaterials[e].map=t,this.terrainMaterials[e].needsUpdate=!0,this.terrainMaterials[e].visible=!0})),this.terrainMaterials[e]}loadPropInternal(e){var t=this;return xt(function*(){let i=!1;if(e.type==hf.ThreeModel){let r;try{if(!t.famPath)throw new Error;const o=new T5,a=new nk,l=yield o.loadAsync(`${t.famPath}/props/${e.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new cl(yield a.loadAsync(`${t.famPath}/props/${e.data.data.resource_id}/0/geometry.obj`))}catch{i=!0,r=t.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:5},{diffuse:yield t.getPlaceholderTexture()})}r.nativeMesh.traverse(o=>{if(o instanceof Yn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof as&&l.map&&(l.map.wrapS=qi,l.map.wrapT=qi,yb(l.map),l.map.needsUpdate=!0)}});const s=new iu(r);return s.position=e.position,s.rotation=e.rotation,i&&(t.unknownEntities.add(s),s.visible=!t.hideUnknownEntities$.getValue()),t.world.addEntity(s),s}if(e.type==hf.Bitmap||e.type==hf.TwoSidedBitmap){const r=(c,u)=>new Array(u).fill(null).map((h,p)=>t.isOpenedTrack?`${Math.floor(c/4)+p}/0000`:`0/${(Math.floor(c/4)+p).toString().padStart(2,"0")}00`).join(";"),s=new jo,[o,a]=yield t.loadTexturePlaneProp(r(e.data.data.resource_id,e.flags.is_animated?e.data.data.frame_count:1),{x:e.data.data.width,y:e.data.data.height},e.data.data.animation_interval);if(s.add(o),e.type==hf.TwoSidedBitmap){const[c,u]=yield t.loadTexturePlaneProp(r(e.data.data.resource_id_2,1),{x:e.data.data.width_2,y:e.data.data.height},e.data.data.animation_interval);c.rotateY(Math.PI/2),c.position.x=e.data.data.width/2,c.position.y=e.data.data.width_2/2,s.add(c)}const l=new iu(new cl(s),null);return l.position=e.position,l.rotation=e.rotation,a&&(t.unknownEntities.add(l),l.visible=!t.hideUnknownEntities$.getValue()),l}return null})()}loadTexturePlaneProp(e,t,i){var r=this;return xt(function*(){const s=e.split(";"),o=yield r.getPlaceholderTexture();let a=!1,l=[];r.famPath?l=yield Promise.all(s.map(h=>r.textureLoader.loadAsync(`${r.famPath}/foreground/${h}.png`).catch(()=>(a=!0,o)))):(a=!0,l=s.map(()=>o));const c=l.map(h=>(yb(h),new as({map:h,alphaTest:.5,transparent:!0,side:Vo}))),u=new Yn(new tg(t.x,t.y),c[0]);if(u.rotateX(Math.PI/2),u.position.set(0,0,t.y/2),c.length>1){let h=-1;eS(r.world).pipe(ZV(i&&!isNaN(+i)?1e3*+i:250)).subscribe(()=>{h=(h+1)%c.length,u.material=c[h]})}return[u,a]})()}}let Due=(()=>{class n{constructor(t,i,r){this.eelDelegate=t,this.cdr=i,this.mainService=r,this._resource$=new Ct(null),this.changed=new it,this.previewLoading$=new Ct(!0),this.previewFamLocation$=new Ct(null),this.previewFamLoading$=new Ct(!1),this.pointer$=new Ct(null),this.selectedSplineIndex$=new Ct(0),this.selectedSplineItem$=new Ct(null),this.selectedAiInfoItem$=new Ct(null),this.selectedTerrainItem$=new Ct(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Ue}get resource(){return this._resource$.getValue()}set resource(t){this._resource$.next(t)}get previewFamPossibleLocations(){const t=this.resource?.id;return t?[t.substring(0,t.indexOf("MISC"))+"ETRACKFM"+t.substr(t.indexOf("MISC")+4,4)+"_001.FAM",t.substring(0,t.indexOf("MISC"))+"GTRACKFM"+t.substr(t.indexOf("MISC")+4,4)+"_001.FAM",t.substring(0,t.indexOf("MISC"))+"NTRACKFM"+t.substr(t.indexOf("MISC")+4,4)+"_M01.FAM",t.substring(0,t.indexOf("MISC"))+"NTRACKFM"+t.substr(t.indexOf("MISC")+4,4)+"_R01.FAM",t.substring(0,t.indexOf("MISC"))+"NTRACKFM"+t.substr(t.indexOf("MISC")+4,4)+"_T01.FAM"]:[]}get roadSpline(){return(this.resource?.data.road_spline||[]).filter((t,i)=>i<(4*this.resource?.data.num_chunks||0)).map(t=>t.position)||[]}ngAfterViewInit(){var t=this;return xt(function*(){var s;t.world=new rz(new M5,{init:(s=xt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=xt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield t.world.init(),t.skySphere=new iu(t.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})),t.skySphere.object3D.nativeMesh.material.side=Vo,t.skySphere.rotation=zr.fromEuler({x:Math.PI/2,y:0,z:0}),t.world.addEntity(t.skySphere),t.selectionSphere=new iu(t.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:.5},{color:16711680,shading:"unlit"})),t.selectionSphere.object3D.nativeMesh.material.opacity=.4,t.selectionSphere.object3D.nativeMesh.material.transparent=!0,t.world.addEntity(t.selectionSphere),t.world.visualScene.nativeScene.add(new zP(16777215,2));let i=new Ct({x:1,y:1});t.renderer=t.world.addRenderer(t.world.visualScene.factory.createPerspectiveCamera(),t.previewCanvas.nativeElement,{size:i.asObservable(),background:11184810}),t.renderer.camera.position={x:0,y:0,z:2.5},t.renderer.camera.rotation=zr.lookAt(t.renderer.camera.position,_t.add(t.renderer.camera.position,_t.Y),_t.Z),eS(t.world).pipe(et(t.destroyed$)).subscribe(()=>{t.renderer&&(t.skySphere.position=t.renderer.camera.position,t.pointer$.next(t.renderer.camera.position))}),t.controller=new Ine(t.world.keyboardInput,t.renderer,{mouseOptions:{canvas:t.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",movementOptions:{speed:1},ignoreMouseUnlessPointerLocked:!0,ignoreKeyboardUnlessPointerLocked:!0}),t.world.addEntity(t.controller);const r=()=>{i.next({x:t.previewCanvasContainer.nativeElement.clientWidth,y:t.previewCanvasContainer.nativeElement.clientHeight})};new ResizeObserver(r).observe(t.previewCanvasContainer.nativeElement),r(),t.world.start(),t._resource$.pipe(et(t.destroyed$)).subscribe(function(){var s=xt(function*(o){t.previewLoading$.next(!0),yield t.loadTerrainChunks(o?.id),yield t.loadPreview(),t.previewFamPossibleLocations[0]&&(t.previewFamLocation$.next(t.previewFamPossibleLocations[0]),yield t.onFamSelected(t.previewFamPossibleLocations[0])),t.previewLoading$.next(!1)});return function(o){return s.apply(this,arguments)}}()),t.mainService.dataBlockChange$.pipe(et(t.destroyed$),On(([s,o])=>!!t.resource&&s.startsWith(t.resource.id)),Ah(3e3)).subscribe(xt(function*(){t.previewLoading$.next(!0),yield t.postTmpUpdates(t.resource?.id),yield t.loadPreview(),t.previewLoading$.next(!1)})),t.selectedSplineIndex$.pipe(et(t.destroyed$),Ah(250)).subscribe(s=>{if(t.resource){const o=t.resource.data.road_spline[s];if(!o)return;const a={x:o.position.x,y:o.position.z,z:o.position.y};t.selectionSphere.position=a,t.renderer&&(t.renderer.position=_t.add(a,_t.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-t.resource.data.road_spline[s].orientation)),t.renderer.rotation=zr.lookAt(t.renderer.position,a,{x:0,y:0,z:1}))}t.selectedSplineItem$.next({id:$l(t.resource.id,`road_spline/${s}`),data:t.resource.data.road_spline[s],schema:(t.resource.schema.fields||[]).find(o=>"road_spline"===o.name)?.schema.child_schema,name:""}),t.selectedAiInfoItem$.next({id:$l(t.resource.id,`ai_info/${Math.floor(s/4)}`),data:t.resource.data.ai_info[Math.floor(s/4)],schema:(t.resource.schema.fields||[]).find(o=>"ai_info"===o.name)?.schema.child_schema,name:""}),t.selectedTerrainItem$.next({id:$l(t.resource.id,`terrain/${Math.floor(s/4)}`),data:t.resource.data.terrain[Math.floor(s/4)],schema:(t.resource.schema.fields||[]).find(o=>"terrain"===o.name)?.schema.child_schema,name:""})})})()}onFamSelected(t){var i=this;return xt(function*(){if("custom"!=t&&i.famPath!=t){i.previewFamLoading$.next(!0);try{const r=yield i.eelDelegate.serializeResource(t,{geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}),s=new gC,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.encoding=cu,a.mapping=jc,i.skySphere.object3D.nativeMesh.material.map=a}else i.skySphere.object3D.nativeMesh.material.map=null;i.skySphere.object3D.nativeMesh.material.needsUpdate=!0,i.famPath=t}catch{i.skySphere.object3D.nativeMesh.material.map=null,i.skySphere.object3D.nativeMesh.material.needsUpdate=!0,i.famPath=null}finally{i.previewFamLoading$.next(!1)}yield i.loadPreview()}})()}loadTerrainChunks(t){var i=this;return xt(function*(){if(t){const r=yield i.eelDelegate.serializeResource(t,{geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1,maps__save_as_chunked:!0,maps__save_invisible_wall_collisions:!1,maps__save_terrain_collisions:!1,maps__save_spherical_skybox_texture:!0});i.terrainChunksObjLocation=r[0].substring(0,r[0].indexOf("terrain_chunk_"))}else i.terrainChunksObjLocation=void 0})()}loadPreview(){var t=this;return xt(function*(){if(t.roadPath=t.resource?.data.road_spline.map(r=>({x:r.position.x,y:r.position.z,z:r.position.y})).filter((r,s)=>s%4==0).slice(0,t.resource.data.num_chunks)||null,t.isOpenedTrack=0===t.resource?.data.loop_chunk,!t.terrainChunksObjLocation||!t.roadPath)return;const i=By.fromMapArray(t.roadPath.map((r,s)=>({path:`${t.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!t.isOpenedTrack);t.unloadPreview(),t.map=new Tue(i,t.famPath&&"resources/"+t.famPath,t.mainService.hideHiddenFields$),t.map.resource=t.resource,t.map.isOpenedTrack=t.isOpenedTrack,t.map.loaderCursorEntity$.next(t.renderer),t.world.addEntity(t.map),t.cdr.markForCheck()})()}unloadPreview(){this.map&&(this.world.removeEntity(this.map),this.map.dispose(),this.map=null,this.cdr.markForCheck())}postTmpUpdates(t){var i=this;return xt(function*(){if(t){const r=yield i.eelDelegate.serializeResourceTmp(t,Object.entries(i.mainService.changedDataBlocks).filter(([s,o])=>"__has_external_changes__"!=s&&s.startsWith(t)).map(([s,o])=>({id:s,value:o})),{geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1,maps__save_as_chunked:!0,maps__save_invisible_wall_collisions:!1,maps__save_terrain_collisions:!1,maps__save_spherical_skybox_texture:!0});i.terrainChunksObjLocation=r[0].substring(0,r[0].indexOf("terrain_chunk_"))}else i.terrainChunksObjLocation=void 0})()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return n.\u0275fac=function(t){return new(t||n)(D(Hc),D(ci),D(il))},n.\u0275cmp=ht({type:n,selectors:[["app-tri-map-block-ui"]],viewQuery:function(t,i){if(1&t&&(oi(xue,5),oi(wue,5)),2&t){let r;Lt(r=Ft())&&(i.previewCanvasContainer=r.first),Lt(r=Ft())&&(i.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:49,vars:43,consts:[[1,"famSelector"],["appearance","fill"],[3,"value","valueChange"],["famSelect",""],[3,"value",4,"ngFor","ngForOf"],["value","custom"],[4,"ngIf"],["mode","indeterminate",3,"diameter",4,"ngIf"],[1,"preview"],[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["mode","indeterminate",4,"ngIf"],[1,"previewNavigationContainer"],["matInput","","type","number",3,"min","max","ngModel","ngModelChange"],[3,"roadSpline","pointer","splineClosed"],[3,"resource","hideBlockActions"],[3,"resource","hideBlockActions","fieldWhitelist"],[3,"value"],["matInput","","type","text",3,"value"],["customFamInput",""],["mat-button","",3,"click"],["mode","indeterminate",3,"diameter"],["mode","indeterminate"]],template:function(t,i){if(1&t&&(K(0,"div",0)(1,"h4"),Je(2,"Preview *.FAM file"),J(),K(3,"mat-form-field",1)(4,"mat-label"),Je(5,"Current preview FAM"),J(),K(6,"mat-select",2,3),ct("valueChange",function(s){return i.onFamSelected(s)}),zt(8,"async"),zt(9,"async"),_e(10,Mue,2,2,"mat-option",4),K(11,"mat-option",5),Je(12,"custom"),J()()(),_e(13,Sue,9,3,"ng-container",6),_e(14,Cue,1,1,"mat-spinner",7),zt(15,"async"),J(),K(16,"div",8)(17,"div",9,10),Fe(19,"canvas",11,12),_e(21,Eue,1,0,"mat-spinner",13),zt(22,"async"),J(),K(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),Je(27,"Spline item"),J(),K(28,"input",15),ct("ngModelChange",function(s){return i.selectedSplineIndex$.next(s)}),zt(29,"async"),zt(30,"async"),J()(),Fe(31,"app-tri-minimap",16),zt(32,"async"),J()(),K(33,"h4"),Je(34,"Road spline item"),J(),Fe(35,"app-compound-block-ui",17),zt(36,"async"),K(37,"h4"),Je(38,"AI info (block for 4 spline items)"),J(),Fe(39,"app-compound-block-ui",17),zt(40,"async"),K(41,"h4"),Je(42,"Terrain (block for 4 spline items)"),J(),Fe(43,"app-compound-block-ui",17),zt(44,"async"),K(45,"h4"),Je(46,"Common"),J(),Fe(47,"app-compound-block-ui",18),zt(48,"async")),2&t){const r=Vr(7);let s;j(6),z("value",i.previewFamPossibleLocations.includes(Xt(8,20,i.previewFamLocation$))?Xt(9,22,i.previewFamLocation$):"custom"),j(4),z("ngForOf",i.previewFamPossibleLocations),j(3),z("ngIf","custom"==r.value),j(1),z("ngIf",Xt(15,24,i.previewFamLoading$)),j(7),z("ngIf",Xt(22,26,i.previewLoading$)),j(7),z("min",0)("max",4*(null==(s=Xt(29,28,i._resource$))?null:s.data.num_chunks)-1)("ngModel",Xt(30,30,i.selectedSplineIndex$)),j(3),z("roadSpline",i.roadSpline)("pointer",Xt(32,32,i.pointer$))("splineClosed",!i.isOpenedTrack),j(4),z("resource",Xt(36,34,i.selectedSplineItem$))("hideBlockActions",!0),j(4),z("resource",Xt(40,36,i.selectedAiInfoItem$))("hideBlockActions",!0),j(4),z("resource",Xt(44,38,i.selectedTerrainItem$))("hideBlockActions",!0),j(4),z("resource",Xt(48,40,i._resource$))("hideBlockActions",!0)("fieldWhitelist",Xs(42,Aue))}},dependencies:[Fo,gi,Wc,wm,eu,Cm,Sm,tu,nu,xa,Em,PM,Oy,vm,EC,Gc,bue,Vl],styles:[".preview[_ngcontent-%COMP%]{width:100%;height:calc(100vh - 14rem);display:flex;column-gap:1rem}.preview[_ngcontent-%COMP%] .previewCanvasContainer[_ngcontent-%COMP%]{flex-grow:1;position:relative;overflow:hidden;margin:0 0 16px;display:flex;align-items:center;justify-content:space-around}.preview[_ngcontent-%COMP%] .previewCanvasContainer[_ngcontent-%COMP%] canvas[_ngcontent-%COMP%]{position:absolute}.preview[_ngcontent-%COMP%] .previewNavigationContainer[_ngcontent-%COMP%]{width:20rem;flex-shrink:0;display:flex;flex-direction:column}.preview[_ngcontent-%COMP%] .previewNavigationContainer[_ngcontent-%COMP%] app-tri-minimap[_ngcontent-%COMP%]{flex-grow:1;display:flex}.famSelector[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;column-gap:1rem}.famSelector[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{min-width:-moz-fit-content;min-width:fit-content}.famSelector[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex-grow:1}.famSelector[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%], .famSelector[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-bottom:1.34375em}"],changeDetection:0}),n})(),Iue=(()=>{class n{constructor(t,i){this.eelDelegate=t,this.mainService=i,this._resource$=new Ct(null),this.changed=new it,this.previewPaths$=new Ct(null),this.destroyed$=new Ue,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1,geometry__replace_car_wheel_with_dummies:!1}}get resource(){return this._resource$.getValue()}set resource(t){this._resource$.next(t)}ngAfterViewInit(){var t=this;return xt(function*(){t._resource$.pipe(et(t.destroyed$)).subscribe(function(){var i=xt(function*(r){t.previewPaths$.next(yield t.loadPreviewFilePaths(r?.id))});return function(r){return i.apply(this,arguments)}}()),t.mainService.dataBlockChange$.pipe(et(t.destroyed$),On(([i,r])=>!!t.resource&&i.startsWith(t.resource.id)),Ah(1500)).subscribe(xt(function*(){t.previewPaths$.next(null),t.previewPaths$.next(yield t.postTmpUpdates(t.resource?.id))}))})()}postTmpUpdates(t){var i=this;return xt(function*(){if(t){const r=yield i.eelDelegate.serializeResourceTmp(t,Object.entries(i.mainService.changedDataBlocks).filter(([s,o])=>"__has_external_changes__"!=s&&s.startsWith(t)).map(([s,o])=>({id:s,value:o})),i.serializerSettings);return[r.find(s=>s.endsWith(".obj")),r.find(s=>s.endsWith(".mtl"))]}return null})()}loadPreviewFilePaths(t){var i=this;return xt(function*(){if(t){const r=yield i.eelDelegate.serializeResource(t,i.serializerSettings);return[r.find(s=>s.endsWith(".obj")),r.find(s=>s.endsWith(".mtl"))]}return null})()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return n.\u0275fac=function(t){return new(t||n)(D(Hc),D(il))},n.\u0275cmp=ht({type:n,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:6,consts:[[3,"paths"],[3,"resource"]],template:function(t,i){1&t&&(Fe(0,"app-obj-viewer",0),zt(1,"async"),Fe(2,"app-compound-block-ui",1),zt(3,"async")),2&t&&(z("paths",Xt(1,2,i.previewPaths$)),j(2),z("resource",Xt(3,4,i._resource$)))},dependencies:[Gc,I5,Vl],changeDetection:0}),n})();const Rue=["class","block-ui"];function Pue(n,e){if(1&n&&(K(0,"mat-label",7),Je(1),J()),2&n){const t=be(2);z("matTooltip",t.resourceDescription),j(1),nr("",null==t.resource?null:t.resource.name," ")}}function kue(n,e){if(1&n&&(K(0,"mat-option",8),Je(1),J()),2&n){const t=e.$implicit,i=e.index,r=be(2);z("value",i)("disabled",r.disabled),j(1),nr(" ",t.block_class_mro.split("__")[0]," ")}}function Oue(n,e){1&n&&Fe(0,"app-block-actions",9),2&n&&z("resource",be(2).childResource)}function Lue(n,e){if(1&n){const t=Wi();uo(0),_e(1,Pue,2,2,"mat-label",1),zt(2,"async"),K(3,"div",2)(4,"mat-label"),Je(5,"Resource type:"),J(),K(6,"mat-select",3),ct("selectionChange",function(r){return Dn(t),In(be().setChoiceIndex(r.value))}),_e(7,kue,2,3,"mat-option",4),J(),_e(8,Oue,1,1,"app-block-actions",5),J(),Fe(9,"app-editor",6),ho()}if(2&n){const t=be();let i;j(1),z("ngIf",(null==t.resource?null:t.resource.name)&&(null==t.resource?null:t.resource.name)!=(null==(i=Xt(2,8,t.main.resource$))?null:i.name)),j(5),z("value",t.resourceData.choice_index)("disabled",t.disabled),j(1),z("ngForOf",t.resource.schema.possible_resource_schemas),j(1),z("ngIf",!t.hideBlockActions),j(1),z("resource",t.childResource)("hideBlockActions",!0)("disabled",t.disabled)}}let R5=(()=>{class n{constructor(t){this.main=t,this._resource=null,this.resourceDescription="",this.hideBlockActions=!1,this.disabled=!1,this.childResource=null,this.choiceDataCaches=[],this.changed=new it}get resource(){return this._resource}set resource(t){const i=!this._resource||!t||this._resource.id!==t.id;this._resource=t,i&&(this.choiceDataCaches=new Array(this._resource?.schema.possible_resource_schemas||0).fill(null),this._resource&&(this.choiceDataCaches[this._resource.data.choice_index]=this._resource.data.data)),this.updateChild()}get resourceData(){return this._resource?.data||null}setChoiceIndex(t){this._resource&&(this.choiceDataCaches[this._resource.data.choice_index]=this.childResource.data,this._resource.data.choice_index=t,this._resource.data.data=this.choiceDataCaches[t],this.updateChild(),this.changed.emit())}updateChild(){this.childResource=this._resource?{...this._resource,id:$l(this._resource.id,"data"),data:this.choiceDataCaches[this._resource.data.choice_index],name:"",schema:this._resource.schema.possible_resource_schemas[this._resource.data.choice_index]}:null}}return n.\u0275fac=function(t){return new(t||n)(D(il))},n.\u0275cmp=ht({type:n,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:Rue,decls:1,vars:1,consts:[[4,"ngIf"],["matTooltipPosition","above",3,"matTooltip",4,"ngIf"],["id","resource-type-container"],[3,"value","disabled","selectionChange"],[3,"value","disabled",4,"ngFor","ngForOf"],[3,"resource",4,"ngIf"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"],[3,"resource"]],template:function(t,i){1&t&&_e(0,Lue,10,10,"ng-container",0),2&t&&z("ngIf",i.resourceData)},styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;row-gap:1rem}#resource-type-container[_ngcontent-%COMP%]{display:flex;column-gap:.5rem;align-items:center}#resource-type-container[_ngcontent-%COMP%] mat-label[_ngcontent-%COMP%]{flex-shrink:0}"],changeDetection:0}),n})();const Fue=["class","block-ui"];function Nue(n,e){if(1&n&&(K(0,"mat-label",7),Je(1),J()),2&n){const t=be(2);z("matTooltip",t.resourceDescription),j(1),nr(" ",t.resource.name," ")}}function Bue(n,e){if(1&n){const t=Wi();uo(0),_e(1,Nue,2,2,"mat-label",1),K(2,"mat-selection-list",2),ct("selectionChange",function(r){return Dn(t),In(be().onSelection(r))}),K(3,"mat-list-option",3),Je(4," Left "),J(),K(5,"mat-list-option",4),Je(6," Right "),J()(),K(7,"mat-form-field",5)(8,"mat-label"),Je(9,"Texture ID"),J(),K(10,"input",6),ct("ngModelChange",function(r){return Dn(t),In(be().resource.data.texture_id=r)})("change",function(){return Dn(t),In(be().changed.emit())}),J()(),ho()}if(2&n){const t=be();j(1),z("ngIf",t.resource.name),j(2),z("selected",t.resource.data.has_left_fence),j(2),z("selected",t.resource.data.has_right_fence),j(5),z("max",63)("min",0)("step",1)("ngModel",t.resource.data.texture_id)}}let Uue=(()=>{class n{constructor(){this.resource=null,this.resourceDescription="",this.changed=new it}onSelection(t){for(const i of t.options)this.resource.data[i.value]=i.selected;this.changed.emit()}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=ht({type:n,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:Fue,decls:1,vars:1,consts:[[4,"ngIf"],["matTooltipPosition","above",3,"matTooltip",4,"ngIf"],[3,"selectionChange"],["value","has_left_fence",3,"selected"],["value","has_right_fence",3,"selected"],["appearance","fill"],["matInput","","type","number",3,"max","min","step","ngModel","ngModelChange","change"],["matTooltipPosition","above",3,"matTooltip"]],template:function(t,i){1&t&&_e(0,Bue,11,7,"ng-container",0),2&t&&z("ngIf",i.resource)},dependencies:[gi,Wc,wm,eu,Cm,Sm,tu,nu,xa,Em,_s,JM,QM],changeDetection:0}),n})(),Vue=(()=>{class n{constructor(){this._resource=null,this.resourceMap={},this.changed=new it}get resource(){return this._resource}set resource(t){this._resource=t,this.resourceMap={};const i=(this._resource?.schema.fields||[]).find(s=>"children"===s.name)?.schema.child_schema;if(!i)return;let r=this.resourceData.items_descr.map((s,o)=>[s,o]).filter(([s,o])=>s>0).map(([s,o])=>o);for(let s=0;s{class n{constructor(t,i,r){this.dialogRef=t,this.fb=i,this.data=r;const s={};for(const o of r.args)s[o.id]=["",FI.required];this.argsForm=this.fb.group(s)}submit(){const t=this.argsForm.value;for(const i of this.data.args)"number"==i.type&&(t[i.id]=+t[i.id]);this.dialogRef.close(t)}}return n.\u0275fac=function(t){return new(t||n)(D(wy),D(OJ),D(CI))},n.\u0275cmp=ht({type:n,selectors:[["app-run-custom-action",8,"dialog"]],attrs:zue,decls:12,vars:5,consts:[["mat-dialog-title",""],["mat-dialog-content",""],[3,"formGroup"],["appearance","fill",4,"ngFor","ngForOf"],["mat-dialog-actions",""],["mat-button","",3,"click"],["mat-button","",3,"disabled","click"],["appearance","fill"],["matInput","",3,"id","type","formControlName"]],template:function(t,i){1&t&&(K(0,"h1",0),Je(1),J(),K(2,"div",1)(3,"p"),Je(4),J()(),K(5,"form",2),_e(6,Hue,4,4,"mat-form-field",3),J(),K(7,"div",4)(8,"button",5),ct("click",function(){return i.dialogRef.close()}),Je(9,"Cancel"),J(),K(10,"button",6),ct("click",function(){return i.submit()}),Je(11,"Run"),J()()),2&t&&(j(1),nr('Run action "',i.data.title,'"'),j(3),$i(i.data.description),j(1),z("formGroup",i.argsForm),j(1),z("ngForOf",i.data.args),j(4),z("disabled",i.argsForm.invalid))},dependencies:[Fo,hV,Wc,eu,J3,nu,xa,Em,PM,GU,WU,$U,Mm,QI],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),n})();function P5(n,e){return e?t=>$v(e.pipe(Li(1),function Wue(){return Gn((n,e)=>{n.subscribe(Un(e,ls))})}()),t.pipe(P5(n))):er((t,i)=>lr(n(t,i)).pipe(Li(1),CN(t)))}function k5(n,e=dy){const t=hM(n,e);return P5(()=>t)}const $ue=["mat-menu-item",""];function jue(n,e){1&n&&(Lr(),K(0,"svg",3),Fe(1,"polygon",4),J())}const Xue=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],que=["mat-icon, [matMenuItemIcon]","*"];function Yue(n,e){if(1&n){const t=Wi();K(0,"div",0),ct("keydown",function(r){return Dn(t),In(be()._handleKeydown(r))})("click",function(){return Dn(t),In(be().closed.emit("click"))})("@transformMenu.start",function(r){return Dn(t),In(be()._onAnimationStart(r))})("@transformMenu.done",function(r){return Dn(t),In(be()._onAnimationDone(r))}),K(1,"div",1),Kt(2),J()()}if(2&n){const t=be();z("id",t.panelId)("ngClass",t._classList)("@transformMenu",t._panelAnimationState),Vt("aria-label",t.ariaLabel||null)("aria-labelledby",t.ariaLabelledby||null)("aria-describedby",t.ariaDescribedby||null)}}const Kue=["*"],ik=new ge("MAT_MENU_PANEL"),Zue=vI(TM(class{}));let AC=(()=>{class n extends Zue{constructor(t,i,r,s,o){super(),this._elementRef=t,this._document=i,this._focusMonitor=r,this._parentMenu=s,this._changeDetectorRef=o,this.role="menuitem",this._hovered=new Ue,this._focused=new Ue,this._highlighted=!1,this._triggersSubmenu=!1,s?.addItem?.(this)}focus(t,i){this._focusMonitor&&t?this._focusMonitor.focusVia(this._getHostElement(),t,i):this._getHostElement().focus(i),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){const t=this._elementRef.nativeElement.cloneNode(!0),i=t.querySelectorAll("mat-icon, .material-icons");for(let r=0;r enter",go("120ms cubic-bezier(0, 0, 0.2, 1)",Ci({opacity:1,transform:"scale(1)"}))),Ks("* => void",go("100ms 25ms linear",Ci({opacity:0})))]),fadeInItems:Gl("fadeInItems",[_o("showing",Ci({opacity:1})),Ks("void => *",[Ci({opacity:0}),go("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let Jue=0;const O5=new ge("mat-menu-default-options",{providedIn:"root",factory:function ehe(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let bb=(()=>{class n{get xPosition(){return this._xPosition}set xPosition(t){this._xPosition=t,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(t){this._yPosition=t,this.setPositionClasses()}get overlapTrigger(){return this._overlapTrigger}set overlapTrigger(t){this._overlapTrigger=Cn(t)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(t){this._hasBackdrop=Cn(t)}set panelClass(t){const i=this._previousPanelClass;i&&i.length&&i.split(" ").forEach(r=>{this._classList[r]=!1}),this._previousPanelClass=t,t&&t.length&&(t.split(" ").forEach(r=>{this._classList[r]=!0}),this._elementRef.nativeElement.className="")}get classList(){return this.panelClass}set classList(t){this.panelClass=t}constructor(t,i,r,s){this._elementRef=t,this._ngZone=i,this._defaultOptions=r,this._changeDetectorRef=s,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._directDescendantItems=new Wp,this._classList={},this._panelAnimationState="void",this._animationDone=new Ue,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new it,this.close=this.closed,this.panelId="mat-menu-panel-"+Jue++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new lU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(No(this._directDescendantItems),gs(t=>cs(...t.map(i=>i._focused)))).subscribe(t=>this._keyManager.updateActiveItem(t)),this._directDescendantItems.changes.subscribe(t=>{const i=this._keyManager;if("enter"===this._panelAnimationState&&i.activeItem?._hasFocus()){const r=t.toArray(),s=Math.max(0,Math.min(r.length-1,i.activeItemIndex||0));r[s]&&!r[s].disabled?i.setActiveItem(s):i.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusSubscription?.unsubscribe()}_hovered(){return this._directDescendantItems.changes.pipe(No(this._directDescendantItems),gs(i=>cs(...i.map(r=>r._hovered))))}addItem(t){}removeItem(t){}_handleKeydown(t){const i=t.keyCode,r=this._keyManager;switch(i){case 27:nl(t)||(t.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case 39:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:return(38===i||40===i)&&r.setFocusOrigin("keyboard"),void r.onKeydown(t)}t.stopPropagation()}focusFirstItem(t="program"){this._firstItemFocusSubscription?.unsubscribe(),this._firstItemFocusSubscription=this._ngZone.onStable.pipe(Li(1)).subscribe(()=>{let i=null;if(this._directDescendantItems.length&&(i=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),!i||!i.contains(document.activeElement)){const r=this._keyManager;r.setFocusOrigin(t).setFirstItemActive(),!r.activeItem&&i&&i.focus()}})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(t){const i=Math.min(this._baseElevation+t,24),r=`${this._elevationPrefix}${i}`,s=Object.keys(this._classList).find(o=>o.startsWith(this._elevationPrefix));(!s||s===this._previousElevation)&&(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[r]=!0,this._previousElevation=r)}setPositionClasses(t=this.xPosition,i=this.yPosition){const r=this._classList;r["mat-menu-before"]="before"===t,r["mat-menu-after"]="after"===t,r["mat-menu-above"]="above"===i,r["mat-menu-below"]="below"===i,this._changeDetectorRef?.markForCheck()}_startAnimation(){this._panelAnimationState="enter"}_resetAnimation(){this._panelAnimationState="void"}_onAnimationDone(t){this._animationDone.next(t),this._isAnimating=!1}_onAnimationStart(t){this._isAnimating=!0,"enter"===t.toState&&0===this._keyManager.activeItemIndex&&(t.element.scrollTop=0)}_updateDirectDescendants(){this._allItems.changes.pipe(No(this._allItems)).subscribe(t=>{this._directDescendantItems.reset(t.filter(i=>i._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(pt),D(O5),D(ci))},n.\u0275dir=Ae({type:n,contentQueries:function(t,i,r){if(1&t&&(Xi(r,Que,5),Xi(r,AC,5),Xi(r,AC,4)),2&t){let s;Lt(s=Ft())&&(i.lazyContent=s.first),Lt(s=Ft())&&(i._allItems=s),Lt(s=Ft())&&(i.items=s)}},viewQuery:function(t,i){if(1&t&&oi(fo,5),2&t){let r;Lt(r=Ft())&&(i.templateRef=r.first)}},inputs:{backdropClass:"backdropClass",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:"overlapTrigger",hasBackdrop:"hasBackdrop",panelClass:["class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"}}),n})(),the=(()=>{class n extends bb{constructor(t,i,r,s){super(t,i,r,s),this._elevationPrefix="mat-elevation-z",this._baseElevation=8}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(pt),D(O5),D(ci))},n.\u0275cmp=ht({type:n,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(t,i){2&t&&Vt("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[Hn([{provide:ik,useExisting:n}]),ft],ngContentSelectors:Kue,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel","mdc-menu-surface","mdc-menu-surface--open","mat-mdc-elevation-specific",3,"id","ngClass","keydown","click"],[1,"mat-mdc-menu-content","mdc-list"]],template:function(t,i){1&t&&(Cr(),_e(0,Yue,3,6,"ng-template"))},dependencies:[Bv],styles:['.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;list-style-type:none}.mat-mdc-menu-content:focus{outline:none}.mat-mdc-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-mdc-menu-panel{outline:solid 1px}.mat-mdc-menu-panel.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;position:relative}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:16px;padding-right:16px;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px}.mat-mdc-menu-item:focus{outline:none}[dir=rtl] .mat-mdc-menu-item,.mat-mdc-menu-item[dir=rtl]{padding-left:16px;padding-right:16px}.mat-mdc-menu-item::-moz-focus-inner{border:0}.mat-mdc-menu-item.mdc-list-item{align-items:center}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item .mat-icon{margin-right:16px}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:16px}.mat-mdc-menu-item .mdc-list-item__primary-text{white-space:normal}.mat-mdc-menu-item.mat-mdc-menu-item-submenu-trigger{padding-right:32px}[dir=rtl] .mat-mdc-menu-item.mat-mdc-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}.cdk-high-contrast-active .mat-mdc-menu-item{margin-top:1px}.mat-mdc-menu-submenu-icon{position:absolute;top:50%;right:16px;transform:translateY(-50%);width:5px;height:10px;fill:currentColor}[dir=rtl] .mat-mdc-menu-submenu-icon{right:auto;left:16px;transform:translateY(-50%) scaleX(-1)}.cdk-high-contrast-active .mat-mdc-menu-submenu-icon{fill:CanvasText}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}'],encapsulation:2,data:{animation:[TC.transformMenu,TC.fadeInItems]},changeDetection:0}),n})();const L5=new ge("mat-menu-scroll-strategy"),ihe={provide:L5,deps:[mo],useFactory:function nhe(n){return()=>n.scrollStrategies.reposition()}},F5=Sh({passive:!0});let rhe=(()=>{class n{get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(t){this.menu=t}get menu(){return this._menu}set menu(t){t!==this._menu&&(this._menu=t,this._menuCloseSubscription.unsubscribe(),t&&(this._menuCloseSubscription=t.close.subscribe(i=>{this._destroyMenu(i),("click"===i||"tab"===i)&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(i)})),this._menuItemInstance?._setTriggersSubmenu(this.triggersSubmenu()))}constructor(t,i,r,s,o,a,l,c,u){this._overlay=t,this._element=i,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=u,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=un.EMPTY,this._hoverSubscription=un.EMPTY,this._menuCloseSubscription=un.EMPTY,this._changeDetectorRef=Ot(ci),this._handleTouchStart=h=>{fI(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new it,this.onMenuOpen=this.menuOpened,this.menuClosed=new it,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof bb?o:void 0,i.nativeElement.addEventListener("touchstart",this._handleTouchStart,F5)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,F5),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this.menu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){const t=this.menu;if(this._menuOpen||!t)return;const i=this._createOverlay(t),r=i.getConfig(),s=r.positionStrategy;this._setPosition(t,s),r.hasBackdrop=null==t.hasBackdrop?!this.triggersSubmenu():t.hasBackdrop,i.attach(this._getPortal(t)),t.lazyContent&&t.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(t),t instanceof bb&&(t._startAnimation(),t._directDescendantItems.changes.pipe(et(t.close)).subscribe(()=>{s.withLockedPosition(!1).reapplyLastPosition(),s.withLockedPosition(!0)}))}closeMenu(){this.menu?.close.emit()}focus(t,i){this._focusMonitor&&t?this._focusMonitor.focusVia(this._element,t,i):this._element.nativeElement.focus(i)}updatePosition(){this._overlayRef?.updatePosition()}_destroyMenu(t){if(!this._overlayRef||!this.menuOpen)return;const i=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this.restoreFocus&&("keydown"===t||!this._openedBy||!this.triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,i instanceof bb?(i._resetAnimation(),i.lazyContent?i._animationDone.pipe(On(r=>"void"===r.toState),Li(1),et(i.lazyContent._attached)).subscribe({next:()=>i.lazyContent.detach(),complete:()=>this._setIsMenuOpen(!1)}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),i?.lazyContent?.detach())}_initMenu(t){t.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,t.direction=this.dir,this._setMenuElevation(t),t.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0)}_setMenuElevation(t){if(t.setElevation){let i=0,r=t.parentMenu;for(;r;)i++,r=r.parentMenu;t.setElevation(i)}}_setIsMenuOpen(t){t!==this._menuOpen&&(this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&this._menuItemInstance._setHighlighted(t),this._changeDetectorRef.markForCheck())}_createOverlay(t){if(!this._overlayRef){const i=this._getOverlayConfig(t);this._subscribeToPositions(t,i.positionStrategy),this._overlayRef=this._overlay.create(i),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}_getOverlayConfig(t){return new _y({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:t.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:t.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}_subscribeToPositions(t,i){t.setPositionClasses&&i.positionChanges.subscribe(r=>{const s="start"===r.connectionPair.overlayX?"after":"before",o="top"===r.connectionPair.overlayY?"below":"above";this._ngZone?this._ngZone.run(()=>t.setPositionClasses(s,o)):t.setPositionClasses(s,o)})}_setPosition(t,i){let[r,s]="before"===t.xPosition?["end","start"]:["start","end"],[o,a]="above"===t.yPosition?["bottom","top"]:["top","bottom"],[l,c]=[o,a],[u,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===t.xPosition?"start":"end",s=u="end"===r?"start":"end",this._parentMaterialMenu){if(null==this._parentInnerPadding){const m=this._parentMaterialMenu.items.first;this._parentInnerPadding=m?m._getHostElement().offsetTop:0}p="bottom"===o?this._parentInnerPadding:-this._parentInnerPadding}}else t.overlapTrigger||(l="top"===o?"bottom":"top",c="top"===a?"bottom":"top");i.withPositions([{originX:r,originY:l,overlayX:u,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:u,overlayY:a,offsetY:-p},{originX:s,originY:c,overlayX:h,overlayY:a,offsetY:-p}])}_menuClosingActions(){const t=this._overlayRef.backdropClick(),i=this._overlayRef.detachments();return cs(t,this._parentMaterialMenu?this._parentMaterialMenu.closed:dt(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(On(o=>o!==this._menuItemInstance),On(()=>this._menuOpen)):dt(),i)}_handleMousedown(t){hI(t)||(this._openedBy=0===t.button?"mouse":void 0,this.triggersSubmenu()&&t.preventDefault())}_handleKeydown(t){const i=t.keyCode;(13===i||32===i)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(39===i&&"ltr"===this.dir||37===i&&"rtl"===this.dir)&&(this._openedBy="keyboard",this.openMenu())}_handleClick(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){!this.triggersSubmenu()||!this._parentMaterialMenu||(this._hoverSubscription=this._parentMaterialMenu._hovered().pipe(On(t=>t===this._menuItemInstance&&!t.disabled),k5(0,JD)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof bb&&this.menu._isAnimating?this.menu._animationDone.pipe(Li(1),k5(0,JD),et(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(t){return(!this._portal||this._portal.templateRef!==t.templateRef)&&(this._portal=new cm(t.templateRef,this._viewContainerRef)),this._portal}}return n.\u0275fac=function(t){return new(t||n)(D(mo),D(yt),D(is),D(L5),D(ik,8),D(AC,10),D(tl,8),D(Yd),D(pt))},n.\u0275dir=Ae({type:n,hostVars:3,hostBindings:function(t,i){1&t&&ct("click",function(s){return i._handleClick(s)})("mousedown",function(s){return i._handleMousedown(s)})("keydown",function(s){return i._handleKeydown(s)}),2&t&&Vt("aria-haspopup",i.menu?"menu":null)("aria-expanded",i.menuOpen)("aria-controls",i.menuOpen?i.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:["mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:["matMenuTriggerFor","menu"],menuData:["matMenuTriggerData","menuData"],restoreFocus:["matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"}}),n})(),she=(()=>{class n extends rhe{}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275dir=Ae({type:n,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[ft]}),n})(),ohe=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({providers:[ihe],imports:[va,IM,qn,pm,my,qn]}),n})();function ahe(n,e){if(1&n){const t=Wi();K(0,"button",7),ct("click",function(){return Dn(t),In(be(2).deserialize())}),Fe(1,"mat-icon",8),J()}}function lhe(n,e){if(1&n){const t=Wi();uo(0),_e(1,ahe,2,0,"button",4),K(2,"button",5),ct("click",function(){return Dn(t),In(be().serializeBlockReversible())}),Fe(3,"mat-icon",6),J(),ho()}if(2&n){const t=be();j(1),z("ngIf",t.isInReversibleSerializationState),j(1),z("disabled",t.isInReversibleSerializationState)}}function che(n,e){1&n&&(K(0,"button",9),Fe(1,"mat-icon",10),J()),2&n&&(be(),z("matMenuTriggerFor",Vr(3)))}function dhe(n,e){if(1&n){const t=Wi();K(0,"button",11),ct("click",function(){const s=Dn(t).$implicit;return In(be().runCustomAction(s))}),K(1,"span"),Je(2),J()()}if(2&n){const t=e.$implicit;j(2),$i(t.title)}}const uhe=function(){return[]};let DC=(()=>{class n{constructor(t,i,r,s,o){this.mainService=t,this.eelDelegate=i,this.cdr=r,this.dialog=s,this.snackBar=o,this.resource=null,this.isInReversibleSerializationState=!1}serializeBlockReversible(){var t=this;return xt(function*(){if(!t.resource)return;const[i,r]=yield t.eelDelegate.serializeReversible(t.resource.id,[]),s=i.reduce((o,a)=>{let l=0;for(;li.cdr.markForCheck()),i.snackBar.open("Error while performing action! Reverting file state.. "+o.errorText||0,"OK :(",{duration:5e3})}})()}}return n.\u0275fac=function(t){return new(t||n)(D(il),D(Hc),D(ci),D(My),D(t3))},n.\u0275cmp=ht({type:n,selectors:[["app-block-actions"]],inputs:{resource:"resource"},decls:5,vars:4,consts:[[4,"ngIf"],["mat-icon-button","","matTooltip","Run custom action",3,"matMenuTriggerFor",4,"ngIf"],["customActionsMenu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-icon-button","","matTooltip","Deserialize back from common format",3,"click",4,"ngIf"],["mat-icon-button","","matTooltip","Serialize to common format",3,"disabled","click"],["fontIcon","download"],["mat-icon-button","","matTooltip","Deserialize back from common format",3,"click"],["fontIcon","upload"],["mat-icon-button","","matTooltip","Run custom action",3,"matMenuTriggerFor"],["fontIcon","bolt"],["mat-menu-item","",3,"click"]],template:function(t,i){1&t&&(_e(0,lhe,4,2,"ng-container",0),_e(1,che,2,1,"button",1),K(2,"mat-menu",null,2),_e(4,dhe,3,1,"button",3),J()),2&t&&(z("ngIf",null==i.resource||null==i.resource.schema?null:i.resource.schema.serializable_to_disc),j(1),z("ngIf",(null==i.resource||null==i.resource.schema.custom_actions?null:i.resource.schema.custom_actions.length)>0),j(3),z("ngForOf",(null==i.resource?null:i.resource.schema.custom_actions)||Xs(3,uhe)))},dependencies:[Fo,gi,_s,EI,E3,the,AC,she],styles:["[_nghost-%COMP%]{display:flex}"]}),n})();const hhe=["class","block-ui"];function fhe(n,e){if(1&n&&(K(0,"mat-label",7),Je(1),J()),2&n){const t=be();z("matTooltip",t.resourceDescription),j(1),nr("",null==t.resource?null:t.resource.name," ")}}function phe(n,e){if(1&n&&(K(0,"audio",8),Fe(1,"source",9),zt(2,"async"),Je(3," Your browser does not support the audio element. "),J()),2&n){const t=be();j(1),z("src",Xt(2,1,t.audioUrl$),_p)}}function mhe(n,e){1&n&&Fe(0,"mat-spinner",10)}function ghe(n,e){1&n&&Fe(0,"app-block-actions",11),2&n&&z("resource",be().resource)}const _he=function(){return["wave_data"]};let vhe=(()=>{class n{constructor(t,i){this.eelDelegate=t,this.main=i,this._resource$=new Ct(null),this.audioUrl$=new Ct(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Ue,this.changed=new it}set resource(t){this._resource$.next(t)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var t=this;return xt(function*(){t._resource$.pipe(et(t.destroyed$)).subscribe(function(){var i=xt(function*(r){if(t.audioUrl$.next(null),r){const s=yield t.eelDelegate.serializeResource(r.id,{audio__save_car_sfx_loops:!1});t.audioUrl$.next(s.find(o=>o.endsWith(".mp3"))||null)}});return function(r){return i.apply(this,arguments)}}())})()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return n.\u0275fac=function(t){return new(t||n)(D(Hc),D(il))},n.\u0275cmp=ht({type:n,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:hhe,decls:11,vars:16,consts:[["id","header"],["matTooltipPosition","above",3,"matTooltip",4,"ngIf"],["controls","",4,"ngIf"],["mode","indeterminate",4,"ngIf"],[1,"flex-spacer"],[3,"resource",4,"ngIf"],[3,"resource","hideBlockActions","fieldBlacklist"],["matTooltipPosition","above",3,"matTooltip"],["controls",""],[3,"src"],["mode","indeterminate"],[3,"resource"]],template:function(t,i){if(1&t&&(K(0,"div",0),_e(1,fhe,2,2,"mat-label",1),zt(2,"async"),_e(3,phe,4,3,"audio",2),zt(4,"async"),_e(5,mhe,1,0,"mat-spinner",3),zt(6,"async"),Fe(7,"div",4),_e(8,ghe,1,1,"app-block-actions",5),J(),Fe(9,"app-compound-block-ui",6),zt(10,"async")),2&t){let r;j(1),z("ngIf",(null==i.resource?null:i.resource.name)&&(null==i.resource?null:i.resource.name)!=(null==(r=Xt(2,7,i.main.resource$))?null:r.name)),j(2),z("ngIf",Xt(4,9,i.audioUrl$)),j(2),z("ngIf",i.resource&&!Xt(6,11,i.audioUrl$)),j(3),z("ngIf",!i.hideBlockActions),j(1),z("resource",Xt(10,13,i._resource$))("hideBlockActions",!0)("fieldBlacklist",Xs(15,_he))}},dependencies:[gi,xa,_s,EC,Gc,DC,Vl],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),n})();const yhe=["class","block-ui"];let bhe=(()=>{class n{constructor(t,i){this.eelDelegate=t,this.mainService=i,this._resource$=new Ct(null),this.changed=new it,this.previewPaths$=new Ct(null),this.destroyed$=new Ue,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1,geometry__replace_car_wheel_with_dummies:!1}}get resource(){return this._resource$.getValue()}set resource(t){this._resource$.next(t)}ngAfterViewInit(){var t=this;return xt(function*(){t._resource$.pipe(et(t.destroyed$)).subscribe(function(){var i=xt(function*(r){t.previewPaths$.next(yield t.loadPreviewFilePaths(r?.id))});return function(r){return i.apply(this,arguments)}}()),t.mainService.dataBlockChange$.pipe(et(t.destroyed$),On(([i,r])=>!!t.resource&&i.startsWith(t.resource.id)),Ah(1500)).subscribe(xt(function*(){t.previewPaths$.next(null),t.previewPaths$.next(yield t.postTmpUpdates(t.resource?.id))}))})()}postTmpUpdates(t){var i=this;return xt(function*(){if(t){const r=yield i.eelDelegate.serializeResourceTmp(t,Object.entries(i.mainService.changedDataBlocks).filter(([s,o])=>"__has_external_changes__"!=s&&s.startsWith(t)).map(([s,o])=>({id:s,value:o})),i.serializerSettings);return[r.find(s=>s.endsWith(".obj")),r.find(s=>s.endsWith(".mtl"))]}return null})()}loadPreviewFilePaths(t){var i=this;return xt(function*(){if(t){const r=yield i.eelDelegate.serializeResource(t,i.serializerSettings);return[r.find(s=>s.endsWith(".obj")),r.find(s=>s.endsWith(".mtl"))]}return null})()}previewObjectGroupFunc(t){return t.startsWith("part_hp")?"High-poly":t.startsWith("part_mp")?"Medium-poly":t.startsWith("part_lp")?"Low-poly":t.startsWith("part_res")?"Reserved":t}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return n.\u0275fac=function(t){return new(t||n)(D(Hc),D(il))},n.\u0275cmp=ht({type:n,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:yhe,decls:4,vars:7,consts:[[3,"paths","groupFunction"],[3,"resource"]],template:function(t,i){1&t&&(Fe(0,"app-obj-viewer",0),zt(1,"async"),Fe(2,"app-compound-block-ui",1),zt(3,"async")),2&t&&(z("paths",Xt(1,3,i.previewPaths$))("groupFunction",i.previewObjectGroupFunc),j(2),z("resource",Xt(3,5,i._resource$)))},dependencies:[Gc,I5,Vl],changeDetection:0}),n})();const xhe=function(){return["children","items_descr"]};let whe=(()=>{class n{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new it}get resource(){return this._resource}set resource(t){this._resource=t,this.resourceMap={};const i=(this._resource?.schema.fields||[]).find(s=>"children"===s.name)?.schema.child_schema;if(!i)return;let r=0;for(const[s,o]of this.resourceData.children_aliases.entries()){let a=o||"__"+r++;this.resourceMap[a]={id:$l(this._resource?.id||"",`children/${s}`),data:this.resourceData?.children[s],schema:i,name:""}}}get resourceData(){return this._resource?.data}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=ht({type:n,selectors:[["app-base-archive-block-ui"]],inputs:{resource:"resource",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},decls:2,vars:5,consts:[[3,"resource","hideBlockActions","fieldBlacklist"],[3,"resources"]],template:function(t,i){1&t&&Fe(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&t&&(z("resource",i.resource)("hideBlockActions",i.hideBlockActions)("fieldBlacklist",Xs(4,xhe)),j(1),z("resources",i.resourceMap))},dependencies:[Gc,ZM],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}[_nghost-%COMP%] #top-bar[_ngcontent-%COMP%]{flex-grow:0;display:flex;flex-direction:row;align-items:center;column-gap:2rem}[_nghost-%COMP%] #top-bar[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:0 0 16px}"],changeDetection:0}),n})();function Mhe(n,e){if(1&n&&(K(0,"mat-error"),Je(1),J()),2&n){const t=be(2);j(1),Vp(" ",t.resourceError.data.error_class,": ",t.resourceError.data.error_text," ")}}function She(n,e){1&n&&Fe(0,"mat-spinner",5)}function Che(n,e){if(1&n&&(K(0,"div",2),_e(1,Mhe,2,2,"mat-error",3),_e(2,She,1,0,"mat-spinner",4),J()),2&n){const t=be();j(1),z("ngIf",t.resourceError),j(1),z("ngIf",!t.resourceError)}}function Ehe(n,e){}let xb=(()=>{class n{constructor(t){this.mainService=t,this._component=null,this._componentChangedSub=null,this.destroyed$=new Ue,this.resourceSet$=new Ue,this._resource=null,this._resourceError=null,this._resourceDescription="",this._hideBlockActions=!1,this._disabled=!1}get resource(){return this._resource}get resourceError(){return this._resourceError}set resourceDescription(t){this._resourceDescription=t,this._component&&(this._component.instance.resourceDescription=t)}set hideBlockActions(t){this._hideBlockActions=t,this._component&&(this._component.instance.hideBlockActions=t)}set disabled(t){this._disabled=t,this._component&&(this._component.instance.disabled=t)}set resource(t){if(this.resourceSet$.next(),t?t.data?.error_class?(this._resourceError=t,this._resource=null):(this._resource=t,this._resourceError=null):(this._resource=null,this._resourceError=null),this.dataBlockUiHost.viewContainerRef.clear(),this._resource&&this._resource.schema.block_class_mro){{let r;for(const s of this._resource.schema.block_class_mro.split("__"))if(r=n.DATA_BLOCK_COMPONENTS_MAP[s],r)break;if(!r)throw new Error("Cannot find GUI component for block MRO "+this._resource.schema.block_class_mro);this._component&&this._componentChangedSub&&this._componentChangedSub.unsubscribe(),this._component=this.dataBlockUiHost.viewContainerRef.createComponent(r),this._componentChangedSub=this._component.instance.changed.pipe(et(this.destroyed$),et(this.resourceSet$)).subscribe(()=>{const s=this._resource.id,o=this._resource.data;if(o instanceof Array)for(let a=0;a*{flex-grow:1;max-width:100%}[_nghost-%COMP%] #error-spinner-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;align-items:center;justify-content:space-around}"],changeDetection:0}),n})();function Ahe(n,e){1&n&&Fe(0,"mat-icon",17)}function The(n,e){1&n&&Fe(0,"mat-icon",18)}let Dhe=(()=>{class n{constructor(t,i,r,s,o){this.eelDelegate=t,this.mainService=i,this.dialog=r,this.snackBar=s,this.cdr=o}saveResource(){var t=this;return xt(function*(){try{yield t.mainService.saveResource(),t.snackBar.open("File Saved!","OK",{duration:1500})}catch(i){t.snackBar.open("Error while saving file! "+i.errorText,"OK :(",{duration:5e3})}})()}toggleUnknownsVisibility(){this.mainService.hideHiddenFields$.next(!this.mainService.hideHiddenFields$.getValue())}reloadResource(){var t=this;return xt(function*(){if(t.mainService.hasUnsavedChanges){let i=t.dialog.open(YU,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield TI(i.afterClosed())))return}yield t.mainService.reloadResource(),t.cdr.markForCheck()})()}}return n.\u0275fac=function(t){return new(t||n)(D(Hc),D(il),D(My),D(t3),D(ci))},n.\u0275cmp=ht({type:n,selectors:[["app-root"]],decls:32,vars:31,consts:[["color","primary"],[1,"flex-spacer"],["mat-icon-button","","matTooltip","Show/hide hidden fields",3,"click"],["fontIcon","visibility_off",4,"ngIf"],["fontIcon","visibility_on",4,"ngIf"],["vertical",""],[3,"resource"],["mat-icon-button","","matTooltip","Reload file from disk",3,"disabled","click"],["fontIcon","refresh"],["mat-icon-button","","matTooltip","Save changes to file",3,"disabled","click"],["fontIcon","save"],["id","content-wrapper"],[1,"scroll-bounds-snapper"],[3,"resource","hideBlockActions"],["id","bmac"],["href","https://www.buymeacoffee.com/andygura","target","_blank"],["src","https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png","alt","Buy Me A Coffee",2,"height","60px !important","width","217px !important"],["fontIcon","visibility_off"],["fontIcon","visibility_on"]],template:function(t,i){if(1&t&&(K(0,"mat-toolbar",0)(1,"span"),Je(2),zt(3,"async"),zt(4,"async"),J(),Fe(5,"span",1),K(6,"button",2),ct("click",function(){return i.toggleUnknownsVisibility()}),_e(7,Ahe,1,0,"mat-icon",3),zt(8,"async"),_e(9,The,1,0,"mat-icon",4),zt(10,"async"),J(),Fe(11,"mat-divider",5)(12,"app-block-actions",6),zt(13,"async"),K(14,"button",7),ct("click",function(){return i.reloadResource()}),zt(15,"async"),Fe(16,"mat-icon",8),J(),Fe(17,"mat-divider",5),K(18,"button",9),ct("click",function(){return i.saveResource()}),zt(19,"async"),zt(20,"async"),Fe(21,"mat-icon",10),J()(),K(22,"div",11),Fe(23,"div",12)(24,"app-editor",13),zt(25,"async"),zt(26,"async"),zt(27,"async"),K(28,"div",14)(29,"a",15),Fe(30,"img",16),J()(),Fe(31,"div",12),J()),2&t){let r;j(2),Vp("",(null==(r=Xt(3,9,i.mainService.resource$))?null:r.name)||"...","",Xt(4,11,i.mainService.hasUnsavedChanges$)?"*":"",""),j(5),z("ngIf",Xt(8,13,i.mainService.hideHiddenFields$)),j(2),z("ngIf",!Xt(10,15,i.mainService.hideHiddenFields$)),j(3),z("resource",Xt(13,17,i.mainService.resource$)),j(2),z("disabled",!Xt(15,19,i.mainService.eelDelegate.openedResourcePath$)),j(4),z("disabled",!Xt(19,21,i.mainService.resource$)||!Xt(20,23,i.mainService.hasUnsavedChanges$)),j(6),z("resource",Xt(25,25,i.mainService.customActionRunning$)?null:Xt(26,27,i.mainService.resource$)||Xt(27,29,i.mainService.error$))("hideBlockActions",!0)}},dependencies:[gi,NZ,UZ,_s,EI,E3,xb,DC,Vl],styles:["[_nghost-%COMP%]{height:100%;display:flex;flex-direction:column}#content-wrapper[_ngcontent-%COMP%]{flex-grow:1;overflow-y:auto;padding:1rem;height:100%;scroll-snap-type:y proximity}#content-wrapper[_ngcontent-%COMP%] .scroll-bounds-snapper[_ngcontent-%COMP%]{height:0;width:100%;scroll-snap-align:start;scroll-margin:1rem}#bmac[_ngcontent-%COMP%]{text-align:end;margin-top:1rem}mat-divider[_ngcontent-%COMP%]{height:100%;margin:0 16px}"],changeDetection:0}),n})();function N5(n){return new fe(3e3,!1)}function dfe(){return typeof window<"u"&&typeof window.document<"u"}function rk(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function wu(n){switch(n.length){case 0:return new xy;case 1:return n[0];default:return new FU(n)}}function B5(n,e,t,i,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(i.forEach(u=>{const h=u.get("offset"),p=h==l,m=p&&c||new Map;u.forEach((g,b)=>{let y=b,v=g;if("offset"!==b)switch(y=e.normalizePropertyName(y,o),v){case MI:v=r.get(b);break;case zc:v=s.get(b);break;default:v=e.normalizeStyleValue(b,y,v,o)}m.set(y,v)}),p||a.push(m),c=m,l=h}),o.length)throw function Qhe(n){return new fe(3502,!1)}();return a}function sk(n,e,t,i){switch(e){case"start":n.onStart(()=>i(t&&ok(t,"start",n)));break;case"done":n.onDone(()=>i(t&&ok(t,"done",n)));break;case"destroy":n.onDestroy(()=>i(t&&ok(t,"destroy",n)))}}function ok(n,e,t){const s=ak(n.element,n.triggerName,n.fromState,n.toState,e||n.phaseName,t.totalTime??n.totalTime,!!t.disabled),o=n._data;return null!=o&&(s._data=o),s}function ak(n,e,t,i,r="",s=0,o){return{element:n,triggerName:e,fromState:t,toState:i,phaseName:r,totalTime:s,disabled:!!o}}function Xo(n,e,t){let i=n.get(e);return i||n.set(e,i=t),i}function U5(n){const e=n.indexOf(":");return[n.substring(1,e),n.slice(e+1)]}let lk=(n,e)=>!1,V5=(n,e,t)=>[],z5=null;function ck(n){const e=n.parentNode||n.host;return e===z5?null:e}(rk()||typeof Element<"u")&&(dfe()?(z5=(()=>document.documentElement)(),lk=(n,e)=>{for(;e;){if(e===n)return!0;e=ck(e)}return!1}):lk=(n,e)=>n.contains(e),V5=(n,e,t)=>{if(t)return Array.from(n.querySelectorAll(e));const i=n.querySelector(e);return i?[i]:[]});let ff=null,H5=!1;const G5=lk,W5=V5;let $5=(()=>{class n{validateStyleProperty(t){return function hfe(n){ff||(ff=function ffe(){return typeof document<"u"?document.body:null}()||{},H5=!!ff.style&&"WebkitAppearance"in ff.style);let e=!0;return ff.style&&!function ufe(n){return"ebkit"==n.substring(1,6)}(n)&&(e=n in ff.style,!e&&H5&&(e="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in ff.style)),e}(t)}matchesElement(t,i){return!1}containsElement(t,i){return G5(t,i)}getParentElement(t){return ck(t)}query(t,i,r){return W5(t,i,r)}computeStyle(t,i,r){return r||""}animate(t,i,r,s,o,a=[],l){return new xy(r,s)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),dk=(()=>{class n{}return n.NOOP=new $5,n})();const pfe=1e3,uk="ng-enter",IC="ng-leave",RC="ng-trigger",PC=".ng-trigger",X5="ng-animating",hk=".ng-animating";function nd(n){if("number"==typeof n)return n;const e=n.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:fk(parseFloat(e[1]),e[2])}function fk(n,e){return"s"===e?n*pfe:n}function kC(n,e,t){return n.hasOwnProperty("duration")?n:function gfe(n,e,t){let r,s=0,o="";if("string"==typeof n){const a=n.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return e.push(N5()),{duration:0,delay:0,easing:""};r=fk(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=fk(parseFloat(l),a[4]));const c=a[5];c&&(o=c)}else r=n;if(!t){let a=!1,l=e.length;r<0&&(e.push(function Ihe(){return new fe(3100,!1)}()),a=!0),s<0&&(e.push(function Rhe(){return new fe(3101,!1)}()),a=!0),a&&e.splice(l,0,N5())}return{duration:r,delay:s,easing:o}}(n,e,t)}function wb(n,e={}){return Object.keys(n).forEach(t=>{e[t]=n[t]}),e}function q5(n){const e=new Map;return Object.keys(n).forEach(t=>{e.set(t,n[t])}),e}function Mu(n,e=new Map,t){if(t)for(let[i,r]of t)e.set(i,r);for(let[i,r]of n)e.set(i,r);return e}function K5(n,e,t){return t?e+":"+t+";":""}function Z5(n){let e="";for(let t=0;t{const s=mk(r);t&&!t.has(r)&&t.set(r,n.style[s]),n.style[s]=i}),rk()&&Z5(n))}function pf(n,e){n.style&&(e.forEach((t,i)=>{const r=mk(i);n.style[r]=""}),rk()&&Z5(n))}function Mb(n){return Array.isArray(n)?1==n.length?n[0]:OU(n):n}const pk=new RegExp("{{\\s*(.+?)\\s*}}","g");function Q5(n){let e=[];if("string"==typeof n){let t;for(;t=pk.exec(n);)e.push(t[1]);pk.lastIndex=0}return e}function Sb(n,e,t){const i=n.toString(),r=i.replace(pk,(s,o)=>{let a=e[o];return null==a&&(t.push(function khe(n){return new fe(3003,!1)}()),a=""),a.toString()});return r==i?n:r}function OC(n){const e=[];let t=n.next();for(;!t.done;)e.push(t.value),t=n.next();return e}const yfe=/-+([a-z0-9])/g;function mk(n){return n.replace(yfe,(...e)=>e[1].toUpperCase())}function bfe(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function qo(n,e,t){switch(e.type){case 7:return n.visitTrigger(e,t);case 0:return n.visitState(e,t);case 1:return n.visitTransition(e,t);case 2:return n.visitSequence(e,t);case 3:return n.visitGroup(e,t);case 4:return n.visitAnimate(e,t);case 5:return n.visitKeyframes(e,t);case 6:return n.visitStyle(e,t);case 8:return n.visitReference(e,t);case 9:return n.visitAnimateChild(e,t);case 10:return n.visitAnimateRef(e,t);case 11:return n.visitQuery(e,t);case 12:return n.visitStagger(e,t);default:throw function Ohe(n){return new fe(3004,!1)}()}}function J5(n,e){return window.getComputedStyle(n)[e]}const NC="*";function Efe(n,e){const t=[];return"string"==typeof n?n.split(/\s*,\s*/).forEach(i=>function Afe(n,e,t){if(":"==n[0]){const l=function Tfe(n,e){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,i)=>parseFloat(i)>parseFloat(t);case":decrement":return(t,i)=>parseFloat(i) *"}}(n,t);if("function"==typeof l)return void e.push(l);n=l}const i=n.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return t.push(function Xhe(n){return new fe(3015,!1)}()),e;const r=i[1],s=i[2],o=i[3];e.push(eG(r,o));"<"==s[0]&&!(r==NC&&o==NC)&&e.push(eG(o,r))}(i,t,e)):t.push(n),t}const BC=new Set(["true","1"]),UC=new Set(["false","0"]);function eG(n,e){const t=BC.has(n)||UC.has(n),i=BC.has(e)||UC.has(e);return(r,s)=>{let o=n==NC||n==r,a=e==NC||e==s;return!o&&t&&"boolean"==typeof r&&(o=r?BC.has(n):UC.has(n)),!a&&i&&"boolean"==typeof s&&(a=s?BC.has(e):UC.has(e)),o&&a}}const Dfe=new RegExp("s*:selfs*,?","g");function gk(n,e,t,i){return new Ife(n).build(e,t,i)}class Ife{constructor(e){this._driver=e}build(e,t,i){const r=new kfe(t);return this._resetContextStyleTimingState(r),qo(this,Mb(e),r)}_resetContextStyleTimingState(e){e.currentQuerySelector="",e.collectedStyles=new Map,e.collectedStyles.set("",new Map),e.currentTime=0}visitTrigger(e,t){let i=t.queryCount=0,r=t.depCount=0;const s=[],o=[];return"@"==e.name.charAt(0)&&t.errors.push(function Fhe(){return new fe(3006,!1)}()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(t),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,s.push(this.visitState(l,t))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,t);i+=l.queryCount,r+=l.depCount,o.push(l)}else t.errors.push(function Nhe(){return new fe(3007,!1)}())}),{type:7,name:e.name,states:s,transitions:o,queryCount:i,depCount:r,options:null}}visitState(e,t){const i=this.visitStyle(e.styles,t),r=e.options&&e.options.params||null;if(i.containsDynamicStyles){const s=new Set,o=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{Q5(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(OC(s.values()),t.errors.push(function Bhe(n,e){return new fe(3008,!1)}()))}return{type:0,name:e.name,style:i,options:r?{params:r}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;const i=qo(this,Mb(e.animation),t);return{type:1,matchers:Efe(e.expr,t.errors),animation:i,queryCount:t.queryCount,depCount:t.depCount,options:mf(e.options)}}visitSequence(e,t){return{type:2,steps:e.steps.map(i=>qo(this,i,t)),options:mf(e.options)}}visitGroup(e,t){const i=t.currentTime;let r=0;const s=e.steps.map(o=>{t.currentTime=i;const a=qo(this,o,t);return r=Math.max(r,t.currentTime),a});return t.currentTime=r,{type:3,steps:s,options:mf(e.options)}}visitAnimate(e,t){const i=function Lfe(n,e){if(n.hasOwnProperty("duration"))return n;if("number"==typeof n)return _k(kC(n,e).duration,0,"");const t=n;if(t.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=_k(0,0,"");return s.dynamic=!0,s.strValue=t,s}const r=kC(t,e);return _k(r.duration,r.delay,r.easing)}(e.timings,t.errors);t.currentAnimateTimings=i;let r,s=e.styles?e.styles:Ci({});if(5==s.type)r=this.visitKeyframes(s,t);else{let o=e.styles,a=!1;if(!o){a=!0;const c={};i.easing&&(c.easing=i.easing),o=Ci(c)}t.currentTime+=i.duration+i.delay;const l=this.visitStyle(o,t);l.isEmptyStep=a,r=l}return t.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(e,t){const i=this._makeStyleAst(e,t);return this._validateStyleAst(i,t),i}_makeStyleAst(e,t){const i=[],r=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of r)"string"==typeof a?a===zc?i.push(a):t.errors.push(new fe(3002,!1)):i.push(q5(a));let s=!1,o=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(o=a.get("easing"),a.delete("easing")),!s))for(let l of a.values())if(l.toString().indexOf("{{")>=0){s=!0;break}}),{type:6,styles:i,easing:o,offset:e.offset,containsDynamicStyles:s,options:null}}_validateStyleAst(e,t){const i=t.currentAnimateTimings;let r=t.currentTime,s=t.currentTime;i&&s>0&&(s-=i.duration+i.delay),e.styles.forEach(o=>{"string"!=typeof o&&o.forEach((a,l)=>{const c=t.collectedStyles.get(t.currentQuerySelector),u=c.get(l);let h=!0;u&&(s!=r&&s>=u.startTime&&r<=u.endTime&&(t.errors.push(function Vhe(n,e,t,i,r){return new fe(3010,!1)}()),h=!1),s=u.startTime),h&&c.set(l,{startTime:s,endTime:r}),t.options&&function vfe(n,e,t){const i=e.params||{},r=Q5(n);r.length&&r.forEach(s=>{i.hasOwnProperty(s)||t.push(function Phe(n){return new fe(3001,!1)}())})}(a,t.options,t.errors)})})}visitKeyframes(e,t){const i={type:5,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(function zhe(){return new fe(3011,!1)}()),i;let s=0;const o=[];let a=!1,l=!1,c=0;const u=e.steps.map(v=>{const M=this._makeStyleAst(v,t);let x=null!=M.offset?M.offset:function Ofe(n){if("string"==typeof n)return null;let e=null;if(Array.isArray(n))n.forEach(t=>{if(t instanceof Map&&t.has("offset")){const i=t;e=parseFloat(i.get("offset")),i.delete("offset")}});else if(n instanceof Map&&n.has("offset")){const t=n;e=parseFloat(t.get("offset")),t.delete("offset")}return e}(M.styles),S=0;return null!=x&&(s++,S=M.offset=x),l=l||S<0||S>1,a=a||S0&&s{const x=p>0?M==m?1:p*M:o[M],S=x*y;t.currentTime=g+b.delay+S,b.duration=S,this._validateStyleAst(v,t),v.offset=x,i.styles.push(v)}),i}visitReference(e,t){return{type:8,animation:qo(this,Mb(e.animation),t),options:mf(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:9,options:mf(e.options)}}visitAnimateRef(e,t){return{type:10,animation:this.visitReference(e.animation,t),options:mf(e.options)}}visitQuery(e,t){const i=t.currentQuerySelector,r=e.options||{};t.queryCount++,t.currentQuery=e;const[s,o]=function Rfe(n){const e=!!n.split(/\s*,\s*/).find(t=>":self"==t);return e&&(n=n.replace(Dfe,"")),n=n.replace(/@\*/g,PC).replace(/@\w+/g,t=>PC+"-"+t.slice(1)).replace(/:animating/g,hk),[n,e]}(e.selector);t.currentQuerySelector=i.length?i+" "+s:s,Xo(t.collectedStyles,t.currentQuerySelector,new Map);const a=qo(this,Mb(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=i,{type:11,selector:s,limit:r.limit||0,optional:!!r.optional,includeSelf:o,animation:a,originalSelector:e.selector,options:mf(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(function $he(){return new fe(3013,!1)}());const i="full"===e.timings?{duration:0,delay:0,easing:"full"}:kC(e.timings,t.errors,!0);return{type:12,animation:qo(this,Mb(e.animation),t),timings:i,options:null}}}class kfe{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function mf(n){return n?(n=wb(n)).params&&(n.params=function Pfe(n){return n?wb(n):null}(n.params)):n={},n}function _k(n,e,t){return{duration:n,delay:e,easing:t}}function vk(n,e,t,i,r,s,o=null,a=!1){return{type:1,element:n,keyframes:e,preStyleProps:t,postStyleProps:i,duration:r,delay:s,totalTime:r+s,easing:o,subTimeline:a}}class VC{constructor(){this._map=new Map}get(e){return this._map.get(e)||[]}append(e,t){let i=this._map.get(e);i||this._map.set(e,i=[]),i.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}}const Bfe=new RegExp(":enter","g"),Vfe=new RegExp(":leave","g");function yk(n,e,t,i,r,s=new Map,o=new Map,a,l,c=[]){return(new zfe).buildKeyframes(n,e,t,i,r,s,o,a,l,c)}class zfe{buildKeyframes(e,t,i,r,s,o,a,l,c,u=[]){c=c||new VC;const h=new bk(e,t,c,r,s,u,[]);h.options=l;const p=l.delay?nd(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),qo(this,i,h);const m=h.timelines.filter(g=>g.containsAnimation());if(m.length&&a.size){let g;for(let b=m.length-1;b>=0;b--){const y=m[b];if(y.element===t){g=y;break}}g&&!g.allowOnlyTimelineStyles()&&g.setStyles([a],null,h.errors,l)}return m.length?m.map(g=>g.buildKeyframes()):[vk(t,[],[],[],0,p,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){const i=t.subInstructions.get(t.element);if(i){const r=t.createSubContext(e.options),s=t.currentTimeline.currentTime,o=this._visitSubInstructions(i,r,r.options);s!=o&&t.transformIntoNewTimeline(o)}t.previousNode=e}visitAnimateRef(e,t){const i=t.createSubContext(e.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,i),this.visitReference(e.animation,i),t.transformIntoNewTimeline(i.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,i){for(const r of e){const s=r?.delay;if(s){const o="number"==typeof s?s:nd(Sb(s,r?.params??{},t.errors));i.delayNextStep(o)}}}_visitSubInstructions(e,t,i){let s=t.currentTimeline.currentTime;const o=null!=i.duration?nd(i.duration):null,a=null!=i.delay?nd(i.delay):null;return 0!==o&&e.forEach(l=>{const c=t.appendInstructionToTimeline(l,o,a);s=Math.max(s,c.duration+c.delay)}),s}visitReference(e,t){t.updateOptions(e.options,!0),qo(this,e.animation,t),t.previousNode=e}visitSequence(e,t){const i=t.subContextCount;let r=t;const s=e.options;if(s&&(s.params||s.delay)&&(r=t.createSubContext(s),r.transformIntoNewTimeline(),null!=s.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=zC);const o=nd(s.delay);r.delayNextStep(o)}e.steps.length&&(e.steps.forEach(o=>qo(this,o,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){const i=[];let r=t.currentTimeline.currentTime;const s=e.options&&e.options.delay?nd(e.options.delay):0;e.steps.forEach(o=>{const a=t.createSubContext(e.options);s&&a.delayNextStep(s),qo(this,o,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(o=>t.currentTimeline.mergeTimelineCollectedStyles(o)),t.transformIntoNewTimeline(r),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){const i=e.strValue;return kC(t.params?Sb(i,t.params,t.errors):i,t.errors)}return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){const i=t.currentAnimateTimings=this._visitTiming(e.timings,t),r=t.currentTimeline;i.delay&&(t.incrementTime(i.delay),r.snapshotCurrentStyles());const s=e.style;5==s.type?this.visitKeyframes(s,t):(t.incrementTime(i.duration),this.visitStyle(s,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){const i=t.currentTimeline,r=t.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const s=r&&r.easing||e.easing;e.isEmptyStep?i.applyEmptyStep(s):i.setStyles(e.styles,s,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){const i=t.currentAnimateTimings,r=t.currentTimeline.duration,s=i.duration,a=t.createSubContext().currentTimeline;a.easing=i.easing,e.styles.forEach(l=>{a.forwardTime((l.offset||0)*s),a.setStyles(l.styles,l.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(r+s),t.previousNode=e}visitQuery(e,t){const i=t.currentTimeline.currentTime,r=e.options||{},s=r.delay?nd(r.delay):0;s&&(6===t.previousNode.type||0==i&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=zC);let o=i;const a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!r.optional,t.errors);t.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{t.currentQueryIndex=u;const h=t.createSubContext(e.options,c);s&&h.delayNextStep(s),c===t.element&&(l=h.currentTimeline),qo(this,e.animation,h),h.currentTimeline.applyStylesToKeyframe(),o=Math.max(o,h.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(o),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){const i=t.parentContext,r=t.currentTimeline,s=e.timings,o=Math.abs(s.duration),a=o*(t.currentQueryTotal-1);let l=o*t.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const u=t.currentTimeline;l&&u.delayNextStep(l);const h=u.currentTime;qo(this,e.animation,t),t.previousNode=e,i.currentStaggerTime=r.currentTime-h+(r.startTime-i.currentTimeline.startTime)}}const zC={};class bk{constructor(e,t,i,r,s,o,a,l){this._driver=e,this.element=t,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=s,this.errors=o,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=zC,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new HC(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;const i=e;let r=this.options;null!=i.duration&&(r.duration=nd(i.duration)),null!=i.delay&&(r.delay=nd(i.delay));const s=i.params;if(s){let o=r.params;o||(o=this.options.params={}),Object.keys(s).forEach(a=>{(!t||!o.hasOwnProperty(a))&&(o[a]=Sb(s[a],o,this.errors))})}}_copyOptions(){const e={};if(this.options){const t=this.options.params;if(t){const i=e.params={};Object.keys(t).forEach(r=>{i[r]=t[r]})}}return e}createSubContext(e=null,t,i){const r=t||this.element,s=new bk(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(e),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(e){return this.previousNode=zC,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,i){const r={duration:t??e.duration,delay:this.currentTimeline.currentTime+(i??0)+e.delay,easing:""},s=new Hfe(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,r,e.stretchStartingKeyframe);return this.timelines.push(s),r}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,i,r,s,o){let a=[];if(r&&a.push(this.element),e.length>0){e=(e=e.replace(Bfe,"."+this._enterClassName)).replace(Vfe,"."+this._leaveClassName);let c=this._driver.query(this.element,e,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!s&&0==a.length&&o.push(function jhe(n){return new fe(3014,!1)}()),a}}class HC{constructor(e,t,i,r){this._driver=e,this.element=t,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){const t=1===this._keyframes.size&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new HC(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,i]of this._globalTimelineStyles)this._backFill.set(t,i||zc),this._currentKeyframe.set(t,zc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,i,r){t&&this._previousKeyframe.set("easing",t);const s=r&&r.params||{},o=function Gfe(n,e){const t=new Map;let i;return n.forEach(r=>{if("*"===r){i=i||e.keys();for(let s of i)t.set(s,zc)}else Mu(r,t)}),t}(e,this._globalTimelineStyles);for(let[a,l]of o){const c=Sb(l,s,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??zc),this._updateStyle(a,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,i)=>{const r=this._styleSummary.get(i);(!r||t.time>r.time)&&this._updateStyle(i,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();const e=new Set,t=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=Mu(a,new Map,this._backFill);c.forEach((u,h)=>{u===MI?e.add(h):u===zc&&t.add(h)}),i||c.set("offset",l/this.duration),r.push(c)});const s=e.size?OC(e.values()):[],o=t.size?OC(t.values()):[];if(i){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return vk(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class Hfe extends HC{constructor(e,t,i,r,s,o,a=!1){super(e,t,o.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=s,this._stretchStartingKeyframe=a,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&t){const s=[],o=i+t,a=t/o,l=Mu(e[0]);l.set("offset",0),s.push(l);const c=Mu(e[0]);c.set("offset",iG(a)),s.push(c);const u=e.length-1;for(let h=1;h<=u;h++){let p=Mu(e[h]);const m=p.get("offset");p.set("offset",iG((t+m*i)/o)),s.push(p)}i=o,t=0,r="",e=s}return vk(this.element,e,this.preStyleProps,this.postStyleProps,i,t,r,!0)}}function iG(n,e=3){const t=Math.pow(10,e-1);return Math.round(n*t)/t}class xk{}const Wfe=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class $fe extends xk{normalizePropertyName(e,t){return mk(e)}normalizeStyleValue(e,t,i,r){let s="";const o=i.toString().trim();if(Wfe.has(t)&&0!==i&&"0"!==i)if("number"==typeof i)s="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(function Lhe(n,e){return new fe(3005,!1)}())}return o+s}}function rG(n,e,t,i,r,s,o,a,l,c,u,h,p){return{type:0,element:n,triggerName:e,isRemovalTransition:r,fromState:t,fromStyles:s,toState:i,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:h,errors:p}}const wk={};class sG{constructor(e,t,i){this._triggerName=e,this.ast=t,this._stateStyles=i}match(e,t,i,r){return function jfe(n,e,t,i,r){return n.some(s=>s(e,t,i,r))}(this.ast.matchers,e,t,i,r)}buildStyles(e,t,i){let r=this._stateStyles.get("*");return void 0!==e&&(r=this._stateStyles.get(e?.toString())||r),r?r.buildStyles(t,i):new Map}build(e,t,i,r,s,o,a,l,c,u){const h=[],p=this.ast.options&&this.ast.options.params||wk,g=this.buildStyles(i,a&&a.params||wk,h),b=l&&l.params||wk,y=this.buildStyles(r,b,h),v=new Set,M=new Map,x=new Map,S="void"===r,P={params:Xfe(b,p),delay:this.ast.options?.delay},A=u?[]:yk(e,t,this.ast.animation,s,o,g,y,P,c,h);let R=0;if(A.forEach(E=>{R=Math.max(E.duration+E.delay,R)}),h.length)return rG(t,this._triggerName,i,r,S,g,y,[],[],M,x,R,h);A.forEach(E=>{const k=E.element,Z=Xo(M,k,new Set);E.preStyleProps.forEach(Me=>Z.add(Me));const ue=Xo(x,k,new Set);E.postStyleProps.forEach(Me=>ue.add(Me)),k!==t&&v.add(k)});const V=OC(v.values());return rG(t,this._triggerName,i,r,S,g,y,A,V,M,x,R)}}function Xfe(n,e){const t=wb(e);for(const i in n)n.hasOwnProperty(i)&&null!=n[i]&&(t[i]=n[i]);return t}class qfe{constructor(e,t,i){this.styles=e,this.defaultParams=t,this.normalizer=i}buildStyles(e,t){const i=new Map,r=wb(this.defaultParams);return Object.keys(e).forEach(s=>{const o=e[s];null!==o&&(r[s]=o)}),this.styles.styles.forEach(s=>{"string"!=typeof s&&s.forEach((o,a)=>{o&&(o=Sb(o,r,t));const l=this.normalizer.normalizePropertyName(a,t);o=this.normalizer.normalizeStyleValue(a,l,o,t),i.set(a,o)})}),i}}class Kfe{constructor(e,t,i){this.name=e,this.ast=t,this._normalizer=i,this.transitionFactories=[],this.states=new Map,t.states.forEach(r=>{this.states.set(r.name,new qfe(r.style,r.options&&r.options.params||{},i))}),oG(this.states,"true","1"),oG(this.states,"false","0"),t.transitions.forEach(r=>{this.transitionFactories.push(new sG(e,r,this.states))}),this.fallbackTransition=function Zfe(n,e,t){return new sG(n,{type:1,animation:{type:2,steps:[],options:null},matchers:[(o,a)=>!0],options:null,queryCount:0,depCount:0},e)}(e,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,i,r){return this.transitionFactories.find(o=>o.match(e,t,i,r))||null}matchStyles(e,t,i){return this.fallbackTransition.buildStyles(e,t,i)}}function oG(n,e,t){n.has(e)?n.has(t)||n.set(t,n.get(e)):n.has(t)&&n.set(e,n.get(t))}const Qfe=new VC;class Jfe{constructor(e,t,i){this.bodyNode=e,this._driver=t,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(e,t){const i=[],r=[],s=gk(this._driver,t,i,r);if(i.length)throw function Jhe(n){return new fe(3503,!1)}();this._animations.set(e,s)}_buildPlayer(e,t,i){const r=e.element,s=B5(0,this._normalizer,0,e.keyframes,t,i);return this._driver.animate(r,s,e.duration,e.delay,e.easing,[],!0)}create(e,t,i={}){const r=[],s=this._animations.get(e);let o;const a=new Map;if(s?(o=yk(this._driver,t,s,uk,IC,new Map,new Map,i,Qfe,r),o.forEach(u=>{const h=Xo(a,u.element,new Map);u.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function efe(){return new fe(3300,!1)}()),o=[]),r.length)throw function tfe(n){return new fe(3504,!1)}();a.forEach((u,h)=>{u.forEach((p,m)=>{u.set(m,this._driver.computeStyle(h,m,zc))})});const c=wu(o.map(u=>{const h=a.get(u.element);return this._buildPlayer(u,new Map,h)}));return this._playersById.set(e,c),c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){const t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);const i=this.players.indexOf(t);i>=0&&this.players.splice(i,1)}_getPlayer(e){const t=this._playersById.get(e);if(!t)throw function nfe(n){return new fe(3301,!1)}();return t}listen(e,t,i,r){const s=ak(t,"","","");return sk(this._getPlayer(e),i,s,r),()=>{}}command(e,t,i,r){if("register"==i)return void this.register(e,r[0]);if("create"==i)return void this.create(e,t,r[0]||{});const s=this._getPlayer(e);switch(i){case"play":s.play();break;case"pause":s.pause();break;case"reset":s.reset();break;case"restart":s.restart();break;case"finish":s.finish();break;case"init":s.init();break;case"setPosition":s.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(e)}}}const aG="ng-animate-queued",Mk="ng-animate-disabled",rpe=[],lG={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},spe={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Aa="__ng_removed";class Sk{get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;const i=e&&e.hasOwnProperty("value");if(this.value=function cpe(n){return n??null}(i?e.value:e),i){const s=wb(e);delete s.value,this.options=s}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){const t=e.params;if(t){const i=this.options.params;Object.keys(t).forEach(r=>{null==i[r]&&(i[r]=t[r])})}}}const Cb="void",Ck=new Sk(Cb);class ope{constructor(e,t,i){this.id=e,this.hostElement=t,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,Ta(t,this._hostClassName)}listen(e,t,i,r){if(!this._triggers.has(t))throw function ife(n,e){return new fe(3302,!1)}();if(null==i||0==i.length)throw function rfe(n){return new fe(3303,!1)}();if(!function dpe(n){return"start"==n||"done"==n}(i))throw function sfe(n,e){return new fe(3400,!1)}();const s=Xo(this._elementListeners,e,[]),o={name:t,phase:i,callback:r};s.push(o);const a=Xo(this._engine.statesByElement,e,new Map);return a.has(t)||(Ta(e,RC),Ta(e,RC+"-"+t),a.set(t,Ck)),()=>{this._engine.afterFlush(()=>{const l=s.indexOf(o);l>=0&&s.splice(l,1),this._triggers.has(t)||a.delete(t)})}}register(e,t){return!this._triggers.has(e)&&(this._triggers.set(e,t),!0)}_getTrigger(e){const t=this._triggers.get(e);if(!t)throw function ofe(n){return new fe(3401,!1)}();return t}trigger(e,t,i,r=!0){const s=this._getTrigger(t),o=new Ek(this.id,t,e);let a=this._engine.statesByElement.get(e);a||(Ta(e,RC),Ta(e,RC+"-"+t),this._engine.statesByElement.set(e,a=new Map));let l=a.get(t);const c=new Sk(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(t,c),l||(l=Ck),c.value!==Cb&&l.value===c.value){if(!function fpe(n,e){const t=Object.keys(n),i=Object.keys(e);if(t.length!=i.length)return!1;for(let r=0;r{pf(e,y),tc(e,v)})}return}const p=Xo(this._engine.playersByElement,e,[]);p.forEach(b=>{b.namespaceId==this.id&&b.triggerName==t&&b.queued&&b.destroy()});let m=s.matchTransition(l.value,c.value,e,c.params),g=!1;if(!m){if(!r)return;m=s.fallbackTransition,g=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:m,fromState:l,toState:c,player:o,isFallbackTransition:g}),g||(Ta(e,aG),o.onStart(()=>{Mg(e,aG)})),o.onDone(()=>{let b=this.players.indexOf(o);b>=0&&this.players.splice(b,1);const y=this._engine.playersByElement.get(e);if(y){let v=y.indexOf(o);v>=0&&y.splice(v,1)}}),this.players.push(o),p.push(o),o}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,i)=>{this._elementListeners.set(i,t.filter(r=>r.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);const t=this._engine.playersByElement.get(e);t&&(t.forEach(i=>i.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){const i=this._engine.driver.query(e,PC,!0);i.forEach(r=>{if(r[Aa])return;const s=this._engine.fetchNamespacesByElement(r);s.size?s.forEach(o=>o.triggerLeaveAnimation(r,t,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(e,t,i,r){const s=this._engine.statesByElement.get(e),o=new Map;if(s){const a=[];if(s.forEach((l,c)=>{if(o.set(c,l.value),this._triggers.has(c)){const u=this.trigger(e,c,Cb,r);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,o),i&&wu(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){const t=this._elementListeners.get(e),i=this._engine.statesByElement.get(e);if(t&&i){const r=new Set;t.forEach(s=>{const o=s.name;if(r.has(o))return;r.add(o);const l=this._triggers.get(o).fallbackTransition,c=i.get(o)||Ck,u=new Sk(Cb),h=new Ek(this.id,o,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:o,transition:l,fromState:c,toState:u,player:h,isFallbackTransition:!0})})}}removeNode(e,t){const i=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let r=!1;if(i.totalAnimations){const s=i.players.length?i.playersByQueriedElement.get(e):[];if(s&&s.length)r=!0;else{let o=e;for(;o=o.parentNode;)if(i.statesByElement.get(o)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(e),r)i.markElementAsRemoved(this.id,e,!1,t);else{const s=e[Aa];(!s||s===lG)&&(i.afterFlush(()=>this.clearElementCache(e)),i.destroyInnerAnimations(e),i._onRemovalComplete(e,t))}}insertNode(e,t){Ta(e,this._hostClassName)}drainQueuedTransitions(e){const t=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const s=i.element,o=this._elementListeners.get(s);o&&o.forEach(a=>{if(a.name==i.triggerName){const l=ak(s,i.triggerName,i.fromState.value,i.toState.value);l._data=e,sk(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):t.push(i)}),this._queue=[],t.sort((i,r)=>{const s=i.transition.ast.depCount,o=r.transition.ast.depCount;return 0==s||0==o?s-o:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}elementContainsData(e){let t=!1;return this._elementListeners.has(e)&&(t=!0),t=!!this._queue.find(i=>i.element===e)||t,t}}class ape{_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,i){this.bodyNode=e,this.driver=t,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,s)=>{}}get queuedPlayers(){const e=[];return this._namespaceList.forEach(t=>{t.players.forEach(i=>{i.queued&&e.push(i)})}),e}createNamespace(e,t){const i=new ope(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(i,t):(this.newHostElements.set(t,i),this.collectEnterElement(t)),this._namespaceLookup[e]=i}_balanceNamespaceList(e,t){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let o=!1,a=this.driver.getParentElement(t);for(;a;){const l=r.get(a);if(l){const c=i.indexOf(l);i.splice(c+1,0,e),o=!0;break}a=this.driver.getParentElement(a)}o||i.unshift(e)}else i.push(e);return r.set(t,e),e}register(e,t){let i=this._namespaceLookup[e];return i||(i=this.createNamespace(e,t)),i}registerTrigger(e,t,i){let r=this._namespaceLookup[e];r&&r.register(t,i)&&this.totalAnimations++}destroy(e,t){if(!e)return;const i=this._fetchNamespace(e);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[e];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(t))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){const t=new Set,i=this.statesByElement.get(e);if(i)for(let r of i.values())if(r.namespaceId){const s=this._fetchNamespace(r.namespaceId);s&&t.add(s)}return t}trigger(e,t,i,r){if(GC(t)){const s=this._fetchNamespace(e);if(s)return s.trigger(t,i,r),!0}return!1}insertNode(e,t,i,r){if(!GC(t))return;const s=t[Aa];if(s&&s.setForRemoval){s.setForRemoval=!1,s.setForMove=!0;const o=this.collectedLeaveElements.indexOf(t);o>=0&&this.collectedLeaveElements.splice(o,1)}if(e){const o=this._fetchNamespace(e);o&&o.insertNode(t,i)}r&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),Ta(e,Mk)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),Mg(e,Mk))}removeNode(e,t,i,r){if(GC(t)){const s=e?this._fetchNamespace(e):null;if(s?s.removeNode(t,r):this.markElementAsRemoved(e,t,!1,r),i){const o=this.namespacesByHostElement.get(t);o&&o.id!==e&&o.removeNode(t,r)}}else this._onRemovalComplete(t,r)}markElementAsRemoved(e,t,i,r,s){this.collectedLeaveElements.push(t),t[Aa]={namespaceId:e,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:s}}listen(e,t,i,r,s){return GC(t)?this._fetchNamespace(e).listen(t,i,r,s):()=>{}}_buildInstruction(e,t,i,r,s){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,i,r,e.fromState.options,e.toState.options,t,s)}destroyInnerAnimations(e){let t=this.driver.query(e,PC,!0);t.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(t=this.driver.query(e,hk,!0),t.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(e){const t=this.playersByElement.get(e);t&&t.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(e){const t=this.playersByQueriedElement.get(e);t&&t.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return wu(this.players).onDone(()=>e());e()})}processLeaveNode(e){const t=e[Aa];if(t&&t.setForRemoval){if(e[Aa]=lG,t.namespaceId){this.destroyInnerAnimations(e);const i=this._fetchNamespace(t.namespaceId);i&&i.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(Mk)&&this.markElementAsDisabled(e,!1),this.driver.query(e,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],t.length?wu(t).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(e){throw function afe(n){return new fe(3402,!1)}()}_flushAnimations(e,t){const i=new VC,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach($=>{u.add($);const ee=this.driver.query($,".ng-animate-queued",!0);for(let ie=0;ie{const ie=uk+b++;g.set(ee,ie),$.forEach(se=>Ta(se,ie))});const y=[],v=new Set,M=new Set;for(let $=0;$v.add(se)):M.add(ee))}const x=new Map,S=uG(p,Array.from(v));S.forEach(($,ee)=>{const ie=IC+b++;x.set(ee,ie),$.forEach(se=>Ta(se,ie))}),e.push(()=>{m.forEach(($,ee)=>{const ie=g.get(ee);$.forEach(se=>Mg(se,ie))}),S.forEach(($,ee)=>{const ie=x.get(ee);$.forEach(se=>Mg(se,ie))}),y.forEach($=>{this.processLeaveNode($)})});const P=[],A=[];for(let $=this._namespaceList.length-1;$>=0;$--)this._namespaceList[$].drainQueuedTransitions(t).forEach(ie=>{const se=ie.player,ve=ie.element;if(P.push(se),this.collectedEnterElements.length){const Be=ve[Aa];if(Be&&Be.setForMove){if(Be.previousTriggersValues&&Be.previousTriggersValues.has(ie.triggerName)){const mt=Be.previousTriggersValues.get(ie.triggerName),gt=this.statesByElement.get(ie.element);if(gt&>.has(ie.triggerName)){const tt=gt.get(ie.triggerName);tt.value=mt,gt.set(ie.triggerName,tt)}}return void se.destroy()}}const Se=!h||!this.driver.containsElement(h,ve),Oe=x.get(ve),le=g.get(ve),me=this._buildInstruction(ie,i,le,Oe,Se);if(me.errors&&me.errors.length)return void A.push(me);if(Se)return se.onStart(()=>pf(ve,me.fromStyles)),se.onDestroy(()=>tc(ve,me.toStyles)),void r.push(se);if(ie.isFallbackTransition)return se.onStart(()=>pf(ve,me.fromStyles)),se.onDestroy(()=>tc(ve,me.toStyles)),void r.push(se);const Ve=[];me.timelines.forEach(Be=>{Be.stretchStartingKeyframe=!0,this.disabledNodes.has(Be.element)||Ve.push(Be)}),me.timelines=Ve,i.append(ve,me.timelines),o.push({instruction:me,player:se,element:ve}),me.queriedElements.forEach(Be=>Xo(a,Be,[]).push(se)),me.preStyleProps.forEach((Be,mt)=>{if(Be.size){let gt=l.get(mt);gt||l.set(mt,gt=new Set),Be.forEach((tt,Rt)=>gt.add(Rt))}}),me.postStyleProps.forEach((Be,mt)=>{let gt=c.get(mt);gt||c.set(mt,gt=new Set),Be.forEach((tt,Rt)=>gt.add(Rt))})});if(A.length){const $=[];A.forEach(ee=>{$.push(function lfe(n,e){return new fe(3505,!1)}())}),P.forEach(ee=>ee.destroy()),this.reportError($)}const R=new Map,V=new Map;o.forEach($=>{const ee=$.element;i.has(ee)&&(V.set(ee,ee),this._beforeAnimationBuild($.player.namespaceId,$.instruction,R))}),r.forEach($=>{const ee=$.element;this._getPreviousPlayers(ee,!1,$.namespaceId,$.triggerName,null).forEach(se=>{Xo(R,ee,[]).push(se),se.destroy()})});const E=y.filter($=>fG($,l,c)),k=new Map;dG(k,this.driver,M,c,zc).forEach($=>{fG($,l,c)&&E.push($)});const ue=new Map;m.forEach(($,ee)=>{dG(ue,this.driver,new Set($),l,MI)}),E.forEach($=>{const ee=k.get($),ie=ue.get($);k.set($,new Map([...Array.from(ee?.entries()??[]),...Array.from(ie?.entries()??[])]))});const Me=[],W=[],ne={};o.forEach($=>{const{element:ee,player:ie,instruction:se}=$;if(i.has(ee)){if(u.has(ee))return ie.onDestroy(()=>tc(ee,se.toStyles)),ie.disabled=!0,ie.overrideTotalTime(se.totalTime),void r.push(ie);let ve=ne;if(V.size>1){let Oe=ee;const le=[];for(;Oe=Oe.parentNode;){const me=V.get(Oe);if(me){ve=me;break}le.push(Oe)}le.forEach(me=>V.set(me,ve))}const Se=this._buildAnimation(ie.namespaceId,se,R,s,ue,k);if(ie.setRealPlayer(Se),ve===ne)Me.push(ie);else{const Oe=this.playersByElement.get(ve);Oe&&Oe.length&&(ie.parentPlayer=wu(Oe)),r.push(ie)}}else pf(ee,se.fromStyles),ie.onDestroy(()=>tc(ee,se.toStyles)),W.push(ie),u.has(ee)&&r.push(ie)}),W.forEach($=>{const ee=s.get($.element);if(ee&&ee.length){const ie=wu(ee);$.setRealPlayer(ie)}}),r.forEach($=>{$.parentPlayer?$.syncPlayerEvents($.parentPlayer):$.destroy()});for(let $=0;$!Se.destroyed);ve.length?upe(this,ee,ve):this.processLeaveNode(ee)}return y.length=0,Me.forEach($=>{this.players.push($),$.onDone(()=>{$.destroy();const ee=this.players.indexOf($);this.players.splice(ee,1)}),$.play()}),Me}elementContainsData(e,t){let i=!1;const r=t[Aa];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(t)&&(i=!0),this.playersByQueriedElement.has(t)&&(i=!0),this.statesByElement.has(t)&&(i=!0),this._fetchNamespace(e).elementContainsData(t)||i}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,i,r,s){let o=[];if(t){const a=this.playersByQueriedElement.get(e);a&&(o=a)}else{const a=this.playersByElement.get(e);if(a){const l=!s||s==Cb;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||o.push(c)})}}return(i||r)&&(o=o.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),o}_beforeAnimationBuild(e,t,i){const s=t.element,o=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:t.triggerName;for(const l of t.timelines){const c=l.element,u=c!==s,h=Xo(i,c,[]);this._getPreviousPlayers(c,u,o,a,t.toState).forEach(m=>{const g=m.getRealPlayer();g.beforeDestroy&&g.beforeDestroy(),m.destroy(),h.push(m)})}pf(s,t.fromStyles)}_buildAnimation(e,t,i,r,s,o){const a=t.triggerName,l=t.element,c=[],u=new Set,h=new Set,p=t.timelines.map(g=>{const b=g.element;u.add(b);const y=b[Aa];if(y&&y.removedBeforeQueried)return new xy(g.duration,g.delay);const v=b!==l,M=function hpe(n){const e=[];return hG(n,e),e}((i.get(b)||rpe).map(R=>R.getRealPlayer())).filter(R=>!!R.element&&R.element===b),x=s.get(b),S=o.get(b),P=B5(0,this._normalizer,0,g.keyframes,x,S),A=this._buildPlayer(g,P,M);if(g.subTimeline&&r&&h.add(b),v){const R=new Ek(e,a,b);R.setRealPlayer(A),c.push(R)}return A});c.forEach(g=>{Xo(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function lpe(n,e,t){let i=n.get(e);if(i){if(i.length){const r=i.indexOf(t);i.splice(r,1)}0==i.length&&n.delete(e)}return i}(this.playersByQueriedElement,g.element,g))}),u.forEach(g=>Ta(g,X5));const m=wu(p);return m.onDestroy(()=>{u.forEach(g=>Mg(g,X5)),tc(l,t.toStyles)}),h.forEach(g=>{Xo(r,g,[]).push(m)}),m}_buildPlayer(e,t,i){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,i):new xy(e.duration,e.delay)}}class Ek{constructor(e,t,i){this.namespaceId=e,this.triggerName=t,this.element=i,this._player=new xy,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,i)=>{t.forEach(r=>sk(e,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){const t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){Xo(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){const t=this._player;t.triggerCallback&&t.triggerCallback(e)}}function GC(n){return n&&1===n.nodeType}function cG(n,e){const t=n.style.display;return n.style.display=e??"none",t}function dG(n,e,t,i,r){const s=[];t.forEach(l=>s.push(cG(l)));const o=[];i.forEach((l,c)=>{const u=new Map;l.forEach(h=>{const p=e.computeStyle(c,h,r);u.set(h,p),(!p||0==p.length)&&(c[Aa]=spe,o.push(c))}),n.set(c,u)});let a=0;return t.forEach(l=>cG(l,s[a++])),o}function uG(n,e){const t=new Map;if(n.forEach(a=>t.set(a,[])),0==e.length)return t;const i=1,r=new Set(e),s=new Map;function o(a){if(!a)return i;let l=s.get(a);if(l)return l;const c=a.parentNode;return l=t.has(c)?c:r.has(c)?i:o(c),s.set(a,l),l}return e.forEach(a=>{const l=o(a);l!==i&&t.get(l).push(a)}),t}function Ta(n,e){n.classList?.add(e)}function Mg(n,e){n.classList?.remove(e)}function upe(n,e,t){wu(t).onDone(()=>n.processLeaveNode(e))}function hG(n,e){for(let t=0;tr.add(s)):e.set(n,i),t.delete(n),!0}class WC{constructor(e,t,i){this.bodyNode=e,this._driver=t,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new ape(e,t,i),this._timelineEngine=new Jfe(e,t,i),this._transitionEngine.onRemovalComplete=(r,s)=>this.onRemovalComplete(r,s)}registerTrigger(e,t,i,r,s){const o=e+"-"+r;let a=this._triggerCache[o];if(!a){const l=[],c=[],u=gk(this._driver,s,l,c);if(l.length)throw function Zhe(n,e){return new fe(3404,!1)}();a=function Yfe(n,e,t){return new Kfe(n,e,t)}(r,u,this._normalizer),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(t,r,a)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,i,r){this._transitionEngine.insertNode(e,t,i,r)}onRemove(e,t,i,r){this._transitionEngine.removeNode(e,t,r||!1,i)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,i,r){if("@"==i.charAt(0)){const[s,o]=U5(i);this._timelineEngine.command(s,t,o,r)}else this._transitionEngine.trigger(e,t,i,r)}listen(e,t,i,r,s){if("@"==i.charAt(0)){const[o,a]=U5(i);return this._timelineEngine.listen(o,t,a,s)}return this._transitionEngine.listen(e,t,i,r,s)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let mpe=(()=>{class n{constructor(t,i,r){this._element=t,this._startStyles=i,this._endStyles=r,this._state=0;let s=n.initialStylesByElement.get(t);s||n.initialStylesByElement.set(t,s=new Map),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&tc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(tc(this._element,this._initialStyles),this._endStyles&&(tc(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(pf(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(pf(this._element,this._endStyles),this._endStyles=null),tc(this._element,this._initialStyles),this._state=3)}}return n.initialStylesByElement=new WeakMap,n})();function Ak(n){let e=null;return n.forEach((t,i)=>{(function gpe(n){return"display"===n||"position"===n})(i)&&(e=e||new Map,e.set(i,t))}),e}class pG{constructor(e,t,i,r){this.element=e,this.keyframes=t,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(e){const t=[];return e.forEach(i=>{t.push(Object.fromEntries(i))}),t}_triggerWebAnimation(e,t,i){return e.animate(this._convertKeyframesToObject(t),i)}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&e.set(r,this._finished?i:J5(this.element,r))}),this.currentSnapshot=e}triggerCallback(e){const t="start"===e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}class _pe{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}matchesElement(e,t){return!1}containsElement(e,t){return G5(e,t)}getParentElement(e){return ck(e)}query(e,t,i){return W5(e,t,i)}computeStyle(e,t,i){return window.getComputedStyle(e)[t]}animate(e,t,i,r,s,o=[]){const l={duration:i,delay:r,fill:0==r?"both":"forwards"};s&&(l.easing=s);const c=new Map,u=o.filter(m=>m instanceof pG);(function xfe(n,e){return 0===n||0===e})(i,r)&&u.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function _fe(n){return n.length?n[0]instanceof Map?n:n.map(e=>q5(e)):[]}(t).map(m=>Mu(m));h=function wfe(n,e,t){if(t.size&&e.length){let i=e[0],r=[];if(t.forEach((s,o)=>{i.has(o)||r.push(o),i.set(o,s)}),r.length)for(let s=1;so.set(a,J5(n,a)))}}return e}(e,h,c);const p=function ppe(n,e){let t=null,i=null;return Array.isArray(e)&&e.length?(t=Ak(e[0]),e.length>1&&(i=Ak(e[e.length-1]))):e instanceof Map&&(t=Ak(e)),t||i?new mpe(n,t,i):null}(e,h);return new pG(e,h,l,p)}}let vpe=(()=>{class n extends PU{constructor(t,i){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(i.body,{id:"0",encapsulation:Do.None,styles:[],data:{animation:[]}})}build(t){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(t)?OU(t):t;return mG(this._renderer,null,i,"register",[r]),new ype(i,this._renderer)}}return n.\u0275fac=function(t){return new(t||n)(Q(fh),Q(Ht))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();class ype extends qK{constructor(e,t){super(),this._id=e,this._renderer=t}create(e,t){return new bpe(this._id,e,t||{},this._renderer)}}class bpe{constructor(e,t,i,r){this.id=e,this.element=t,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(e,t){return this._renderer.listen(this.element,`@@${this.id}:${e}`,t)}_command(e,...t){return mG(this._renderer,this.element,this.id,e,t)}onDone(e){this._listen("done",e)}onStart(e){this._listen("start",e)}onDestroy(e){this._listen("destroy",e)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(e){this._command("setPosition",e)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function mG(n,e,t,i,r){return n.setProperty(e,`@@${t}:${i}`,r)}const gG="@.disabled";let xpe=(()=>{class n{constructor(t,i,r){this.delegate=t,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(s,o)=>{const a=o?.parentNode(s);a&&o.removeChild(a,s)}}createRenderer(t,i){const s=this.delegate.createRenderer(t,i);if(!(t&&i&&i.data&&i.data.animation)){let u=this._rendererCache.get(s);return u||(u=new _G("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,u)),u}const o=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,t);const l=u=>{Array.isArray(u)?u.forEach(l):this.engine.registerTrigger(o,a,t,u.name,u)};return i.data.animation.forEach(l),new wpe(this,a,s,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,i,r){t>=0&&ti(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(s=>{const[o,a]=s;o(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return n.\u0275fac=function(t){return new(t||n)(Q(fh),Q(WC),Q(pt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();class _G{constructor(e,t,i,r){this.namespaceId=e,this.delegate=t,this.engine=i,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?s=>t.destroyNode(s):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,i,r=!0){this.delegate.insertBefore(e,t,i),this.engine.onInsert(this.namespaceId,t,e,r)}removeChild(e,t,i){this.engine.onRemove(this.namespaceId,t,this.delegate,i)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,i,r){this.delegate.setAttribute(e,t,i,r)}removeAttribute(e,t,i){this.delegate.removeAttribute(e,t,i)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,i,r){this.delegate.setStyle(e,t,i,r)}removeStyle(e,t,i){this.delegate.removeStyle(e,t,i)}setProperty(e,t,i){"@"==t.charAt(0)&&t==gG?this.disableAnimations(e,!!i):this.delegate.setProperty(e,t,i)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,i){return this.delegate.listen(e,t,i)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}}class wpe extends _G{constructor(e,t,i,r,s){super(t,i,r,s),this.factory=e,this.namespaceId=t}setProperty(e,t,i){"@"==t.charAt(0)?"."==t.charAt(1)&&t==gG?this.disableAnimations(e,i=void 0===i||!!i):this.engine.process(this.namespaceId,e,t.slice(1),i):this.delegate.setProperty(e,t,i)}listen(e,t,i){if("@"==t.charAt(0)){const r=function Mpe(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}(e);let s=t.slice(1),o="";return"@"!=s.charAt(0)&&([s,o]=function Spe(n){const e=n.indexOf(".");return[n.substring(0,e),n.slice(e+1)]}(s)),this.engine.listen(this.namespaceId,r,s,o,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(e,t,i)}}const vG=[{provide:PU,useClass:vpe},{provide:xk,useFactory:function Epe(){return new $fe}},{provide:WC,useClass:(()=>{class n extends WC{constructor(t,i,r,s){super(t.body,i,r)}ngOnDestroy(){this.flush()}}return n.\u0275fac=function(t){return new(t||n)(Q(Ht),Q(dk),Q(xk),Q(qp))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})()},{provide:fh,useFactory:function Ape(n,e,t){return new xpe(n,e,t)},deps:[Vw,WC,pt]}],Tk=[{provide:dk,useFactory:()=>new _pe},{provide:rs,useValue:"BrowserAnimations"},...vG],yG=[{provide:dk,useClass:$5},{provide:rs,useValue:"NoopAnimations"},...vG];let Tpe=(()=>{class n{static withConfig(t){return{ngModule:n,providers:t.disableAnimations?yG:Tk}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({providers:Tk,imports:[hN]}),n})();const bG=new ge("CdkAccordion");let Dpe=0,Ipe=(()=>{class n{get expanded(){return this._expanded}set expanded(t){t=Cn(t),this._expanded!==t&&(this._expanded=t,this.expandedChange.emit(t),t?(this.opened.emit(),this._expansionDispatcher.notify(this.id,this.accordion?this.accordion.id:this.id)):this.closed.emit(),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(t){this._disabled=Cn(t)}constructor(t,i,r){this.accordion=t,this._changeDetectorRef=i,this._expansionDispatcher=r,this._openCloseAllSubscription=un.EMPTY,this.closed=new it,this.opened=new it,this.destroyed=new it,this.expandedChange=new it,this.id="cdk-accordion-child-"+Dpe++,this._expanded=!1,this._disabled=!1,this._removeUniqueSelectionListener=()=>{},this._removeUniqueSelectionListener=r.listen((s,o)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===o&&this.id!==s&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(t=>{this.disabled||(this.expanded=t)})}}return n.\u0275fac=function(t){return new(t||n)(D(bG,12),D(ci),D(UV))},n.\u0275dir=Ae({type:n,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Hn([{provide:bG,useValue:void 0}])]}),n})(),Rpe=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({}),n})();const Ppe=["body"];function kpe(n,e){}const Ope=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],Lpe=["mat-expansion-panel-header","*","mat-action-row"];function Fpe(n,e){1&n&&Fe(0,"span",2),2&n&&z("@indicatorRotate",be()._getExpandedState())}const Npe=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],Bpe=["mat-panel-title","mat-panel-description","*"],xG=new ge("MAT_ACCORDION"),wG="225ms cubic-bezier(0.4,0.0,0.2,1)",MG={indicatorRotate:Gl("indicatorRotate",[_o("collapsed, void",Ci({transform:"rotate(0deg)"})),_o("expanded",Ci({transform:"rotate(180deg)"})),Ks("expanded <=> collapsed, void => collapsed",go(wG))]),bodyExpansion:Gl("bodyExpansion",[_o("collapsed, void",Ci({height:"0px",visibility:"hidden"})),_o("expanded",Ci({height:"*",visibility:"visible"})),Ks("expanded <=> collapsed, void => collapsed",go(wG))])},SG=new ge("MAT_EXPANSION_PANEL");let Upe=(()=>{class n{constructor(t,i){this._template=t,this._expansionPanel=i}}return n.\u0275fac=function(t){return new(t||n)(D(fo),D(SG,8))},n.\u0275dir=Ae({type:n,selectors:[["ng-template","matExpansionPanelContent",""]]}),n})(),Vpe=0;const CG=new ge("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let EG=(()=>{class n extends Ipe{get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(t){this._hideToggle=Cn(t)}get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(t){this._togglePosition=t}constructor(t,i,r,s,o,a,l){super(t,i,r),this._viewContainerRef=s,this._animationMode=a,this._hideToggle=!1,this.afterExpand=new it,this.afterCollapse=new it,this._inputChanges=new Ue,this._headerId="mat-expansion-panel-header-"+Vpe++,this._bodyAnimationDone=new Ue,this.accordion=t,this._document=o,this._bodyAnimationDone.pipe(qd((c,u)=>c.fromState===u.fromState&&c.toState===u.toState)).subscribe(c=>{"void"!==c.fromState&&("expanded"===c.toState?this.afterExpand.emit():"collapsed"===c.toState&&this.afterCollapse.emit())}),l&&(this.hideToggle=l.hideToggle)}_hasSpacing(){return!!this.accordion&&this.expanded&&"default"===this.accordion.displayMode}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(No(null),On(()=>this.expanded&&!this._portal),Li(1)).subscribe(()=>{this._portal=new cm(this._lazyContent._template,this._viewContainerRef)})}ngOnChanges(t){this._inputChanges.next(t)}ngOnDestroy(){super.ngOnDestroy(),this._bodyAnimationDone.complete(),this._inputChanges.complete()}_containsFocus(){if(this._body){const t=this._document.activeElement,i=this._body.nativeElement;return t===i||i.contains(t)}return!1}}return n.\u0275fac=function(t){return new(t||n)(D(xG,12),D(ci),D(UV),D(is),D(Ht),D(rs,8),D(CG,8))},n.\u0275cmp=ht({type:n,selectors:[["mat-expansion-panel"]],contentQueries:function(t,i,r){if(1&t&&Xi(r,Upe,5),2&t){let s;Lt(s=Ft())&&(i._lazyContent=s.first)}},viewQuery:function(t,i){if(1&t&&oi(Ppe,5),2&t){let r;Lt(r=Ft())&&(i._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(t,i){2&t&&Pn("mat-expanded",i.expanded)("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-expansion-panel-spacing",i._hasSpacing())},inputs:{disabled:"disabled",expanded:"expanded",hideToggle:"hideToggle",togglePosition:"togglePosition"},outputs:{opened:"opened",closed:"closed",expandedChange:"expandedChange",afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[Hn([{provide:xG,useValue:void 0},{provide:SG,useExisting:n}]),ft,zi],ngContentSelectors:Lpe,decls:7,vars:4,consts:[["role","region",1,"mat-expansion-panel-content",3,"id"],["body",""],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(t,i){1&t&&(Cr(Ope),Kt(0),K(1,"div",0,1),ct("@bodyExpansion.done",function(s){return i._bodyAnimationDone.next(s)}),K(3,"div",2),Kt(4,1),_e(5,kpe,0,0,"ng-template",3),J(),Kt(6,2),J()),2&t&&(j(1),z("@bodyExpansion",i._getExpandedState())("id",i.id),Vt("aria-labelledby",i._headerId),j(4),z("cdkPortalOutlet",i._portal))},dependencies:[dm],styles:['.mat-expansion-panel{box-sizing:content-box;display:block;margin:0;border-radius:4px;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:4px;border-top-left-radius:4px}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible}.mat-expansion-panel-content[style*="visibility: hidden"] *{visibility:hidden !important}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2,data:{animation:[MG.bodyExpansion]},changeDetection:0}),n})();class zpe{}const Hpe=xU(zpe);let Gpe=(()=>{class n extends Hpe{constructor(t,i,r,s,o,a,l){super(),this.panel=t,this._element=i,this._focusMonitor=r,this._changeDetectorRef=s,this._animationMode=a,this._parentChangeSubscription=un.EMPTY;const c=t.accordion?t.accordion._stateChanges.pipe(On(u=>!(!u.hideToggle&&!u.togglePosition))):Is;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=cs(t.opened,t.closed,c,t._inputChanges.pipe(On(u=>!!(u.hideToggle||u.disabled||u.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),t.closed.pipe(On(()=>t._containsFocus())).subscribe(()=>r.focusVia(i,"program")),o&&(this.expandedHeight=o.expandedHeight,this.collapsedHeight=o.collapsedHeight)}get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){const t=this._isExpanded();return t&&this.expandedHeight?this.expandedHeight:!t&&this.collapsedHeight?this.collapsedHeight:null}_keydown(t){switch(t.keyCode){case 32:case 13:nl(t)||(t.preventDefault(),this._toggle());break;default:return void(this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(t))}}focus(t,i){t?this._focusMonitor.focusVia(this._element,t,i):this._element.nativeElement.focus(i)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(t=>{t&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}}return n.\u0275fac=function(t){return new(t||n)(D(EG,1),D(yt),D(Yd),D(ci),D(CG,8),D(rs,8),Ua("tabindex"))},n.\u0275cmp=ht({type:n,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:15,hostBindings:function(t,i){1&t&&ct("click",function(){return i._toggle()})("keydown",function(s){return i._keydown(s)}),2&t&&(Vt("id",i.panel._headerId)("tabindex",i.tabIndex)("aria-controls",i._getPanelId())("aria-expanded",i._isExpanded())("aria-disabled",i.panel.disabled),Pc("height",i._getHeaderHeight()),Pn("mat-expanded",i._isExpanded())("mat-expansion-toggle-indicator-after","after"===i._getTogglePosition())("mat-expansion-toggle-indicator-before","before"===i._getTogglePosition())("_mat-animation-noopable","NoopAnimations"===i._animationMode))},inputs:{tabIndex:"tabIndex",expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight"},features:[ft],ngContentSelectors:Bpe,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(t,i){1&t&&(Cr(Npe),K(0,"span",0),Kt(1),Kt(2,1),Kt(3,2),J(),_e(4,Fpe,1,1,"span",1)),2&t&&(Pn("mat-content-hide-toggle",!i._showToggle()),j(4),z("ngIf",i._showToggle()))},dependencies:[gi],styles:['.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-content.mat-content-hide-toggle{margin-right:8px}[dir=rtl] .mat-content.mat-content-hide-toggle{margin-right:0;margin-left:8px}.mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-left:24px;margin-right:0}[dir=rtl] .mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-right:24px;margin-left:0}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;flex-basis:0;margin-right:16px;align-items:center}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header-description{flex-grow:2}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle}.cdk-high-contrast-active .mat-expansion-panel-content{border-top:1px solid;border-top-left-radius:0;border-top-right-radius:0}'],encapsulation:2,data:{animation:[MG.indicatorRotate]},changeDetection:0}),n})(),Wpe=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),n})(),$pe=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),n})(),jpe=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[va,qn,Rpe,um]}),n})();function Xpe(n,e){if(1&n&&(K(0,"mat-option",19),Je(1),J()),2&n){const t=e.$implicit;z("value",t),j(1),nr(" ",t," ")}}function qpe(n,e){if(1&n){const t=Wi();K(0,"mat-form-field",16)(1,"mat-select",17),ct("selectionChange",function(r){return Dn(t),In(be(2)._changePageSize(r.value))}),_e(2,Xpe,2,2,"mat-option",18),J()()}if(2&n){const t=be(2);z("appearance",t._formFieldAppearance)("color",t.color),j(1),z("value",t.pageSize)("disabled",t.disabled)("aria-labelledby",t._pageSizeLabelId)("panelClass",t.selectConfig.panelClass||"")("disableOptionCentering",t.selectConfig.disableOptionCentering),j(1),z("ngForOf",t._displayedPageSizeOptions)}}function Ype(n,e){if(1&n&&(K(0,"div",20),Je(1),J()),2&n){const t=be(2);j(1),$i(t.pageSize)}}function Kpe(n,e){if(1&n&&(K(0,"div",12)(1,"div",13),Je(2),J(),_e(3,qpe,3,8,"mat-form-field",14),_e(4,Ype,2,1,"div",15),J()),2&n){const t=be();j(1),r1("id",t._pageSizeLabelId),j(1),nr(" ",t._intl.itemsPerPageLabel," "),j(1),z("ngIf",t._displayedPageSizeOptions.length>1),j(1),z("ngIf",t._displayedPageSizeOptions.length<=1)}}function Zpe(n,e){if(1&n){const t=Wi();K(0,"button",21),ct("click",function(){return Dn(t),In(be().firstPage())}),Lr(),K(1,"svg",7),Fe(2,"path",22),J()()}if(2&n){const t=be();z("matTooltip",t._intl.firstPageLabel)("matTooltipDisabled",t._previousButtonsDisabled())("matTooltipPosition","above")("disabled",t._previousButtonsDisabled()),Vt("aria-label",t._intl.firstPageLabel)}}function Qpe(n,e){if(1&n){const t=Wi();Lr(),es(),K(0,"button",23),ct("click",function(){return Dn(t),In(be().lastPage())}),Lr(),K(1,"svg",7),Fe(2,"path",24),J()()}if(2&n){const t=be();z("matTooltip",t._intl.lastPageLabel)("matTooltipDisabled",t._nextButtonsDisabled())("matTooltipPosition","above")("disabled",t._nextButtonsDisabled()),Vt("aria-label",t._intl.lastPageLabel)}}let jC=(()=>{class n{constructor(){this.changes=new Ue,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(t,i,r)=>{if(0==r||0==i)return`0 of ${r}`;const s=t*i;return`${s+1} \u2013 ${s<(r=Math.max(r,0))?Math.min(s+i,r):s+i} of ${r}`}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const eme={provide:jC,deps:[[new Po,new Il,jC]],useFactory:function Jpe(n){return n||new jC}},nme=new ge("MAT_PAGINATOR_DEFAULT_OPTIONS"),ime=TM(FK(class{}));let rme=(()=>{class n extends ime{get pageIndex(){return this._pageIndex}set pageIndex(t){this._pageIndex=Math.max(Ys(t),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(t){this._length=Ys(t),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(t){this._pageSize=Math.max(Ys(t),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(t){this._pageSizeOptions=(t||[]).map(i=>Ys(i)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(t){this._hidePageSize=Cn(t)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(t){this._showFirstLastButtons=Cn(t)}constructor(t,i,r){if(super(),this._intl=t,this._changeDetectorRef=i,this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this._hidePageSize=!1,this._showFirstLastButtons=!1,this.selectConfig={},this.page=new it,this._intlChanges=t.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),r){const{pageSize:s,pageSizeOptions:o,hidePageSize:a,showFirstLastButtons:l}=r;null!=s&&(this._pageSize=s),null!=o&&(this._pageSizeOptions=o),null!=a&&(this._hidePageSize=a),null!=l&&(this._showFirstLastButtons=l)}}ngOnInit(){this._initialized=!0,this._updateDisplayedPageSizeOptions(),this._markInitialized()}ngOnDestroy(){this._intlChanges.unsubscribe()}nextPage(){if(!this.hasNextPage())return;const t=this.pageIndex;this.pageIndex=this.pageIndex+1,this._emitPageEvent(t)}previousPage(){if(!this.hasPreviousPage())return;const t=this.pageIndex;this.pageIndex=this.pageIndex-1,this._emitPageEvent(t)}firstPage(){if(!this.hasPreviousPage())return;const t=this.pageIndex;this.pageIndex=0,this._emitPageEvent(t)}lastPage(){if(!this.hasNextPage())return;const t=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(t)}hasPreviousPage(){return this.pageIndex>=1&&0!=this.pageSize}hasNextPage(){const t=this.getNumberOfPages()-1;return this.pageIndext-i),this._changeDetectorRef.markForCheck())}_emitPageEvent(t){this.page.emit({previousPageIndex:t,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}}return n.\u0275fac=function(t){Ya()},n.\u0275dir=Ae({type:n,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[ft]}),n})(),sme=0,ome=(()=>{class n extends rme{constructor(t,i,r){super(t,i,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+sme++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return n.\u0275fac=function(t){return new(t||n)(D(jC),D(ci),D(nme,8))},n.\u0275cmp=ht({type:n,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[ft],decls:14,vars:14,consts:[[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],["class","mat-mdc-paginator-page-size",4,"ngIf"],[1,"mat-mdc-paginator-range-actions"],["aria-live","polite",1,"mat-mdc-paginator-range-label"],["mat-icon-button","","type","button","class","mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-previous",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["viewBox","0 0 24 24","focusable","false",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-next",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button","class","mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-page-size-label",3,"id"],["class","mat-mdc-paginator-page-size-select",3,"appearance","color",4,"ngIf"],["class","mat-mdc-paginator-page-size-value",4,"ngIf"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],["hideSingleSelectionIndicator","",3,"value","disabled","aria-labelledby","panelClass","disableOptionCentering","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"mat-mdc-paginator-page-size-value"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(t,i){1&t&&(K(0,"div",0)(1,"div",1),_e(2,Kpe,5,4,"div",2),K(3,"div",3)(4,"div",4),Je(5),J(),_e(6,Zpe,3,5,"button",5),K(7,"button",6),ct("click",function(){return i.previousPage()}),Lr(),K(8,"svg",7),Fe(9,"path",8),J()(),es(),K(10,"button",9),ct("click",function(){return i.nextPage()}),Lr(),K(11,"svg",7),Fe(12,"path",10),J()(),_e(13,Qpe,3,5,"button",11),J()()()),2&t&&(j(2),z("ngIf",!i.hidePageSize),j(3),nr(" ",i._intl.getRangeLabel(i.pageIndex,i.pageSize,i.length)," "),j(1),z("ngIf",i.showFirstLastButtons),j(1),z("matTooltip",i._intl.previousPageLabel)("matTooltipDisabled",i._previousButtonsDisabled())("matTooltipPosition","above")("disabled",i._previousButtonsDisabled()),Vt("aria-label",i._intl.previousPageLabel),j(3),z("matTooltip",i._intl.nextPageLabel)("matTooltipDisabled",i._nextButtonsDisabled())("matTooltipPosition","above")("disabled",i._nextButtonsDisabled()),Vt("aria-label",i._intl.nextPageLabel),j(3),z("ngIf",i.showFirstLastButtons))},dependencies:[Fo,gi,EI,nu,Oy,vm,_s],styles:[".mat-mdc-paginator{display:block}.mat-mdc-paginator .mat-mdc-form-field-subscript-wrapper{display:none}.mat-mdc-paginator .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap-reverse;width:100%}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px}[dir=rtl] .mat-mdc-paginator-icon{transform:rotate(180deg)}.cdk-high-contrast-active .mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon,.cdk-high-contrast-active .mat-mdc-paginator-icon{fill:currentColor;fill:CanvasText}.cdk-high-contrast-active .mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0}),n})(),ame=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({providers:[eme],imports:[va,AI,HV,a3]}),n})();const lme=["*"],fme=new ge("MAT_CARD_CONFIG");let AG=(()=>{class n{constructor(t){this.appearance=t?.appearance||"raised"}}return n.\u0275fac=function(t){return new(t||n)(D(fme,8))},n.\u0275cmp=ht({type:n,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(t,i){2&t&&Pn("mat-mdc-card-outlined","outlined"===i.appearance)("mdc-card--outlined","outlined"===i.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:lme,decls:1,vars:0,template:function(t,i){1&t&&(Cr(),Kt(0))},styles:['.mdc-card{display:flex;flex-direction:column;box-sizing:border-box}.mdc-card::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none;pointer-events:none}@media screen and (forced-colors: active){.mdc-card::after{border-color:CanvasText}}.mdc-card--outlined::after{border:none}.mdc-card__content{border-radius:inherit;height:100%}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mdc-card__media--square::before{margin-top:100%}.mdc-card__media--16-9::before{margin-top:56.25%}.mdc-card__media-content{position:absolute;top:0;right:0;bottom:0;left:0;box-sizing:border-box}.mdc-card__primary-action{display:flex;flex-direction:column;box-sizing:border-box;position:relative;outline:none;color:inherit;text-decoration:none;cursor:pointer;overflow:hidden}.mdc-card__primary-action:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__primary-action:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mdc-card__actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mdc-card__actions--full-bleed{padding:0}.mdc-card__action-buttons,.mdc-card__action-icons{display:flex;flex-direction:row;align-items:center;box-sizing:border-box}.mdc-card__action-icons{flex-grow:1;justify-content:flex-end}.mdc-card__action-buttons+.mdc-card__action-icons{margin-left:16px;margin-right:0}[dir=rtl] .mdc-card__action-buttons+.mdc-card__action-icons,.mdc-card__action-buttons+.mdc-card__action-icons[dir=rtl]{margin-left:0;margin-right:16px}.mdc-card__action{display:inline-flex;flex-direction:row;align-items:center;box-sizing:border-box;justify-content:center;cursor:pointer;user-select:none}.mdc-card__action:focus{outline:none}.mdc-card__action--button{margin-left:0;margin-right:8px;padding:0 8px}[dir=rtl] .mdc-card__action--button,.mdc-card__action--button[dir=rtl]{margin-left:8px;margin-right:0}.mdc-card__action--button:last-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-card__action--button:last-child,.mdc-card__action--button:last-child[dir=rtl]{margin-left:0;margin-right:0}.mdc-card__actions--full-bleed .mdc-card__action--button{justify-content:space-between;width:100%;height:auto;max-height:none;margin:0;padding:8px 16px;text-align:left}[dir=rtl] .mdc-card__actions--full-bleed .mdc-card__action--button,.mdc-card__actions--full-bleed .mdc-card__action--button[dir=rtl]{text-align:right}.mdc-card__action--icon{margin:-6px 0;padding:12px}.mat-mdc-card{position:relative;border-radius:var(--mdc-elevated-card-container-shape, var(--mdc-shape-medium, 4px));background-color:var(--mdc-elevated-card-container-color, transparent);border-width:0;border-style:solid;border-color:var(--mdc-elevated-card-container-color, transparent)}.mat-mdc-card .mdc-card::after{border-radius:var(--mdc-elevated-card-container-shape, var(--mdc-shape-medium, 4px))}.mat-mdc-card-outlined{border-width:var(--mdc-outlined-card-outline-width, 1px);border-style:solid;border-color:var(--mdc-outlined-card-outline-color, transparent)}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end}'],encapsulation:2,changeDetection:0}),n})(),Ame=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[qn,va,qn]}),n})(),Tme=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n,bootstrap:[Dhe]}),n.\u0275inj=Yt({providers:[Hc,BV],imports:[hN,Oq,Tpe,LJ,BZ,KM,Mee,jpe,JU,n3,a3,AI,RQ,ame,one,Ame,HV,aZ,hue,ohe,FJ,bI]}),n})();ku(Gc,[Fo,gi,_s,xb,DC],[Vl]),ku(oR,[Bv,Fo,gi,Vv,eu,tu,nu,EG,Gpe,$pe,Wpe,_s,ome,Oy,vm,xb],[]),ku(ZM,[Fo,gi,JM,QM,AG,xb],[]),ku(R5,[Fo,gi,xa,_s,Oy,vm,xb,DC],[Vl]),q9().bootstrapModule(Tme).catch(n=>console.error(n))},489:function(wo,Es,qr){var Qt;wo=qr.nmd(wo),function(){var B,Yr=200,Fn="Expected a function",Ia="__lodash_hash_undefined__",di="__lodash_placeholder__",ui=1,ls=2,Ts=4,Ds=1,Mo=2,Tn=1,ar=2,ic=4,Ko=8,ul=16,Zo=32,hl=64,Ra=128,Qo=256,rd=512,KC=800,Cg=16,Sn=1/0,ka=9007199254740991,QC=17976931348623157e292,vf=NaN,Jo=4294967295,Ue=Jo-1,Tb=Jo>>>1,Db=[["ary",Ra],["bind",Tn],["bindKey",ar],["curry",Ko],["curryRight",ul],["flip",rd],["partial",Zo],["partialRight",hl],["rearg",Qo]],Gn="[object Arguments]",Un="[object Array]",JC="[object AsyncFunction]",Ye="[object Boolean]",rc="[object Date]",eE="[object DOMException]",sd="[object Error]",yf="[object Function]",Ib="[object GeneratorFunction]",So="[object Map]",bf="[object Number]",kk="[object Null]",fl="[object Object]",tE="[object Promise]",nE="[object Proxy]",od="[object RegExp]",Co="[object Set]",sc="[object String]",xf="[object Symbol]",Eg="[object Undefined]",ad="[object WeakMap]",Su="[object ArrayBuffer]",ld="[object DataView]",ea="[object Float32Array]",wf="[object Float64Array]",Ag="[object Int8Array]",Mf="[object Int16Array]",Tg="[object Int32Array]",Dg="[object Uint8Array]",Ig="[object Uint8ClampedArray]",Rg="[object Uint16Array]",Pg="[object Uint32Array]",rE=/\b__p \+= '';/g,sE=/\b(__p \+=) '' \+/g,oE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Rb=/&(?:amp|lt|gt|quot|#39);/g,Pb=/[&<>"']/g,Ok=RegExp(Rb.source),kg=RegExp(Pb.source),kb=/<%-([\s\S]+?)%>/g,Ob=/<%([\s\S]+?)%>/g,Og=/<%=([\s\S]+?)%>/g,Lb=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,aE=/^\w*$/,Fb=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Sf=/[\\^$.*+?()[\]{}|]/g,Nb=RegExp(Sf.source),Cf=/^\s+/,lr=/\s/,lE=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,cE=/\{\n\/\* \[wrapped with (.+)\] \*/,dE=/,? & /,uE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Bb=/[()=,{}\[\]\/\s]/,hE=/\\(\\)?/g,fE=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ta=/\w*$/,pE=/^[-+]0x[0-9a-f]+$/i,er=/^0b[01]+$/i,cd=/^\[object .+?Constructor\]$/,Is=/^0o[0-7]+$/i,Lk=/^(?:0|[1-9]\d*)$/,mE=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Cu=/($^)/,Lg=/['\n\r\u2028\u2029\\]/g,Eu="\\ud800-\\udfff",Fg="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Vb="\\u2700-\\u27bf",zb="a-z\\xdf-\\xf6\\xf8-\\xff",Gb="A-Z\\xc0-\\xd6\\xd8-\\xde",Ri="\\ufe0e\\ufe0f",cs="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ng="["+Eu+"]",Zn="["+cs+"]",dd="["+Fg+"]",ri="\\d+",Bg="["+Vb+"]",Wb="["+zb+"]",Qn="[^"+Eu+cs+ri+Vb+zb+Gb+"]",Mt="\\ud83c[\\udffb-\\udfff]",Ef="[^"+Eu+"]",$b="(?:\\ud83c[\\udde6-\\uddff]){2}",ud="[\\ud800-\\udbff][\\udc00-\\udfff]",fe="["+Gb+"]",Wt="(?:"+Wb+"|"+Qn+")",jn="(?:"+fe+"|"+Qn+")",jb="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",bE="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Xb="(?:"+dd+"|"+Mt+")?",Iu="["+Ri+"]?",wE=Iu+Xb+"(?:\\u200d(?:"+[Ef,$b,ud].join("|")+")"+Iu+Xb+")*",pl="(?:"+[Bg,$b,ud].join("|")+")"+wE,Nk="(?:"+[Ef+dd+"?",dd,$b,ud,Ng].join("|")+")",Bk=RegExp("['\u2019]","g"),Uk=RegExp(dd,"g"),qb=RegExp(Mt+"(?="+Mt+")|"+Nk+wE,"g"),ME=RegExp([fe+"?"+Wb+"+"+jb+"(?="+[Zn,fe,"$"].join("|")+")",jn+"+"+bE+"(?="+[Zn,fe+Wt,"$"].join("|")+")",fe+"?"+Wt+"+"+jb,fe+"+"+bE,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ri,pl].join("|"),"g"),Vk=RegExp("[\\u200d"+Eu+Fg+Ri+"]"),SE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zk=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],io=-1,bt={};bt[ea]=bt[wf]=bt[Ag]=bt[Mf]=bt[Tg]=bt[Dg]=bt[Ig]=bt[Rg]=bt[Pg]=!0,bt[Gn]=bt[Un]=bt[Su]=bt[Ye]=bt[ld]=bt[rc]=bt[sd]=bt[yf]=bt[So]=bt[bf]=bt[fl]=bt[od]=bt[Co]=bt[sc]=bt[ad]=!1;var li={};li[Gn]=li[Un]=li[Su]=li[ld]=li[Ye]=li[rc]=li[ea]=li[wf]=li[Ag]=li[Mf]=li[Tg]=li[So]=li[bf]=li[fl]=li[od]=li[Co]=li[sc]=li[xf]=li[Dg]=li[Ig]=li[Rg]=li[Pg]=!0,li[sd]=li[yf]=li[ad]=!1;var Wk={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Yt=parseFloat,Af=parseInt,Yb="object"==typeof global&&global&&global.Object===Object&&global,Kb="object"==typeof self&&self&&self.Object===Object&&self,vr=Yb||Kb||Function("return this")(),Vg=Es&&!Es.nodeType&&Es,ml=Vg&&wo&&!wo.nodeType&&wo,Tf=ml&&ml.exports===Vg,Df=Tf&&Yb.process,ro=function(){try{return ml&&ml.require&&ml.require("util").types||Df&&Df.binding&&Df.binding("util")}catch{}}(),At=ro&&ro.isArrayBuffer,If=ro&&ro.isDate,Zb=ro&&ro.isMap,Ps=ro&&ro.isRegExp,zg=ro&&ro.isSet,CE=ro&&ro.isTypedArray;function bn(q,oe,ae){switch(ae.length){case 0:return q.call(oe);case 1:return q.call(oe,ae[0]);case 2:return q.call(oe,ae[0],ae[1]);case 3:return q.call(oe,ae[0],ae[1],ae[2])}return q.apply(oe,ae)}function $k(q,oe,ae,Ke){for(var Ne=-1,zn=null==q?0:q.length;++Ne-1}function Hg(q,oe,ae){for(var Ke=-1,Ne=null==q?0:q.length;++Ke-1;);return ae}function t0(q,oe){for(var ae=q.length;ae--&&vl(oe,q[ae],0)>-1;);return ae}var ku=Ao({\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"Ae",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u010e:"D",\u0110:"D",\u010f:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011a:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011b:"e",\u011c:"G",\u011e:"G",\u0120:"G",\u0122:"G",\u011d:"g",\u011f:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012a:"I",\u012c:"I",\u012e:"I",\u0130:"I",\u0129:"i",\u012b:"i",\u012d:"i",\u012f:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013b:"L",\u013d:"L",\u013f:"L",\u0141:"L",\u013a:"l",\u013c:"l",\u013e:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014a:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014b:"n",\u014c:"O",\u014e:"O",\u0150:"O",\u014d:"o",\u014f:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015a:"S",\u015c:"S",\u015e:"S",\u0160:"S",\u015b:"s",\u015d:"s",\u015f:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016a:"U",\u016c:"U",\u016e:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016b:"u",\u016d:"u",\u016f:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017b:"Z",\u017d:"Z",\u017a:"z",\u017c:"z",\u017e:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017f:"s"}),AE=Ao({"&":"&","<":"<",">":">",'"':""","'":"'"});function TE(q){return"\\"+Wk[q]}function pd(q){return Vk.test(q)}function Pr(q){var oe=-1,ae=Array(q.size);return q.forEach(function(Ke,Ne){ae[++oe]=[Ne,Ke]}),ae}function Wn(q,oe){return function(ae){return q(oe(ae))}}function wi(q,oe){for(var ae=-1,Ke=q.length,Ne=0,zn=[];++ae",""":'"',"'":"'"}),tr=function q(oe){var d,ae=(oe=null==oe?vr:tr.defaults(vr.Object(),oe,tr.pick(vr,zk))).Array,Ke=oe.Date,Ne=oe.Error,zn=oe.Function,Mi=oe.Math,Jn=oe.Object,yl=oe.RegExp,kr=oe.String,Or=oe.TypeError,Oa=ae.prototype,sa=Jn.prototype,Ou=oe["__core-js_shared__"],ei=zn.prototype.toString,ti=sa.hasOwnProperty,Wg=0,$g=(d=/[^.]+$/.exec(Ou&&Ou.keys&&Ou.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"",dc=sa.toString,Lf=ei.call(Jn),gd=vr._,Zr=yl("^"+ei.call(ti).replace(Sf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),jg=Tf?oe.Buffer:B,Vi=oe.Symbol,us=oe.Uint8Array,Ff=jg?jg.allocUnsafe:B,bl=Wn(Jn.getPrototypeOf,Jn),Lu=Jn.create,so=sa.propertyIsEnumerable,Nf=Oa.splice,DE=Vi?Vi.isConcatSpreadable:B,Fu=Vi?Vi.iterator:B,uc=Vi?Vi.toStringTag:B,Xg=function(){try{var d=Mc(Jn,"defineProperty");return d({},"",{}),d}catch{}}(),Xk=oe.clearTimeout!==vr.clearTimeout&&oe.clearTimeout,qk=Ke&&Ke.now!==vr.Date.now&&Ke.now,Yk=oe.setTimeout!==vr.setTimeout&&oe.setTimeout,qg=Mi.ceil,Yg=Mi.floor,s0=Jn.getOwnPropertySymbols,Kk=jg?jg.isBuffer:B,IE=oe.isFinite,Zk=Oa.join,Qk=Wn(Jn.keys,Jn),cr=Mi.max,br=Mi.min,o0=Ke.now,Jk=oe.parseInt,RE=Mi.random,eO=Oa.reverse,La=Mc(oe,"DataView"),Nu=Mc(oe,"Map"),zi=Mc(oe,"Promise"),hc=Mc(oe,"Set"),Bu=Mc(oe,"WeakMap"),Uu=Mc(Jn,"create"),Vu=Bu&&new Bu,fc={},PE=Gi(La),Kg=Gi(Nu),kE=Gi(zi),oo=Gi(hc),a0=Gi(Bu),zu=Vi?Vi.prototype:B,Pi=zu?zu.valueOf:B,l0=zu?zu.toString:B;function T(d){if(ni(d)&&!en(d)&&!(d instanceof nn)){if(d instanceof Ls)return d;if(ti.call(d,"__wrapped__"))return T_(d)}return new Ls(d)}var dr=function(){function d(){}return function(f){if(!fi(f))return{};if(Lu)return Lu(f);d.prototype=f;var _=new d;return d.prototype=B,_}}();function Bf(){}function Ls(d,f){this.__wrapped__=d,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=B}function nn(d){this.__wrapped__=d,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Jo,this.__views__=[]}function pc(d){var f=-1,_=null==d?0:d.length;for(this.clear();++f<_;){var w=d[f];this.set(w[0],w[1])}}function wl(d){var f=-1,_=null==d?0:d.length;for(this.clear();++f<_;){var w=d[f];this.set(w[0],w[1])}}function Fa(d){var f=-1,_=null==d?0:d.length;for(this.clear();++f<_;){var w=d[f];this.set(w[0],w[1])}}function Ml(d){var f=-1,_=null==d?0:d.length;for(this.__data__=new Fa;++f<_;)this.add(d[f])}function Fs(d){var f=this.__data__=new wl(d);this.size=f.size}function aa(d,f){var _=en(d),w=!_&&Rd(d),C=!_&&!w&&Ga(d),O=!_&&!w&&!C&&Pd(d),U=_||w||C||O,G=U?Vn(d.length,kr):[],Y=G.length;for(var pe in d)(f||ti.call(d,pe))&&(!U||!("length"==pe||C&&("offset"==pe||"parent"==pe)||O&&("buffer"==pe||"byteLength"==pe||"byteOffset"==pe)||Pl(pe,Y)))&&G.push(pe);return G}function Jg(d){var f=d.length;return f?d[Qu(0,f-1)]:B}function _d(d,f){return sh(Fr(d),mc(f,0,d.length))}function Na(d){return sh(Fr(d))}function e_(d,f,_){(_!==B&&!ko(d[f],_)||_===B&&!(f in d))&&la(d,f,_)}function vd(d,f,_){var w=d[f];(!ti.call(d,f)||!ko(w,_)||_===B&&!(f in d))&&la(d,f,_)}function Vf(d,f){for(var _=d.length;_--;)if(ko(d[_][0],f))return _;return-1}function VE(d,f,_,w){return Ba(d,function(C,O,U){f(w,C,_(C),U)}),w}function zf(d,f){return d&&fs(f,Sr(f),d)}function la(d,f,_){"__proto__"==f&&Xg?Xg(d,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):d[f]=_}function Gu(d,f){for(var _=-1,w=f.length,C=ae(w),O=null==d;++_=f?d:f)),d}function Ns(d,f,_,w,C,O){var U,G=f&ui,Y=f&ls,pe=f&Ts;if(_&&(U=C?_(d,w,C,O):_(d)),U!==B)return U;if(!fi(d))return d;var ye=en(d);if(ye){if(U=function k0(d){var f=d.length,_=new d.constructor(f);return f&&"string"==typeof d[0]&&ti.call(d,"index")&&(_.index=d.index,_.input=d.input),_}(d),!G)return Fr(d,U)}else{var Te=wr(d),$e=Te==yf||Te==Ib;if(Ga(d))return XE(d,G);if(Te==fl||Te==Gn||$e&&!C){if(U=Y||$e?{}:iA(d),!G)return Y?function lo(d,f){return fs(d,ih(d),f)}(d,function t_(d,f){return d&&fs(f,Gs(f),d)}(U,d)):function KE(d,f){return fs(d,b_(d),f)}(d,zf(U,d))}else{if(!li[Te])return C?d:{};U=function rA(d,f,_){var w=d.constructor;switch(f){case Su:return E0(d);case Ye:case rc:return new w(+d);case ld:return function rO(d,f){var _=f?E0(d.buffer):d.buffer;return new d.constructor(_,d.byteOffset,d.byteLength)}(d,_);case ea:case wf:case Ag:case Mf:case Tg:case Dg:case Ig:case Rg:case Pg:return qE(d,_);case So:return new w;case bf:case sc:return new w(d);case od:return function sO(d){var f=new d.constructor(d.source,ta.exec(d));return f.lastIndex=d.lastIndex,f}(d);case Co:return new w;case xf:return function oO(d){return Pi?Jn(Pi.call(d)):{}}(d)}}(d,Te,G)}}O||(O=new Fs);var lt=O.get(d);if(lt)return lt;O.set(d,U),rv(d)?d.forEach(function(Dt){U.add(Ns(Dt,f,_,Dt,d,O))}):Ax(d)&&d.forEach(function(Dt,fn){U.set(fn,Ns(Dt,f,_,fn,d,O))});var ln=ye?B:(pe?Y?Rl:y_:Y?Gs:Sr)(d);return Eo(ln||d,function(Dt,fn){ln&&(Dt=d[fn=Dt]),vd(U,fn,Ns(Dt,f,_,fn,d,O))}),U}function i_(d,f,_){var w=_.length;if(null==d)return!w;for(d=Jn(d);w--;){var C=_[w],U=d[C];if(U===B&&!(C in d)||!(0,f[C])(U))return!1}return!0}function r_(d,f,_){if("function"!=typeof d)throw new Or(Fn);return Sc(function(){d.apply(B,_)},f)}function yd(d,f,_,w){var C=-1,O=oc,U=!0,G=d.length,Y=[],pe=f.length;if(!G)return Y;_&&(f=hi(f,Kr(_))),w?(O=Hg,U=!1):f.length>=Yr&&(O=ks,U=!1,f=new Ml(f));e:for(;++C-1},wl.prototype.set=function BE(d,f){var _=this.__data__,w=Vf(_,d);return w<0?(++this.size,_.push([d,f])):_[w][1]=f,this},Fa.prototype.clear=function Ee(){this.size=0,this.__data__={hash:new pc,map:new(Nu||wl),string:new pc}},Fa.prototype.delete=function Nn(d){var f=ap(this,d).delete(d);return this.size-=f?1:0,f},Fa.prototype.get=function Dn(d){return ap(this,d).get(d)},Fa.prototype.has=function In(d){return ap(this,d).has(d)},Fa.prototype.set=function xr(d,f){var _=ap(this,d),w=_.size;return _.set(d,f),this.size+=_.size==w?0:1,this},Ml.prototype.add=Ml.prototype.push=function Hu(d){return this.__data__.set(d,Ia),this},Ml.prototype.has=function oa(d){return this.__data__.has(d)},Fs.prototype.clear=function Qg(){this.__data__=new wl,this.size=0},Fs.prototype.delete=function UE(d){var f=this.__data__,_=f.delete(d);return this.size=f.size,_},Fs.prototype.get=function tO(d){return this.__data__.get(d)},Fs.prototype.has=function h0(d){return this.__data__.has(d)},Fs.prototype.set=function Qr(d,f){var _=this.__data__;if(_ instanceof wl){var w=_.__data__;if(!Nu||w.length0&&_(G)?f>1?hn(G,f-1,_,w,C):gl(C,G):w||(C[C.length]=G)}return C}var Lr=Md(),f0=Md(!0);function es(d,f){return d&&Lr(d,f,Sr)}function s_(d,f){return d&&f0(d,f,Sr)}function Wf(d,f){return na(f,function(_){return Wa(d[_])})}function gc(d,f){for(var _=0,w=(f=yc(f,d)).length;null!=d&&_f}function o_(d,f){return null!=d&&ti.call(d,f)}function p0(d,f){return null!=d&&f in Jn(d)}function Cl(d,f,_){for(var w=_?Hg:oc,C=d[0].length,O=d.length,U=O,G=ae(O),Y=1/0,pe=[];U--;){var ye=d[U];U&&f&&(ye=hi(ye,Kr(f))),Y=br(ye.length,Y),G[U]=!_&&(f||C>=120&&ye.length>=120)?new Ml(U&&ye):B}ye=d[0];var Te=-1,$e=G[0];e:for(;++Te=G?Y:Y*("desc"==_[w]?-1:1)}return d.index-f.index}(O,U,_)})}function b0(d,f,_){for(var w=-1,C=f.length,O={};++w-1;)G!==d&&Nf.call(G,Y,1),Nf.call(d,Y,1);return d}function h_(d,f){for(var _=d?f.length:0,w=_-1;_--;){var C=f[_];if(_==w||C!==O){var O=C;Pl(C)?Nf.call(d,C,1):Zf(d,C)}}return d}function Qu(d,f){return d+Yg(RE()*(f-d+1))}function p_(d,f){var _="";if(!d||f<1||f>ka)return _;do{f%2&&(_+=d),(f=Yg(f/2))&&(d+=d)}while(f);return _}function an(d,f){return E_(ns(d,f,Br),d+"")}function x0(d){return Jg(kd(d))}function w0(d,f){var _=kd(d);return sh(_,mc(f,0,_.length))}function xd(d,f,_,w){if(!fi(d))return d;for(var C=-1,O=(f=yc(f,d)).length,U=O-1,G=d;null!=G&&++CC?0:C+f),(_=_>C?C:_)<0&&(_+=C),C=f>_?0:_-f>>>0,f>>>=0;for(var O=ae(C);++w>>1,U=d[O];null!==U&&!Hs(U)&&(_?U<=f:U=Yr){var pe=f?null:rp(d);if(pe)return yr(pe);U=!1,C=ks,Y=new Ml}else Y=f?[]:G;e:for(;++w=w?d:ao(d,f,_)}var jE=Xk||function(d){return vr.clearTimeout(d)};function XE(d,f){if(f)return d.slice();var _=d.length,w=Ff?Ff(_):new d.constructor(_);return d.copy(w),w}function E0(d){var f=new d.constructor(d.byteLength);return new us(f).set(new us(d)),f}function qE(d,f){var _=f?E0(d.buffer):d.buffer;return new d.constructor(_,d.byteOffset,d.length)}function wd(d,f){if(d!==f){var _=d!==B,w=null===d,C=d==d,O=Hs(d),U=f!==B,G=null===f,Y=f==f,pe=Hs(f);if(!G&&!pe&&!O&&d>f||O&&U&&Y&&!G&&!pe||w&&U&&Y||!_&&Y||!C)return 1;if(!w&&!O&&!pe&&d1?_[C-1]:B,U=C>2?_[2]:B;for(O=d.length>3&&"function"==typeof O?(C--,O):B,U&&ps(_[0],_[1],U)&&(O=C<3?B:O,C=1),f=Jn(f);++w-1?C[O?f[U]:U]:B}}function xc(d){return za(function(f){var _=f.length,w=_,C=Ls.prototype.thru;for(d&&f.reverse();w--;){var O=f[w];if("function"!=typeof O)throw new Or(Fn);if(C&&!U&&"wrapper"==op(O))var U=new Ls([],!0)}for(w=U?w:_;++w<_;){var G=op(O=f[w]),Y="wrapper"==G?wc(O):B;U=Y&&O0(Y[0])&&Y[1]==(Ra|Ko|Zo|Qo)&&!Y[4].length&&1==Y[9]?U[op(Y[0])].apply(U,Y[3]):1==O.length&&O0(O)?U[G]():U.thru(O)}return function(){var pe=arguments,ye=pe[0];if(U&&1==pe.length&&en(ye))return U.plant(ye).value();for(var Te=0,$e=_?f[Te].apply(this,pe):ye;++Te<_;)$e=f[Te].call(this,$e);return $e}})}function g_(d,f,_,w,C,O,U,G,Y,pe){var ye=f&Ra,Te=f&Tn,$e=f&ar,lt=f&(Ko|ul),Tt=f&rd,ln=$e?B:Qf(d);return function Dt(){for(var fn=arguments.length,Rn=ae(fn),$s=fn;$s--;)Rn[$s]=arguments[$s];if(lt)var hr=nh(Dt),Ur=function ht(q,oe){for(var ae=q.length,Ke=0;ae--;)q[ae]===oe&&++Ke;return Ke}(Rn,hr);if(w&&(Rn=YE(Rn,w,C,lt)),O&&(Rn=Hi(Rn,O,U,lt)),fn-=Ur,lt&&fn1&&Rn.reverse(),ye&&YG))return!1;var pe=O.get(d),ye=O.get(f);if(pe&&ye)return pe==f&&ye==d;var Te=-1,$e=!0,lt=_&Mo?new Ml:B;for(O.set(d,f),O.set(f,d);++Te-1&&d%1==0&&d1?"& ":"")+f[w],f=f.join(_>2?", ":" "),d.replace(lE,"{\n/* [wrapped with "+f+"] */\n")}(w,function A_(d,f){return Eo(Db,function(_){var w="_."+_[0];f&_[1]&&!oc(d,w)&&d.push(w)}),d.sort()}(function P0(d){var f=d.match(cE);return f?f[1].split(dE):[]}(w),_)))}function z0(d){var f=0,_=0;return function(){var w=o0(),C=Cg-(w-_);if(_=w,C>0){if(++f>=KC)return arguments[0]}else f=0;return d.apply(B,arguments)}}function sh(d,f){var _=-1,w=d.length,C=w-1;for(f=f===B?w:f;++_1?d[f-1]:B;return _="function"==typeof _?(d.pop(),_):B,B_(d,_)});function cx(d){var f=T(d);return f.__chain__=!0,f}function ch(d,f){return f(d)}var fp=za(function(d){var f=d.length,_=f?d[0]:0,w=this.__wrapped__,C=function(O){return Gu(O,d)};return!(f>1||this.__actions__.length)&&w instanceof nn&&Pl(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:ch,args:[C],thisArg:B}),new Ls(w,this.__chain__).thru(function(O){return f&&!O.length&&O.push(B),O})):this.thru(C)}),TA=da(function(d,f,_){ti.call(d,_)?++d[_]:la(d,_,1)}),W_=Jf(q0),hx=Jf(Y0);function mx(d,f){return(en(d)?Eo:Ba)(d,St(f,3))}function gx(d,f){return(en(d)?jk:Hf)(d,St(f,3))}var DA=da(function(d,f,_){ti.call(d,_)?d[_].push(f):la(d,_,[f])}),RA=an(function(d,f,_){var w=-1,C="function"==typeof f,O=Mr(d)?ae(d.length):[];return Ba(d,function(U){O[++w]=C?bn(f,U,_):ju(U,f,_)}),O}),Vs=da(function(d,f,_){la(d,_,f)});function zs(d,f){return(en(d)?hi:Yu)(d,St(f,3))}var kA=da(function(d,f,_){d[_?0:1].push(f)},function(){return[[],[]]}),zA=an(function(d,f){if(null==d)return[];var _=f.length;return _>1&&ps(d,f[0],f[1])?f=[]:_>2&&ps(f[0],f[1],f[2])&&(f=[f[0]]),y0(d,hn(f,1),[])}),Ac=qk||function(){return vr.Date.now()};function Id(d,f,_){return f=_?B:f,ua(d,Ra,B,B,B,B,f=d&&null==f?d.length:f)}function $_(d,f){var _;if("function"!=typeof f)throw new Or(Fn);return d=rn(d),function(){return--d>0&&(_=f.apply(this,arguments)),d<=1&&(f=B),_}}var mp=an(function(d,f,_){var w=Tn;if(_.length){var C=wi(_,nh(mp));w|=Zo}return ua(d,w,f,_,C)}),j_=an(function(d,f,_){var w=Tn|ar;if(_.length){var C=wi(_,nh(j_));w|=Zo}return ua(f,w,d,_,C)});function WA(d,f,_){var w,C,O,U,G,Y,pe=0,ye=!1,Te=!1,$e=!0;if("function"!=typeof d)throw new Or(Fn);function lt(pi){var pa=w,Lo=C;return w=C=B,pe=pi,U=d.apply(Lo,pa)}function Dt(pi){var pa=pi-Y;return Y===B||pa>=f||pa<0||Te&&pi-pe>=O}function fn(){var pi=Ac();if(Dt(pi))return Rn(pi);G=Sc(fn,function ln(pi){var KT=f-(pi-Y);return Te?br(KT,O-(pi-pe)):KT}(pi))}function Rn(pi){return G=B,$e&&w?lt(pi):(w=C=B,U)}function Ur(){var pi=Ac(),pa=Dt(pi);if(w=arguments,C=this,Y=pi,pa){if(G===B)return function Tt(pi){return pe=pi,G=Sc(fn,f),ye?lt(pi):U}(Y);if(Te)return jE(G),G=Sc(fn,f),lt(Y)}return G===B&&(G=Sc(fn,f)),U}return f=co(f)||0,fi(_)&&(ye=!!_.leading,O=(Te="maxWait"in _)?cr(co(_.maxWait)||0,f):O,$e="trailing"in _?!!_.trailing:$e),Ur.cancel=function $s(){G!==B&&jE(G),pe=0,w=Y=C=G=B},Ur.flush=function hr(){return G===B?U:Rn(Ac())},Ur}var X_=an(function(d,f){return r_(d,1,f)}),q_=an(function(d,f,_){return r_(d,co(f)||0,_)});function Y_(d,f){if("function"!=typeof d||null!=f&&"function"!=typeof f)throw new Or(Fn);var _=function(){var w=arguments,C=f?f.apply(this,w):w[0],O=_.cache;if(O.has(C))return O.get(C);var U=d.apply(this,w);return _.cache=O.set(C,U)||O,U};return _.cache=new(Y_.Cache||Fa),_}function dh(d){if("function"!=typeof d)throw new Or(Fn);return function(){var f=arguments;switch(f.length){case 0:return!d.call(this);case 1:return!d.call(this,f[0]);case 2:return!d.call(this,f[0],f[1]);case 3:return!d.call(this,f[0],f[1],f[2])}return!d.apply(this,f)}}Y_.Cache=Fa;var jA=$E(function(d,f){var _=(f=1==f.length&&en(f[0])?hi(f[0],Kr(St())):hi(hn(f,1),Kr(St()))).length;return an(function(w){for(var C=-1,O=br(w.length,_);++C=f}),Rd=GE(function(){return arguments}())?GE:function(d){return ni(d)&&ti.call(d,"callee")&&!so.call(d,"callee")},en=ae.isArray,uh=At?Kr(At):function a_(d){return ni(d)&&ur(d)==Su};function Mr(d){return null!=d&&hh(d.length)&&!Wa(d)}function Di(d){return ni(d)&&Mr(d)}var Ga=Kk||mh,pO=If?Kr(If):function nO(d){return ni(d)&&ur(d)==rc};function Ex(d){if(!ni(d))return!1;var f=ur(d);return f==sd||f==eE||"string"==typeof d.message&&"string"==typeof d.name&&!Tc(d)}function Wa(d){if(!fi(d))return!1;var f=ur(d);return f==yf||f==Ib||f==JC||f==nE}function vp(d){return"number"==typeof d&&d==rn(d)}function hh(d){return"number"==typeof d&&d>-1&&d%1==0&&d<=ka}function fi(d){var f=typeof d;return null!=d&&("object"==f||"function"==f)}function ni(d){return null!=d&&"object"==typeof d}var Ax=Zb?Kr(Zb):function iO(d){return ni(d)&&wr(d)==So};function nv(d){return"number"==typeof d||ni(d)&&ur(d)==bf}function Tc(d){if(!ni(d)||ur(d)!=fl)return!1;var f=bl(d);if(null===f)return!0;var _=ti.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&ei.call(_)==Lf}var iv=Ps?Kr(Ps):function g0(d){return ni(d)&&ur(d)==od},rv=zg?Kr(zg):function _0(d){return ni(d)&&wr(d)==Co};function ja(d){return"string"==typeof d||!en(d)&&ni(d)&&ur(d)==sc}function Hs(d){return"symbol"==typeof d||ni(d)&&ur(d)==xf}var Pd=CE?Kr(CE):function qu(d){return ni(d)&&hh(d.length)&&!!bt[ur(d)]},Tx=np(c_),rT=np(function(d,f){return d<=f});function ov(d){if(!d)return[];if(Mr(d))return ja(d)?ds(d):Fr(d);if(Fu&&d[Fu])return function Ae(q){for(var oe,ae=[];!(oe=q.next()).done;)ae.push(oe.value);return ae}(d[Fu]());var f=wr(d);return(f==So?Pr:f==Co?yr:kd)(d)}function kl(d){return d?(d=co(d))===Sn||d===-Sn?(d<0?-1:1)*QC:d==d?d:0:0===d?d:0}function rn(d){var f=kl(d),_=f%1;return f==f?_?f-_:f:0}function Ol(d){return d?mc(rn(d),0,Jo):0}function co(d){if("number"==typeof d)return d;if(Hs(d))return vf;if(fi(d)){var f="function"==typeof d.valueOf?d.valueOf():d;d=fi(f)?f+"":f}if("string"!=typeof d)return 0===d?d:+d;d=kf(d);var _=er.test(d);return _||Is.test(d)?Af(d.slice(2),_?2:8):pE.test(d)?vf:+d}function Dc(d){return fs(d,Gs(d))}function Xn(d){return null==d?"":ts(d)}var fh=bc(function(d,f){if(lp(f)||Mr(f))fs(f,Sr(f),d);else for(var _ in f)ti.call(f,_)&&vd(d,_,f[_])}),fa=bc(function(d,f){fs(f,Gs(f),d)}),xp=bc(function(d,f,_,w){fs(f,Gs(f),d,w)}),sT=bc(function(d,f,_,w){fs(f,Sr(f),d,w)}),Ic=za(Gu),av=an(function(d,f){d=Jn(d);var _=-1,w=f.length,C=w>2?f[2]:B;for(C&&ps(f[0],f[1],C)&&(w=1);++_1),O}),fs(d,Rl(d),_),w&&(_=Ns(_,ui|ls|Ts,D0));for(var C=f.length;C--;)Zf(_,f[C]);return _}),_T=za(function(d,f){return null==d?{}:function ca(d,f){return b0(d,f,function(_,w){return Ll(d,w)})}(d,f)});function Px(d,f){if(null==d)return{};var _=hi(Rl(d),function(w){return[w]});return f=St(f),b0(d,_,function(w,C){return f(w,C[0])})}var Ox=Po(Sr),Lx=Po(Gs);function kd(d){return null==d?[]:Of(d,Sr(d))}var Bx=Sd(function(d,f,_){return f=f.toLowerCase(),d+(_?Ux(f):f)});function Ux(d){return Mp(Xn(d).toLowerCase())}function Vx(d){return(d=Xn(d))&&d.replace(mE,ku).replace(Uk,"")}var ST=Sd(function(d,f,_){return d+(_?"-":"")+f.toLowerCase()}),CT=Sd(function(d,f,_){return d+(_?" ":"")+f.toLowerCase()}),gO=QE("toLowerCase"),AT=Sd(function(d,f,_){return d+(_?"_":"")+f.toLowerCase()}),vO=Sd(function(d,f,_){return d+(_?" ":"")+Mp(f)}),RT=Sd(function(d,f,_){return d+(_?" ":"")+f.toUpperCase()}),Mp=QE("toUpperCase");function Xx(d,f,_){return d=Xn(d),(f=_?B:f)===B?function n0(q){return SE.test(q)}(d)?function Ro(q){return q.match(ME)||[]}(d):function Qb(q){return q.match(uE)||[]}(d):d.match(f)||[]}var qx=an(function(d,f){try{return bn(d,B,f)}catch(_){return Ex(_)?_:new Ne(_)}}),PT=za(function(d,f){return Eo(f,function(_){_=ha(_),la(d,_,mp(d[_],d))}),d});function Sp(d){return function(){return d}}var Yx=xc(),Kx=xc(!0);function Br(d){return d}function Zx(d){return l_("function"==typeof d?d:Ns(d,ui))}var xO=an(function(d,f){return function(_){return ju(_,d,f)}}),D=an(function(d,f){return function(_){return ju(d,_,f)}});function Ya(d,f,_){var w=Sr(f),C=Wf(f,w);null==_&&(!fi(f)||!C.length&&w.length)&&(_=f,f=d,d=this,C=Wf(f,Sr(f)));var O=!(fi(_)&&"chain"in _&&!_.chain),U=Wa(d);return Eo(C,function(G){var Y=f[G];d[G]=Y,U&&(d.prototype[G]=function(){var pe=this.__chain__;if(O||pe){var ye=d(this.__wrapped__);return(ye.__actions__=Fr(this.__actions__)).push({func:Y,args:arguments,thisArg:d}),ye.__chain__=pe,ye}return Y.apply(d,gl([this.value()],arguments))})}),d}function Cp(){}var UT=v_(hi),Ep=v_(hd),Ld=v_(_l);function Ap(d){return rh(d)?Gg(ha(d)):function Yf(d){return function(f){return gc(f,d)}}(d)}var mv=A0(),Tp=A0(!0);function Dp(){return[]}function mh(){return!1}var Jx=ep(function(d,f){return d+f},0),HT=Cd("ceil"),ew=ep(function(d,f){return d/f},1),tw=Cd("floor"),yv=ep(function(d,f){return d*f},1),nw=Cd("round"),XT=ep(function(d,f){return d-f},0);return T.after=function Ha(d,f){if("function"!=typeof f)throw new Or(Fn);return d=rn(d),function(){if(--d<1)return f.apply(this,arguments)}},T.ary=Id,T.assign=fh,T.assignIn=fa,T.assignInWith=xp,T.assignWith=sT,T.at=Ic,T.before=$_,T.bind=mp,T.bindAll=PT,T.bindKey=j_,T.castArray=function qA(){if(!arguments.length)return[];var d=arguments[0];return en(d)?d:[d]},T.chain=cx,T.chunk=function D_(d,f,_){f=(_?ps(d,f,_):f===B)?1:cr(rn(f),0);var w=null==d?0:d.length;if(!w||f<1)return[];for(var C=0,O=0,U=ae(qg(w/f));CC?0:C+_),(w=w===B||w>C?C:rn(w))<0&&(w+=C),w=_>w?0:Ol(w);_>>0)?(d=Xn(d))&&("string"==typeof f||null!=f&&!iv(f))&&!(f=ts(f))&&pd(d)?ge(ds(d),0,_):d.split(f,_):[]},T.spread=function bx(d,f){if("function"!=typeof d)throw new Or(Fn);return f=null==f?0:cr(rn(f),0),an(function(_){var w=_[f],C=ge(_,0,f);return w&&gl(C,w),bn(d,this,C)})},T.tail=function ix(d){var f=null==d?0:d.length;return f?ao(d,1,f):[]},T.take=function bA(d,f,_){return d&&d.length?ao(d,0,(f=_||f===B?1:rn(f))<0?0:f):[]},T.takeRight=function uO(d,f,_){var w=null==d?0:d.length;return w?ao(d,(f=w-(f=_||f===B?1:rn(f)))<0?0:f,w):[]},T.takeRightWhile=function up(d,f){return d&&d.length?Va(d,St(f,3),!1,!0):[]},T.takeWhile=function xA(d,f){return d&&d.length?Va(d,St(f,3)):[]},T.tap=function dx(d,f){return f(d),d},T.throttle=function Z_(d,f,_){var w=!0,C=!0;if("function"!=typeof d)throw new Or(Fn);return fi(_)&&(w="leading"in _?!!_.leading:w,C="trailing"in _?!!_.trailing:C),WA(d,f,{leading:w,maxWait:f,trailing:C})},T.thru=ch,T.toArray=ov,T.toPairs=Ox,T.toPairsIn=Lx,T.toPath=function VT(d){return en(d)?hi(d,ha):Hs(d)?[d]:Fr(H0(Xn(d)))},T.toPlainObject=Dc,T.transform=function yT(d,f,_){var w=en(d),C=w||Ga(d)||Pd(d);if(f=St(f,4),null==_){var O=d&&d.constructor;_=C?w?new O:[]:fi(d)&&Wa(O)?dr(bl(d)):{}}return(C?Eo:es)(d,function(U,G,Y){return f(_,U,G,Y)}),_},T.unary=function XA(d){return Id(d,1)},T.union=rx,T.unionBy=sx,T.unionWith=ox,T.uniq=function N_(d){return d&&d.length?Al(d):[]},T.uniqBy=function ax(d,f){return d&&d.length?Al(d,St(f,2)):[]},T.uniqWith=function hp(d,f){return f="function"==typeof f?f:B,d&&d.length?Al(d,B,f):[]},T.unset=function bT(d,f){return null==d||Zf(d,f)},T.unzip=Td,T.unzipWith=B_,T.update=function Fx(d,f,_){return null==d?d:Ua(d,f,Dl(_))},T.updateWith=function xT(d,f,_,w){return w="function"==typeof w?w:B,null==d?d:Ua(d,f,Dl(_),w)},T.values=kd,T.valuesIn=function wT(d){return null==d?[]:Of(d,Gs(d))},T.without=U_,T.words=Xx,T.wrap=function $n(d,f){return K_(Dl(f),d)},T.xor=V_,T.xorBy=z_,T.xorWith=lh,T.zip=wA,T.zipObject=function lx(d,f){return m_(d||[],f||[],vd)},T.zipObjectDeep=function MA(d,f){return m_(d||[],f||[],xd)},T.zipWith=SA,T.entries=Ox,T.entriesIn=Lx,T.extend=fa,T.extendWith=xp,Ya(T,T),T.add=Jx,T.attempt=qx,T.camelCase=Bx,T.capitalize=Ux,T.ceil=HT,T.clamp=function jt(d,f,_){return _===B&&(_=f,f=B),_!==B&&(_=(_=co(_))==_?_:0),f!==B&&(f=(f=co(f))==f?f:0),mc(co(d),f,_)},T.clone=function YA(d){return Ns(d,Ts)},T.cloneDeep=function xx(d){return Ns(d,ui|Ts)},T.cloneDeepWith=function KA(d,f){return Ns(d,ui|Ts,f="function"==typeof f?f:B)},T.cloneWith=function _p(d,f){return Ns(d,Ts,f="function"==typeof f?f:B)},T.conformsTo=function ZA(d,f){return null==f||i_(d,f,Sr(f))},T.deburr=Vx,T.defaultTo=function LT(d,f){return null==d||d!=d?f:d},T.divide=ew,T.endsWith=function zx(d,f,_){d=Xn(d),f=ts(f);var w=d.length,C=_=_===B?w:mc(rn(_),0,w);return(_-=f.length)>=0&&d.slice(_,C)==f},T.eq=ko,T.escape=function MT(d){return(d=Xn(d))&&kg.test(d)?d.replace(Pb,AE):d},T.escapeRegExp=function Hx(d){return(d=Xn(d))&&Nb.test(d)?d.replace(Sf,"\\$&"):d},T.every=function ux(d,f,_){var w=en(d)?hd:zE;return _&&ps(d,f,_)&&(f=B),w(d,St(f,3))},T.find=W_,T.findIndex=q0,T.findKey=function aT(d,f){return Ot(d,St(f,3),es)},T.findLast=hx,T.findLastIndex=Y0,T.findLastKey=function cv(d,f){return Ot(d,St(f,3),s_)},T.floor=tw,T.forEach=mx,T.forEachRight=gx,T.forIn=function Xa(d,f){return null==d?d:Lr(d,St(f,3),Gs)},T.forInRight=function lT(d,f){return null==d?d:f0(d,St(f,3),Gs)},T.forOwn=function cT(d,f){return d&&es(d,St(f,3))},T.forOwnRight=function dT(d,f){return d&&s_(d,St(f,3))},T.get=dv,T.gt=QA,T.gte=wx,T.has=function fT(d,f){return null!=d&&nA(d,f,o_)},T.hasIn=Ll,T.head=K0,T.identity=Br,T.includes=function IA(d,f,_,w){d=Mr(d)?d:kd(d),_=_&&!w?rn(_):0;var C=d.length;return _<0&&(_=cr(C+_,0)),ja(d)?_<=C&&d.indexOf(f,_)>-1:!!C&&vl(d,f,_)>-1},T.indexOf=function uA(d,f,_){var w=null==d?0:d.length;if(!w)return-1;var C=null==_?0:rn(_);return C<0&&(C=cr(w+C,0)),vl(d,f,C)},T.inRange=function j(d,f,_){return f=kl(f),_===B?(_=f,f=0):_=kl(_),function HE(d,f,_){return d>=br(f,_)&&d=-ka&&d<=ka},T.isSet=rv,T.isString=ja,T.isSymbol=Hs,T.isTypedArray=Pd,T.isUndefined=function nT(d){return d===B},T.isWeakMap=function sv(d){return ni(d)&&wr(d)==ad},T.isWeakSet=function iT(d){return ni(d)&&"[object WeakSet]"==ur(d)},T.join=function k_(d,f){return null==d?"":Zk.call(d,f)},T.kebabCase=ST,T.last=Us,T.lastIndexOf=function hA(d,f,_){var w=null==d?0:d.length;if(!w)return-1;var C=w;return _!==B&&(C=(C=rn(_))<0?cr(w+C,0):br(C,w-1)),f==f?function r0(q,oe,ae){for(var Ke=ae+1;Ke--;)if(q[Ke]===oe)return Ke;return Ke}(d,f,C):ac(d,Jb,C,!0)},T.lowerCase=CT,T.lowerFirst=gO,T.lt=Tx,T.lte=rT,T.max=function GT(d){return d&&d.length?Gf(d,Br,bd):B},T.maxBy=function WT(d,f){return d&&d.length?Gf(d,St(f,2),bd):B},T.mean=function Ws(d){return e0(d,Br)},T.meanBy=function $T(d,f){return e0(d,St(f,2))},T.min=function jT(d){return d&&d.length?Gf(d,Br,c_):B},T.minBy=function wO(d,f){return d&&d.length?Gf(d,St(f,2),c_):B},T.stubArray=Dp,T.stubFalse=mh,T.stubObject=function gv(){return{}},T.stubString=function _v(){return""},T.stubTrue=function Qx(){return!0},T.multiply=yv,T.nth=function O_(d,f){return d&&d.length?u_(d,rn(f)):B},T.noConflict=function NT(){return vr._===this&&(vr._=gd),this},T.noop=Cp,T.now=Ac,T.pad=function Gx(d,f,_){d=Xn(d);var w=(f=rn(f))?lc(d):0;if(!f||w>=f)return d;var C=(f-w)/2;return tp(Yg(C),_)+d+tp(qg(C),_)},T.padEnd=function Wx(d,f,_){d=Xn(d);var w=(f=rn(f))?lc(d):0;return f&&wf){var w=d;d=f,f=w}if(_||d%1||f%1){var C=RE();return br(d+C*(f-d+Yt("1e-"+((C+"").length-1))),f)}return Qu(d,f)},T.reduce=function OA(d,f,_){var w=en(d)?Rf:To,C=arguments.length<3;return w(d,St(f,4),_,C,Ba)},T.reduceRight=function LA(d,f,_){var w=en(d)?Ru:To,C=arguments.length<3;return w(d,St(f,4),_,C,Hf)},T.repeat=function hv(d,f,_){return f=(_?ps(d,f,_):f===B)?1:rn(f),p_(Xn(d),f)},T.replace=function fv(){var d=arguments,f=Xn(d[0]);return d.length<3?f:f.replace(d[1],d[2])},T.result=function Oo(d,f,_){var w=-1,C=(f=yc(f,d)).length;for(C||(C=1,d=B);++wka)return[];var _=Jo,w=br(d,Jo);f=St(f),d-=Jo;for(var C=Vn(w,f);++_=O)return d;var G=_-lc(w);if(G<1)return w;var Y=U?ge(U,0,G).join(""):d.slice(0,G);if(C===B)return Y+w;if(U&&(G+=Y.length-G),iv(C)){if(d.slice(G).search(C)){var pe,ye=Y;for(C.global||(C=yl(C.source,Xn(ta.exec(C))+"g")),C.lastIndex=0;pe=C.exec(ye);)var Te=pe.index;Y=Y.slice(0,Te===B?G:Te)}}else if(d.indexOf(ts(C),G)!=G){var $e=Y.lastIndexOf(C);$e>-1&&(Y=Y.slice(0,$e))}return Y+w},T.unescape=function wp(d){return(d=Xn(d))&&Ok.test(d)?d.replace(Rb,Qe):d},T.uniqueId=function zT(d){var f=++Wg;return Xn(d)+f},T.upperCase=RT,T.upperFirst=Mp,T.each=mx,T.eachRight=gx,T.first=K0,Ya(T,function(){var d={};return es(T,function(f,_){ti.call(T.prototype,_)||(d[_]=f)}),d}(),{chain:!1}),T.VERSION="4.17.21",Eo(["bind","bindKey","curry","curryRight","partial","partialRight"],function(d){T[d].placeholder=T}),Eo(["drop","take"],function(d,f){nn.prototype[d]=function(_){_=_===B?1:cr(rn(_),0);var w=this.__filtered__&&!f?new nn(this):this.clone();return w.__filtered__?w.__takeCount__=br(_,w.__takeCount__):w.__views__.push({size:br(_,Jo),type:d+(w.__dir__<0?"Right":"")}),w},nn.prototype[d+"Right"]=function(_){return this.reverse()[d](_).reverse()}}),Eo(["filter","map","takeWhile"],function(d,f){var _=f+1,w=1==_||3==_;nn.prototype[d]=function(C){var O=this.clone();return O.__iteratees__.push({iteratee:St(C,3),type:_}),O.__filtered__=O.__filtered__||w,O}}),Eo(["head","last"],function(d,f){var _="take"+(f?"Right":"");nn.prototype[d]=function(){return this[_](1).value()[0]}}),Eo(["initial","tail"],function(d,f){var _="drop"+(f?"":"Right");nn.prototype[d]=function(){return this.__filtered__?new nn(this):this[_](1)}}),nn.prototype.compact=function(){return this.filter(Br)},nn.prototype.find=function(d){return this.filter(d).head()},nn.prototype.findLast=function(d){return this.reverse().find(d)},nn.prototype.invokeMap=an(function(d,f){return"function"==typeof d?new nn(this):this.map(function(_){return ju(_,d,f)})}),nn.prototype.reject=function(d){return this.filter(dh(St(d)))},nn.prototype.slice=function(d,f){d=rn(d);var _=this;return _.__filtered__&&(d>0||f<0)?new nn(_):(d<0?_=_.takeRight(-d):d&&(_=_.drop(d)),f!==B&&(_=(f=rn(f))<0?_.dropRight(-f):_.take(f-d)),_)},nn.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},nn.prototype.toArray=function(){return this.take(Jo)},es(nn.prototype,function(d,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),C=T[w?"take"+("last"==f?"Right":""):f],O=w||/^find/.test(f);C&&(T.prototype[f]=function(){var U=this.__wrapped__,G=w?[1]:arguments,Y=U instanceof nn,pe=G[0],ye=Y||en(U),Te=function(fn){var Rn=C.apply(T,gl([fn],G));return w&&$e?Rn[0]:Rn};ye&&_&&"function"==typeof pe&&1!=pe.length&&(Y=ye=!1);var $e=this.__chain__,Tt=O&&!$e,ln=Y&&!this.__actions__.length;if(!O&&ye){U=ln?U:new nn(this);var Dt=d.apply(U,G);return Dt.__actions__.push({func:ch,args:[Te],thisArg:B}),new Ls(Dt,$e)}return Tt&&ln?d.apply(this,G):(Dt=this.thru(Te),Tt?w?Dt.value()[0]:Dt.value():Dt)})}),Eo(["pop","push","shift","sort","splice","unshift"],function(d){var f=Oa[d],_=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",w=/^(?:pop|shift)$/.test(d);T.prototype[d]=function(){var C=arguments;if(w&&!this.__chain__){var O=this.value();return f.apply(en(O)?O:[],C)}return this[_](function(U){return f.apply(en(U)?U:[],C)})}}),es(nn.prototype,function(d,f){var _=T[f];if(_){var w=_.name+"";ti.call(fc,w)||(fc[w]=[]),fc[w].push({name:f,func:_})}}),fc[g_(B,ar).name]=[{name:"wrapper",func:B}],nn.prototype.clone=function hs(){var d=new nn(this.__wrapped__);return d.__actions__=Fr(this.__actions__),d.__dir__=this.__dir__,d.__filtered__=this.__filtered__,d.__iteratees__=Fr(this.__iteratees__),d.__takeCount__=this.__takeCount__,d.__views__=Fr(this.__views__),d},nn.prototype.reverse=function OE(){if(this.__filtered__){var d=new nn(this);d.__dir__=-1,d.__filtered__=!0}else(d=this.clone()).__dir__*=-1;return d},nn.prototype.value=function Uf(){var d=this.__wrapped__.value(),f=this.__dir__,_=en(d),w=f<0,C=_?d.length:0,O=function tA(d,f,_){for(var w=-1,C=_.length;++w=this.__values__.length;return{done:d,value:d?B:this.__values__[this.__index__++]}},T.prototype.plant=function hO(d){for(var f,_=this;_ instanceof Bf;){var w=T_(_);w.__index__=0,w.__values__=B,f?C.__wrapped__=w:f=w;var C=w;_=_.__wrapped__}return C.__wrapped__=d,f},T.prototype.reverse=function AA(){var d=this.__wrapped__;if(d instanceof nn){var f=d;return this.__actions__.length&&(f=new nn(this)),(f=f.reverse()).__actions__.push({func:ch,args:[dp],thisArg:B}),new Ls(f,this.__chain__)}return this.thru(dp)},T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=function G_(){return vc(this.__wrapped__,this.__actions__)},T.prototype.first=T.prototype.head,Fu&&(T.prototype[Fu]=function EA(){return this}),T}();vr._=tr,(Qt=function(){return tr}.call(Es,qr,Es,wo))!==B&&(wo.exports=Qt)}.call(this)},738:function(wo){var Es;wo.exports=((Es=function(){function qr(di){return Rr.appendChild(di.dom),di}function Qt(di){for(var ui=0;uiun+1e3&&(dl.update(1e3*Fn/(di-un),100),un=di,Fn=0,As)){var ui=performance.memory;As.update(ui.usedJSHeapSize/1048576,ui.jsHeapSizeLimit/1048576)}return di},update:function(){Yr=this.end()},domElement:Rr,setMode:Qt}}).Panel=function(qr,Qt,B){var Rr=1/0,Yr=0,un=Math.round,Fn=un(window.devicePixelRatio||1),dl=80*Fn,Ia=48*Fn,As=3*Fn,di=2*Fn,ui=3*Fn,ls=15*Fn,Ts=74*Fn,Ds=30*Fn,Mo=document.createElement("canvas");Mo.width=dl,Mo.height=Ia,Mo.style.cssText="width:80px;height:48px";var Tn=Mo.getContext("2d");return Tn.font="bold "+9*Fn+"px Helvetica,Arial,sans-serif",Tn.textBaseline="top",Tn.fillStyle=B,Tn.fillRect(0,0,dl,Ia),Tn.fillStyle=Qt,Tn.fillText(qr,As,di),Tn.fillRect(ui,ls,Ts,Ds),Tn.fillStyle=B,Tn.globalAlpha=.9,Tn.fillRect(ui,ls,Ts,Ds),{dom:Mo,update:function(ar,ic){Rr=Math.min(Rr,ar),Yr=Math.max(Yr,ar),Tn.fillStyle=B,Tn.globalAlpha=1,Tn.fillRect(0,0,dl,ls),Tn.fillStyle=Qt,Tn.fillText(un(ar)+" "+qr+" ("+un(Rr)+"-"+un(Yr)+")",As,di),Tn.drawImage(Mo,ui+Fn,ls,Ts-Fn,Ds,ui,ls,Ts-Fn,Ds),Tn.fillRect(ui+Ts-Fn,ls,Fn,Ds),Tn.fillStyle=B,Tn.globalAlpha=.9,Tn.fillRect(ui+Ts-Fn,ls,Fn,un((1-ar/ic)*Ds))}}},Es)}},wo=>{wo(wo.s=980)}]); \ No newline at end of file +(self.webpackChunkgui=self.webpackChunkgui||[]).push([[179],{980:(wo,Es,qr)=>{"use strict";function Qt(n){return"function"==typeof n}function B(n){const t=n(i=>{Error.call(i),i.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}const Rr=B(n=>function(t){n(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((i,r)=>`${r+1}) ${i.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t});function Yr(n,e){if(n){const t=n.indexOf(e);0<=t&&n.splice(t,1)}}class un{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;const{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(const s of t)s.remove(this);else t.remove(this);const{initialTeardown:i}=this;if(Qt(i))try{i()}catch(s){e=s instanceof Rr?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Ia(s)}catch(o){e=e??[],o instanceof Rr?e=[...e,...o.errors]:e.push(o)}}if(e)throw new Rr(e)}}add(e){var t;if(e&&e!==this)if(this.closed)Ia(e);else{if(e instanceof un){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(t=this._finalizers)&&void 0!==t?t:[]).push(e)}}_hasParent(e){const{_parentage:t}=this;return t===e||Array.isArray(t)&&t.includes(e)}_addParent(e){const{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e}_removeParent(e){const{_parentage:t}=this;t===e?this._parentage=null:Array.isArray(t)&&Yr(t,e)}remove(e){const{_finalizers:t}=this;t&&Yr(t,e),e instanceof un&&e._removeParent(this)}}un.EMPTY=(()=>{const n=new un;return n.closed=!0,n})();const Fn=un.EMPTY;function dl(n){return n instanceof un||n&&"closed"in n&&Qt(n.remove)&&Qt(n.add)&&Qt(n.unsubscribe)}function Ia(n){Qt(n)?n():n.unsubscribe()}const As={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},di={setTimeout(n,e,...t){const{delegate:i}=di;return i?.setTimeout?i.setTimeout(n,e,...t):setTimeout(n,e,...t)},clearTimeout(n){const{delegate:e}=di;return(e?.clearTimeout||clearTimeout)(n)},delegate:void 0};function ui(n){di.setTimeout(()=>{const{onUnhandledError:e}=As;if(!e)throw n;e(n)})}function ls(){}const Ts=Tn("C",void 0,void 0);function Tn(n,e,t){return{kind:n,value:e,error:t}}let ar=null;function ic(n){if(As.useDeprecatedSynchronousErrorHandling){const e=!ar;if(e&&(ar={errorThrown:!1,error:null}),n(),e){const{errorThrown:t,error:i}=ar;if(ar=null,t)throw i}}else n()}class ul extends un{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,dl(e)&&e.add(this)):this.destination=KC}static create(e,t,i){return new Qo(e,t,i)}next(e){this.isStopped?Sg(function Mo(n){return Tn("N",n,void 0)}(e),this):this._next(e)}error(e){this.isStopped?Sg(function Ds(n){return Tn("E",void 0,n)}(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?Sg(Ts,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()}}}const Zo=Function.prototype.bind;function hl(n,e){return Zo.call(n,e)}class Ra{constructor(e){this.partialObserver=e}next(e){const{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(i){rd(i)}}error(e){const{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(i){rd(i)}else rd(e)}complete(){const{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){rd(t)}}}class Qo extends ul{constructor(e,t,i){let r;if(super(),Qt(e)||!e)r={next:e??void 0,error:t??void 0,complete:i??void 0};else{let s;this&&As.useDeprecatedNextContext?(s=Object.create(e),s.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&hl(e.next,s),error:e.error&&hl(e.error,s),complete:e.complete&&hl(e.complete,s)}):r=e}this.destination=new Ra(r)}}function rd(n){As.useDeprecatedSynchronousErrorHandling?function Ko(n){As.useDeprecatedSynchronousErrorHandling&&ar&&(ar.errorThrown=!0,ar.error=n)}(n):ui(n)}function Sg(n,e){const{onStoppedNotification:t}=As;t&&di.setTimeout(()=>t(n,e))}const KC={closed:!0,next:ls,error:function YC(n){throw n},complete:ls},Cg="function"==typeof Symbol&&Symbol.observable||"@@observable";function Pa(n){return n}function Ab(n){return 0===n.length?Pa:1===n.length?n[0]:function(t){return n.reduce((i,r)=>r(i),t)}}let Sn=(()=>{class n{constructor(t){t&&(this._subscribe=t)}lift(t){const i=new n;return i.source=this,i.operator=t,i}subscribe(t,i,r){const s=function vf(n){return n&&n instanceof ul||function QC(n){return n&&Qt(n.next)&&Qt(n.error)&&Qt(n.complete)}(n)&&dl(n)}(t)?t:new Qo(t,i,r);return ic(()=>{const{operator:o,source:a}=this;s.add(o?o.call(s,a):a?this._subscribe(s):this._trySubscribe(s))}),s}_trySubscribe(t){try{return this._subscribe(t)}catch(i){t.error(i)}}forEach(t,i){return new(i=ka(i))((r,s)=>{const o=new Qo({next:a=>{try{t(a)}catch(l){s(l),o.unsubscribe()}},error:s,complete:r});this.subscribe(o)})}_subscribe(t){var i;return null===(i=this.source)||void 0===i?void 0:i.subscribe(t)}[Cg](){return this}pipe(...t){return Ab(t)(this)}toPromise(t){return new(t=ka(t))((i,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>i(s))})}}return n.create=e=>new n(e),n})();function ka(n){var e;return null!==(e=n??As.Promise)&&void 0!==e?e:Promise}const Jo=B(n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Ue=(()=>{class n extends Sn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){const i=new Tb(this,this);return i.operator=t,i}_throwIfClosed(){if(this.closed)throw new Jo}next(t){ic(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const i of this.currentObservers)i.next(t)}})}error(t){ic(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;const{observers:i}=this;for(;i.length;)i.shift().error(t)}})}complete(){ic(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{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(null===(t=this.observers)||void 0===t?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){const{hasError:i,isStopped:r,observers:s}=this;return i||r?Fn:(this.currentObservers=null,s.push(t),new un(()=>{this.currentObservers=null,Yr(s,t)}))}_checkFinalizedStatuses(t){const{hasError:i,thrownError:r,isStopped:s}=this;i?t.error(r):s&&t.complete()}asObservable(){const t=new Sn;return t.source=this,t}}return n.create=(e,t)=>new Tb(e,t),n})();class Tb extends Ue{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,i;null===(i=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===i||i.call(t,e)}error(e){var t,i;null===(i=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===i||i.call(t,e)}complete(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)}_subscribe(e){var t,i;return null!==(i=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==i?i:Fn}}function Db(n){return Qt(n?.lift)}function Gn(n){return e=>{if(Db(e))return e.lift(function(t){try{return n(t,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function Un(n,e,t,i,r){return new JC(n,e,t,i,r)}class JC extends ul{constructor(e,t,i,r,s,o){super(e),this.onFinalize=s,this.shouldUnsubscribe=o,this._next=t?function(a){try{t(a)}catch(l){e.error(l)}}:super._next,this._error=r?function(a){try{r(a)}catch(l){e.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:t}=this;super.unsubscribe(),!t&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}}}function Ye(n,e){return Gn((t,i)=>{let r=0;t.subscribe(Un(i,s=>{i.next(n.call(e,s,r++))}))})}function ea(n){return this instanceof ea?(this.v=n,this):new ea(n)}function Mf(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,e=n[Symbol.asyncIterator];return e?e.call(n):(n=function Eg(n){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&n[e],i=0;if(t)return t.call(n);if(n&&"number"==typeof n.length)return{next:function(){return n&&i>=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(n),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(s){t[s]=n[s]&&function(o){return new Promise(function(a,l){!function r(s,o,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},o)}(a,l,(o=n[s](o)).done,o.value)})}}}"function"==typeof SuppressedError&&SuppressedError;const kg=n=>n&&"number"==typeof n.length&&"function"!=typeof n;function kb(n){return Qt(n?.then)}function Ob(n){return Qt(n[Cg])}function Og(n){return Symbol.asyncIterator&&Qt(n?.[Symbol.asyncIterator])}function Lb(n){return new TypeError(`You provided ${null!==n&&"object"==typeof n?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const Fb=function aE(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Sf(n){return Qt(n?.[Fb])}function Nb(n){return function wf(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=t.apply(n,e||[]),s=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(p){i[p]&&(r[p]=function(m){return new Promise(function(g,b){s.push([p,m,g,b])>1||a(p,m)})})}function a(p,m){try{!function l(p){p.value instanceof ea?Promise.resolve(p.value.v).then(c,u):h(s[0][2],p)}(i[p](m))}catch(g){h(s[0][3],g)}}function c(p){a("next",p)}function u(p){a("throw",p)}function h(p,m){p(m),s.shift(),s.length&&a(s[0][0],s[0][1])}}(this,arguments,function*(){const t=n.getReader();try{for(;;){const{value:i,done:r}=yield ea(t.read());if(r)return yield ea(void 0);yield yield ea(i)}}finally{t.releaseLock()}})}function Cf(n){return Qt(n?.getReader)}function lr(n){if(n instanceof Sn)return n;if(null!=n){if(Ob(n))return function lE(n){return new Sn(e=>{const t=n[Cg]();if(Qt(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(n);if(kg(n))return function cE(n){return new Sn(e=>{for(let t=0;t{n.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,ui)})}(n);if(Og(n))return Bb(n);if(Sf(n))return function uE(n){return new Sn(e=>{for(const t of n)if(e.next(t),e.closed)return;e.complete()})}(n);if(Cf(n))return function hE(n){return Bb(Nb(n))}(n)}throw Lb(n)}function Bb(n){return new Sn(e=>{(function fE(n,e){var t,i,r,s;return function od(n,e,t,i){return new(t||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})}(this,void 0,void 0,function*(){try{for(t=Mf(n);!(i=yield t.next()).done;)if(e.next(i.value),e.closed)return}catch(o){r={error:o}}finally{try{i&&!i.done&&(s=t.return)&&(yield s.call(t))}finally{if(r)throw r.error}}e.complete()})})(n,e).catch(t=>e.error(t))})}function ta(n,e,t,i=0,r=!1){const s=e.schedule(function(){t(),r?n.add(this.schedule(null,i)):this.unsubscribe()},i);if(n.add(s),!r)return s}function er(n,e,t=1/0){return Qt(e)?er((i,r)=>Ye((s,o)=>e(i,s,r,o))(lr(n(i,r))),t):("number"==typeof e&&(t=e),Gn((i,r)=>function pE(n,e,t,i,r,s,o,a){const l=[];let c=0,u=0,h=!1;const p=()=>{h&&!l.length&&!c&&e.complete()},m=b=>c{s&&e.next(b),c++;let y=!1;lr(t(b,u++)).subscribe(Un(e,v=>{r?.(v),s?m(v):e.next(v)},()=>{y=!0},void 0,()=>{if(y)try{for(c--;l.length&&cg(v)):g(v)}p()}catch(v){e.error(v)}}))};return n.subscribe(Un(e,m,()=>{h=!0,p()})),()=>{a?.()}}(i,r,n,t)))}function cd(n=1/0){return er(Pa,n)}const Is=new Sn(n=>n.complete());function Cu(n){return n&&Qt(n.schedule)}function Lg(n){return n[n.length-1]}function Eu(n){return Qt(Lg(n))?n.pop():void 0}function Au(n){return Cu(Lg(n))?n.pop():void 0}function Ub(n,e=0){return Gn((t,i)=>{t.subscribe(Un(i,r=>ta(i,n,()=>i.next(r),e),()=>ta(i,n,()=>i.complete(),e),r=>ta(i,n,()=>i.error(r),e)))})}function Fg(n,e=0){return Gn((t,i)=>{i.add(n.schedule(()=>t.subscribe(i),e))})}function Hb(n,e){if(!n)throw new Error("Iterable cannot be null");return new Sn(t=>{ta(t,e,()=>{const i=n[Symbol.asyncIterator]();ta(t,e,()=>{i.next().then(r=>{r.done?t.complete():t.next(r.value)})},0,!0)})})}function Ri(n,e){return e?function Gb(n,e){if(null!=n){if(Ob(n))return function Vb(n,e){return lr(n).pipe(Fg(e),Ub(e))}(n,e);if(kg(n))return function _E(n,e){return new Sn(t=>{let i=0;return e.schedule(function(){i===n.length?t.complete():(t.next(n[i++]),t.closed||this.schedule())})})}(n,e);if(kb(n))return function zb(n,e){return lr(n).pipe(Fg(e),Ub(e))}(n,e);if(Og(n))return Hb(n,e);if(Sf(n))return function vE(n,e){return new Sn(t=>{let i;return ta(t,e,()=>{i=n[Fb](),ta(t,e,()=>{let r,s;try{({value:r,done:s}=i.next())}catch(o){return void t.error(o)}s?t.complete():t.next(r)},0,!0)}),()=>Qt(i?.return)&&i.return()})}(n,e);if(Cf(n))return function yE(n,e){return Hb(Nb(n),e)}(n,e)}throw Lb(n)}(n,e):lr(n)}function cs(...n){const e=Au(n),t=function gE(n,e){return"number"==typeof Lg(n)?n.pop():e}(n,1/0),i=n;return i.length?1===i.length?lr(i[0]):cd(t)(Ri(i,e)):Is}function Tu(n={}){const{connector:e=(()=>new Ue),resetOnError:t=!0,resetOnComplete:i=!0,resetOnRefCountZero:r=!0}=n;return s=>{let o,a,l,c=0,u=!1,h=!1;const p=()=>{a?.unsubscribe(),a=void 0},m=()=>{p(),o=l=void 0,u=h=!1},g=()=>{const b=o;m(),b?.unsubscribe()};return Gn((b,y)=>{c++,!h&&!u&&p();const v=l=l??e();y.add(()=>{c--,0===c&&!h&&!u&&(a=Ng(g,r))}),v.subscribe(y),!o&&c>0&&(o=new Qo({next:M=>v.next(M),error:M=>{h=!0,p(),a=Ng(m,t,M),v.error(M)},complete:()=>{u=!0,p(),a=Ng(m,i),v.complete()}}),lr(b).subscribe(o))})(s)}}function Ng(n,e,...t){if(!0===e)return void n();if(!1===e)return;const i=new Qo({next:()=>{i.unsubscribe(),n()}});return lr(e(...t)).subscribe(i)}function Zn(n){for(let e in n)if(n[e]===Zn)return e;throw Error("Could not find renamed property on target object.")}function dd(n,e){for(const t in e)e.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&(n[t]=e[t])}function ri(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(ri).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const e=n.toString();if(null==e)return""+e;const t=e.indexOf("\n");return-1===t?e:e.substring(0,t)}function Bg(n,e){return null==n||""===n?null===e?"":e:null==e||""===e?n:n+" "+e}const Wb=Zn({__forward_ref__:Zn});function Qn(n){return n.__forward_ref__=Qn,n.toString=function(){return ri(this())},n}function Mt(n){return Ug(n)?n():n}function Ug(n){return"function"==typeof n&&n.hasOwnProperty(Wb)&&n.__forward_ref__===Qn}function Ef(n){return n&&!!n.\u0275providers}const ud="https://g.co/ng/security#xss";class fe extends Error{constructor(e,t){super(Du(e,t)),this.code=e}}function Du(n,e){return`NG0${Math.abs(n)}${e?": "+e.trim():""}`}function Wt(n){return"string"==typeof n?n:null==n?"":String(n)}function Iu(n,e){throw new fe(-201,!1)}function io(n,e){null==n&&function bt(n,e,t,i){throw new Error(`ASSERTION ERROR: ${n}`+(null==i?"":` [Expected=> ${t} ${i} ${e} <=Actual]`))}(e,n,null,"!=")}function ke(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function Yt(n){return{providers:n.providers||[],imports:n.imports||[]}}function Af(n){return Kb(n,ml)||Kb(n,Df)}function Kb(n,e){return n.hasOwnProperty(e)?n[e]:null}function Vg(n){return n&&(n.hasOwnProperty(Tf)||n.hasOwnProperty(ro))?n[Tf]:null}const ml=Zn({\u0275prov:Zn}),Tf=Zn({\u0275inj:Zn}),Df=Zn({ngInjectableDef:Zn}),ro=Zn({ngInjectorDef:Zn});var At=(()=>((At=At||{})[At.Default=0]="Default",At[At.Host=1]="Host",At[At.Self=2]="Self",At[At.SkipSelf=4]="SkipSelf",At[At.Optional=8]="Optional",At))();let If;function Ps(n){const e=If;return If=n,e}function zg(n,e,t){const i=Af(n);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:t&At.Optional?null:void 0!==e?e:void Iu(ri(n))}const bn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),hd={},na="__NG_DI_FLAG__",oc="ngTempTokenPath",Hg="ngTokenPath",hi=/\n/gm,gl="\u0275",Rf="__source";let Ru;function _l(n){const e=Ru;return Ru=n,e}function EE(n,e=At.Default){if(void 0===Ru)throw new fe(-203,!1);return null===Ru?zg(n,void 0,e):Ru.get(n,e&At.Optional?null:void 0,e)}function Q(n,e=At.Default){return(function Zb(){return If}()||EE)(Mt(n),e)}function Ot(n,e=At.Default){return Q(n,ac(e))}function ac(n){return typeof n>"u"||"number"==typeof n?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function vl(n){const e=[];for(let t=0;t((To=To||{})[To.OnPush=0]="OnPush",To[To.Default=1]="Default",To))(),Do=(()=>{return(n=Do||(Do={}))[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",Do;var n})();const Io={},Vn=[],Pf=Zn({\u0275cmp:Zn}),kf=Zn({\u0275dir:Zn}),Kr=Zn({\u0275pipe:Zn}),Of=Zn({\u0275mod:Zn}),ks=Zn({\u0275fac:Zn}),fd=Zn({__NG_ELEMENT_ID__:Zn});let t0=0;function ht(n){return Ao(()=>{const e=r0(n),t={...e,decls:n.decls,vars:n.vars,template:n.template,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,onPush:n.changeDetection===To.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&n.dependencies||null,getStandaloneInjector:null,data:n.data||{},encapsulation:n.encapsulation||Do.Emulated,id:"c"+t0++,styles:n.styles||Vn,_:null,schemas:n.schemas||null,tView:null};lc(t);const i=n.dependencies;return t.directiveDefs=ds(i,!1),t.pipeDefs=ds(i,!0),t})}function ku(n,e,t){const i=n.\u0275cmp;i.directiveDefs=ds(e,!1),i.pipeDefs=ds(t,!0)}function AE(n){return Wn(n)||wi(n)}function TE(n){return null!==n}function Jt(n){return Ao(()=>({type:n.type,bootstrap:n.bootstrap||Vn,declarations:n.declarations||Vn,imports:n.imports||Vn,exports:n.exports||Vn,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null}))}function n0(n,e){if(null==n)return Io;const t={};for(const i in n)if(n.hasOwnProperty(i)){let r=n[i],s=r;Array.isArray(r)&&(s=r[1],r=r[0]),t[r]=i,e&&(e[r]=s)}return t}function Ae(n){return Ao(()=>{const e=r0(n);return lc(e),e})}function Pr(n){return{type:n.type,name:n.name,factory:null,pure:!1!==n.pure,standalone:!0===n.standalone,onDestroy:n.type.prototype.ngOnDestroy||null}}function Wn(n){return n[Pf]||null}function wi(n){return n[kf]||null}function yr(n){return n[Kr]||null}function Os(n,e){const t=n[Of]||null;if(!t&&!0===e)throw new Error(`Type ${ri(n)} does not have '\u0275mod' property.`);return t}function r0(n){const e={};return{type:n.type,providersResolver:null,factory:null,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:e,exportAs:n.exportAs||null,standalone:!0===n.standalone,selectors:n.selectors||Vn,viewQuery:n.viewQuery||null,features:n.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:n0(n.inputs,e),outputs:n0(n.outputs)}}function lc(n){n.features?.forEach(e=>e(n))}function ds(n,e){if(!n)return null;const t=e?yr:AE;return()=>("function"==typeof n?n():n).map(i=>t(i)).filter(TE)}const ia=0,Qe=1,tn=2,Ti=3,Ro=4,cc=5,tr=6,q=7,oe=8,ae=9,Ke=10,Ne=11,zn=12,Mi=13,Jn=14,yl=15,kr=16,Or=17,Oa=18,ra=19,sa=20,Ou=21,ei=22,Wg=1,$g=2,dc=7,Lf=8,gd=9,Zr=10;function Vi(n){return Array.isArray(n)&&"object"==typeof n[Wg]}function us(n){return Array.isArray(n)&&!0===n[Wg]}function Ff(n){return 0!=(4&n.flags)}function bl(n){return n.componentOffset>-1}function Lu(n){return 1==(1&n.flags)}function so(n){return!!n.template}function Nf(n){return 0!=(256&n[tn])}function La(n,e){return n.hasOwnProperty(ks)?n[ks]:null}class Nu{constructor(e,t,i){this.previousValue=e,this.currentValue=t,this.firstChange=i}isFirstChange(){return this.firstChange}}function zi(){return hc}function hc(n){return n.type.prototype.ngOnChanges&&(n.setInput=Uu),Bu}function Bu(){const n=fc(this),e=n?.current;if(e){const t=n.previous;if(t===Io)n.previous=e;else for(let i in e)t[i]=e[i];n.current=null,this.ngOnChanges(e)}}function Uu(n,e,t,i){const r=this.declaredInputs[t],s=fc(n)||function PE(n,e){return n[Vu]=e}(n,{previous:Io,current:null}),o=s.current||(s.current={}),a=s.previous,l=a[r];o[r]=new Nu(l&&l.currentValue,e,a===Io),n[i]=e}zi.ngInherit=!0;const Vu="__ngSimpleChanges__";function fc(n){return n[Vu]||null}const oo=function(n,e,t){},a0="svg";function Pi(n){for(;Array.isArray(n);)n=n[ia];return n}function T(n,e){return Pi(e[n])}function dr(n,e){return Pi(e[n.index])}function Ls(n,e){return n.data[e]}function nn(n,e){return n[e]}function hs(n,e){const t=e[n];return Vi(t)?t:t[ia]}function Uf(n){return 64==(64&n[tn])}function xl(n,e){return null==e?null:n[e]}function c0(n){n[Oa]=0}function Zg(n,e){n[cc]+=e;let t=n,i=n[Ti];for(;null!==i&&(1===e&&1===t[cc]||-1===e&&0===t[cc]);)i[cc]+=e,t=i,i=i[Ti]}const $t={lFrame:r_(null),bindingsEnabled:!0};function u0(){return $t.bindingsEnabled}function Ee(){return $t.lFrame.lView}function Nn(){return $t.lFrame.tView}function Dn(n){return $t.lFrame.contextLView=n,n[oe]}function In(n){return $t.lFrame.contextLView=null,n}function xr(){let n=Ml();for(;null!==n&&64===n.type;)n=n.parent;return n}function Ml(){return $t.lFrame.currentTNode}function oa(n,e){const t=$t.lFrame;t.currentTNode=n,t.isParent=e}function Fs(){return $t.lFrame.isParent}function Qg(){$t.lFrame.isParent=!1}function Qr(){const n=$t.lFrame;let e=n.bindingRootIndex;return-1===e&&(e=n.bindingRootIndex=n.tView.bindingStartIndex),e}function _d(){return $t.lFrame.bindingIndex++}function Na(n){const e=$t.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+n,t}function Vf(n,e){const t=$t.lFrame;t.bindingIndex=t.bindingRootIndex=n,zf(e)}function zf(n){$t.lFrame.currentDirectiveIndex=n}function t_(n){const e=$t.lFrame.currentDirectiveIndex;return-1===e?null:n[e]}function la(){return $t.lFrame.currentQueryIndex}function Gu(n){$t.lFrame.currentQueryIndex=n}function mc(n){const e=n[Qe];return 2===e.type?e.declTNode:1===e.type?n[tr]:null}function Ns(n,e,t){if(t&At.SkipSelf){let r=e,s=n;for(;!(r=r.parent,null!==r||t&At.Host||(r=mc(s),null===r||(s=s[yl],10&r.type))););if(null===r)return!1;e=r,n=s}const i=$t.lFrame=i_();return i.currentTNode=e,i.lView=n,!0}function n_(n){const e=i_(),t=n[Qe];$t.lFrame=e,e.currentTNode=t.firstChild,e.lView=n,e.tView=t,e.contextLView=n,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function i_(){const n=$t.lFrame,e=null===n?null:n.child;return null===e?r_(n):e}function r_(n){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return null!==n&&(n.child=e),e}function yd(){const n=$t.lFrame;return $t.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const Ba=yd;function Hf(){const n=yd();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function Jr(){return $t.lFrame.selectedIndex}function Sl(n){$t.lFrame.selectedIndex=n}function hn(){const n=$t.lFrame;return Ls(n.tView,n.selectedIndex)}function Lr(){$t.lFrame.currentNamespace=a0}function es(){!function s_(){$t.lFrame.currentNamespace=null}()}function Wu(n,e){for(let t=e.directiveStart,i=e.directiveEnd;t=i)break}else e[l]<0&&(n[Oa]+=65536),(a>11>16&&(3&n[tn])===e){n[tn]+=2048,oo(4,a,s);try{s.call(a)}finally{oo(5,a,s)}}}else{oo(4,a,s);try{s.call(a)}finally{oo(5,a,s)}}}const Cl=-1;class $u{constructor(e,t,i){this.factory=e,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=i}}function $f(n,e,t){let i=0;for(;ie){o=s-1;break}}}for(;s>16}(n),i=e;for(;t>0;)i=i[yl],t--;return i}let qf=!0;function Ku(n){const e=qf;return qf=n,e}const v0=255,u_=5;let y0=0;const ca={};function Yf(n,e){const t=h_(n,e);if(-1!==t)return t;const i=e[Qe];i.firstCreatePass&&(n.injectorIndex=e.length,Zu(i.data,n),Zu(e,null),Zu(i.blueprint,null));const r=Qu(n,e),s=n.injectorIndex;if(jf(r)){const o=Xf(r),a=Yu(r,e),l=a[Qe].data;for(let c=0;c<8;c++)e[s+c]=a[o+c]|l[o+c]}return e[s+8]=r,s}function Zu(n,e){n.push(0,0,0,0,0,0,0,0,e)}function h_(n,e){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===e[n.injectorIndex+8]?-1:n.injectorIndex}function Qu(n,e){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let t=0,i=null,r=e;for(;null!==r;){if(i=Zf(r),null===i)return Cl;if(t++,r=r[yl],-1!==i.injectorIndex)return i.injectorIndex|t<<16}return Cl}function f_(n,e,t){!function b0(n,e,t){let i;"string"==typeof t?i=t.charCodeAt(0)||0:t.hasOwnProperty(fd)&&(i=t[fd]),null==i&&(i=t[fd]=y0++);const r=i&v0;e.data[n+(r>>u_)]|=1<=0?e&v0:C0:e}(t);if("function"==typeof s){if(!Ns(e,n,i))return i&At.Host?an(r,0,i):x0(e,t,i,r);try{const o=s(i);if(null!=o||i&At.Optional)return o;Iu()}finally{Ba()}}else if("number"==typeof s){let o=null,a=h_(n,e),l=Cl,c=i&At.Host?e[kr][tr]:null;for((-1===a||i&At.SkipSelf)&&(l=-1===a?Qu(n,e):e[a+8],l!==Cl&&Ju(i,!1)?(o=e[Qe],a=Xf(l),e=Yu(l,e)):a=-1);-1!==a;){const u=e[Qe];if(S0(s,a,u.data)){const h=M0(a,e,t,o,i,c);if(h!==ca)return h}l=e[a+8],l!==Cl&&Ju(i,e[Qe].data[a+8]===c)&&S0(s,a,e)?(o=u,a=Xf(l),e=Yu(l,e)):a=-1}}return r}function M0(n,e,t,i,r,s){const o=e[Qe],a=o.data[n+8],u=Kf(a,o,t,null==i?bl(a)&&qf:i!=o&&0!=(3&a.type),r&At.Host&&s===a);return null!==u?_c(e,o,u,a):ca}function Kf(n,e,t,i,r){const s=n.providerIndexes,o=e.data,a=1048575&s,l=n.directiveStart,u=s>>20,p=r?a+u:n.directiveEnd;for(let m=i?a:a+u;m=l&&g.type===t)return m}if(r){const m=o[l];if(m&&so(m)&&m.type===t)return l}return null}function _c(n,e,t,i){let r=n[t];const s=e.data;if(function ju(n){return n instanceof $u}(r)){const o=r;o.resolving&&function jb(n,e){const t=e?`. Dependency path: ${e.join(" > ")} > ${n}`:"";throw new fe(-200,`Circular dependency in DI detected for ${n}${t}`)}(function jn(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():Wt(n)}(s[t]));const a=Ku(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?Ps(o.injectImpl):null;Ns(n,i,At.Default);try{r=n[t]=o.factory(void 0,s,n,i),e.firstCreatePass&&t>=i.directiveStart&&function gc(n,e,t){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:s}=e.type.prototype;if(i){const o=hc(e);(t.preOrderHooks??(t.preOrderHooks=[])).push(n,o),(t.preOrderCheckHooks??(t.preOrderCheckHooks=[])).push(n,o)}r&&(t.preOrderHooks??(t.preOrderHooks=[])).push(0-n,r),s&&((t.preOrderHooks??(t.preOrderHooks=[])).push(n,s),(t.preOrderCheckHooks??(t.preOrderCheckHooks=[])).push(n,s))}(t,s[t],e)}finally{null!==l&&Ps(l),Ku(a),o.resolving=!1,Ba()}}return r}function S0(n,e,t){return!!(t[e+(n>>u_)]&1<{const e=n.prototype.constructor,t=e[ks]||ts(e),i=Object.prototype;let r=Object.getPrototypeOf(n.prototype).constructor;for(;r&&r!==i;){const s=r[ks]||ts(r);if(s&&s!==t)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function ts(n){return Ug(n)?()=>{const e=ts(Mt(n));return e&&e()}:La(n)}function Zf(n){const e=n[Qe],t=e.type;return 2===t?e.declTNode:1===t?n[tr]:null}function Ua(n){return function p_(n,e){if("class"===e)return n.classes;if("style"===e)return n.styles;const t=n.attrs;if(t){const i=t.length;let r=0;for(;r{const i=function eh(n){return function(...t){if(n){const i=n(...t);for(const r in i)this[r]=i[r]}}}(e);function r(...s){if(this instanceof r)return i.apply(this,s),this;const o=new r(...s);return a.annotation=o,a;function a(l,c,u){const h=l.hasOwnProperty(vc)?l[vc]:Object.defineProperty(l,vc,{value:[]})[vc];for(;h.length<=u;)h.push(null);return(h[u]=h[u]||[]).push(o),l}}return t&&(r.prototype=Object.create(t.prototype)),r.prototype.ngMetadataName=n,r.annotationCls=r,r})}class ge{constructor(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=ke({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function da(n,e){n.forEach(t=>Array.isArray(t)?da(t,e):e(t))}function bc(n,e,t){e>=n.length?n.push(t):n.splice(e,0,t)}function th(n,e){return e>=n.length-1?n.pop():n.splice(e,1)[0]}function Md(n,e){const t=[];for(let i=0;i=0?n[1|i]=t:(i=~i,function Sd(n,e,t,i){let r=n.length;if(r==e)n.push(t,i);else if(1===r)n.push(i,n[0]),n[0]=t;else{for(r--,n.push(n[r-1],n[r]);r>e;)n[r]=n[r-2],r--;n[e]=t,n[e+1]=i}}(n,i,e,t)),i}function Jf(n,e){const t=xc(n,e);if(t>=0)return n[1|t]}function xc(n,e){return function __(n,e,t){let i=0,r=n.length>>t;for(;r!==i;){const s=i+(r-i>>1),o=n[s<e?r=s:i=s+1}return~(r<({token:n})),-1),Po=Pu(Dl("Optional"),8),Il=Pu(Dl("SkipSelf"),4);var ns=(()=>((ns=ns||{})[ns.Important=1]="Important",ns[ns.DashCase=2]="DashCase",ns))();const Sc=new Map;let E_=0;const D_="__ngContext__";function Nr(n,e){Vi(e)?(n[D_]=e[sa],function z0(n){Sc.set(n[sa],n)}(e)):n[D_]=e}let cp;function I_(n,e){return cp(n,e)}function ah(n){const e=n[Ti];return us(e)?e[Ti]:e}function R_(n){return Z0(n[Mi])}function P_(n){return Z0(n[Ro])}function Z0(n){for(;null!==n&&!us(n);)n=n[Ro];return n}function Ad(n,e,t,i,r){if(null!=i){let s,o=!1;us(i)?s=i:Vi(i)&&(o=!0,i=i[ia]);const a=Pi(i);0===n&&null!==t?null==r?nx(e,t,a):Cc(e,t,a,r||null,!0):1===n&&null!==t?Cc(e,t,a,r||null,!0):2===n?function V_(n,e,t){const i=up(n,e);i&&function bA(n,e,t,i){n.removeChild(e,t,i)}(n,i,e,t)}(e,a,o):3===n&&e.destroyNode(a),null!=s&&function MA(n,e,t,i,r){const s=t[dc];s!==Pi(t)&&Ad(e,n,i,s,r);for(let a=Zr;a0&&(n[t-1][Ro]=i[Ro]);const s=th(n,Zr+e);!function fA(n,e){lh(n,e,e[Ne],2,null,null),e[ia]=null,e[tr]=null}(i[Qe],i);const o=s[ra];null!==o&&o.detachView(s[Qe]),i[Ti]=null,i[Ro]=null,i[tn]&=-65}return i}function J0(n,e){if(!(128&e[tn])){const t=e[Ne];t.destroyNode&&lh(n,e,t,3,null,null),function mA(n){let e=n[Mi];if(!e)return F_(n[Qe],n);for(;e;){let t=null;if(Vi(e))t=e[Mi];else{const i=e[Zr];i&&(t=i)}if(!t){for(;e&&!e[Ro]&&e!==n;)Vi(e)&&F_(e[Qe],e),e=e[Ti];null===e&&(e=n),Vi(e)&&F_(e[Qe],e),t=e&&e[Ro]}e=t}}(e)}}function F_(n,e){if(!(128&e[tn])){e[tn]&=-65,e[tn]|=128,function yA(n,e){let t;if(null!=n&&null!=(t=n.destroyHooks))for(let i=0;i=0?i[r=o]():i[r=-o].unsubscribe(),s+=2}else{const o=i[r=t[s+1]];t[s].call(o)}if(null!==i){for(let s=r+1;s-1){const{encapsulation:s}=n.data[i.directiveStart+r];if(s===Do.None||s===Do.Emulated)return null}return dr(i,t)}}(n,e.parent,t)}function Cc(n,e,t,i,r){n.insertBefore(e,t,i,r)}function nx(n,e,t){n.appendChild(e,t)}function ix(n,e,t,i,r){null!==i?Cc(n,e,t,i,r):nx(n,e,t)}function up(n,e){return n.parentNode(e)}function rx(n,e,t){return ox(n,e,t)}let N_,fp,G_,ox=function sx(n,e,t){return 40&n.type?dr(n,t):null};function hp(n,e,t,i){const r=ex(n,i,e),s=e[Ne],a=rx(i.parent||e[tr],i,e);if(null!=r)if(Array.isArray(t))for(let l=0;ln,createScript:n=>n,createScriptURL:n=>n})}catch{}return fp}()?.createHTML(n)||n}class Ec{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${ud})`}}class mx extends Ec{getTypeName(){return"HTML"}}class gx extends Ec{getTypeName(){return"Style"}}class DA extends Ec{getTypeName(){return"Script"}}class IA extends Ec{getTypeName(){return"URL"}}class RA extends Ec{getTypeName(){return"ResourceURL"}}function Vs(n){return n instanceof Ec?n.changingThisBreaksApplicationSecurity:n}function zs(n,e){const t=function PA(n){return n instanceof Ec&&n.getTypeName()||null}(n);if(null!=t&&t!==e){if("ResourceURL"===t&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${t} (see ${ud})`)}return t===e}class BA{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e=""+e;try{const t=(new window.DOMParser).parseFromString(Dd(e),"text/html").body;return null===t?this.inertDocumentHelper.getInertBodyElement(e):(t.removeChild(t.firstChild),t)}catch{return null}}}class UA{constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){const t=this.inertDocument.createElement("template");return t.innerHTML=Dd(e),t}}const zA=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Ac(n){return(n=String(n)).match(zA)?n:"unsafe:"+n}function Ha(n){const e={};for(const t of n.split(","))e[t]=!0;return e}function Id(...n){const e={};for(const t of n)for(const i in t)t.hasOwnProperty(i)&&(e[i]=!0);return e}const $_=Ha("area,br,col,hr,img,wbr"),mp=Ha("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),j_=Ha("rp,rt"),X_=Id($_,Id(mp,Ha("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")),Id(j_,Ha("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")),Id(j_,mp)),q_=Ha("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),dh=Id(q_,Ha("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"),Ha("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")),$A=Ha("script,style,template");class jA{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let t=e.firstChild,i=!0;for(;t;)if(t.nodeType===Node.ELEMENT_NODE?i=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,i&&t.firstChild)t=t.firstChild;else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let r=this.checkClobberedElement(t,t.nextSibling);if(r){t=r;break}t=this.checkClobberedElement(t,t.parentNode)}return this.buf.join("")}startElement(e){const t=e.nodeName.toLowerCase();if(!X_.hasOwnProperty(t))return this.sanitizedSomething=!0,!$A.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);const i=e.attributes;for(let r=0;r"),!0}endElement(e){const t=e.nodeName.toLowerCase();X_.hasOwnProperty(t)&&!$_.hasOwnProperty(t)&&(this.buf.push(""))}chars(e){this.buf.push(yx(e))}checkClobberedElement(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`);return t}}const K_=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,vx=/([^\#-~ |!])/g;function yx(n){return n.replace(/&/g,"&").replace(K_,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(vx,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}let gp;function bx(n,e){let t=null;try{gp=gp||function _x(n){const e=new UA(n);return function VA(){try{return!!(new window.DOMParser).parseFromString(Dd(""),"text/html")}catch{return!1}}()?new BA(e):e}(n);let i=e?String(e):"";t=gp.getInertBodyElement(i);let r=5,s=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=s,s=t.innerHTML,t=gp.getInertBodyElement(i)}while(i!==s);return Dd((new jA).sanitizeChildren(Z_(t)||t))}finally{if(t){const i=Z_(t)||t;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function Z_(n){return"content"in n&&function XA(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var $n=(()=>(($n=$n||{})[$n.NONE=0]="NONE",$n[$n.HTML=1]="HTML",$n[$n.STYLE=2]="STYLE",$n[$n.SCRIPT=3]="SCRIPT",$n[$n.URL=4]="URL",$n[$n.RESOURCE_URL=5]="RESOURCE_URL",$n))();function _p(n){const e=function uh(){const n=Ee();return n&&n[zn]}();return e?e.sanitize($n.URL,n)||"":zs(n,"URL")?Vs(n):Ac(Wt(n))}const Mr=new ge("ENVIRONMENT_INITIALIZER"),Di=new ge("INJECTOR",-1),Mx=new ge("INJECTOR_DEF_TYPES");class Ga{get(e,t=hd){if(t===hd){const i=new Error(`NullInjectorError: No provider for ${ri(e)}!`);throw i.name="NullInjectorError",i}return t}}function JA(...n){return{\u0275providers:Sx(0,n),\u0275fromNgModule:!0}}function Sx(n,...e){const t=[],i=new Set;let r;return da(e,s=>{const o=s;Q_(o,t,[],i)&&(r||(r=[]),r.push(o))}),void 0!==r&&Cx(r,t),t}function Cx(n,e){for(let t=0;t{e.push(s)})}}function Q_(n,e,t,i){if(!(n=Mt(n)))return!1;let r=null,s=Vg(n);const o=!s&&Wn(n);if(s||o){if(o&&!o.standalone)return!1;r=n}else{const l=n.ngModule;if(s=Vg(l),!s)return!1;r=l}const a=i.has(r);if(o){if(a)return!1;if(i.add(r),o.dependencies){const l="function"==typeof o.dependencies?o.dependencies():o.dependencies;for(const c of l)Q_(c,e,t,i)}}else{if(!s)return!1;{if(null!=s.imports&&!a){let c;i.add(r);try{da(s.imports,u=>{Q_(u,e,t,i)&&(c||(c=[]),c.push(u))})}finally{}void 0!==c&&Cx(c,e)}if(!a){const c=La(r)||(()=>new r);e.push({provide:r,useFactory:c,deps:Vn},{provide:Mx,useValue:r,multi:!0},{provide:Mr,useValue:()=>Q(r),multi:!0})}const l=s.providers;null==l||a||J_(l,u=>{e.push(u)})}}return r!==n&&void 0!==n.providers}function J_(n,e){for(let t of n)Ef(t)&&(t=t.\u0275providers),Array.isArray(t)?J_(t,e):e(t)}const Wa=Zn({provide:String,useValue:Zn});function vp(n){return null!==n&&"object"==typeof n&&Wa in n}function ni(n){return"function"==typeof n}const ev=new ge("Set Injector scope."),yp={},eT={};let tv;function bp(){return void 0===tv&&(tv=new Ga),tv}class $a{}class nv extends $a{get destroyed(){return this._destroyed}constructor(e,t,i,r){super(),this.parent=t,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,sv(e,o=>this.processProvider(o)),this.records.set(Di,ja(void 0,this)),r.has("environment")&&this.records.set($a,ja(void 0,this));const s=this.records.get(ev);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(Mx.multi,Vn,At.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const e of this._ngOnDestroyHooks)e.ngOnDestroy();for(const e of this._onDestroyHooks)e()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(e){this._onDestroyHooks.push(e)}runInContext(e){this.assertNotDestroyed();const t=_l(this),i=Ps(void 0);try{return e()}finally{_l(t),Ps(i)}}get(e,t=hd,i=At.Default){this.assertNotDestroyed(),i=ac(i);const r=_l(this),s=Ps(void 0);try{if(!(i&At.SkipSelf)){let a=this.records.get(e);if(void 0===a){const l=function nT(n){return"function"==typeof n||"object"==typeof n&&n instanceof ge}(e)&&Af(e);a=l&&this.injectableDefInScope(l)?ja(Tc(e),yp):null,this.records.set(e,a)}if(null!=a)return this.hydrate(e,a)}return(i&At.Self?bp():this.parent).get(e,t=i&At.Optional&&t===hd?null:t)}catch(o){if("NullInjectorError"===o.name){if((o[oc]=o[oc]||[]).unshift(ri(e)),r)throw o;return function e0(n,e,t,i){const r=n[oc];throw e[Rf]&&r.unshift(e[Rf]),n.message=function Gg(n,e,t,i=null){n=n&&"\n"===n.charAt(0)&&n.charAt(1)==gl?n.slice(2):n;let r=ri(e);if(Array.isArray(e))r=e.map(ri).join(" -> ");else if("object"==typeof e){let s=[];for(let o in e)if(e.hasOwnProperty(o)){let a=e[o];s.push(o+":"+("string"==typeof a?JSON.stringify(a):ri(a)))}r=`{${s.join(", ")}}`}return`${t}${i?"("+i+")":""}[${r}]: ${n.replace(hi,"\n ")}`}("\n"+n.message,r,t,i),n[Hg]=r,n[oc]=null,n}(o,e,"R3InjectorError",this.source)}throw o}finally{Ps(s),_l(r)}}resolveInjectorInitializers(){const e=_l(this),t=Ps(void 0);try{const i=this.get(Mr.multi,Vn,At.Self);for(const r of i)r()}finally{_l(e),Ps(t)}}toString(){const e=[],t=this.records;for(const i of t.keys())e.push(ri(i));return`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new fe(205,!1)}processProvider(e){let t=ni(e=Mt(e))?e:Mt(e&&e.provide);const i=function tT(n){return vp(n)?ja(void 0,n.useValue):ja(rv(n),yp)}(e);if(ni(e)||!0!==e.multi)this.records.get(t);else{let r=this.records.get(t);r||(r=ja(void 0,yp,!0),r.factory=()=>vl(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,i)}hydrate(e,t){return t.value===yp&&(t.value=eT,t.value=t.factory()),"object"==typeof t.value&&t.value&&function Pd(n){return null!==n&&"object"==typeof n&&"function"==typeof n.ngOnDestroy}(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}injectableDefInScope(e){if(!e.providedIn)return!1;const t=Mt(e.providedIn);return"string"==typeof t?"any"===t||this.scopes.has(t):this.injectorDefTypes.has(t)}}function Tc(n){const e=Af(n),t=null!==e?e.factory:La(n);if(null!==t)return t;if(n instanceof ge)throw new fe(204,!1);if(n instanceof Function)return function iv(n){const e=n.length;if(e>0)throw Md(e,"?"),new fe(204,!1);const t=function vr(n){return n&&(n[ml]||n[Df])||null}(n);return null!==t?()=>t.factory(n):()=>new n}(n);throw new fe(204,!1)}function rv(n,e,t){let i;if(ni(n)){const r=Mt(n);return La(r)||Tc(r)}if(vp(n))i=()=>Mt(n.useValue);else if(function fi(n){return!(!n||!n.useFactory)}(n))i=()=>n.useFactory(...vl(n.deps||[]));else if(function hh(n){return!(!n||!n.useExisting)}(n))i=()=>Q(Mt(n.useExisting));else{const r=Mt(n&&(n.useClass||n.provide));if(!function Hs(n){return!!n.deps}(n))return La(r)||Tc(r);i=()=>new r(...vl(n.deps))}return i}function ja(n,e,t=!1){return{factory:n,value:e,multi:t?[]:void 0}}function sv(n,e){for(const t of n)Array.isArray(t)?sv(t,e):t&&Ef(t)?sv(t.\u0275providers,e):e(t)}class iT{}class Tx{}class rn{resolveComponentFactory(e){throw function rT(n){const e=Error(`No component factory found for ${ri(n)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=n,e}(e)}}let Ol=(()=>{class n{}return n.NULL=new rn,n})();function co(){return Dc(xr(),Ee())}function Dc(n,e){return new yt(dr(n,e))}let yt=(()=>{class n{constructor(t){this.nativeElement=t}}return n.__NG_ELEMENT_ID__=co,n})();function Xn(n){return n instanceof yt?n.nativeElement:n}class fh{}let fa=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>function xp(){const n=Ee(),t=hs(xr().index,n);return(Vi(t)?t:n)[Ne]}(),n})(),sT=(()=>{class n{}return n.\u0275prov=ke({token:n,providedIn:"root",factory:()=>null}),n})();class Ic{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const oT=new Ic("15.2.10"),av={},lv="ngOriginalError";function cv(n){return n[lv]}class Xa{constructor(){this._console=console}handleError(e){const t=this._findOriginalError(e);this._console.error("ERROR",e),t&&this._console.error("ORIGINAL ERROR",t)}_findOriginalError(e){let t=e&&cv(e);for(;t&&cv(t);)t=cv(t);return t||null}}function qa(n){return n instanceof Function?n():n}function Ix(n,e,t){let i=n.length;for(;;){const r=n.indexOf(e,t);if(-1===r)return r;if(0===r||n.charCodeAt(r-1)<=32){const s=e.length;if(r+s===i||n.charCodeAt(r+s)<=32)return r}t=r+1}}const uv="ng-template";function gT(n,e,t){let i=0,r=!0;for(;is?"":r[h+1].toLowerCase();const m=8&i?p:null;if(m&&-1!==Ix(m,c,0)||2&i&&c!==p){if(Oo(i))return!1;o=!0}}}}else{if(!o&&!Oo(i)&&!Oo(l))return!1;if(o&&Oo(l))continue;o=!1,i=l|1&i}}return Oo(i)||o}function Oo(n){return 0==(1&n)}function vT(n,e,t,i){if(null===e)return-1;let r=0;if(i||!t){let s=!1;for(;r-1)for(t++;t0?'="'+a+'"':"")+"]"}else 8&i?r+="."+o:4&i&&(r+=" "+o);else""!==r&&!Oo(o)&&(e+=Fx(s,r),r=""),i=o,s=s||!Oo(i);t++}return""!==r&&(e+=Fx(s,r)),e}const jt={};function j(n){Nx(Nn(),Ee(),Jr()+n,!1)}function Nx(n,e,t,i){if(!i)if(3==(3&e[tn])){const s=n.preOrderCheckHooks;null!==s&&ur(e,s,t)}else{const s=n.preOrderHooks;null!==s&&bd(e,s,0,t)}Sl(t)}function Gx(n,e=null,t=null,i){const r=Wx(n,e,t,i);return r.resolveInjectorInitializers(),r}function Wx(n,e=null,t=null,i,r=new Set){const s=[t||Vn,JA(n)];return i=i||("object"==typeof n?void 0:ri(n)),new nv(s,e||bp(),i||null,r)}let ki=(()=>{class n{static create(t,i){if(Array.isArray(t))return Gx({name:""},i,t,"");{const r=t.name??"";return Gx({name:r},t.parent,t.providers,r)}}}return n.THROW_IF_NOT_FOUND=hd,n.NULL=new Ga,n.\u0275prov=ke({token:n,providedIn:"any",factory:()=>Q(Di)}),n.__NG_ELEMENT_ID__=-1,n})();function D(n,e=At.Default){const t=Ee();return null===t?Q(n,e):w0(xr(),t,Mt(n),e)}function Ya(){throw new Error("invalid")}function Cp(n,e){const t=n.contentQueries;if(null!==t)for(let i=0;iei&&Nx(n,e,ei,!1),oo(o?2:0,r),t(i,r)}finally{Sl(s),oo(o?3:1,r)}}function mh(n,e,t){if(Ff(e)){const r=e.directiveEnd;for(let s=e.directiveStart;s0;){const t=n[--e];if("number"==typeof t&&t<0)return t}return 0})(o)!=a&&o.push(a),o.push(t,i,s)}}(n,e,i,ph(n,t,r.hostVars,jt),r)}function pe(n,e,t,i,r,s){const o=dr(n,e);!function ye(n,e,t,i,r,s,o){if(null==s)n.removeAttribute(e,r,t);else{const a=null==o?Wt(s):o(s,i||"",r);n.setAttribute(e,r,a,t)}}(e[Ne],o,s,n.value,t,i,r)}function Te(n,e,t,i,r,s){const o=s[e];if(null!==o){const a=i.setInput;for(let l=0;l0&&fn(t)}}function fn(n){for(let i=R_(n);null!==i;i=P_(i))for(let r=Zr;r0&&fn(s)}const t=n[Qe].components;if(null!==t)for(let i=0;i0&&fn(r)}}function Rn(n,e){const t=hs(e,n),i=t[Qe];(function $s(n,e){for(let t=e.length;t-1&&(L_(e,i),th(t,i))}this._attachedToViewContainer=!1}J0(this._lView[Qe],this._lView)}onDestroy(e){Jx(this._lView[Qe],this._lView,null,e)}markForCheck(){Ur(this._cdRefInjectingView||this._lView)}detach(){this._lView[tn]&=-65}reattach(){this._lView[tn]|=64}detectChanges(){pi(this._lView[Qe],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new fe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function pA(n,e){lh(n,e,e[Ne],2,null,null)}(this._lView[Qe],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new fe(902,!1);this._appRef=e}}class OG extends bv{constructor(e){super(e),this._view=e}detectChanges(){const e=this._view;pi(e[Qe],e,e[oe],!1)}checkNoChanges(){}get context(){return null}}class AO extends Ol{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){const t=Wn(e);return new xv(t,this.ngModule)}}function TO(n){const e=[];for(let t in n)n.hasOwnProperty(t)&&e.push({propName:n[t],templateName:t});return e}class FG{constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,i){i=ac(i);const r=this.injector.get(e,av,i);return r!==av||t===av?r:this.parentInjector.get(e,t,i)}}class xv extends Tx{get inputs(){return TO(this.componentDef.inputs)}get outputs(){return TO(this.componentDef.outputs)}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=function kd(n){return n.map(xT).join(",")}(e.selectors),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!t}create(e,t,i,r){let s=(r=r||this.ngModule)instanceof $a?r:r?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const o=s?new FG(e,s):e,a=o.get(fh,null);if(null===a)throw new fe(407,!1);const l=o.get(sT,null),c=a.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",h=i?function zT(n,e,t){return n.selectRootElement(e,t===Do.ShadowDom)}(c,i,this.componentDef.encapsulation):O_(c,u,function LG(n){const e=n.toLowerCase();return"svg"===e?a0:"math"===e?"math":null}(u)),p=this.componentDef.onPush?288:272,m=vv(0,null,null,1,0,null,null,null,null,null),g=Ep(null,m,null,p,null,null,a,c,l,o,null);let b,y;n_(g);try{const v=this.componentDef;let M,x=null;v.findHostDirectiveDefs?(M=[],x=new Map,v.findHostDirectiveDefs(v,M,x),M.push(v)):M=[v];const S=function BG(n,e){const t=n[Qe],i=ei;return n[i]=e,Ld(t,i,2,"#host",null)}(g,h),P=function UG(n,e,t,i,r,s,o,a){const l=r[Qe];!function VG(n,e,t,i){for(const r of n)e.mergedAttrs=qu(e.mergedAttrs,r.hostAttrs);null!==e.mergedAttrs&&(iw(e,e.mergedAttrs,!0),null!==t&&ch(i,t,e))}(i,n,e,o);const c=s.createRenderer(e,t),u=Ep(r,Qx(t),null,t.onPush?32:16,r[n.index],n,s,c,a||null,null,null);return l.firstCreatePass&&w(l,n,i.length-1),hr(r,u),r[n.index]=u}(S,h,v,M,g,a,c);y=Ls(m,ei),h&&function HG(n,e,t,i){if(i)$f(n,t,["ng-version",oT.full]);else{const{attrs:r,classes:s}=function wT(n){const e=[],t=[];let i=1,r=2;for(;i0&&dx(n,t,s.join(" "))}}(c,v,h,i),void 0!==t&&function GG(n,e,t){const i=n.projection=[];for(let r=0;r=0;i--){const r=n[i];r.hostVars=e+=r.hostVars,r.hostAttrs=qu(r.hostAttrs,t=qu(t,r.hostAttrs))}}(i)}function QT(n){return n===Io?{}:n===Vn?[]:n}function jG(n,e){const t=n.viewQuery;n.viewQuery=t?(i,r)=>{e(i,r),t(i,r)}:e}function XG(n,e){const t=n.contentQueries;n.contentQueries=t?(i,r,s)=>{e(i,r,s),t(i,r,s)}:e}function qG(n,e){const t=n.hostBindings;n.hostBindings=t?(i,r)=>{e(i,r),t(i,r)}:e}function sw(n){return!!JT(n)&&(Array.isArray(n)||!(n instanceof Map)&&Symbol.iterator in n)}function JT(n){return null!==n&&("function"==typeof n||"object"==typeof n)}function Fl(n,e,t){return n[e]=t}function ms(n,e,t){return!Object.is(n[e],t)&&(n[e]=t,!0)}function gh(n,e,t,i){const r=ms(n,e,t);return ms(n,e+1,i)||r}function Vt(n,e,t,i){const r=Ee();return ms(r,_d(),e)&&(Nn(),pe(hn(),r,n,e,t,i)),Vt}function Rp(n,e,t,i){return ms(n,_d(),t)?e+Wt(t)+i:jt}function Pp(n,e,t,i,r,s){const a=gh(n,function aa(){return $t.lFrame.bindingIndex}(),t,r);return Na(2),a?e+Wt(t)+i+Wt(r)+s:jt}function _e(n,e,t,i,r,s,o,a){const l=Ee(),c=Nn(),u=n+ei,h=c.firstCreatePass?function r8(n,e,t,i,r,s,o,a,l){const c=e.consts,u=Ld(e,n,4,o||null,xl(c,a));yv(e,t,u,xl(c,l)),Wu(e,u);const h=u.tView=vv(2,u,i,r,s,e.directiveRegistry,e.pipeRegistry,null,e.schemas,c);return null!==e.queries&&(e.queries.template(e,u),h.queries=e.queries.embeddedTView(u)),u}(u,c,l,e,t,i,r,s,o):c.data[u];oa(h,!1);const p=l[Ne].createComment("");hp(c,l,p,h),Nr(p,l),hr(l,l[u]=lt(p,l,p,h)),Lu(h)&&gv(c,l,h),null!=o&&_v(l,h,a)}function Vr(n){return nn(function UE(){return $t.lFrame.contextLView}(),ei+n)}function z(n,e,t){const i=Ee();return ms(i,_d(),e)&&Ws(Nn(),hn(),i,n,e,i[Ne],t,!1),z}function e1(n,e,t,i,r){const o=r?"class":"style";ZT(n,t,e.inputs[o],o,i)}function K(n,e,t,i){const r=Ee(),s=Nn(),o=ei+n,a=r[Ne],l=s.firstCreatePass?function o8(n,e,t,i,r,s){const o=e.consts,l=Ld(e,n,2,i,xl(o,r));return yv(e,t,l,xl(o,s)),null!==l.attrs&&iw(l,l.attrs,!1),null!==l.mergedAttrs&&iw(l,l.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,l),l}(o,s,r,e,t,i):s.data[o],c=r[o]=O_(a,e,function Wf(){return $t.lFrame.currentNamespace}()),u=Lu(l);return oa(l,!0),ch(a,c,l),32!=(32&l.flags)&&hp(s,r,c,l),0===function LE(){return $t.lFrame.elementDepthCount}()&&Nr(c,r),function FE(){$t.lFrame.elementDepthCount++}(),u&&(gv(s,r,l),mh(s,l,r)),null!==i&&_v(r,l),K}function J(){let n=xr();Fs()?Qg():(n=n.parent,oa(n,!1));const e=n;!function NE(){$t.lFrame.elementDepthCount--}();const t=Nn();return t.firstCreatePass&&(Wu(t,n),Ff(n)&&t.queries.elementEnd(n)),null!=e.classesWithoutHost&&function Xu(n){return 0!=(8&n.flags)}(e)&&e1(t,e,Ee(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function WE(n){return 0!=(16&n.flags)}(e)&&e1(t,e,Ee(),e.stylesWithoutHost,!1),J}function Fe(n,e,t,i){return K(n,e,t,i),J(),Fe}function uo(n,e,t){const i=Ee(),r=Nn(),s=n+ei,o=r.firstCreatePass?function a8(n,e,t,i,r){const s=e.consts,o=xl(s,i),a=Ld(e,n,8,"ng-container",o);return null!==o&&iw(a,o,!0),yv(e,t,a,xl(s,r)),null!==e.queries&&e.queries.elementStart(e,a),a}(s,r,i,e,t):r.data[s];oa(o,!0);const a=i[s]=i[Ne].createComment("");return hp(r,i,a,o),Nr(a,i),Lu(o)&&(gv(r,i,o),mh(r,o,i)),null!=t&&_v(i,o),uo}function ho(){let n=xr();const e=Nn();return Fs()?Qg():(n=n.parent,oa(n,!1)),e.firstCreatePass&&(Wu(e,n),Ff(n)&&e.queries.elementEnd(n)),ho}function Mv(n,e,t){return uo(n,e,t),ho(),Mv}function Wi(){return Ee()}function Sv(n){return!!n&&"function"==typeof n.then}function HO(n){return!!n&&"function"==typeof n.subscribe}const t1=HO;function ct(n,e,t,i){const r=Ee(),s=Nn(),o=xr();return GO(s,r,r[Ne],o,n,e,i),ct}function n1(n,e){const t=xr(),i=Ee(),r=Nn();return GO(r,i,CO(t_(r.data),t,i),t,n,e),n1}function GO(n,e,t,i,r,s,o){const a=Lu(i),c=n.firstCreatePass&&SO(n),u=e[oe],h=MO(e);let p=!0;if(3&i.type||o){const b=dr(i,e),y=o?o(b):b,v=h.length,M=o?S=>o(Pi(S[i.index])):i.index;let x=null;if(!o&&a&&(x=function l8(n,e,t,i){const r=n.cleanup;if(null!=r)for(let s=0;sl?a[l]:null}"string"==typeof o&&(s+=2)}return null}(n,e,r,i.index)),null!==x)(x.__ngLastListenerFn__||x).__ngNextListenerFn__=s,x.__ngLastListenerFn__=s,p=!1;else{s=$O(i,e,u,s,!1);const S=t.listen(y,r,s);h.push(s,S),c&&c.push(r,M,v,v+1)}}else s=$O(i,e,u,s,!1);const m=i.outputs;let g;if(p&&null!==m&&(g=m[r])){const b=g.length;if(b)for(let y=0;y-1?hs(n.index,e):e);let l=WO(e,t,i,o),c=s.__ngNextListenerFn__;for(;c;)l=WO(e,t,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function be(n=1){return function zE(n){return($t.lFrame.contextLView=function Gf(n,e){for(;n>0;)e=e[yl],n--;return e}(n,$t.lFrame.contextLView))[oe]}(n)}function c8(n,e){let t=null;const i=function Ox(n){const e=n.attrs;if(null!=e){const t=e.indexOf(5);if(!(1&t))return e[t+1]}return null}(n);for(let r=0;r>17&32767}function o1(n){return 2|n}function _h(n){return(131068&n)>>2}function a1(n,e){return-131069&n|e<<2}function l1(n){return 1|n}function eL(n,e,t,i,r){const s=n[t+1],o=null===e;let a=i?Fd(s):_h(s),l=!1;for(;0!==a&&(!1===l||o);){const u=n[a+1];m8(n[a],e)&&(l=!0,n[a+1]=i?l1(u):o1(u)),a=i?Fd(u):_h(u)}l&&(n[t+1]=i?o1(s):l1(s))}function m8(n,e){return null===n||null==e||(Array.isArray(n)?n[1]:n)===e||!(!Array.isArray(n)||"string"!=typeof e)&&xc(n,e)>=0}const Er={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function tL(n){return n.substring(Er.key,Er.keyEnd)}function nL(n,e){const t=Er.textEnd;return t===e?-1:(e=Er.keyEnd=function y8(n,e,t){for(;e32;)e++;return e}(n,Er.key=e,t),Up(n,e,t))}function Up(n,e,t){for(;e=0;t=nL(e,t))Bs(n,tL(e),!0)}function Ka(n,e,t,i){const r=Ee(),s=Nn(),o=Na(2);s.firstUpdatePass&&lL(s,n,o,i),e!==jt&&ms(r,o,e)&&dL(s,s.data[Jr()],r,r[Ne],n,r[o+1]=function R8(n,e){return null==n||""===n||("string"==typeof e?n+=e:"object"==typeof n&&(n=ri(Vs(n)))),n}(e,t),i,o)}function aL(n,e){return e>=n.expandoStartIndex}function lL(n,e,t,i){const r=n.data;if(null===r[t+1]){const s=r[Jr()],o=aL(n,t);hL(s,i)&&null===e&&!o&&(e=!1),e=function S8(n,e,t,i){const r=t_(n);let s=i?e.residualClasses:e.residualStyles;if(null===r)0===(i?e.classBindings:e.styleBindings)&&(t=Cv(t=c1(null,n,e,t,i),e.attrs,i),s=null);else{const o=e.directiveStylingLast;if(-1===o||n[o]!==r)if(t=c1(r,n,e,t,i),null===s){let l=function C8(n,e,t){const i=t?e.classBindings:e.styleBindings;if(0!==_h(i))return n[Fd(i)]}(n,e,i);void 0!==l&&Array.isArray(l)&&(l=c1(null,n,e,l[1],i),l=Cv(l,e.attrs,i),function E8(n,e,t,i){n[Fd(t?e.classBindings:e.styleBindings)]=i}(n,e,i,l))}else s=function A8(n,e,t){let i;const r=e.directiveEnd;for(let s=1+e.directiveStylingLast;s0)&&(c=!0)):u=t,r)if(0!==l){const p=Fd(n[a+1]);n[i+1]=aw(p,a),0!==p&&(n[p+1]=a1(n[p+1],i)),n[a+1]=function u8(n,e){return 131071&n|e<<17}(n[a+1],i)}else n[i+1]=aw(a,0),0!==a&&(n[a+1]=a1(n[a+1],i)),a=i;else n[i+1]=aw(l,0),0===a?a=i:n[l+1]=a1(n[l+1],i),l=i;c&&(n[i+1]=o1(n[i+1])),eL(n,u,i,!0),eL(n,u,i,!1),function p8(n,e,t,i,r){const s=r?n.residualClasses:n.residualStyles;null!=s&&"string"==typeof e&&xc(s,e)>=0&&(t[i+1]=l1(t[i+1]))}(e,u,n,i,s),o=aw(a,l),s?e.classBindings=o:e.styleBindings=o}(r,s,e,t,o,i)}}function c1(n,e,t,i,r){let s=null;const o=t.directiveEnd;let a=t.directiveStylingLast;for(-1===a?a=t.directiveStart:a++;a0;){const l=n[r],c=Array.isArray(l),u=c?l[1]:l,h=null===u;let p=t[r+1];p===jt&&(p=h?Vn:void 0);let m=h?Jf(p,i):u===i?p:void 0;if(c&&!lw(m)&&(m=Jf(l,i)),lw(m)&&(a=m,o))return a;const g=n[r+1];r=o?Fd(g):_h(g)}if(null!==e){let l=s?e.residualClasses:e.residualStyles;null!=l&&(a=Jf(l,i))}return a}function lw(n){return void 0!==n}function hL(n,e){return 0!=(n.flags&(e?8:16))}function Je(n,e=""){const t=Ee(),i=Nn(),r=n+ei,s=i.firstCreatePass?Ld(i,r,1,e,null):i.data[r],o=t[r]=function k_(n,e){return n.createText(e)}(t[Ne],e);hp(i,t,o,s),oa(s,!1)}function $i(n){return nr("",n,""),$i}function nr(n,e,t){const i=Ee(),r=Rp(i,n,e,t);return r!==jt&&Rc(i,Jr(),r),nr}function Vp(n,e,t,i,r){const s=Ee(),o=Pp(s,n,e,t,i,r);return o!==jt&&Rc(s,Jr(),o),Vp}function bL(n,e,t){!function Za(n,e,t,i){const r=Nn(),s=Na(2);r.firstUpdatePass&&lL(r,null,s,i);const o=Ee();if(t!==jt&&ms(o,s,t)){const a=r.data[Jr()];if(hL(a,i)&&!aL(r,s)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(t=Bg(l,t||"")),e1(r,a,o,t,i)}else!function I8(n,e,t,i,r,s,o,a){r===jt&&(r=Vn);let l=0,c=0,u=0((Ze=Ze||{})[Ze.LocaleId=0]="LocaleId",Ze[Ze.DayPeriodsFormat=1]="DayPeriodsFormat",Ze[Ze.DayPeriodsStandalone=2]="DayPeriodsStandalone",Ze[Ze.DaysFormat=3]="DaysFormat",Ze[Ze.DaysStandalone=4]="DaysStandalone",Ze[Ze.MonthsFormat=5]="MonthsFormat",Ze[Ze.MonthsStandalone=6]="MonthsStandalone",Ze[Ze.Eras=7]="Eras",Ze[Ze.FirstDayOfWeek=8]="FirstDayOfWeek",Ze[Ze.WeekendRange=9]="WeekendRange",Ze[Ze.DateFormat=10]="DateFormat",Ze[Ze.TimeFormat=11]="TimeFormat",Ze[Ze.DateTimeFormat=12]="DateTimeFormat",Ze[Ze.NumberSymbols=13]="NumberSymbols",Ze[Ze.NumberFormats=14]="NumberFormats",Ze[Ze.CurrencyCode=15]="CurrencyCode",Ze[Ze.CurrencySymbol=16]="CurrencySymbol",Ze[Ze.CurrencyName=17]="CurrencyName",Ze[Ze.Currencies=18]="Currencies",Ze[Ze.Directionality=19]="Directionality",Ze[Ze.PluralCase=20]="PluralCase",Ze[Ze.ExtraData=21]="ExtraData",Ze))();const Hp="en-US";let PL=Hp;function f1(n,e,t,i,r){if(n=Mt(n),Array.isArray(n))for(let s=0;s>20;if(ni(n)||!n.multi){const m=new $u(l,r,D),g=m1(a,e,r?u:u+p,h);-1===g?(f_(Yf(c,o),s,a),p1(s,n,e.length),e.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),t.push(m),o.push(m)):(t[g]=m,o[g]=m)}else{const m=m1(a,e,u+p,h),g=m1(a,e,u,u+p),y=g>=0&&t[g];if(r&&!y||!r&&!(m>=0&&t[m])){f_(Yf(c,o),s,a);const v=function qW(n,e,t,i,r){const s=new $u(n,t,D);return s.multi=[],s.index=e,s.componentProviders=0,iF(s,r,i&&!t),s}(r?XW:jW,t.length,r,i,l);!r&&y&&(t[g].providerFactory=v),p1(s,n,e.length,0),e.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),t.push(v),o.push(v)}else p1(s,n,m>-1?m:g,iF(t[r?g:m],l,!r&&i));!r&&i&&y&&t[g].componentProviders++}}}function p1(n,e,t,i){const r=ni(e),s=function Ax(n){return!!n.useClass}(e);if(r||s){const l=(s?Mt(e.useClass):e).prototype.ngOnDestroy;if(l){const c=n.destroyHooks||(n.destroyHooks=[]);if(!r&&e.multi){const u=c.indexOf(t);-1===u?c.push(t,[i,l]):c[u+1].push(i,l)}else c.push(t,l)}}}function iF(n,e,t){return t&&n.componentProviders++,n.multi.push(e)-1}function m1(n,e,t,i){for(let r=t;r{t.providersResolver=(i,r)=>function $W(n,e,t){const i=Nn();if(i.firstCreatePass){const r=so(n);f1(t,i.data,i.blueprint,r,!0),f1(e,i.data,i.blueprint,r,!1)}}(i,r?r(n):n,e)}}class Gp{}class rF{}class sF extends Gp{constructor(e,t){super(),this._parent=t,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new AO(this);const i=Os(e);this._bootstrapComponents=qa(i.bootstrap),this._r3Injector=Wx(e,t,[{provide:Gp,useValue:this},{provide:Ol,useValue:this.componentFactoryResolver}],ri(e),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(e)}get injector(){return this._r3Injector}destroy(){const e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class _1 extends rF{constructor(e){super(),this.moduleType=e}create(e){return new sF(this.moduleType,e)}}class KW extends Gp{constructor(e,t,i){super(),this.componentFactoryResolver=new AO(this),this.instance=null;const r=new nv([...e,{provide:Gp,useValue:this},{provide:Ol,useValue:this.componentFactoryResolver}],t||bp(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}}function fw(n,e,t=null){return new KW(n,e,t).injector}let ZW=(()=>{class n{constructor(t){this._injector=t,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t.id)){const i=Sx(0,t.type),r=i.length>0?fw([i],this._injector,`Standalone[${t.type.name}]`):null;this.cachedInjectors.set(t.id,r)}return this.cachedInjectors.get(t.id)}ngOnDestroy(){try{for(const t of this.cachedInjectors.values())null!==t&&t.destroy()}finally{this.cachedInjectors.clear()}}}return n.\u0275prov=ke({token:n,providedIn:"environment",factory:()=>new n(Q($a))}),n})();function v1(n){n.getStandaloneInjector=e=>e.get(ZW).getOrCreateStandaloneInjector(n)}function Xs(n,e,t){const i=Qr()+n,r=Ee();return r[i]===jt?Fl(r,i,t?e.call(t):e()):function wv(n,e){return n[e]}(r,i)}function pw(n,e,t,i){return fF(Ee(),Qr(),n,e,t,i)}function hF(n,e,t,i,r,s,o){return function gF(n,e,t,i,r,s,o,a,l){const c=e+t;return function ma(n,e,t,i,r,s){const o=gh(n,e,t,i);return gh(n,e+2,r,s)||o}(n,c,r,s,o,a)?Fl(n,c+4,l?i.call(l,r,s,o,a):i(r,s,o,a)):Rv(n,c+4)}(Ee(),Qr(),n,e,t,i,r,s,o)}function Rv(n,e){const t=n[e];return t===jt?void 0:t}function fF(n,e,t,i,r,s){const o=e+t;return ms(n,o,r)?Fl(n,o+1,s?i.call(s,r):i(r)):Rv(n,o+1)}function zt(n,e){const t=Nn();let i;const r=n+ei;t.firstCreatePass?(i=function f$(n,e){if(e)for(let t=e.length-1;t>=0;t--){const i=e[t];if(n===i.name)return i}}(e,t.pipeRegistry),t.data[r]=i,i.onDestroy&&(t.destroyHooks??(t.destroyHooks=[])).push(r,i.onDestroy)):i=t.data[r];const s=i.factory||(i.factory=La(i.type)),o=Ps(D);try{const a=Ku(!1),l=s();return Ku(a),function s8(n,e,t,i){t>=n.data.length&&(n.data[t]=null,n.blueprint[t]=null),e[t]=i}(t,Ee(),r,l),l}finally{Ps(o)}}function Xt(n,e,t){const i=n+ei,r=Ee(),s=nn(r,i);return Pv(r,i)?fF(r,Qr(),e,s.transform,t,s):s.transform(t)}function b1(n,e,t,i){const r=n+ei,s=Ee(),o=nn(s,r);return Pv(s,r)?function pF(n,e,t,i,r,s,o){const a=e+t;return gh(n,a,r,s)?Fl(n,a+2,o?i.call(o,r,s):i(r,s)):Rv(n,a+2)}(s,Qr(),e,o.transform,t,i,o):o.transform(t,i)}function Pv(n,e){return n[Qe].data[e].pure}function x1(n){return e=>{setTimeout(n,void 0,e)}}const it=class _$ extends Ue{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,t,i){let r=e,s=t||(()=>null),o=i;if(e&&"object"==typeof e){const l=e;r=l.next?.bind(l),s=l.error?.bind(l),o=l.complete?.bind(l)}this.__isAsync&&(s=x1(s),r&&(r=x1(r)),o&&(o=x1(o)));const a=super.subscribe({next:r,error:s,complete:o});return e instanceof un&&e.add(a),a}};function v$(){return this._results[Symbol.iterator]()}class Wp{get changes(){return this._changes||(this._changes=new it)}constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const t=Wp.prototype;t[Symbol.iterator]||(t[Symbol.iterator]=v$)}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){const i=this;i.dirty=!1;const r=function lo(n){return n.flat(Number.POSITIVE_INFINITY)}(e);(this._changesDetected=!function KE(n,e,t){if(n.length!==e.length)return!1;for(let i=0;i{class n{}return n.__NG_ELEMENT_ID__=x$,n})();const y$=fo,b$=class extends y${constructor(e,t,i){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=i}createEmbeddedView(e,t){const i=this._declarationTContainer.tView,r=Ep(this._declarationLView,i,e,16,null,i.declTNode,null,null,null,null,t||null);r[Or]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[ra];return null!==o&&(r[ra]=o.createEmbeddedView(i)),mv(i,r,e),new bv(r)}};function x$(){return mw(xr(),Ee())}function mw(n,e){return 4&n.type?new b$(e,n,Dc(n,e)):null}let is=(()=>{class n{}return n.__NG_ELEMENT_ID__=w$,n})();function w$(){return bF(xr(),Ee())}const M$=is,vF=class extends M${constructor(e,t,i){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=i}get element(){return Dc(this._hostTNode,this._hostLView)}get injector(){return new El(this._hostTNode,this._hostLView)}get parentInjector(){const e=Qu(this._hostTNode,this._hostLView);if(jf(e)){const t=Yu(e,this._hostLView),i=Xf(e);return new El(t[Qe].data[i+8],t)}return new El(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){const t=yF(this._lContainer);return null!==t&&t[e]||null}get length(){return this._lContainer.length-Zr}createEmbeddedView(e,t,i){let r,s;"number"==typeof i?r=i:null!=i&&(r=i.index,s=i.injector);const o=e.createEmbeddedView(t||{},s);return this.insert(o,r),o}createComponent(e,t,i,r,s){const o=e&&!function fs(n){return"function"==typeof n}(e);let a;if(o)a=t;else{const h=t||{};a=h.index,i=h.injector,r=h.projectableNodes,s=h.environmentInjector||h.ngModuleRef}const l=o?e:new xv(Wn(e)),c=i||this.parentInjector;if(!s&&null==l.ngModule){const p=(o?c:this.parentInjector).get($a,null);p&&(s=p)}const u=l.create(c,r,void 0,s);return this.insert(u.hostView,a),u}insert(e,t){const i=e._lView,r=i[Qe];if(function pc(n){return us(n[Ti])}(i)){const u=this.indexOf(e);if(-1!==u)this.detach(u);else{const h=i[Ti],p=new vF(h,h[tr],h[Ti]);p.detach(p.indexOf(e))}}const s=this._adjustIndex(t),o=this._lContainer;!function gA(n,e,t,i){const r=Zr+i,s=t.length;i>0&&(t[r-1][Ro]=e),i0)i.push(o[a/2]);else{const c=s[a+1],u=e[-l];for(let h=Zr;h{class n{constructor(t){this.appInits=t,this.resolve=_w,this.reject=_w,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const t=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{s.subscribe({complete:a,error:l})});t.push(o)}}Promise.all(t).then(()=>{i()}).catch(r=>{this.reject(r)}),0===t.length&&i(),this.initialized=!0}}return n.\u0275fac=function(t){return new(t||n)(Q(vw,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Xp=new ge("AppId",{providedIn:"root",factory:function GF(){return`${k1()}${k1()}${k1()}`}});function k1(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const WF=new ge("Platform Initializer"),O1=new ge("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),rs=new ge("AnimationModuleType");let Y$=(()=>{class n{log(t){console.log(t)}warn(t){console.warn(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();const Ul=new ge("LocaleId",{providedIn:"root",factory:()=>Ot(Ul,At.Optional|At.SkipSelf)||function K$(){return typeof $localize<"u"&&$localize.locale||Hp}()});class Q${constructor(e,t){this.ngModuleFactory=e,this.componentFactories=t}}let $F=(()=>{class n{compileModuleSync(t){return new _1(t)}compileModuleAsync(t){return Promise.resolve(this.compileModuleSync(t))}compileModuleAndAllComponentsSync(t){const i=this.compileModuleSync(t),s=qa(Os(t).declarations).reduce((o,a)=>{const l=Wn(a);return l&&o.push(new xv(l)),o},[]);return new Q$(i,s)}compileModuleAndAllComponentsAsync(t){return Promise.resolve(this.compileModuleAndAllComponentsSync(t))}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const t6=(()=>Promise.resolve(0))();function L1(n){typeof Zone>"u"?t6.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class pt{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new it(!1),this.onMicrotaskEmpty=new it(!1),this.onStable=new it(!1),this.onError=new it(!1),typeof Zone>"u")throw new fe(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&t,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function n6(){let n=bn.requestAnimationFrame,e=bn.cancelAnimationFrame;if(typeof Zone<"u"&&n&&e){const t=n[Zone.__symbol__("OriginalDelegate")];t&&(n=t);const i=e[Zone.__symbol__("OriginalDelegate")];i&&(e=i)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function s6(n){const e=()=>{!function r6(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(bn,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,N1(n),n.isCheckStableRunning=!0,F1(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),N1(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,i,r,s,o,a)=>{try{return qF(n),t.invokeTask(r,s,o,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||n.shouldCoalesceRunChangeDetection)&&e(),YF(n)}},onInvoke:(t,i,r,s,o,a,l)=>{try{return qF(n),t.invoke(r,s,o,a,l)}finally{n.shouldCoalesceRunChangeDetection&&e(),YF(n)}},onHasTask:(t,i,r,s)=>{t.hasTask(r,s),i===r&&("microTask"==s.change?(n._hasPendingMicrotasks=s.microTask,N1(n),F1(n)):"macroTask"==s.change&&(n.hasPendingMacrotasks=s.macroTask))},onHandleError:(t,i,r,s)=>(t.handleError(r,s),n.runOutsideAngular(()=>n.onError.emit(s)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!pt.isInAngularZone())throw new fe(909,!1)}static assertNotInAngularZone(){if(pt.isInAngularZone())throw new fe(909,!1)}run(e,t,i){return this._inner.run(e,t,i)}runTask(e,t,i,r){const s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+r,e,i6,_w,_w);try{return s.runTask(o,t,i)}finally{s.cancelTask(o)}}runGuarded(e,t,i){return this._inner.runGuarded(e,t,i)}runOutsideAngular(e){return this._outer.run(e)}}const i6={};function F1(n){if(0==n._nesting&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function N1(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function qF(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function YF(n){n._nesting--,F1(n)}class o6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new it,this.onMicrotaskEmpty=new it,this.onStable=new it,this.onError=new it}run(e,t,i){return e.apply(t,i)}runGuarded(e,t,i){return e.apply(t,i)}runOutsideAngular(e){return e()}runTask(e,t,i,r){return e.apply(t,i)}}const KF=new ge(""),bw=new ge("");let V1,B1=(()=>{class n{constructor(t,i,r){this._ngZone=t,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,V1||(function a6(n){V1=n}(r),r.addToWindow(i)),this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{pt.assertNotInAngularZone(),L1(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())L1(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(t)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,i,r){let s=-1;i&&i>0&&(s=setTimeout(()=>{this._callbacks=this._callbacks.filter(o=>o.timeoutId!==s),t(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:t,timeoutId:s,updateCb:r})}whenStable(t,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(t,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(t){this.registry.registerApplication(t,this)}unregisterApplication(t){this.registry.unregisterApplication(t)}findProviders(t,i,r){return[]}}return n.\u0275fac=function(t){return new(t||n)(Q(pt),Q(U1),Q(bw))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),U1=(()=>{class n{constructor(){this._applications=new Map}registerApplication(t,i){this._applications.set(t,i)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,i=!0){return V1?.findTestabilityInTree(this,t,i)??null}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();const Oc=!1;let Bd=null;const ZF=new ge("AllowMultipleToken"),z1=new ge("PlatformDestroyListeners"),QF=new ge("appBootstrapListener");class JF{constructor(e,t){this.name=e,this.token=t}}function t2(n,e,t=[]){const i=`Platform: ${e}`,r=new ge(i);return(s=[])=>{let o=H1();if(!o||o.injector.get(ZF,!1)){const a=[...t,...s,{provide:r,useValue:!0}];n?n(a):function d6(n){if(Bd&&!Bd.get(ZF,!1))throw new fe(400,!1);Bd=n;const e=n.get(r2);(function e2(n){const e=n.get(WF,null);e&&e.forEach(t=>t())})(n)}(function n2(n=[],e){return ki.create({name:e,providers:[{provide:ev,useValue:"platform"},{provide:z1,useValue:new Set([()=>Bd=null])},...n]})}(a,i))}return function h6(n){const e=H1();if(!e)throw new fe(401,!1);return e}()}}function H1(){return Bd?.get(r2)??null}let r2=(()=>{class n{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,i){const r=function o2(n,e){let t;return t="noop"===n?new o6:("zone.js"===n?void 0:n)||new pt(e),t}(i?.ngZone,function s2(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!n||!n.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!n||!n.ngZoneRunCoalescing)||!1}}(i)),s=[{provide:pt,useValue:r}];return r.run(()=>{const o=ki.create({providers:s,parent:this.injector,name:t.moduleType.name}),a=t.create(o),l=a.injector.get(Xa,null);if(!l)throw new fe(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:u=>{l.handleError(u)}});a.onDestroy(()=>{xw(this._modules,a),c.unsubscribe()})}),function a2(n,e,t){try{const i=t();return Sv(i)?i.catch(r=>{throw e.runOutsideAngular(()=>n.handleError(r)),r}):i}catch(i){throw e.runOutsideAngular(()=>n.handleError(i)),i}}(l,r,()=>{const c=a.injector.get(yw);return c.runInitializers(),c.donePromise.then(()=>(function kL(n){io(n,"Expected localeId to be defined"),"string"==typeof n&&(PL=n.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Ul,Hp)||Hp),this._moduleDoBootstrap(a),a))})})}bootstrapModule(t,i=[]){const r=l2({},i);return function l6(n,e,t){const i=new _1(t);return Promise.resolve(i)}(0,0,t).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(t){const i=t.injector.get(qp);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!t.instance.ngDoBootstrap)throw new fe(-403,!1);t.instance.ngDoBootstrap(i)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new fe(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const t=this._injector.get(z1,null);t&&(t.forEach(i=>i()),t.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(t){return new(t||n)(Q(ki))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();function l2(n,e){return Array.isArray(e)?e.reduce(l2,n):{...n,...e}}let qp=(()=>{class n{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(t,i,r){this._zone=t,this._injector=i,this._exceptionHandler=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const s=new Sn(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),o=new Sn(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{pt.assertNotInAngularZone(),L1(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{pt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=cs(s,o.pipe(Tu()))}bootstrap(t,i){const r=t instanceof Tx;if(!this._injector.get(yw).done){!r&&function md(n){const e=Wn(n)||wi(n)||yr(n);return null!==e&&e.standalone}(t);throw new fe(405,Oc)}let o;o=r?t:this._injector.get(Ol).resolveComponentFactory(t),this.componentTypes.push(o.componentType);const a=function c6(n){return n.isBoundToModule}(o)?void 0:this._injector.get(Gp),c=o.create(ki.NULL,[],i||o.selector,a),u=c.location.nativeElement,h=c.injector.get(KF,null);return h?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),xw(this.components,c),h?.unregisterApplication(u)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new fe(101,!1);try{this._runningTick=!0;for(let t of this._views)t.detectChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const i=t;this._views.push(i),i.attachToAppRef(this)}detachView(t){const i=t;xw(this._views,i),i.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t);const i=this._injector.get(QF,[]);i.push(...this._bootstrapListeners),i.forEach(r=>r(t))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(t=>t()),this._views.slice().forEach(t=>t.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>xw(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new fe(406,!1);const t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return n.\u0275fac=function(t){return new(t||n)(Q(pt),Q($a),Q(Xa))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function xw(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}let ci=(()=>{class n{}return n.__NG_ELEMENT_ID__=p6,n})();function p6(n){return function m6(n,e,t){if(bl(n)&&!t){const i=hs(n.index,e);return new bv(i,i)}return 47&n.type?new bv(e[kr],e):null}(xr(),Ee(),16==(16&n))}class f2{constructor(){}supports(e){return sw(e)}create(e){return new x6(e)}}const b6=(n,e)=>e;class x6{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||b6}forEachItem(e){let t;for(t=this._itHead;null!==t;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,i=this._removalsHead,r=0,s=null;for(;t||i;){const o=!i||t&&t.currentIndex{o=this._trackByFn(r,a),null!==t&&Object.is(t.trackById,o)?(i&&(t=this._verifyReinsertion(t,a,o,r)),Object.is(t.item,a)||this._addIdentityChange(t,a)):(t=this._mismatch(t,a,o,r),i=!0),t=t._next,r++}),this.length=r;return this._truncate(t),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,i,r){let s;return null===e?s=this._itTail:(s=e._prev,this._remove(e)),null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,s,r)):null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,s,r)):e=this._addAfter(new w6(t,i),s,r),e}_verifyReinsertion(e,t,i,r){let s=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==s?e=this._reinsertAfter(s,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e}_truncate(e){for(;null!==e;){const t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,t,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const r=e._prevRemoved,s=e._nextRemoved;return null===r?this._removalsHead=s:r._nextRemoved=s,null===s?this._removalsTail=r:s._prevRemoved=r,this._insertAfter(e,t,i),this._addToMoves(e,i),e}_moveAfter(e,t,i){return this._unlink(e),this._insertAfter(e,t,i),this._addToMoves(e,i),e}_addAfter(e,t,i){return this._insertAfter(e,t,i),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e}_insertAfter(e,t,i){const r=null===t?this._itHead:t._next;return e._next=r,e._prev=t,null===r?this._itTail=e:r._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new p2),this._linkedRecords.put(e),e.currentIndex=i,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const t=e._prev,i=e._next;return null===t?this._itHead=i:t._next=i,null===i?this._itTail=t:i._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new p2),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e}}class w6{constructor(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class M6{constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,t){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===t||t<=i.currentIndex)&&Object.is(i.trackById,e))return i;return null}remove(e){const t=e._prevDup,i=e._nextDup;return null===t?this._head=i:t._nextDup=i,null===i?this._tail=t:i._prevDup=t,null===this._head}}class p2{constructor(){this.map=new Map}put(e){const t=e.trackById;let i=this.map.get(t);i||(i=new M6,this.map.set(t,i)),i.add(e)}get(e,t){const r=this.map.get(e);return r?r.get(e,t):null}remove(e){const t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function m2(n,e,t){const i=n.previousIndex;if(null===i)return i;let r=0;return t&&i{if(t&&t.key===r)this._maybeAddToChanges(t,i),this._appendAfter=t,t=t._next;else{const s=this._getOrCreateRecordForKey(r,i);t=this._insertBeforeOrAppend(t,s)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let i=t;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){const i=e._prev;return t._next=e,t._prev=i,e._prev=t,i&&(i._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){const r=this._records.get(e);this._maybeAddToChanges(r,t);const s=r._prev,o=r._next;return s&&(s._next=o),o&&(o._prev=s),r._next=null,r._prev=null,r}const i=new C6(e);return this._records.set(e,i),i.currentValue=t,this._addToAdditions(i),i}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,t){Object.is(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(i=>t(e[i],i))}}class C6{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function _2(){return new Sw([new f2])}let Sw=(()=>{class n{constructor(t){this.factories=t}static create(t,i){if(null!=i){const r=i.factories.slice();t=t.concat(r)}return new n(t)}static extend(t){return{provide:n,useFactory:i=>n.create(t,i||_2()),deps:[[n,new Il,new Po]]}}find(t){const i=this.factories.find(r=>r.supports(t));if(null!=i)return i;throw new fe(901,!1)}}return n.\u0275prov=ke({token:n,providedIn:"root",factory:_2}),n})();function v2(){return new Ov([new g2])}let Ov=(()=>{class n{constructor(t){this.factories=t}static create(t,i){if(i){const r=i.factories.slice();t=t.concat(r)}return new n(t)}static extend(t){return{provide:n,useFactory:i=>n.create(t,i||v2()),deps:[[n,new Il,new Po]]}}find(t){const i=this.factories.find(r=>r.supports(t));if(i)return i;throw new fe(901,!1)}}return n.\u0275prov=ke({token:n,providedIn:"root",factory:v2}),n})();const T6=t2(null,"core",[]);let D6=(()=>{class n{constructor(t){}}return n.\u0275fac=function(t){return new(t||n)(Q(qp))},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({}),n})();let X1=null;function Lc(){return X1}class P6{}const Ht=new ge("DocumentToken");let q1=(()=>{class n{historyGo(t){throw new Error("Not implemented")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:function(){return function k6(){return Q(y2)}()},providedIn:"platform"}),n})();const O6=new ge("Location Initialized");let y2=(()=>{class n extends q1{constructor(t){super(),this._doc=t,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Lc().getBaseHref(this._doc)}onPopState(t){const i=Lc().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",t,!1),()=>i.removeEventListener("popstate",t)}onHashChange(t){const i=Lc().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",t,!1),()=>i.removeEventListener("hashchange",t)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(t){this._location.pathname=t}pushState(t,i,r){b2()?this._history.pushState(t,i,r):this._location.hash=r}replaceState(t,i,r){b2()?this._history.replaceState(t,i,r):this._location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}}return n.\u0275fac=function(t){return new(t||n)(Q(Ht))},n.\u0275prov=ke({token:n,factory:function(){return function L6(){return new y2(Q(Ht))}()},providedIn:"platform"}),n})();function b2(){return!!window.history.pushState}function Y1(n,e){if(0==n.length)return e;if(0==e.length)return n;let t=0;return n.endsWith("/")&&t++,e.startsWith("/")&&t++,2==t?n+e.substring(1):1==t?n+e:n+"/"+e}function x2(n){const e=n.match(/#|\?|$/),t=e&&e.index||n.length;return n.slice(0,t-("/"===n[t-1]?1:0))+n.slice(t)}function Fc(n){return n&&"?"!==n[0]?"?"+n:n}let bh=(()=>{class n{historyGo(t){throw new Error("Not implemented")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:function(){return Ot(M2)},providedIn:"root"}),n})();const w2=new ge("appBaseHref");let M2=(()=>{class n extends bh{constructor(t,i){super(),this._platformLocation=t,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??Ot(Ht).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return Y1(this._baseHref,t)}path(t=!1){const i=this._platformLocation.pathname+Fc(this._platformLocation.search),r=this._platformLocation.hash;return r&&t?`${i}${r}`:i}pushState(t,i,r,s){const o=this.prepareExternalUrl(r+Fc(s));this._platformLocation.pushState(t,i,o)}replaceState(t,i,r,s){const o=this.prepareExternalUrl(r+Fc(s));this._platformLocation.replaceState(t,i,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}}return n.\u0275fac=function(t){return new(t||n)(Q(q1),Q(w2,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),F6=(()=>{class n extends bh{constructor(t,i){super(),this._platformLocation=t,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}path(t=!1){let i=this._platformLocation.hash;return null==i&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(t){const i=Y1(this._baseHref,t);return i.length>0?"#"+i:i}pushState(t,i,r,s){let o=this.prepareExternalUrl(r+Fc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(t,i,o)}replaceState(t,i,r,s){let o=this.prepareExternalUrl(r+Fc(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.replaceState(t,i,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}}return n.\u0275fac=function(t){return new(t||n)(Q(q1),Q(w2,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),Lv=(()=>{class n{constructor(t){this._subject=new it,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=t;const i=this._locationStrategy.getBaseHref();this._basePath=function U6(n){if(new RegExp("^(https?:)?//").test(n)){const[,t]=n.split(/\/\/[^\/]+/);return t}return n}(x2(S2(i))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(t=!1){return this.normalize(this._locationStrategy.path(t))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(t,i=""){return this.path()==this.normalize(t+Fc(i))}normalize(t){return n.stripTrailingSlash(function B6(n,e){if(!n||!e.startsWith(n))return e;const t=e.substring(n.length);return""===t||["/",";","?","#"].includes(t[0])?t:e}(this._basePath,S2(t)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._locationStrategy.prepareExternalUrl(t)}go(t,i="",r=null){this._locationStrategy.pushState(r,"",t,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Fc(i)),r)}replaceState(t,i="",r=null){this._locationStrategy.replaceState(r,"",t,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Fc(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(t=0){this._locationStrategy.historyGo?.(t)}onUrlChange(t){return this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{const i=this._urlChangeListeners.indexOf(t);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(t="",i){this._urlChangeListeners.forEach(r=>r(t,i))}subscribe(t,i,r){return this._subject.subscribe({next:t,error:i,complete:r})}}return n.normalizeQueryParams=Fc,n.joinWithSlash=Y1,n.stripTrailingSlash=x2,n.\u0275fac=function(t){return new(t||n)(Q(bh))},n.\u0275prov=ke({token:n,factory:function(){return function N6(){return new Lv(Q(bh))}()},providedIn:"root"}),n})();function S2(n){return n.replace(/\/index.html$/,"")}var po=(()=>((po=po||{})[po.Decimal=0]="Decimal",po[po.Percent=1]="Percent",po[po.Currency=2]="Currency",po[po.Scientific=3]="Scientific",po))(),It=(()=>((It=It||{})[It.Decimal=0]="Decimal",It[It.Group=1]="Group",It[It.List=2]="List",It[It.PercentSign=3]="PercentSign",It[It.PlusSign=4]="PlusSign",It[It.MinusSign=5]="MinusSign",It[It.Exponential=6]="Exponential",It[It.SuperscriptingExponent=7]="SuperscriptingExponent",It[It.PerMille=8]="PerMille",It[It.Infinity=9]="Infinity",It[It.NaN=10]="NaN",It[It.TimeSeparator=11]="TimeSeparator",It[It.CurrencyDecimal=12]="CurrencyDecimal",It[It.CurrencyGroup=13]="CurrencyGroup",It))();function ga(n,e){const t=js(n),i=t[Ze.NumberSymbols][e];if(typeof i>"u"){if(e===It.CurrencyDecimal)return t[Ze.NumberSymbols][It.Decimal];if(e===It.CurrencyGroup)return t[Ze.NumberSymbols][It.Group]}return i}const uj=/^(\d+)?\.((\d+)(-(\d+))?)?$/,I2=22,kw=".",Nv="0",hj=";",fj=",",eD="#";function iD(n){const e=parseInt(n);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+n);return e}const sD=/\s+/,k2=[];let Bv=(()=>{class n{constructor(t,i,r,s){this._iterableDiffers=t,this._keyValueDiffers=i,this._ngEl=r,this._renderer=s,this.initialClasses=k2,this.stateMap=new Map}set klass(t){this.initialClasses=null!=t?t.trim().split(sD):k2}set ngClass(t){this.rawClass="string"==typeof t?t.trim().split(sD):t}ngDoCheck(){for(const i of this.initialClasses)this._updateState(i,!0);const t=this.rawClass;if(Array.isArray(t)||t instanceof Set)for(const i of t)this._updateState(i,!0);else if(null!=t)for(const i of Object.keys(t))this._updateState(i,Boolean(t[i]));this._applyStateDiff()}_updateState(t,i){const r=this.stateMap.get(t);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(t,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(const t of this.stateMap){const i=t[0],r=t[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(t,i){(t=t.trim()).length>0&&t.split(sD).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return n.\u0275fac=function(t){return new(t||n)(D(Sw),D(Ov),D(yt),D(fa))},n.\u0275dir=Ae({type:n,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),n})();class Sj{constructor(e,t,i,r){this.$implicit=e,this.ngForOf=t,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Fo=(()=>{class n{set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}constructor(t,i,r){this._viewContainer=t,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const t=this._ngForOf;!this._differ&&t&&(this._differ=this._differs.find(t).create(this.ngForTrackBy))}if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const i=this._viewContainer;t.forEachOperation((r,s,o)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new Sj(r.item,this._ngForOf,-1,-1),null===o?void 0:o);else if(null==o)i.remove(null===s?void 0:s);else if(null!==s){const a=i.get(s);i.move(a,o),F2(a,r)}});for(let r=0,s=i.length;r{F2(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(t,i){return!0}}return n.\u0275fac=function(t){return new(t||n)(D(is),D(fo),D(Sw))},n.\u0275dir=Ae({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),n})();function F2(n,e){n.context.$implicit=e.item}let gi=(()=>{class n{constructor(t,i){this._viewContainer=t,this._context=new Ej,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){N2("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){N2("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,i){return!0}}return n.\u0275fac=function(t){return new(t||n)(D(is),D(fo))},n.\u0275dir=Ae({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),n})();class Ej{constructor(){this.$implicit=null,this.ngIf=null}}function N2(n,e){if(e&&!e.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${ri(e)}'.`)}class oD{constructor(e,t){this._viewContainerRef=e,this._templateRef=t,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(e){e&&!this._created?this.create():!e&&this._created&&this.destroy()}}let Uv=(()=>{class n{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(t){this._ngSwitch=t,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(t){this._defaultViews.push(t)}_matchCase(t){const i=t==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(t){if(this._defaultViews.length>0&&t!==this._defaultUsed){this._defaultUsed=t;for(const i of this._defaultViews)i.enforceState(t)}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),n})(),aD=(()=>{class n{constructor(t,i,r){this.ngSwitch=r,r._addCase(),this._view=new oD(t,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return n.\u0275fac=function(t){return new(t||n)(D(is),D(fo),D(Uv,9))},n.\u0275dir=Ae({type:n,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),n})(),B2=(()=>{class n{constructor(t,i,r){r._addDefault(new oD(t,i))}}return n.\u0275fac=function(t){return new(t||n)(D(is),D(fo),D(Uv,9))},n.\u0275dir=Ae({type:n,selectors:[["","ngSwitchDefault",""]],standalone:!0}),n})(),Ow=(()=>{class n{constructor(t,i,r){this._ngEl=t,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,i){const[r,s]=t.split("."),o=-1===r.indexOf("-")?void 0:ns.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,s?`${i}${s}`:i,o):this._renderer.removeStyle(this._ngEl.nativeElement,r,o)}_applyChanges(t){t.forEachRemovedItem(i=>this._setStyle(i.key,null)),t.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),t.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(Ov),D(fa))},n.\u0275dir=Ae({type:n,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),n})(),Vv=(()=>{class n{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(t){if(t.ngTemplateOutlet||t.ngTemplateOutletInjector){const i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:r,ngTemplateOutletContext:s,ngTemplateOutletInjector:o}=this;this._viewRef=i.createEmbeddedView(r,s,o?{injector:o}:void 0)}else this._viewRef=null}else this._viewRef&&t.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return n.\u0275fac=function(t){return new(t||n)(D(is))},n.\u0275dir=Ae({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[zi]}),n})();function el(n,e){return new fe(2100,!1)}class Tj{createSubscription(e,t){return e.subscribe({next:t,error:i=>{throw i}})}dispose(e){e.unsubscribe()}}class Dj{createSubscription(e,t){return e.then(t,i=>{throw i})}dispose(e){}}const Ij=new Dj,Rj=new Tj;let Vl=(()=>{class n{constructor(t){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=t}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(t){return this._obj?t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue:(t&&this._subscribe(t),this._latestValue)}_subscribe(t){this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,i=>this._updateLatestValue(t,i))}_selectStrategy(t){if(Sv(t))return Ij;if(HO(t))return Rj;throw el()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(t,i){t===this._obj&&(this._latestValue=i,this._ref.markForCheck())}}return n.\u0275fac=function(t){return new(t||n)(D(ci,16))},n.\u0275pipe=Pr({name:"async",type:n,pure:!1,standalone:!0}),n})(),V2=(()=>{class n{constructor(t){this.differs=t,this.keyValues=[],this.compareFn=z2}transform(t,i=z2){if(!t||!(t instanceof Map)&&"object"!=typeof t)return null;this.differ||(this.differ=this.differs.find(t).create());const r=this.differ.diff(t),s=i!==this.compareFn;return r&&(this.keyValues=[],r.forEachItem(o=>{this.keyValues.push(function Wj(n,e){return{key:n,value:e}}(o.key,o.currentValue))})),(r||s)&&(this.keyValues.sort(i),this.compareFn=i),this.keyValues}}return n.\u0275fac=function(t){return new(t||n)(D(Ov,16))},n.\u0275pipe=Pr({name:"keyvalue",type:n,pure:!1,standalone:!0}),n})();function z2(n,e){const t=n.key,i=e.key;if(t===i)return 0;if(void 0===t)return 1;if(void 0===i)return-1;if(null===t)return 1;if(null===i)return-1;if("string"==typeof t&&"string"==typeof i)return t{class n{constructor(t){this._locale=t}transform(t,i,r){if(!function lD(n){return!(null==n||""===n||n!=n)}(t))return null;r=r||this._locale;try{return function _j(n,e,t){return function tD(n,e,t,i,r,s,o=!1){let a="",l=!1;if(isFinite(n)){let c=function yj(n){let i,r,s,o,a,e=Math.abs(n)+"",t=0;for((r=e.indexOf(kw))>-1&&(e=e.replace(kw,"")),(s=e.search(/e/i))>0?(r<0&&(r=s),r+=+e.slice(s+1),e=e.substring(0,s)):r<0&&(r=e.length),s=0;e.charAt(s)===Nv;s++);if(s===(a=e.length))i=[0],r=1;else{for(a--;e.charAt(a)===Nv;)a--;for(r-=s,i=[],o=0;s<=a;s++,o++)i[o]=Number(e.charAt(s))}return r>I2&&(i=i.splice(0,I2-1),t=r-1,r=1),{digits:i,exponent:t,integerLen:r}}(n);o&&(c=function vj(n){if(0===n.digits[0])return n;const e=n.digits.length-n.integerLen;return n.exponent?n.exponent+=2:(0===e?n.digits.push(0,0):1===e&&n.digits.push(0),n.integerLen+=2),n}(c));let u=e.minInt,h=e.minFrac,p=e.maxFrac;if(s){const M=s.match(uj);if(null===M)throw new Error(`${s} is not a valid digit info`);const x=M[1],S=M[3],P=M[5];null!=x&&(u=iD(x)),null!=S&&(h=iD(S)),null!=P?p=iD(P):null!=S&&h>p&&(p=h)}!function bj(n,e,t){if(e>t)throw new Error(`The minimum number of digits after fraction (${e}) is higher than the maximum (${t}).`);let i=n.digits,r=i.length-n.integerLen;const s=Math.min(Math.max(e,r),t);let o=s+n.integerLen,a=i[o];if(o>0){i.splice(Math.max(n.integerLen,o));for(let h=o;h=5)if(o-1<0){for(let h=0;h>o;h--)i.unshift(0),n.integerLen++;i.unshift(1),n.integerLen++}else i[o-1]++;for(;r=c?g.pop():l=!1),p>=10?1:0},0);u&&(i.unshift(u),n.integerLen++)}(c,h,p);let m=c.digits,g=c.integerLen;const b=c.exponent;let y=[];for(l=m.every(M=>!M);g0?y=m.splice(g,m.length):(y=m,m=[0]);const v=[];for(m.length>=e.lgSize&&v.unshift(m.splice(-e.lgSize,m.length).join(""));m.length>e.gSize;)v.unshift(m.splice(-e.gSize,m.length).join(""));m.length&&v.unshift(m.join("")),a=v.join(ga(t,i)),y.length&&(a+=ga(t,r)+y.join("")),b&&(a+=ga(t,It.Exponential)+"+"+b)}else a=ga(t,It.Infinity);return a=n<0&&!l?e.negPre+a+e.negSuf:e.posPre+a+e.posSuf,a}(n,function nD(n,e="-"){const t={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=n.split(hj),r=i[0],s=i[1],o=-1!==r.indexOf(kw)?r.split(kw):[r.substring(0,r.lastIndexOf(Nv)+1),r.substring(r.lastIndexOf(Nv)+1)],a=o[0],l=o[1]||"";t.posPre=a.substring(0,a.indexOf(eD));for(let u=0;u{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({}),n})();const G2="browser";let Zj=(()=>{class n{}return n.\u0275prov=ke({token:n,providedIn:"root",factory:()=>new Qj(Q(Ht),window)}),n})();class Qj{constructor(e,t){this.document=e,this.window=t,this.offset=()=>[0,0]}setOffset(e){this.offset=Array.isArray(e)?()=>e:e}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(e){this.supportsScrolling()&&this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){if(!this.supportsScrolling())return;const t=function Jj(n,e){const t=n.getElementById(e)||n.getElementsByName(e)[0];if(t)return t;if("function"==typeof n.createTreeWalker&&n.body&&(n.body.createShadowRoot||n.body.attachShadow)){const i=n.createTreeWalker(n.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const s=r.shadowRoot;if(s){const o=s.getElementById(e)||s.querySelector(`[name="${e}"]`);if(o)return o}r=i.nextNode()}}return null}(this.document,e);t&&(this.scrollToElement(t),t.focus())}setHistoryScrollRestoration(e){if(this.supportScrollRestoration()){const t=this.window.history;t&&t.scrollRestoration&&(t.scrollRestoration=e)}}scrollToElement(e){const t=e.getBoundingClientRect(),i=t.left+this.window.pageXOffset,r=t.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(i-s[0],r-s[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const e=W2(this.window.history)||W2(Object.getPrototypeOf(this.window.history));return!(!e||!e.writable&&!e.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function W2(n){return Object.getOwnPropertyDescriptor(n,"scrollRestoration")}class A9 extends P6{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class hD extends A9{static makeCurrent(){!function R6(n){X1||(X1=n)}(new hD)}onAndCancel(e,t,i){return e.addEventListener(t,i,!1),()=>{e.removeEventListener(t,i,!1)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,t){return(t=t||this.getDefaultDocument()).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"window"===t?window:"document"===t?e:"body"===t?e.body:null}getBaseHref(e){const t=function T9(){return Hv=Hv||document.querySelector("base"),Hv?Hv.getAttribute("href"):null}();return null==t?null:function D9(n){Nw=Nw||document.createElement("a"),Nw.setAttribute("href",n);const e=Nw.pathname;return"/"===e.charAt(0)?e:`/${e}`}(t)}resetBaseElement(){Hv=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return function wj(n,e){e=encodeURIComponent(e);for(const t of n.split(";")){const i=t.indexOf("="),[r,s]=-1==i?[t,""]:[t.slice(0,i),t.slice(i+1)];if(r.trim()===e)return decodeURIComponent(s)}return null}(document.cookie,e)}}let Nw,Hv=null;const Y2=new ge("TRANSITION_ID"),R9=[{provide:vw,useFactory:function I9(n,e,t){return()=>{t.get(yw).donePromise.then(()=>{const i=Lc(),r=e.querySelectorAll(`style[ng-transition="${n}"]`);for(let s=0;s{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const Bw=new ge("EventManagerPlugins");let Uw=(()=>{class n{constructor(t,i){this._zone=i,this._eventNameToPlugin=new Map,t.forEach(r=>{r.manager=this}),this._plugins=t.slice().reverse()}addEventListener(t,i,r){return this._findPluginFor(i).addEventListener(t,i,r)}addGlobalEventListener(t,i,r){return this._findPluginFor(i).addGlobalEventListener(t,i,r)}getZone(){return this._zone}_findPluginFor(t){const i=this._eventNameToPlugin.get(t);if(i)return i;const r=this._plugins;for(let s=0;s{class n{constructor(){this.usageCount=new Map}addStyles(t){for(const i of t)1===this.changeUsageCount(i,1)&&this.onStyleAdded(i)}removeStyles(t){for(const i of t)0===this.changeUsageCount(i,-1)&&this.onStyleRemoved(i)}onStyleRemoved(t){}onStyleAdded(t){}getAllStyles(){return this.usageCount.keys()}changeUsageCount(t,i){const r=this.usageCount;let s=r.get(t)??0;return s+=i,s>0?r.set(t,s):r.delete(t),s}ngOnDestroy(){for(const t of this.getAllStyles())this.onStyleRemoved(t);this.usageCount.clear()}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),Gv=(()=>{class n extends Z2{constructor(t){super(),this.doc=t,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(t){for(const i of this.hostNodes)this.addStyleToHost(i,t)}onStyleRemoved(t){const i=this.styleRef;i.get(t)?.forEach(s=>s.remove()),i.delete(t)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(t){this.hostNodes.add(t);for(const i of this.getAllStyles())this.addStyleToHost(t,i)}removeHost(t){this.hostNodes.delete(t)}addStyleToHost(t,i){const r=this.doc.createElement("style");r.textContent=i,t.appendChild(r);const s=this.styleRef.get(i);s?s.push(r):this.styleRef.set(i,[r])}resetHostNodes(){const t=this.hostNodes;t.clear(),t.add(this.doc.head)}}return n.\u0275fac=function(t){return new(t||n)(Q(Ht))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const fD={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/MathML/"},pD=/%COMP%/g,eN=new ge("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function tN(n,e){return e.flat(100).map(t=>t.replace(pD,n))}function nN(n){return e=>{if("__ngUnwrap__"===e)return n;!1===n(e)&&(e.preventDefault(),e.returnValue=!1)}}let Vw=(()=>{class n{constructor(t,i,r,s){this.eventManager=t,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestory=s,this.rendererByCompId=new Map,this.defaultRenderer=new mD(t)}createRenderer(t,i){if(!t||!i)return this.defaultRenderer;const r=this.getOrCreateRenderer(t,i);return r instanceof sN?r.applyToHost(t):r instanceof gD&&r.applyStyles(),r}getOrCreateRenderer(t,i){const r=this.rendererByCompId;let s=r.get(i.id);if(!s){const o=this.eventManager,a=this.sharedStylesHost,l=this.removeStylesOnCompDestory;switch(i.encapsulation){case Do.Emulated:s=new sN(o,a,i,this.appId,l);break;case Do.ShadowDom:return new V9(o,a,t,i);default:s=new gD(o,a,i,l)}s.onDestroy=()=>r.delete(i.id),r.set(i.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}return n.\u0275fac=function(t){return new(t||n)(Q(Uw),Q(Gv),Q(Xp),Q(eN))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();class mD{constructor(e){this.eventManager=e,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(e,t){return t?document.createElementNS(fD[t]||t,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,t){(rN(e)?e.content:e).appendChild(t)}insertBefore(e,t,i){e&&(rN(e)?e.content:e).insertBefore(t,i)}removeChild(e,t){e&&e.removeChild(t)}selectRootElement(e,t){let i="string"==typeof e?document.querySelector(e):e;if(!i)throw new Error(`The selector "${e}" did not match any elements`);return t||(i.textContent=""),i}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,i,r){if(r){t=r+":"+t;const s=fD[r];s?e.setAttributeNS(s,t,i):e.setAttribute(t,i)}else e.setAttribute(t,i)}removeAttribute(e,t,i){if(i){const r=fD[i];r?e.removeAttributeNS(r,t):e.removeAttribute(`${i}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,i,r){r&(ns.DashCase|ns.Important)?e.style.setProperty(t,i,r&ns.Important?"important":""):e.style[t]=i}removeStyle(e,t,i){i&ns.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,i){e[t]=i}setValue(e,t){e.nodeValue=t}listen(e,t,i){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,nN(i)):this.eventManager.addEventListener(e,t,nN(i))}}function rN(n){return"TEMPLATE"===n.tagName&&void 0!==n.content}class V9 extends mD{constructor(e,t,i,r){super(e),this.sharedStylesHost=t,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const s=tN(r.id,r.styles);for(const o of s){const a=document.createElement("style");a.textContent=o,this.shadowRoot.appendChild(a)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,i){return super.insertBefore(this.nodeOrShadowRoot(e),t,i)}removeChild(e,t){return super.removeChild(this.nodeOrShadowRoot(e),t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class gD extends mD{constructor(e,t,i,r,s=i.id){super(e),this.sharedStylesHost=t,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=tN(s,i.styles)}applyStyles(){this.sharedStylesHost.addStyles(this.styles),this.rendererUsageCount++}destroy(){this.removeStylesOnCompDestory&&(this.sharedStylesHost.removeStyles(this.styles),this.rendererUsageCount--,0===this.rendererUsageCount&&this.onDestroy?.())}}class sN extends gD{constructor(e,t,i,r,s){const o=r+"-"+i.id;super(e,t,i,s,o),this.contentAttr=function N9(n){return"_ngcontent-%COMP%".replace(pD,n)}(o),this.hostAttr=function B9(n){return"_nghost-%COMP%".replace(pD,n)}(o)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){const i=super.createElement(e,t);return super.setAttribute(i,this.contentAttr,""),i}}let z9=(()=>{class n extends K2{constructor(t){super(t)}supports(t){return!0}addEventListener(t,i,r){return t.addEventListener(i,r,!1),()=>this.removeEventListener(t,i,r)}removeEventListener(t,i,r){return t.removeEventListener(i,r)}}return n.\u0275fac=function(t){return new(t||n)(Q(Ht))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const oN=["alt","control","meta","shift"],H9={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},G9={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let W9=(()=>{class n extends K2{constructor(t){super(t)}supports(t){return null!=n.parseEventName(t)}addEventListener(t,i,r){const s=n.parseEventName(i),o=n.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Lc().onAndCancel(t,s.domEventName,o))}static parseEventName(t){const i=t.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const s=n._normalizeKey(i.pop());let o="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),o="code."),oN.forEach(c=>{const u=i.indexOf(c);u>-1&&(i.splice(u,1),o+=c+".")}),o+=s,0!=i.length||0===s.length)return null;const l={};return l.domEventName=r,l.fullKey=o,l}static matchEventFullKeyCode(t,i){let r=H9[t.key]||t.key,s="";return i.indexOf("code.")>-1&&(r=t.code,s="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),oN.forEach(o=>{o!==r&&(0,G9[o])(t)&&(s+=o+".")}),s+=r,s===i)}static eventCallback(t,i,r){return s=>{n.matchEventFullKeyCode(s,t)&&r.runGuarded(()=>i(s))}}static _normalizeKey(t){return"esc"===t?"escape":t}}return n.\u0275fac=function(t){return new(t||n)(Q(Ht))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const q9=t2(T6,"browser",[{provide:O1,useValue:G2},{provide:WF,useValue:function $9(){hD.makeCurrent()},multi:!0},{provide:Ht,useFactory:function X9(){return function TA(n){G_=n}(document),document},deps:[]}]),cN=new ge(""),dN=[{provide:bw,useClass:class P9{addToWindow(e){bn.getAngularTestability=(i,r=!0)=>{const s=e.findTestabilityInTree(i,r);if(null==s)throw new Error("Could not find testability for element.");return s},bn.getAllAngularTestabilities=()=>e.getAllTestabilities(),bn.getAllAngularRootElements=()=>e.getAllRootElements(),bn.frameworkStabilizers||(bn.frameworkStabilizers=[]),bn.frameworkStabilizers.push(i=>{const r=bn.getAllAngularTestabilities();let s=r.length,o=!1;const a=function(l){o=o||l,s--,0==s&&i(o)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(e,t,i){return null==t?null:e.getTestability(t)??(i?Lc().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null)}},deps:[]},{provide:KF,useClass:B1,deps:[pt,U1,bw]},{provide:B1,useClass:B1,deps:[pt,U1,bw]}],uN=[{provide:ev,useValue:"root"},{provide:Xa,useFactory:function j9(){return new Xa},deps:[]},{provide:Bw,useClass:z9,multi:!0,deps:[Ht,pt,O1]},{provide:Bw,useClass:W9,multi:!0,deps:[Ht]},{provide:Vw,useClass:Vw,deps:[Uw,Gv,Xp,eN]},{provide:fh,useExisting:Vw},{provide:Z2,useExisting:Gv},{provide:Gv,useClass:Gv,deps:[Ht]},{provide:Uw,useClass:Uw,deps:[Bw,pt]},{provide:class e9{},useClass:k9,deps:[]},[]];let hN=(()=>{class n{constructor(t){}static withServerTransition(t){return{ngModule:n,providers:[{provide:Xp,useValue:t.appId},{provide:Y2,useExisting:Xp},R9]}}}return n.\u0275fac=function(t){return new(t||n)(Q(cN,12))},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({providers:[...uN,...dN],imports:[va,D6]}),n})(),fN=(()=>{class n{constructor(t){this._doc=t}getTitle(){return this._doc.title}setTitle(t){this._doc.title=t||""}}return n.\u0275fac=function(t){return new(t||n)(Q(Ht))},n.\u0275prov=ke({token:n,factory:function(t){let i=null;return i=t?new t:function K9(){return new fN(Q(Ht))}(),i},providedIn:"root"}),n})();typeof window<"u"&&window;let yD=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:function(t){let i=null;return i=t?new(t||n):Q(gN),i},providedIn:"root"}),n})(),gN=(()=>{class n extends yD{constructor(t){super(),this._doc=t}sanitize(t,i){if(null==i)return null;switch(t){case $n.NONE:return i;case $n.HTML:return zs(i,"HTML")?Vs(i):bx(this._doc,String(i)).toString();case $n.STYLE:return zs(i,"Style")?Vs(i):i;case $n.SCRIPT:if(zs(i,"Script"))return Vs(i);throw new Error("unsafe value used in a script context");case $n.URL:return zs(i,"URL")?Vs(i):Ac(String(i));case $n.RESOURCE_URL:if(zs(i,"ResourceURL"))return Vs(i);throw new Error(`unsafe value used in a resource URL context (see ${ud})`);default:throw new Error(`Unexpected SecurityContext ${t} (see ${ud})`)}}bypassSecurityTrustHtml(t){return function kA(n){return new mx(n)}(t)}bypassSecurityTrustStyle(t){return function OA(n){return new gx(n)}(t)}bypassSecurityTrustScript(t){return function LA(n){return new DA(n)}(t)}bypassSecurityTrustUrl(t){return function FA(n){return new IA(n)}(t)}bypassSecurityTrustResourceUrl(t){return function NA(n){return new RA(n)}(t)}}return n.\u0275fac=function(t){return new(t||n)(Q(Ht))},n.\u0275prov=ke({token:n,factory:function(t){let i=null;return i=t?new t:function t7(n){return new gN(n.get(Ht))}(Q(ki)),i},providedIn:"root"}),n})();function dt(...n){return Ri(n,Au(n))}class Ct extends Ue{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){const t=super._subscribe(e);return!t.closed&&e.next(this._value),t}getValue(){const{hasError:e,thrownError:t,_value:i}=this;if(e)throw t;return this._throwIfClosed(),i}next(e){super.next(this._value=e)}}const Wv=B(n=>function(){n(this),this.name="EmptyError",this.message="no elements in sequence"}),{isArray:n7}=Array,{getPrototypeOf:i7,prototype:r7,keys:s7}=Object;function _N(n){if(1===n.length){const e=n[0];if(n7(e))return{args:e,keys:null};if(function o7(n){return n&&"object"==typeof n&&i7(n)===r7}(e)){const t=s7(e);return{args:t.map(i=>e[i]),keys:t}}}return{args:n,keys:null}}const{isArray:a7}=Array;function bD(n){return Ye(e=>function l7(n,e){return a7(e)?n(...e):n(e)}(n,e))}function vN(n,e){return n.reduce((t,i,r)=>(t[i]=e[r],t),{})}function Vd(...n){const e=Au(n),t=Eu(n),{args:i,keys:r}=_N(n);if(0===i.length)return Ri([],e);const s=new Sn(function c7(n,e,t=Pa){return i=>{yN(e,()=>{const{length:r}=n,s=new Array(r);let o=r,a=r;for(let l=0;l{const c=Ri(n[l],e);let u=!1;c.subscribe(Un(i,h=>{s[l]=h,u||(u=!0,a--),a||i.next(t(s.slice()))},()=>{--o||i.complete()}))},i)},i)}}(i,e,r?o=>vN(r,o):Pa));return t?s.pipe(bD(t)):s}function yN(n,e,t){n?ta(t,n,e):e()}function $v(...n){return function d7(){return cd(1)}()(Ri(n,Au(n)))}function jv(n){return new Sn(e=>{lr(n()).subscribe(e)})}function Kp(n,e){const t=Qt(n)?n:()=>n,i=r=>r.error(t());return new Sn(e?r=>e.schedule(i,0,r):i)}function xD(){return Gn((n,e)=>{let t=null;n._refCount++;const i=Un(e,void 0,void 0,void 0,()=>{if(!n||n._refCount<=0||0<--n._refCount)return void(t=null);const r=n._connection,s=t;t=null,r&&(!s||r===s)&&r.unsubscribe(),e.unsubscribe()});n.subscribe(i),i.closed||(t=n.connect())})}class bN extends Sn{constructor(e,t){super(),this.source=e,this.subjectFactory=t,this._subject=null,this._refCount=0,this._connection=null,Db(e)&&(this.lift=e.lift)}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){const e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:e}=this;this._subject=this._connection=null,e?.unsubscribe()}connect(){let e=this._connection;if(!e){e=this._connection=new un;const t=this.getSubject();e.add(this.source.subscribe(Un(t,void 0,()=>{this._teardown(),t.complete()},i=>{this._teardown(),t.error(i)},()=>this._teardown()))),e.closed&&(this._connection=null,e=un.EMPTY)}return e}refCount(){return xD()(this)}}function gs(n,e){return Gn((t,i)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&i.complete();t.subscribe(Un(i,l=>{r?.unsubscribe();let c=0;const u=s++;lr(n(l,u)).subscribe(r=Un(i,h=>i.next(e?e(l,h,u,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Li(n){return n<=0?()=>Is:Gn((e,t)=>{let i=0;e.subscribe(Un(t,r=>{++i<=n&&(t.next(r),n<=i&&t.complete())}))})}function No(...n){const e=Au(n);return Gn((t,i)=>{(e?$v(n,t,e):$v(n,t)).subscribe(i)})}function On(n,e){return Gn((t,i)=>{let r=0;t.subscribe(Un(i,s=>n.call(e,s,r++)&&i.next(s)))})}function zw(n){return Gn((e,t)=>{let i=!1;e.subscribe(Un(t,r=>{i=!0,t.next(r)},()=>{i||t.next(n),t.complete()}))})}function xN(n=u7){return Gn((e,t)=>{let i=!1;e.subscribe(Un(t,r=>{i=!0,t.next(r)},()=>i?t.complete():t.error(n())))})}function u7(){return new Wv}function zd(n,e){const t=arguments.length>=2;return i=>i.pipe(n?On((r,s)=>n(r,s,i)):Pa,Li(1),t?zw(e):xN(()=>new Wv))}function Hd(n,e){return Qt(e)?er(n,e,1):er(n,1)}function Ii(n,e,t){const i=Qt(n)||e||t?{next:n,error:e,complete:t}:n;return i?Gn((r,s)=>{var o;null===(o=i.subscribe)||void 0===o||o.call(i);let a=!0;r.subscribe(Un(s,l=>{var c;null===(c=i.next)||void 0===c||c.call(i,l),s.next(l)},()=>{var l;a=!1,null===(l=i.complete)||void 0===l||l.call(i),s.complete()},l=>{var c;a=!1,null===(c=i.error)||void 0===c||c.call(i,l),s.error(l)},()=>{var l,c;a&&(null===(l=i.unsubscribe)||void 0===l||l.call(i)),null===(c=i.finalize)||void 0===c||c.call(i)}))}):Pa}function Bc(n){return Gn((e,t)=>{let s,i=null,r=!1;i=e.subscribe(Un(t,void 0,void 0,o=>{s=lr(n(o,Bc(n)(e))),i?(i.unsubscribe(),i=null,s.subscribe(t)):r=!0})),r&&(i.unsubscribe(),i=null,s.subscribe(t))})}function wN(n,e){return Gn(function h7(n,e,t,i,r){return(s,o)=>{let a=t,l=e,c=0;s.subscribe(Un(o,u=>{const h=c++;l=a?n(l,u,h):(a=!0,u),i&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}(n,e,arguments.length>=2,!0))}function wD(n){return n<=0?()=>Is:Gn((e,t)=>{let i=[];e.subscribe(Un(t,r=>{i.push(r),n{for(const r of i)t.next(r);t.complete()},void 0,()=>{i=null}))})}function MN(n,e){const t=arguments.length>=2;return i=>i.pipe(n?On((r,s)=>n(r,s,i)):Pa,wD(1),t?zw(e):xN(()=>new Wv))}function SN(n,e=!1){return Gn((t,i)=>{let r=0;t.subscribe(Un(i,s=>{const o=n(s,r++);(o||e)&&i.next(s),!o&&i.complete()}))})}function CN(n){return Ye(()=>n)}function Gd(n){return Gn((e,t)=>{try{e.subscribe(t)}finally{t.add(n)}})}const sn="primary",Xv=Symbol("RouteTitle");class f7{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){const t=this.params[e];return Array.isArray(t)?t[0]:t}return null}getAll(e){if(this.has(e)){const t=this.params[e];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}}function Zp(n){return new f7(n)}function p7(n,e,t){const i=t.path.split("/");if(i.length>n.length||"full"===t.pathMatch&&(e.hasChildren()||i.lengthi[s]===r)}return n===e}function AN(n){return Array.prototype.concat.apply([],n)}function TN(n){return n.length>0?n[n.length-1]:null}function ss(n,e){for(const t in n)n.hasOwnProperty(t)&&e(n[t],t)}function Wd(n){return t1(n)?n:Sv(n)?Ri(Promise.resolve(n)):dt(n)}const Hw=!1,g7={exact:function RN(n,e,t){if(!xh(n.segments,e.segments)||!Gw(n.segments,e.segments,t)||n.numberOfChildren!==e.numberOfChildren)return!1;for(const i in e.children)if(!n.children[i]||!RN(n.children[i],e.children[i],t))return!1;return!0},subset:PN},DN={exact:function _7(n,e){return zl(n,e)},subset:function v7(n,e){return Object.keys(e).length<=Object.keys(n).length&&Object.keys(e).every(t=>EN(n[t],e[t]))},ignored:()=>!0};function IN(n,e,t){return g7[t.paths](n.root,e.root,t.matrixParams)&&DN[t.queryParams](n.queryParams,e.queryParams)&&!("exact"===t.fragment&&n.fragment!==e.fragment)}function PN(n,e,t){return kN(n,e,e.segments,t)}function kN(n,e,t,i){if(n.segments.length>t.length){const r=n.segments.slice(0,t.length);return!(!xh(r,t)||e.hasChildren()||!Gw(r,t,i))}if(n.segments.length===t.length){if(!xh(n.segments,t)||!Gw(n.segments,t,i))return!1;for(const r in e.children)if(!n.children[r]||!PN(n.children[r],e.children[r],i))return!1;return!0}{const r=t.slice(0,n.segments.length),s=t.slice(n.segments.length);return!!(xh(n.segments,r)&&Gw(n.segments,r,i)&&n.children[sn])&&kN(n.children[sn],e,s,i)}}function Gw(n,e,t){return e.every((i,r)=>DN[t](n[r].parameters,i.parameters))}class $d{constructor(e=new xn([],{}),t={},i=null){this.root=e,this.queryParams=t,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Zp(this.queryParams)),this._queryParamMap}toString(){return x7.serialize(this)}}class xn{constructor(e,t){this.segments=e,this.children=t,this.parent=null,ss(t,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Ww(this)}}class qv{constructor(e,t){this.path=e,this.parameters=t}get parameterMap(){return this._parameterMap||(this._parameterMap=Zp(this.parameters)),this._parameterMap}toString(){return FN(this)}}function xh(n,e){return n.length===e.length&&n.every((t,i)=>t.path===e[i].path)}let Yv=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:function(){return new MD},providedIn:"root"}),n})();class MD{parse(e){const t=new I7(e);return new $d(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(e){const t=`/${Kv(e.root,!0)}`,i=function S7(n){const e=Object.keys(n).map(t=>{const i=n[t];return Array.isArray(i)?i.map(r=>`${$w(t)}=${$w(r)}`).join("&"):`${$w(t)}=${$w(i)}`}).filter(t=>!!t);return e.length?`?${e.join("&")}`:""}(e.queryParams);return`${t}${i}${"string"==typeof e.fragment?`#${function w7(n){return encodeURI(n)}(e.fragment)}`:""}`}}const x7=new MD;function Ww(n){return n.segments.map(e=>FN(e)).join("/")}function Kv(n,e){if(!n.hasChildren())return Ww(n);if(e){const t=n.children[sn]?Kv(n.children[sn],!1):"",i=[];return ss(n.children,(r,s)=>{s!==sn&&i.push(`${s}:${Kv(r,!1)}`)}),i.length>0?`${t}(${i.join("//")})`:t}{const t=function b7(n,e){let t=[];return ss(n.children,(i,r)=>{r===sn&&(t=t.concat(e(i,r)))}),ss(n.children,(i,r)=>{r!==sn&&(t=t.concat(e(i,r)))}),t}(n,(i,r)=>r===sn?[Kv(n.children[sn],!1)]:[`${r}:${Kv(i,!1)}`]);return 1===Object.keys(n.children).length&&null!=n.children[sn]?`${Ww(n)}/${t[0]}`:`${Ww(n)}/(${t.join("//")})`}}function ON(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function $w(n){return ON(n).replace(/%3B/gi,";")}function SD(n){return ON(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function jw(n){return decodeURIComponent(n)}function LN(n){return jw(n.replace(/\+/g,"%20"))}function FN(n){return`${SD(n.path)}${function M7(n){return Object.keys(n).map(e=>`;${SD(e)}=${SD(n[e])}`).join("")}(n.parameters)}`}const C7=/^[^\/()?;=#]+/;function Xw(n){const e=n.match(C7);return e?e[0]:""}const E7=/^[^=?&#]+/,T7=/^[^&#]+/;class I7{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new xn([],{}):new xn([],this.parseChildren())}parseQueryParams(){const e={};if(this.consumeOptional("?"))do{this.parseQueryParam(e)}while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(i[sn]=new xn(e,t)),i}parseSegment(){const e=Xw(this.remaining);if(""===e&&this.peekStartsWith(";"))throw new fe(4009,Hw);return this.capture(e),new qv(jw(e),this.parseMatrixParams())}parseMatrixParams(){const e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){const t=Xw(this.remaining);if(!t)return;this.capture(t);let i="";if(this.consumeOptional("=")){const r=Xw(this.remaining);r&&(i=r,this.capture(i))}e[jw(t)]=jw(i)}parseQueryParam(e){const t=function A7(n){const e=n.match(E7);return e?e[0]:""}(this.remaining);if(!t)return;this.capture(t);let i="";if(this.consumeOptional("=")){const o=function D7(n){const e=n.match(T7);return e?e[0]:""}(this.remaining);o&&(i=o,this.capture(i))}const r=LN(t),s=LN(i);if(e.hasOwnProperty(r)){let o=e[r];Array.isArray(o)||(o=[o],e[r]=o),o.push(s)}else e[r]=s}parseParens(e){const t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=Xw(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new fe(4010,Hw);let s;i.indexOf(":")>-1?(s=i.slice(0,i.indexOf(":")),this.capture(s),this.capture(":")):e&&(s=sn);const o=this.parseChildren();t[s]=1===Object.keys(o).length?o[sn]:new xn([],o),this.consumeOptional("//")}return t}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return!!this.peekStartsWith(e)&&(this.remaining=this.remaining.substring(e.length),!0)}capture(e){if(!this.consumeOptional(e))throw new fe(4011,Hw)}}function CD(n){return n.segments.length>0?new xn([],{[sn]:n}):n}function qw(n){const e={};for(const i of Object.keys(n.children)){const s=qw(n.children[i]);(s.segments.length>0||s.hasChildren())&&(e[i]=s)}return function R7(n){if(1===n.numberOfChildren&&n.children[sn]){const e=n.children[sn];return new xn(n.segments.concat(e.segments),e.children)}return n}(new xn(n.segments,e))}function wh(n){return n instanceof $d}const ED=!1;function P7(n,e,t,i,r){if(0===t.length)return Qp(e.root,e.root,e.root,i,r);const s=function zN(n){if("string"==typeof n[0]&&1===n.length&&"/"===n[0])return new VN(!0,0,n);let e=0,t=!1;const i=n.reduce((r,s,o)=>{if("object"==typeof s&&null!=s){if(s.outlets){const a={};return ss(s.outlets,(l,c)=>{a[c]="string"==typeof l?l.split("/"):l}),[...r,{outlets:a}]}if(s.segmentPath)return[...r,s.segmentPath]}return"string"!=typeof s?[...r,s]:0===o?(s.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?t=!0:".."===a?e++:""!=a&&r.push(a))}),r):[...r,s]},[]);return new VN(t,e,i)}(t);return s.toRoot()?Qp(e.root,e.root,new xn([],{}),i,r):function o(l){const c=function O7(n,e,t,i){if(n.isAbsolute)return new Jp(e.root,!0,0);if(-1===i)return new Jp(t,t===e.root,0);return function HN(n,e,t){let i=n,r=e,s=t;for(;s>r;){if(s-=r,i=i.parent,!i)throw new fe(4005,ED&&"Invalid number of '../'");r=i.segments.length}return new Jp(i,!1,r-s)}(t,i+(Zv(n.commands[0])?0:1),n.numberOfDoubleDots)}(s,e,n.snapshot?._urlSegment,l),u=c.processChildren?em(c.segmentGroup,c.index,s.commands):AD(c.segmentGroup,c.index,s.commands);return Qp(e.root,c.segmentGroup,u,i,r)}(n.snapshot?._lastPathIndex)}function Zv(n){return"object"==typeof n&&null!=n&&!n.outlets&&!n.segmentPath}function Qv(n){return"object"==typeof n&&null!=n&&n.outlets}function Qp(n,e,t,i,r){let o,s={};i&&ss(i,(l,c)=>{s[c]=Array.isArray(l)?l.map(u=>`${u}`):`${l}`}),o=n===e?t:UN(n,e,t);const a=CD(qw(o));return new $d(a,s,r)}function UN(n,e,t){const i={};return ss(n.children,(r,s)=>{i[s]=r===e?t:UN(r,e,t)}),new xn(n.segments,i)}class VN{constructor(e,t,i){if(this.isAbsolute=e,this.numberOfDoubleDots=t,this.commands=i,e&&i.length>0&&Zv(i[0]))throw new fe(4003,ED&&"Root segment cannot have matrix parameters");const r=i.find(Qv);if(r&&r!==TN(i))throw new fe(4004,ED&&"{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Jp{constructor(e,t,i){this.segmentGroup=e,this.processChildren=t,this.index=i}}function AD(n,e,t){if(n||(n=new xn([],{})),0===n.segments.length&&n.hasChildren())return em(n,e,t);const i=function F7(n,e,t){let i=0,r=e;const s={match:!1,pathIndex:0,commandIndex:0};for(;r=t.length)return s;const o=n.segments[r],a=t[i];if(Qv(a))break;const l=`${a}`,c=i0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!WN(l,c,o))return s;i+=2}else{if(!WN(l,{},o))return s;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(n,e,t),r=t.slice(i.commandIndex);if(i.match&&i.pathIndex{"string"==typeof s&&(s=[s]),null!==s&&(r[o]=AD(n.children[o],e,s))}),ss(n.children,(s,o)=>{void 0===i[o]&&(r[o]=s)}),new xn(n.segments,r)}}function TD(n,e,t){const i=n.segments.slice(0,e);let r=0;for(;r{"string"==typeof t&&(t=[t]),null!==t&&(e[i]=TD(new xn([],{}),0,t))}),e}function GN(n){const e={};return ss(n,(t,i)=>e[i]=`${t}`),e}function WN(n,e,t){return n==t.path&&zl(e,t.parameters)}const Jv="imperative";class Hl{constructor(e,t){this.id=e,this.url=t}}class DD extends Hl{constructor(e,t,i="imperative",r=null){super(e,t),this.type=0,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Mh extends Hl{constructor(e,t,i){super(e,t),this.urlAfterRedirects=i,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class Yw extends Hl{constructor(e,t,i,r){super(e,t),this.reason=i,this.code=r,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class Kw extends Hl{constructor(e,t,i,r){super(e,t),this.reason=i,this.code=r,this.type=16}}class ID extends Hl{constructor(e,t,i,r){super(e,t),this.error=i,this.target=r,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class B7 extends Hl{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class U7 extends Hl{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class V7 extends Hl{constructor(e,t,i,r,s){super(e,t),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=s,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class z7 extends Hl{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class H7 extends Hl{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class G7{constructor(e){this.route=e,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class W7{constructor(e){this.route=e,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class $7{constructor(e){this.snapshot=e,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class j7{constructor(e){this.snapshot=e,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class X7{constructor(e){this.snapshot=e,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class q7{constructor(e){this.snapshot=e,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class $N{constructor(e,t,i){this.routerEvent=e,this.position=t,this.anchor=i,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}let Z7=(()=>{class n{createUrlTree(t,i,r,s,o,a){return P7(t||i.root,r,s,o,a)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),J7=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:function(e){return Z7.\u0275fac(e)},providedIn:"root"}),n})();class jN{constructor(e){this._root=e}get root(){return this._root.value}parent(e){const t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}children(e){const t=RD(e,this._root);return t?t.children.map(i=>i.value):[]}firstChild(e){const t=RD(e,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(e){const t=PD(e,this._root);return t.length<2?[]:t[t.length-2].children.map(r=>r.value).filter(r=>r!==e)}pathFromRoot(e){return PD(e,this._root).map(t=>t.value)}}function RD(n,e){if(n===e.value)return e;for(const t of e.children){const i=RD(n,t);if(i)return i}return null}function PD(n,e){if(n===e.value)return[e];for(const t of e.children){const i=PD(n,t);if(i.length)return i.unshift(e),i}return[]}class Uc{constructor(e,t){this.value=e,this.children=t}toString(){return`TreeNode(${this.value})`}}function tm(n){const e={};return n&&n.children.forEach(t=>e[t.value.outlet]=t),e}class XN extends jN{constructor(e,t){super(e),this.snapshot=t,kD(this,e)}toString(){return this.snapshot.toString()}}function qN(n,e){const t=function eX(n,e){const o=new Zw([],{},{},"",{},sn,e,null,n.root,-1,{});return new KN("",new Uc(o,[]))}(n,e),i=new Ct([new qv("",{})]),r=new Ct({}),s=new Ct({}),o=new Ct({}),a=new Ct(""),l=new nm(i,r,o,a,s,sn,e,t.root);return l.snapshot=t.root,new XN(new Uc(l,[]),t)}class nm{constructor(e,t,i,r,s,o,a,l){this.url=e,this.params=t,this.queryParams=i,this.fragment=r,this.data=s,this.outlet=o,this.component=a,this.title=this.data?.pipe(Ye(c=>c[Xv]))??dt(void 0),this._futureSnapshot=l}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(Ye(e=>Zp(e)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(Ye(e=>Zp(e)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function YN(n,e="emptyOnly"){const t=n.pathFromRoot;let i=0;if("always"!==e)for(i=t.length-1;i>=1;){const r=t[i],s=t[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(s.component)break;i--}}return function tX(n){return n.reduce((e,t)=>({params:{...e.params,...t.params},data:{...e.data,...t.data},resolve:{...t.data,...e.resolve,...t.routeConfig?.data,...t._resolvedData}}),{params:{},data:{},resolve:{}})}(t.slice(i))}class Zw{get title(){return this.data?.[Xv]}constructor(e,t,i,r,s,o,a,l,c,u,h){this.url=e,this.params=t,this.queryParams=i,this.fragment=r,this.data=s,this.outlet=o,this.component=a,this.routeConfig=l,this._urlSegment=c,this._lastPathIndex=u,this._resolve=h}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Zp(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Zp(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class KN extends jN{constructor(e,t){super(t),this.url=e,kD(this,t)}toString(){return ZN(this._root)}}function kD(n,e){e.value._routerState=n,e.children.forEach(t=>kD(n,t))}function ZN(n){const e=n.children.length>0?` { ${n.children.map(ZN).join(", ")} } `:"";return`${n.value}${e}`}function OD(n){if(n.snapshot){const e=n.snapshot,t=n._futureSnapshot;n.snapshot=t,zl(e.queryParams,t.queryParams)||n.queryParams.next(t.queryParams),e.fragment!==t.fragment&&n.fragment.next(t.fragment),zl(e.params,t.params)||n.params.next(t.params),function m7(n,e){if(n.length!==e.length)return!1;for(let t=0;tzl(t.parameters,e[i].parameters))}(n.url,e.url);return t&&!(!n.parent!=!e.parent)&&(!n.parent||LD(n.parent,e.parent))}function ey(n,e,t){if(t&&n.shouldReuseRoute(e.value,t.value.snapshot)){const i=t.value;i._futureSnapshot=e.value;const r=function iX(n,e,t){return e.children.map(i=>{for(const r of t.children)if(n.shouldReuseRoute(i.value,r.value.snapshot))return ey(n,i,r);return ey(n,i)})}(n,e,t);return new Uc(i,r)}{if(n.shouldAttach(e.value)){const s=n.retrieve(e.value);if(null!==s){const o=s.route;return o.value._futureSnapshot=e.value,o.children=e.children.map(a=>ey(n,a)),o}}const i=function rX(n){return new nm(new Ct(n.url),new Ct(n.params),new Ct(n.queryParams),new Ct(n.fragment),new Ct(n.data),n.outlet,n.component,n)}(e.value),r=e.children.map(s=>ey(n,s));return new Uc(i,r)}}const FD="ngNavigationCancelingError";function QN(n,e){const{redirectTo:t,navigationBehaviorOptions:i}=wh(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,r=JN(!1,0,e);return r.url=t,r.navigationBehaviorOptions=i,r}function JN(n,e,t){const i=new Error("NavigationCancelingError: "+(n||""));return i[FD]=!0,i.cancellationCode=e,t&&(i.url=t),i}function eB(n){return tB(n)&&wh(n.url)}function tB(n){return n&&n[FD]}class sX{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new ty,this.attachRef=null}}let ty=(()=>{class n{constructor(){this.contexts=new Map}onChildOutletCreated(t,i){const r=this.getOrCreateContext(t);r.outlet=i,this.contexts.set(t,r)}onChildOutletDestroyed(t){const i=this.getContext(t);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let i=this.getContext(t);return i||(i=new sX,this.contexts.set(t,i)),i}getContext(t){return this.contexts.get(t)||null}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Qw=!1;let nB=(()=>{class n{constructor(){this.activated=null,this._activatedRoute=null,this.name=sn,this.activateEvents=new it,this.deactivateEvents=new it,this.attachEvents=new it,this.detachEvents=new it,this.parentContexts=Ot(ty),this.location=Ot(is),this.changeDetector=Ot(ci),this.environmentInjector=Ot($a)}ngOnChanges(t){if(t.name){const{firstChange:i,previousValue:r}=t.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name)}isTrackedInParentContexts(t){return this.parentContexts.getContext(t)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const t=this.parentContexts.getContext(this.name);t?.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new fe(4012,Qw);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new fe(4012,Qw);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new fe(4012,Qw);this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(t.instance),t}attach(t,i){this.activated=t,this._activatedRoute=i,this.location.insert(t.hostView),this.attachEvents.emit(t.instance)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,i){if(this.isActivated)throw new fe(4013,Qw);this._activatedRoute=t;const r=this.location,o=t.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new oX(t,a,r.injector);if(i&&function aX(n){return!!n.resolveComponentFactory}(i)){const c=i.resolveComponentFactory(o);this.activated=r.createComponent(c,r.length,l)}else this.activated=r.createComponent(o,{index:r.length,injector:l,environmentInjector:i??this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[zi]}),n})();class oX{constructor(e,t,i){this.route=e,this.childContexts=t,this.parent=i}get(e,t){return e===nm?this.route:e===ty?this.childContexts:this.parent.get(e,t)}}let ND=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=ht({type:n,selectors:[["ng-component"]],standalone:!0,features:[v1],decls:1,vars:0,template:function(t,i){1&t&&Fe(0,"router-outlet")},dependencies:[nB],encapsulation:2}),n})();function iB(n,e){return n.providers&&!n._injector&&(n._injector=fw(n.providers,e,`Route: ${n.path}`)),n._injector??e}function UD(n){const e=n.children&&n.children.map(UD),t=e?{...n,children:e}:{...n};return!t.component&&!t.loadComponent&&(e||t.loadChildren)&&t.outlet&&t.outlet!==sn&&(t.component=ND),t}function ya(n){return n.outlet||sn}function rB(n,e){const t=n.filter(i=>ya(i)===e);return t.push(...n.filter(i=>ya(i)!==e)),t}function ny(n){if(!n)return null;if(n.routeConfig?._injector)return n.routeConfig._injector;for(let e=n.parent;e;e=e.parent){const t=e.routeConfig;if(t?._loadedInjector)return t._loadedInjector;if(t?._injector)return t._injector}return null}class hX{constructor(e,t,i,r){this.routeReuseStrategy=e,this.futureState=t,this.currState=i,this.forwardEvent=r}activate(e){const t=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,i,e),OD(this.futureState.root),this.activateChildRoutes(t,i,e)}deactivateChildRoutes(e,t,i){const r=tm(t);e.children.forEach(s=>{const o=s.value.outlet;this.deactivateRoutes(s,r[o],i),delete r[o]}),ss(r,(s,o)=>{this.deactivateRouteAndItsChildren(s,i)})}deactivateRoutes(e,t,i){const r=e.value,s=t?t.value:null;if(r===s)if(r.component){const o=i.getContext(r.outlet);o&&this.deactivateChildRoutes(e,t,o.children)}else this.deactivateChildRoutes(e,t,i);else s&&this.deactivateRouteAndItsChildren(t,i)}deactivateRouteAndItsChildren(e,t){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}detachAndStoreRouteSubtree(e,t){const i=t.getContext(e.value.outlet),r=i&&e.value.component?i.children:t,s=tm(e);for(const o of Object.keys(s))this.deactivateRouteAndItsChildren(s[o],r);if(i&&i.outlet){const o=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:o,route:e,contexts:a})}}deactivateRouteAndOutlet(e,t){const i=t.getContext(e.value.outlet),r=i&&e.value.component?i.children:t,s=tm(e);for(const o of Object.keys(s))this.deactivateRouteAndItsChildren(s[o],r);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.resolver=null,i.route=null)}activateChildRoutes(e,t,i){const r=tm(t);e.children.forEach(s=>{this.activateRoutes(s,r[s.value.outlet],i),this.forwardEvent(new q7(s.value.snapshot))}),e.children.length&&this.forwardEvent(new j7(e.value.snapshot))}activateRoutes(e,t,i){const r=e.value,s=t?t.value:null;if(OD(r),r===s)if(r.component){const o=i.getOrCreateContext(r.outlet);this.activateChildRoutes(e,t,o.children)}else this.activateChildRoutes(e,t,i);else if(r.component){const o=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),o.children.onOutletReAttached(a.contexts),o.attachRef=a.componentRef,o.route=a.route.value,o.outlet&&o.outlet.attach(a.componentRef,a.route.value),OD(a.route.value),this.activateChildRoutes(e,null,o.children)}else{const a=ny(r.snapshot),l=a?.get(Ol)??null;o.attachRef=null,o.route=r,o.resolver=l,o.injector=a,o.outlet&&o.outlet.activateWith(r,o.injector),this.activateChildRoutes(e,null,o.children)}}else this.activateChildRoutes(e,null,i)}}class sB{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}}class Jw{constructor(e,t){this.component=e,this.route=t}}function fX(n,e,t){const i=n._root;return iy(i,e?e._root:null,t,[i.value])}function im(n,e){const t=Symbol(),i=e.get(n,t);return i===t?"function"!=typeof n||function Yb(n){return null!==Af(n)}(n)?e.get(n):n:i}function iy(n,e,t,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=tm(e);return n.children.forEach(o=>{(function mX(n,e,t,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=n.value,o=e?e.value:null,a=t?t.getContext(n.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){const l=function gX(n,e,t){if("function"==typeof t)return t(n,e);switch(t){case"pathParamsChange":return!xh(n.url,e.url);case"pathParamsOrQueryParamsChange":return!xh(n.url,e.url)||!zl(n.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!LD(n,e)||!zl(n.queryParams,e.queryParams);default:return!LD(n,e)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new sB(i)):(s.data=o.data,s._resolvedData=o._resolvedData),iy(n,e,s.component?a?a.children:null:t,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Jw(a.outlet.component,o))}else o&&ry(e,a,r),r.canActivateChecks.push(new sB(i)),iy(n,null,s.component?a?a.children:null:t,i,r)})(o,s[o.value.outlet],t,i.concat([o.value]),r),delete s[o.value.outlet]}),ss(s,(o,a)=>ry(o,t.getContext(a),r)),r}function ry(n,e,t){const i=tm(n),r=n.value;ss(i,(s,o)=>{ry(s,r.component?e?e.children.getContext(o):null:e,t)}),t.canDeactivateChecks.push(new Jw(r.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,r))}function sy(n){return"function"==typeof n}function VD(n){return n instanceof Wv||"EmptyError"===n?.name}const eM=Symbol("INITIAL_VALUE");function rm(){return gs(n=>Vd(n.map(e=>e.pipe(Li(1),No(eM)))).pipe(Ye(e=>{for(const t of e)if(!0!==t){if(t===eM)return eM;if(!1===t||t instanceof $d)return t}return!0}),On(e=>e!==eM),Li(1)))}function oB(n){return function ZC(...n){return Ab(n)}(Ii(e=>{if(wh(e))throw QN(0,e)}),Ye(e=>!0===e))}const zD={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function aB(n,e,t,i,r){const s=HD(n,e,t);return s.matched?function kX(n,e,t,i){const r=e.canMatch;return r&&0!==r.length?dt(r.map(o=>{const a=im(o,n);return Wd(function wX(n){return n&&sy(n.canMatch)}(a)?a.canMatch(e,t):n.runInContext(()=>a(e,t)))})).pipe(rm(),oB()):dt(!0)}(i=iB(e,i),e,t).pipe(Ye(o=>!0===o?s:{...zD})):dt(s)}function HD(n,e,t){if(""===e.path)return"full"===e.pathMatch&&(n.hasChildren()||t.length>0)?{...zD}:{matched:!0,consumedSegments:[],remainingSegments:t,parameters:{},positionalParamSegments:{}};const r=(e.matcher||p7)(t,n,e);if(!r)return{...zD};const s={};ss(r.posParams,(a,l)=>{s[l]=a.path});const o=r.consumed.length>0?{...s,...r.consumed[r.consumed.length-1].parameters}:s;return{matched:!0,consumedSegments:r.consumed,remainingSegments:t.slice(r.consumed.length),parameters:o,positionalParamSegments:r.posParams??{}}}function tM(n,e,t,i){if(t.length>0&&function FX(n,e,t){return t.some(i=>nM(n,e,i)&&ya(i)!==sn)}(n,t,i)){const s=new xn(e,function LX(n,e,t,i){const r={};r[sn]=i,i._sourceSegment=n,i._segmentIndexShift=e.length;for(const s of t)if(""===s.path&&ya(s)!==sn){const o=new xn([],{});o._sourceSegment=n,o._segmentIndexShift=e.length,r[ya(s)]=o}return r}(n,e,i,new xn(t,n.children)));return s._sourceSegment=n,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:[]}}if(0===t.length&&function NX(n,e,t){return t.some(i=>nM(n,e,i))}(n,t,i)){const s=new xn(n.segments,function OX(n,e,t,i,r){const s={};for(const o of i)if(nM(n,t,o)&&!r[ya(o)]){const a=new xn([],{});a._sourceSegment=n,a._segmentIndexShift=e.length,s[ya(o)]=a}return{...r,...s}}(n,e,t,i,n.children));return s._sourceSegment=n,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:t}}const r=new xn(n.segments,n.children);return r._sourceSegment=n,r._segmentIndexShift=e.length,{segmentGroup:r,slicedSegments:t}}function nM(n,e,t){return(!(n.hasChildren()||e.length>0)||"full"!==t.pathMatch)&&""===t.path}function lB(n,e,t,i){return!!(ya(n)===i||i!==sn&&nM(e,t,n))&&("**"===n.path||HD(e,n,t).matched)}function cB(n,e,t){return 0===e.length&&!n.children[t]}const iM=!1;class rM{constructor(e){this.segmentGroup=e||null}}class dB{constructor(e){this.urlTree=e}}function oy(n){return Kp(new rM(n))}function uB(n){return Kp(new dB(n))}class zX{constructor(e,t,i,r,s){this.injector=e,this.configLoader=t,this.urlSerializer=i,this.urlTree=r,this.config=s,this.allowRedirects=!0}apply(){const e=tM(this.urlTree.root,[],[],this.config).segmentGroup,t=new xn(e.segments,e.children);return this.expandSegmentGroup(this.injector,this.config,t,sn).pipe(Ye(s=>this.createUrlTree(qw(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Bc(s=>{if(s instanceof dB)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof rM?this.noMatchError(s):s}))}match(e){return this.expandSegmentGroup(this.injector,this.config,e.root,sn).pipe(Ye(r=>this.createUrlTree(qw(r),e.queryParams,e.fragment))).pipe(Bc(r=>{throw r instanceof rM?this.noMatchError(r):r}))}noMatchError(e){return new fe(4002,iM)}createUrlTree(e,t,i){const r=CD(e);return new $d(r,t,i)}expandSegmentGroup(e,t,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(e,t,i).pipe(Ye(s=>new xn([],s))):this.expandSegment(e,i,t,i.segments,r,!0)}expandChildren(e,t,i){const r=[];for(const s of Object.keys(i.children))"primary"===s?r.unshift(s):r.push(s);return Ri(r).pipe(Hd(s=>{const o=i.children[s],a=rB(t,s);return this.expandSegmentGroup(e,a,o,s).pipe(Ye(l=>({segment:l,outlet:s})))}),wN((s,o)=>(s[o.outlet]=o.segment,s),{}),MN())}expandSegment(e,t,i,r,s,o){return Ri(i).pipe(Hd(a=>this.expandSegmentAgainstRoute(e,t,i,a,r,s,o).pipe(Bc(c=>{if(c instanceof rM)return dt(null);throw c}))),zd(a=>!!a),Bc((a,l)=>{if(VD(a))return cB(t,r,s)?dt(new xn([],{})):oy(t);throw a}))}expandSegmentAgainstRoute(e,t,i,r,s,o,a){return lB(r,t,s,o)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(e,t,r,s,o):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(e,t,i,r,s,o):oy(t):oy(t)}expandSegmentAgainstRouteUsingRedirect(e,t,i,r,s,o){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(e,i,r,o):this.expandRegularSegmentAgainstRouteUsingRedirect(e,t,i,r,s,o)}expandWildCardWithParamsAgainstRouteUsingRedirect(e,t,i,r){const s=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?uB(s):this.lineralizeSegments(i,s).pipe(er(o=>{const a=new xn(o,{});return this.expandSegment(e,a,t,o,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(e,t,i,r,s,o){const{matched:a,consumedSegments:l,remainingSegments:c,positionalParamSegments:u}=HD(t,r,s);if(!a)return oy(t);const h=this.applyRedirectCommands(l,r.redirectTo,u);return r.redirectTo.startsWith("/")?uB(h):this.lineralizeSegments(r,h).pipe(er(p=>this.expandSegment(e,t,i,p.concat(c),o,!1)))}matchSegmentAgainstRoute(e,t,i,r,s){return"**"===i.path?(e=iB(i,e),i.loadChildren?(i._loadedRoutes?dt({routes:i._loadedRoutes,injector:i._loadedInjector}):this.configLoader.loadChildren(e,i)).pipe(Ye(a=>(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,new xn(r,{})))):dt(new xn(r,{}))):aB(t,i,r,e).pipe(gs(({matched:o,consumedSegments:a,remainingSegments:l})=>o?this.getChildConfig(e=i._injector??e,i,r).pipe(er(u=>{const h=u.injector??e,p=u.routes,{segmentGroup:m,slicedSegments:g}=tM(t,a,l,p),b=new xn(m.segments,m.children);if(0===g.length&&b.hasChildren())return this.expandChildren(h,p,b).pipe(Ye(x=>new xn(a,x)));if(0===p.length&&0===g.length)return dt(new xn(a,{}));const y=ya(i)===s;return this.expandSegment(h,b,p,g,y?sn:s,!0).pipe(Ye(M=>new xn(a.concat(M.segments),M.children)))})):oy(t)))}getChildConfig(e,t,i){return t.children?dt({routes:t.children,injector:e}):t.loadChildren?void 0!==t._loadedRoutes?dt({routes:t._loadedRoutes,injector:t._loadedInjector}):function PX(n,e,t,i){const r=e.canLoad;return void 0===r||0===r.length?dt(!0):dt(r.map(o=>{const a=im(o,n);return Wd(function vX(n){return n&&sy(n.canLoad)}(a)?a.canLoad(e,t):n.runInContext(()=>a(e,t)))})).pipe(rm(),oB())}(e,t,i).pipe(er(r=>r?this.configLoader.loadChildren(e,t).pipe(Ii(s=>{t._loadedRoutes=s.routes,t._loadedInjector=s.injector})):function UX(n){return Kp(JN(iM,3))}())):dt({routes:[],injector:e})}lineralizeSegments(e,t){let i=[],r=t.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return dt(i);if(r.numberOfChildren>1||!r.children[sn])return e.redirectTo,Kp(new fe(4e3,iM));r=r.children[sn]}}applyRedirectCommands(e,t,i){return this.applyRedirectCreateUrlTree(t,this.urlSerializer.parse(t),e,i)}applyRedirectCreateUrlTree(e,t,i,r){const s=this.createSegmentGroup(e,t.root,i,r);return new $d(s,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(e,t){const i={};return ss(e,(r,s)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);i[s]=t[a]}else i[s]=r}),i}createSegmentGroup(e,t,i,r){const s=this.createSegments(e,t.segments,i,r);let o={};return ss(t.children,(a,l)=>{o[l]=this.createSegmentGroup(e,a,i,r)}),new xn(s,o)}createSegments(e,t,i,r){return t.map(s=>s.path.startsWith(":")?this.findPosParam(e,s,r):this.findOrReturn(s,i))}findPosParam(e,t,i){const r=i[t.path.substring(1)];if(!r)throw new fe(4001,iM);return r}findOrReturn(e,t){let i=0;for(const r of t){if(r.path===e.path)return t.splice(i),r;i++}return e}}class GX{}class jX{constructor(e,t,i,r,s,o,a){this.injector=e,this.rootComponentType=t,this.config=i,this.urlTree=r,this.url=s,this.paramsInheritanceStrategy=o,this.urlSerializer=a}recognize(){const e=tM(this.urlTree.root,[],[],this.config.filter(t=>void 0===t.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,e,sn).pipe(Ye(t=>{if(null===t)return null;const i=new Zw([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},sn,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Uc(i,t),s=new KN(this.url,r);return this.inheritParamsAndData(s._root),s}))}inheritParamsAndData(e){const t=e.value,i=YN(t,this.paramsInheritanceStrategy);t.params=Object.freeze(i.params),t.data=Object.freeze(i.data),e.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(e,t,i,r){return 0===i.segments.length&&i.hasChildren()?this.processChildren(e,t,i):this.processSegment(e,t,i,i.segments,r)}processChildren(e,t,i){return Ri(Object.keys(i.children)).pipe(Hd(r=>{const s=i.children[r],o=rB(t,r);return this.processSegmentGroup(e,o,s,r)}),wN((r,s)=>r&&s?(r.push(...s),r):null),SN(r=>null!==r),zw(null),MN(),Ye(r=>{if(null===r)return null;const s=fB(r);return function XX(n){n.sort((e,t)=>e.value.outlet===sn?-1:t.value.outlet===sn?1:e.value.outlet.localeCompare(t.value.outlet))}(s),s}))}processSegment(e,t,i,r,s){return Ri(t).pipe(Hd(o=>this.processSegmentAgainstRoute(o._injector??e,o,i,r,s)),zd(o=>!!o),Bc(o=>{if(VD(o))return cB(i,r,s)?dt([]):dt(null);throw o}))}processSegmentAgainstRoute(e,t,i,r,s){if(t.redirectTo||!lB(t,i,r,s))return dt(null);let o;if("**"===t.path){const a=r.length>0?TN(r).parameters:{},l=mB(i)+r.length;o=dt({snapshot:new Zw(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,gB(t),ya(t),t.component??t._loadedComponent??null,t,pB(i),l,_B(t)),consumedSegments:[],remainingSegments:[]})}else o=aB(i,t,r,e).pipe(Ye(({matched:a,consumedSegments:l,remainingSegments:c,parameters:u})=>{if(!a)return null;const h=mB(i)+l.length;return{snapshot:new Zw(l,u,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,gB(t),ya(t),t.component??t._loadedComponent??null,t,pB(i),h,_B(t)),consumedSegments:l,remainingSegments:c}}));return o.pipe(gs(a=>{if(null===a)return dt(null);const{snapshot:l,consumedSegments:c,remainingSegments:u}=a;e=t._injector??e;const h=t._loadedInjector??e,p=function qX(n){return n.children?n.children:n.loadChildren?n._loadedRoutes:[]}(t),{segmentGroup:m,slicedSegments:g}=tM(i,c,u,p.filter(y=>void 0===y.redirectTo));if(0===g.length&&m.hasChildren())return this.processChildren(h,p,m).pipe(Ye(y=>null===y?null:[new Uc(l,y)]));if(0===p.length&&0===g.length)return dt([new Uc(l,[])]);const b=ya(t)===s;return this.processSegment(h,p,m,g,b?sn:s).pipe(Ye(y=>null===y?null:[new Uc(l,y)]))}))}}function YX(n){const e=n.value.routeConfig;return e&&""===e.path&&void 0===e.redirectTo}function fB(n){const e=[],t=new Set;for(const i of n){if(!YX(i)){e.push(i);continue}const r=e.find(s=>i.value.routeConfig===s.value.routeConfig);void 0!==r?(r.children.push(...i.children),t.add(r)):e.push(i)}for(const i of t){const r=fB(i.children);e.push(new Uc(i.value,r))}return e.filter(i=>!t.has(i))}function pB(n){let e=n;for(;e._sourceSegment;)e=e._sourceSegment;return e}function mB(n){let e=n,t=e._segmentIndexShift??0;for(;e._sourceSegment;)e=e._sourceSegment,t+=e._segmentIndexShift??0;return t-1}function gB(n){return n.data||{}}function _B(n){return n.resolve||{}}function vB(n){return"string"==typeof n.title||null===n.title}function GD(n){return gs(e=>{const t=n(e);return t?Ri(t).pipe(Ye(()=>e)):dt(e)})}const sm=new ge("ROUTES");let WD=(()=>{class n{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Ot($F)}loadComponent(t){if(this.componentLoaders.get(t))return this.componentLoaders.get(t);if(t._loadedComponent)return dt(t._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(t);const i=Wd(t.loadComponent()).pipe(Ye(bB),Ii(s=>{this.onLoadEndListener&&this.onLoadEndListener(t),t._loadedComponent=s}),Gd(()=>{this.componentLoaders.delete(t)})),r=new bN(i,()=>new Ue).pipe(xD());return this.componentLoaders.set(t,r),r}loadChildren(t,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return dt({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const s=this.loadModuleFactoryOrRoutes(i.loadChildren).pipe(Ye(a=>{this.onLoadEndListener&&this.onLoadEndListener(i);let l,c,u=!1;Array.isArray(a)?c=a:(l=a.create(t).injector,c=AN(l.get(sm,[],At.Self|At.Optional)));return{routes:c.map(UD),injector:l}}),Gd(()=>{this.childrenLoaders.delete(i)})),o=new bN(s,()=>new Ue).pipe(xD());return this.childrenLoaders.set(i,o),o}loadModuleFactoryOrRoutes(t){return Wd(t()).pipe(Ye(bB),er(i=>i instanceof rF||Array.isArray(i)?dt(i):Ri(this.compiler.compileModuleAsync(i))))}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function bB(n){return function iq(n){return n&&"object"==typeof n&&"default"in n}(n)?n.default:n}let oM=(()=>{class n{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new Ue,this.configLoader=Ot(WD),this.environmentInjector=Ot($a),this.urlSerializer=Ot(Yv),this.rootContexts=Ot(ty),this.navigationId=0,this.afterPreactivation=()=>dt(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new W7(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new G7(r))}complete(){this.transitions?.complete()}handleNavigationRequest(t){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...t,id:i})}setupNavigations(t){return this.transitions=new Ct({id:0,targetPageId:0,currentUrlTree:t.currentUrlTree,currentRawUrl:t.currentUrlTree,extractedUrl:t.urlHandlingStrategy.extract(t.currentUrlTree),urlAfterRedirects:t.urlHandlingStrategy.extract(t.currentUrlTree),rawUrl:t.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:Jv,restoredState:null,currentSnapshot:t.routerState.snapshot,targetSnapshot:null,currentRouterState:t.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(On(i=>0!==i.id),Ye(i=>({...i,extractedUrl:t.urlHandlingStrategy.extract(i.rawUrl)})),gs(i=>{let r=!1,s=!1;return dt(i).pipe(Ii(o=>{this.currentNavigation={id:o.id,initialUrl:o.rawUrl,extractedUrl:o.extractedUrl,trigger:o.source,extras:o.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),gs(o=>{const a=t.browserUrlTree.toString(),l=!t.navigated||o.extractedUrl.toString()!==a||a!==t.currentUrlTree.toString();if(!l&&"reload"!==(o.extras.onSameUrlNavigation??t.onSameUrlNavigation)){const u="";return this.events.next(new Kw(o.id,t.serializeUrl(i.rawUrl),u,0)),t.rawUrlTree=o.rawUrl,o.resolve(null),Is}if(t.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return xB(o.source)&&(t.browserUrlTree=o.extractedUrl),dt(o).pipe(gs(u=>{const h=this.transitions?.getValue();return this.events.next(new DD(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),h!==this.transitions?.getValue()?Is:Promise.resolve(u)}),function HX(n,e,t,i){return gs(r=>function VX(n,e,t,i,r){return new zX(n,e,t,i,r).apply()}(n,e,t,r.extractedUrl,i).pipe(Ye(s=>({...r,urlAfterRedirects:s}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,t.config),Ii(u=>{this.currentNavigation={...this.currentNavigation,finalUrl:u.urlAfterRedirects},i.urlAfterRedirects=u.urlAfterRedirects}),function ZX(n,e,t,i,r){return er(s=>function $X(n,e,t,i,r,s,o="emptyOnly"){return new jX(n,e,t,i,r,o,s).recognize().pipe(gs(a=>null===a?function WX(n){return new Sn(e=>e.error(n))}(new GX):dt(a)))}(n,e,t,s.urlAfterRedirects,i.serialize(s.urlAfterRedirects),i,r).pipe(Ye(o=>({...s,targetSnapshot:o}))))}(this.environmentInjector,this.rootComponentType,t.config,this.urlSerializer,t.paramsInheritanceStrategy),Ii(u=>{if(i.targetSnapshot=u.targetSnapshot,"eager"===t.urlUpdateStrategy){if(!u.extras.skipLocationChange){const p=t.urlHandlingStrategy.merge(u.urlAfterRedirects,u.rawUrl);t.setBrowserUrl(p,u)}t.browserUrlTree=u.urlAfterRedirects}const h=new B7(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(h)}));if(l&&t.urlHandlingStrategy.shouldProcessUrl(t.rawUrlTree)){const{id:u,extractedUrl:h,source:p,restoredState:m,extras:g}=o,b=new DD(u,this.urlSerializer.serialize(h),p,m);this.events.next(b);const y=qN(h,this.rootComponentType).snapshot;return dt(i={...o,targetSnapshot:y,urlAfterRedirects:h,extras:{...g,skipLocationChange:!1,replaceUrl:!1}})}{const u="";return this.events.next(new Kw(o.id,t.serializeUrl(i.extractedUrl),u,1)),t.rawUrlTree=o.rawUrl,o.resolve(null),Is}}),Ii(o=>{const a=new U7(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),Ye(o=>i={...o,guards:fX(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),function SX(n,e){return er(t=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=t;return 0===o.length&&0===s.length?dt({...t,guardsResult:!0}):function CX(n,e,t,i){return Ri(n).pipe(er(r=>function RX(n,e,t,i,r){const s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return s&&0!==s.length?dt(s.map(a=>{const l=ny(e)??r,c=im(a,l);return Wd(function xX(n){return n&&sy(n.canDeactivate)}(c)?c.canDeactivate(n,e,t,i):l.runInContext(()=>c(n,e,t,i))).pipe(zd())})).pipe(rm()):dt(!0)}(r.component,r.route,t,e,i)),zd(r=>!0!==r,!0))}(o,i,r,n).pipe(er(a=>a&&function _X(n){return"boolean"==typeof n}(a)?function EX(n,e,t,i){return Ri(e).pipe(Hd(r=>$v(function TX(n,e){return null!==n&&e&&e(new $7(n)),dt(!0)}(r.route.parent,i),function AX(n,e){return null!==n&&e&&e(new X7(n)),dt(!0)}(r.route,i),function IX(n,e,t){const i=e[e.length-1],s=e.slice(0,e.length-1).reverse().map(o=>function pX(n){const e=n.routeConfig?n.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:n,guards:e}:null}(o)).filter(o=>null!==o).map(o=>jv(()=>dt(o.guards.map(l=>{const c=ny(o.node)??t,u=im(l,c);return Wd(function bX(n){return n&&sy(n.canActivateChild)}(u)?u.canActivateChild(i,n):c.runInContext(()=>u(i,n))).pipe(zd())})).pipe(rm())));return dt(s).pipe(rm())}(n,r.path,t),function DX(n,e,t){const i=e.routeConfig?e.routeConfig.canActivate:null;if(!i||0===i.length)return dt(!0);const r=i.map(s=>jv(()=>{const o=ny(e)??t,a=im(s,o);return Wd(function yX(n){return n&&sy(n.canActivate)}(a)?a.canActivate(e,n):o.runInContext(()=>a(e,n))).pipe(zd())}));return dt(r).pipe(rm())}(n,r.route,t))),zd(r=>!0!==r,!0))}(i,s,n,e):dt(a)),Ye(a=>({...t,guardsResult:a})))})}(this.environmentInjector,o=>this.events.next(o)),Ii(o=>{if(i.guardsResult=o.guardsResult,wh(o.guardsResult))throw QN(0,o.guardsResult);const a=new V7(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),On(o=>!!o.guardsResult||(t.restoreHistory(o),this.cancelNavigationTransition(o,"",3),!1)),GD(o=>{if(o.guards.canActivateChecks.length)return dt(o).pipe(Ii(a=>{const l=new z7(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),gs(a=>{let l=!1;return dt(a).pipe(function QX(n,e){return er(t=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=t;if(!r.length)return dt(t);let s=0;return Ri(r).pipe(Hd(o=>function JX(n,e,t,i){const r=n.routeConfig,s=n._resolve;return void 0!==r?.title&&!vB(r)&&(s[Xv]=r.title),function eq(n,e,t,i){const r=function tq(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}(n);if(0===r.length)return dt({});const s={};return Ri(r).pipe(er(o=>function nq(n,e,t,i){const r=ny(e)??i,s=im(n,r);return Wd(s.resolve?s.resolve(e,t):r.runInContext(()=>s(e,t)))}(n[o],e,t,i).pipe(zd(),Ii(a=>{s[o]=a}))),wD(1),CN(s),Bc(o=>VD(o)?Is:Kp(o)))}(s,n,e,i).pipe(Ye(o=>(n._resolvedData=o,n.data=YN(n,t).resolve,r&&vB(r)&&(n.data[Xv]=r.title),null)))}(o.route,i,n,e)),Ii(()=>s++),wD(1),er(o=>s===r.length?dt(t):Is))})}(t.paramsInheritanceStrategy,this.environmentInjector),Ii({next:()=>l=!0,complete:()=>{l||(t.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Ii(a=>{const l=new H7(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),GD(o=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Ii(u=>{l.component=u}),Ye(()=>{})));for(const u of l.children)c.push(...a(u));return c};return Vd(a(o.targetSnapshot.root)).pipe(zw(),Li(1))}),GD(()=>this.afterPreactivation()),Ye(o=>{const a=function nX(n,e,t){const i=ey(n,e._root,t?t._root:void 0);return new XN(i,e)}(t.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return i={...o,targetRouterState:a}}),Ii(o=>{t.currentUrlTree=o.urlAfterRedirects,t.rawUrlTree=t.urlHandlingStrategy.merge(o.urlAfterRedirects,o.rawUrl),t.routerState=o.targetRouterState,"deferred"===t.urlUpdateStrategy&&(o.extras.skipLocationChange||t.setBrowserUrl(t.rawUrlTree,o),t.browserUrlTree=o.urlAfterRedirects)}),((n,e,t)=>Ye(i=>(new hX(e,i.targetRouterState,i.currentRouterState,t).activate(n),i)))(this.rootContexts,t.routeReuseStrategy,o=>this.events.next(o)),Li(1),Ii({next:o=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,t.navigated=!0,this.events.next(new Mh(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(t.currentUrlTree))),t.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),Gd(()=>{r||s||this.cancelNavigationTransition(i,"",1),this.currentNavigation?.id===i.id&&(this.currentNavigation=null)}),Bc(o=>{if(s=!0,tB(o)){eB(o)||(t.navigated=!0,t.restoreHistory(i,!0));const a=new Yw(i.id,this.urlSerializer.serialize(i.extractedUrl),o.message,o.cancellationCode);if(this.events.next(a),eB(o)){const l=t.urlHandlingStrategy.merge(o.url,t.rawUrlTree),c={skipLocationChange:i.extras.skipLocationChange,replaceUrl:"eager"===t.urlUpdateStrategy||xB(i.source)};t.scheduleNavigation(l,Jv,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}else i.resolve(!1)}else{t.restoreHistory(i,!0);const a=new ID(i.id,this.urlSerializer.serialize(i.extractedUrl),o,i.targetSnapshot??void 0);this.events.next(a);try{i.resolve(t.errorHandler(o))}catch(l){i.reject(l)}}return Is}))}))}cancelNavigationTransition(t,i,r){const s=new Yw(t.id,this.urlSerializer.serialize(t.extractedUrl),i,r);this.events.next(s),t.resolve(!1)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function xB(n){return n!==Jv}let wB=(()=>{class n{buildTitle(t){let i,r=t.root;for(;void 0!==r;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(s=>s.outlet===sn);return i}getResolvedTitleForRoute(t){return t.data[Xv]}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:function(){return Ot(rq)},providedIn:"root"}),n})(),rq=(()=>{class n extends wB{constructor(t){super(),this.title=t}updateTitle(t){const i=this.buildTitle(t);void 0!==i&&this.title.setTitle(i)}}return n.\u0275fac=function(t){return new(t||n)(Q(fN))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),sq=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:function(){return Ot(aq)},providedIn:"root"}),n})();class oq{shouldDetach(e){return!1}store(e,t){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,t){return e.routeConfig===t.routeConfig}}let aq=(()=>{class n extends oq{}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const aM=new ge("",{providedIn:"root",factory:()=>({})});let cq=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:function(){return Ot(dq)},providedIn:"root"}),n})(),dq=(()=>{class n{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,i){return t}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function uq(n){throw n}function hq(n,e,t){return e.parse("/")}const fq={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},pq={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Bo=(()=>{class n{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){if("computed"===this.canceledNavigationResolution)return this.location.getState()?.\u0275routerPageId}get events(){return this.navigationTransitions.events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=Ot(Y$),this.isNgZoneEnabled=!1,this.options=Ot(aM,{optional:!0})||{},this.errorHandler=this.options.errorHandler||uq,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||hq,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Ot(cq),this.routeReuseStrategy=Ot(sq),this.urlCreationStrategy=Ot(J7),this.titleStrategy=Ot(wB),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=AN(Ot(sm,{optional:!0})??[]),this.navigationTransitions=Ot(oM),this.urlSerializer=Ot(Yv),this.location=Ot(Lv),this.isNgZoneEnabled=Ot(pt)instanceof pt&&pt.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new $d,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=qN(this.currentUrlTree,null),this.navigationTransitions.setupNavigations(this).subscribe(t=>{this.lastSuccessfulId=t.id,this.currentPageId=this.browserPageId??0},t=>{this.console.warn(`Unhandled Navigation Error: ${t}`)})}resetRootComponentType(t){this.routerState.root.component=t,this.navigationTransitions.rootComponentType=t}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const t=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),Jv,t)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{const i="popstate"===t.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{this.navigateToSyncWithBrowser(t.url,i,t.state)},0)}))}navigateToSyncWithBrowser(t,i,r){const s={replaceUrl:!0},o=r?.navigationId?r:null;if(r){const l={...r};delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(s.state=l)}const a=this.parseUrl(t);this.scheduleNavigation(a,i,o,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}resetConfig(t){this.config=t.map(UD),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(t,i={}){const{relativeTo:r,queryParams:s,fragment:o,queryParamsHandling:a,preserveFragment:l}=i,c=l?this.currentUrlTree.fragment:o;let u=null;switch(a){case"merge":u={...this.currentUrlTree.queryParams,...s};break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=s||null}return null!==u&&(u=this.removeEmptyProps(u)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,t,u,c??null)}navigateByUrl(t,i={skipLocationChange:!1}){const r=wh(t)?t:this.parseUrl(t),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Jv,null,i)}navigate(t,i={skipLocationChange:!1}){return function mq(n){for(let e=0;e{const s=t[r];return null!=s&&(i[r]=s),i},{})}scheduleNavigation(t,i,r,s,o){if(this.disposed)return Promise.resolve(!1);let a,l,c,u;return o?(a=o.resolve,l=o.reject,c=o.promise):c=new Promise((h,p)=>{a=h,l=p}),u="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:u,source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:t,extras:s,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(h=>Promise.reject(h))}setBrowserUrl(t,i){const r=this.urlSerializer.serialize(t);if(this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl){const o={...i.extras.state,...this.generateNgRouterState(i.id,this.browserPageId)};this.location.replaceState(r,"",o)}else{const s={...i.extras.state,...this.generateNgRouterState(i.id,i.targetPageId)};this.location.go(r,"",s)}}restoreHistory(t,i=!1){if("computed"===this.canceledNavigationResolution){const s=this.currentPageId-(this.browserPageId??this.currentPageId);0!==s?this.location.historyGo(s):this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===s&&(this.resetState(t),this.browserUrlTree=t.currentUrlTree,this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(t),this.resetUrlToCurrentUrlTree())}resetState(t){this.routerState=t.currentRouterState,this.currentUrlTree=t.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(t,i){return"computed"===this.canceledNavigationResolution?{navigationId:t,\u0275routerPageId:i}:{navigationId:t}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class MB{}let vq=(()=>{class n{constructor(t,i,r,s,o){this.router=t,this.injector=r,this.preloadingStrategy=s,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(On(t=>t instanceof Mh),Hd(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,i){const r=[];for(const s of i){s.providers&&!s._injector&&(s._injector=fw(s.providers,t,`Route: ${s.path}`));const o=s._injector??t,a=s._loadedInjector??o;(s.loadChildren&&!s._loadedRoutes&&void 0===s.canLoad||s.loadComponent&&!s._loadedComponent)&&r.push(this.preloadConfig(o,s)),(s.children||s._loadedRoutes)&&r.push(this.processRoutes(a,s.children??s._loadedRoutes))}return Ri(r).pipe(cd())}preloadConfig(t,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(t,i):dt(null);const s=r.pipe(er(o=>null===o?dt(void 0):(i._loadedRoutes=o.routes,i._loadedInjector=o.injector,this.processRoutes(o.injector??t,o.routes))));return i.loadComponent&&!i._loadedComponent?Ri([s,this.loader.loadComponent(i)]).pipe(cd()):s})}}return n.\u0275fac=function(t){return new(t||n)(Q(Bo),Q($F),Q($a),Q(MB),Q(WD))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const XD=new ge("");let SB=(()=>{class n{constructor(t,i,r,s,o={}){this.urlSerializer=t,this.transitions=i,this.viewportScroller=r,this.zone=s,this.options=o,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},o.scrollPositionRestoration=o.scrollPositionRestoration||"disabled",o.anchorScrolling=o.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(t=>{t instanceof DD?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof Mh&&(this.lastId=t.id,this.scheduleScrollEvent(t,this.urlSerializer.parse(t.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(t=>{t instanceof $N&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new $N(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return n.\u0275fac=function(t){Ya()},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();var Uo=(()=>((Uo=Uo||{})[Uo.COMPLETE=0]="COMPLETE",Uo[Uo.FAILED=1]="FAILED",Uo[Uo.REDIRECTING=2]="REDIRECTING",Uo))();const om=!1;function jd(n,e){return{\u0275kind:n,\u0275providers:e}}const qD=new ge("",{providedIn:"root",factory:()=>!1});function EB(){const n=Ot(ki);return e=>{const t=n.get(qp);if(e!==t.components[0])return;const i=n.get(Bo),r=n.get(AB);1===n.get(YD)&&i.initialNavigation(),n.get(TB,null,At.Optional)?.setUpPreloading(),n.get(XD,null,At.Optional)?.init(),i.resetRootComponentType(t.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const AB=new ge(om?"bootstrap done indicator":"",{factory:()=>new Ue}),YD=new ge(om?"initial navigation":"",{providedIn:"root",factory:()=>1});function Mq(){let n=[];return n=om?[{provide:Mr,multi:!0,useFactory:()=>{const e=Ot(Bo);return()=>e.events.subscribe(t=>{console.group?.(`Router Event: ${t.constructor.name}`),console.log(function Y7(n){if(!("type"in n))return`Unknown Router Event: ${n.constructor.name}`;switch(n.type){case 14:return`ActivationEnd(path: '${n.snapshot.routeConfig?.path||""}')`;case 13:return`ActivationStart(path: '${n.snapshot.routeConfig?.path||""}')`;case 12:return`ChildActivationEnd(path: '${n.snapshot.routeConfig?.path||""}')`;case 11:return`ChildActivationStart(path: '${n.snapshot.routeConfig?.path||""}')`;case 8:return`GuardsCheckEnd(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}', state: ${n.state}, shouldActivate: ${n.shouldActivate})`;case 7:return`GuardsCheckStart(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}', state: ${n.state})`;case 2:return`NavigationCancel(id: ${n.id}, url: '${n.url}')`;case 16:return`NavigationSkipped(id: ${n.id}, url: '${n.url}')`;case 1:return`NavigationEnd(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}')`;case 3:return`NavigationError(id: ${n.id}, url: '${n.url}', error: ${n.error})`;case 0:return`NavigationStart(id: ${n.id}, url: '${n.url}')`;case 6:return`ResolveEnd(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}', state: ${n.state})`;case 5:return`ResolveStart(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}', state: ${n.state})`;case 10:return`RouteConfigLoadEnd(path: ${n.route.path})`;case 9:return`RouteConfigLoadStart(path: ${n.route.path})`;case 4:return`RoutesRecognized(id: ${n.id}, url: '${n.url}', urlAfterRedirects: '${n.urlAfterRedirects}', state: ${n.state})`;case 15:return`Scroll(anchor: '${n.anchor}', position: '${n.position?`${n.position[0]}, ${n.position[1]}`:null}')`}}(t)),console.log(t),console.groupEnd?.()})}}]:[],jd(1,n)}const TB=new ge(om?"router preloader":"");function Sq(n){return jd(0,[{provide:TB,useExisting:vq},{provide:MB,useExisting:n}])}const ay=!1,DB=new ge(ay?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),Cq=[Lv,{provide:Yv,useClass:MD},Bo,ty,{provide:nm,useFactory:function CB(n){return n.routerState.root},deps:[Bo]},WD,ay?{provide:qD,useValue:!0}:[]];function Eq(){return new JF("Router",Bo)}let IB=(()=>{class n{constructor(t){}static forRoot(t,i){return{ngModule:n,providers:[Cq,ay&&i?.enableTracing?Mq().\u0275providers:[],{provide:sm,multi:!0,useValue:t},{provide:DB,useFactory:Iq,deps:[[Bo,new Po,new Il]]},{provide:aM,useValue:i||{}},i?.useHash?{provide:bh,useClass:F6}:{provide:bh,useClass:M2},{provide:XD,useFactory:()=>{const n=Ot(Zj),e=Ot(pt),t=Ot(aM),i=Ot(oM),r=Ot(Yv);return t.scrollOffset&&n.setOffset(t.scrollOffset),new SB(r,i,n,e,t)}},i?.preloadingStrategy?Sq(i.preloadingStrategy).\u0275providers:[],{provide:JF,multi:!0,useFactory:Eq},i?.initialNavigation?Rq(i):[],[{provide:RB,useFactory:EB},{provide:QF,multi:!0,useExisting:RB}]]}}static forChild(t){return{ngModule:n,providers:[{provide:sm,multi:!0,useValue:t}]}}}return n.\u0275fac=function(t){return new(t||n)(Q(DB,8))},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[ND]}),n})();function Iq(n){if(ay&&n)throw new fe(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function Rq(n){return["disabled"===n.initialNavigation?jd(3,[{provide:vw,multi:!0,useFactory:()=>{const e=Ot(Bo);return()=>{e.setUpLocationChangeListener()}}},{provide:YD,useValue:2}]).\u0275providers:[],"enabledBlocking"===n.initialNavigation?jd(2,[{provide:YD,useValue:0},{provide:vw,multi:!0,deps:[ki],useFactory:e=>{const t=e.get(O6,Promise.resolve());return()=>t.then(()=>new Promise(i=>{const r=e.get(Bo),s=e.get(AB);(function yq(n,e){n.events.pipe(On(t=>t instanceof Mh||t instanceof Yw||t instanceof ID||t instanceof Kw),Ye(t=>t instanceof Mh||t instanceof Kw?Uo.COMPLETE:t instanceof Yw&&(0===t.code||1===t.code)?Uo.REDIRECTING:Uo.FAILED),On(t=>t!==Uo.REDIRECTING),Li(1)).subscribe(()=>{e()})})(r,()=>{i(!0)}),e.get(oM).afterPreactivation=()=>(i(!0),s.closed?dt(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const RB=new ge(ay?"Router Initializer":""),kq=[];let Oq=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[IB.forRoot(kq),IB]}),n})();function PB(n,e,t,i,r,s,o){try{var a=n[s](o),l=a.value}catch(c){return void t(c)}a.done?e(l):Promise.resolve(l).then(i,r)}function xt(n){return function(){var e=this,t=arguments;return new Promise(function(i,r){var s=n.apply(e,t);function o(l){PB(s,i,r,o,a,"next",l)}function a(l){PB(s,i,r,o,a,"throw",l)}o(void 0)})}}function Cn(n){return null!=n&&"false"!=`${n}`}function Ys(n,e=0){return function Lq(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}(n)?Number(n):e}function lM(n){return Array.isArray(n)?n:[n]}function mr(n){return null==n?"":"string"==typeof n?n:`${n}px`}function Vc(n){return n instanceof yt?n.nativeElement:n}const Fq=["addListener","removeListener"],Nq=["addEventListener","removeEventListener"],Bq=["on","off"];function ba(n,e,t,i){if(Qt(t)&&(i=t,t=void 0),i)return ba(n,e,t).pipe(bD(i));const[r,s]=function zq(n){return Qt(n.addEventListener)&&Qt(n.removeEventListener)}(n)?Nq.map(o=>a=>n[o](e,a,t)):function Uq(n){return Qt(n.addListener)&&Qt(n.removeListener)}(n)?Fq.map(kB(n,e)):function Vq(n){return Qt(n.on)&&Qt(n.off)}(n)?Bq.map(kB(n,e)):[];if(!r&&kg(n))return er(o=>ba(o,e,t))(lr(n));if(!r)throw new TypeError("Invalid event target");return new Sn(o=>{const a=(...l)=>o.next(1s(a)})}function kB(n,e){return t=>i=>n[t](e,i)}class Hq extends un{constructor(e,t){super()}schedule(e,t=0){return this}}const cM={setInterval(n,e,...t){const{delegate:i}=cM;return i?.setInterval?i.setInterval(n,e,...t):setInterval(n,e,...t)},clearInterval(n){const{delegate:e}=cM;return(e?.clearInterval||clearInterval)(n)},delegate:void 0};class KD extends Hq{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){var i;if(this.closed)return this;this.state=e;const r=this.id,s=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(s,r,t)),this.pending=!0,this.delay=t,this.id=null!==(i=this.id)&&void 0!==i?i:this.requestAsyncId(s,this.id,t),this}requestAsyncId(e,t,i=0){return cM.setInterval(e.flush.bind(e,this),i)}recycleAsyncId(e,t,i=0){if(null!=i&&this.delay===i&&!1===this.pending)return t;null!=t&&cM.clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(e,t);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let r,i=!1;try{this.work(e)}catch(s){i=!0,r=s||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){const{id:e,scheduler:t}=this,{actions:i}=t;this.work=this.state=this.scheduler=null,this.pending=!1,Yr(i,this),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,super.unsubscribe()}}}const ly={schedule(n){let e=requestAnimationFrame,t=cancelAnimationFrame;const{delegate:i}=ly;i&&(e=i.requestAnimationFrame,t=i.cancelAnimationFrame);const r=e(s=>{t=void 0,n(s)});return new un(()=>t?.(r))},requestAnimationFrame(...n){const{delegate:e}=ly;return(e?.requestAnimationFrame||requestAnimationFrame)(...n)},cancelAnimationFrame(...n){const{delegate:e}=ly;return(e?.cancelAnimationFrame||cancelAnimationFrame)(...n)},delegate:void 0},OB={now:()=>(OB.delegate||Date).now(),delegate:void 0};class cy{constructor(e,t=cy.now){this.schedulerActionCtor=e,this.now=t}schedule(e,t=0,i){return new this.schedulerActionCtor(this,e).schedule(i,t)}}cy.now=OB.now;class ZD extends cy{constructor(e,t=cy.now){super(e,t),this.actions=[],this._active=!1}flush(e){const{actions:t}=this;if(this._active)return void t.push(e);let i;this._active=!0;do{if(i=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,i){for(;e=t.shift();)e.unsubscribe();throw i}}}const LB=new class Wq extends ZD{flush(e){this._active=!0;const t=this._scheduled;this._scheduled=void 0;const{actions:i}=this;let r;e=e||i.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=i[0])&&e.id===t&&i.shift());if(this._active=!1,r){for(;(e=i[0])&&e.id===t&&i.shift();)e.unsubscribe();throw r}}}(class Gq extends KD{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,i=0){return null!==i&&i>0?super.requestAsyncId(e,t,i):(e.actions.push(this),e._scheduled||(e._scheduled=ly.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,t,i=0){var r;if(null!=i?i>0:this.delay>0)return super.recycleAsyncId(e,t,i);const{actions:s}=e;null!=t&&(null===(r=s[s.length-1])||void 0===r?void 0:r.id)!==t&&(ly.cancelAnimationFrame(t),e._scheduled=void 0)}});let QD,$q=1;const dM={};function FB(n){return n in dM&&(delete dM[n],!0)}const jq={setImmediate(n){const e=$q++;return dM[e]=!0,QD||(QD=Promise.resolve()),QD.then(()=>FB(e)&&n()),e},clearImmediate(n){FB(n)}},{setImmediate:Xq,clearImmediate:qq}=jq,uM={setImmediate(...n){const{delegate:e}=uM;return(e?.setImmediate||Xq)(...n)},clearImmediate(n){const{delegate:e}=uM;return(e?.clearImmediate||qq)(n)},delegate:void 0},JD=new class Kq extends ZD{flush(e){this._active=!0;const t=this._scheduled;this._scheduled=void 0;const{actions:i}=this;let r;e=e||i.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=i[0])&&e.id===t&&i.shift());if(this._active=!1,r){for(;(e=i[0])&&e.id===t&&i.shift();)e.unsubscribe();throw r}}}(class Yq extends KD{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,i=0){return null!==i&&i>0?super.requestAsyncId(e,t,i):(e.actions.push(this),e._scheduled||(e._scheduled=uM.setImmediate(e.flush.bind(e,void 0))))}recycleAsyncId(e,t,i=0){var r;if(null!=i?i>0:this.delay>0)return super.recycleAsyncId(e,t,i);const{actions:s}=e;null!=t&&(null===(r=s[s.length-1])||void 0===r?void 0:r.id)!==t&&(uM.clearImmediate(t),e._scheduled=void 0)}}),dy=new ZD(KD),Zq=dy;function hM(n=0,e,t=Zq){let i=-1;return null!=e&&(Cu(e)?t=e:i=e),new Sn(r=>{let s=function Jq(n){return n instanceof Date&&!isNaN(n)}(n)?+n-t.now():n;s<0&&(s=0);let o=0;return t.schedule(function(){r.closed||(r.next(o++),0<=i?this.schedule(void 0,i):r.complete())},s)})}function fM(n,e=dy){return function Qq(n){return Gn((e,t)=>{let i=!1,r=null,s=null,o=!1;const a=()=>{if(s?.unsubscribe(),s=null,i){i=!1;const c=r;r=null,t.next(c)}o&&t.complete()},l=()=>{s=null,o&&t.complete()};e.subscribe(Un(t,c=>{i=!0,r=c,s||lr(n(c)).subscribe(s=Un(t,a,l))},()=>{o=!0,(!i||!s||s.closed)&&t.complete()}))})}(()=>hM(n,e))}function et(n){return Gn((e,t)=>{lr(n).subscribe(Un(t,()=>t.complete(),ls)),!t.closed&&e.subscribe(t)})}let eI;try{eI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{eI=!1}let am,Fi=(()=>{class n{constructor(t){this._platformId=t,this.isBrowser=this._platformId?function Kj(n){return n===G2}(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!eI)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return n.\u0275fac=function(t){return new(t||n)(Q(O1))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const NB=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function BB(){if(am)return am;if("object"!=typeof document||!document)return am=new Set(NB),am;let n=document.createElement("input");return am=new Set(NB.filter(e=>(n.setAttribute("type",e),n.type===e))),am}let uy,pM,Ch,tI;function Sh(n){return function eY(){if(null==uy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>uy=!0}))}finally{uy=uy||!1}return uy}()?n:!!n.capture}function UB(){if(null==Ch){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Ch=!1,Ch;if("scrollBehavior"in document.documentElement.style)Ch=!0;else{const n=Element.prototype.scrollTo;Ch=!!n&&!/\{\s*\[native code\]\s*\}/.test(n.toString())}}return Ch}function hy(){if("object"!=typeof document||!document)return 0;if(null==pM){const n=document.createElement("div"),e=n.style;n.dir="rtl",e.width="1px",e.overflow="auto",e.visibility="hidden",e.pointerEvents="none",e.position="absolute";const t=document.createElement("div"),i=t.style;i.width="2px",i.height="1px",n.appendChild(t),document.body.appendChild(n),pM=0,0===n.scrollLeft&&(n.scrollLeft=1,pM=0===n.scrollLeft?1:2),n.remove()}return pM}function mM(){let n=typeof document<"u"&&document?document.activeElement:null;for(;n&&n.shadowRoot;){const e=n.shadowRoot.activeElement;if(e===n)break;n=e}return n}function Xd(n){return n.composedPath?n.composedPath()[0]:n.target}function nI(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}const iY=new ge("cdk-dir-doc",{providedIn:"root",factory:function rY(){return Ot(Ht)}}),sY=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let tl=(()=>{class n{constructor(t){this.value="ltr",this.change=new it,t&&(this.value=function oY(n){const e=n?.toLowerCase()||"";return"auto"===e&&typeof navigator<"u"&&navigator?.language?sY.test(navigator.language)?"rtl":"ltr":"rtl"===e?"rtl":"ltr"}((t.body?t.body.dir:null)||(t.documentElement?t.documentElement.dir:null)||"ltr"))}ngOnDestroy(){this.change.complete()}}return n.\u0275fac=function(t){return new(t||n)(Q(iY,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),fy=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({}),n})();const aY=["contentWrapper"],lY=["*"],cY=new ge("VIRTUAL_SCROLL_STRATEGY");let py=(()=>{class n{constructor(t,i,r){this._ngZone=t,this._platform=i,this._scrolled=new Ue,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=r}register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){const i=this.scrollContainers.get(t);i&&(i.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=20){return this._platform.isBrowser?new Sn(i=>{this._globalSubscription||this._addGlobalListener();const r=t>0?this._scrolled.pipe(fM(t)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):dt()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((t,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(t,i){const r=this.getAncestorScrollContainers(t);return this.scrolled(i).pipe(On(s=>!s||r.indexOf(s)>-1))}getAncestorScrollContainers(t){const i=[];return this.scrollContainers.forEach((r,s)=>{this._scrollableContainsElement(s,t)&&i.push(s)}),i}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(t,i){let r=Vc(i),s=t.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>ba(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}return n.\u0275fac=function(t){return new(t||n)(Q(pt),Q(Fi),Q(Ht,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),VB=(()=>{class n{constructor(t,i,r,s){this.elementRef=t,this.scrollDispatcher=i,this.ngZone=r,this.dir=s,this._destroyed=new Ue,this._elementScrolled=new Sn(o=>this.ngZone.runOutsideAngular(()=>ba(this.elementRef.nativeElement,"scroll").pipe(et(this._destroyed)).subscribe(o)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(t){const i=this.elementRef.nativeElement,r=this.dir&&"rtl"==this.dir.value;null==t.left&&(t.left=r?t.end:t.start),null==t.right&&(t.right=r?t.start:t.end),null!=t.bottom&&(t.top=i.scrollHeight-i.clientHeight-t.bottom),r&&0!=hy()?(null!=t.left&&(t.right=i.scrollWidth-i.clientWidth-t.left),2==hy()?t.left=t.right:1==hy()&&(t.left=t.right?-t.right:t.right)):null!=t.right&&(t.left=i.scrollWidth-i.clientWidth-t.right),this._applyScrollToOptions(t)}_applyScrollToOptions(t){const i=this.elementRef.nativeElement;UB()?i.scrollTo(t):(null!=t.top&&(i.scrollTop=t.top),null!=t.left&&(i.scrollLeft=t.left))}measureScrollOffset(t){const i="left",r="right",s=this.elementRef.nativeElement;if("top"==t)return s.scrollTop;if("bottom"==t)return s.scrollHeight-s.clientHeight-s.scrollTop;const o=this.dir&&"rtl"==this.dir.value;return"start"==t?t=o?r:i:"end"==t&&(t=o?i:r),o&&2==hy()?t==i?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&1==hy()?t==i?s.scrollLeft+s.scrollWidth-s.clientWidth:-s.scrollLeft:t==i?s.scrollLeft:s.scrollWidth-s.clientWidth-s.scrollLeft}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(py),D(pt),D(tl,8))},n.\u0275dir=Ae({type:n,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),n})(),gM=(()=>{class n{constructor(t,i,r){this._platform=t,this._change=new Ue,this._changeListener=s=>{this._change.next(s)},this._document=r,i.runOutsideAngular(()=>{if(t.isBrowser){const s=this._getWindow();s.addEventListener("resize",this._changeListener),s.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:i,height:r}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+r,right:t.left+i,height:r,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._document,i=this._getWindow(),r=t.documentElement,s=r.getBoundingClientRect();return{top:-s.top||t.body.scrollTop||i.scrollY||r.scrollTop||0,left:-s.left||t.body.scrollLeft||i.scrollX||r.scrollLeft||0}}change(t=20){return t>0?this._change.pipe(fM(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}}return n.\u0275fac=function(t){return new(t||n)(Q(Fi),Q(pt),Q(Ht,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const zB=new ge("VIRTUAL_SCROLLABLE");let hY=(()=>{class n extends VB{constructor(t,i,r,s){super(t,i,r,s)}measureViewportSize(t){const i=this.elementRef.nativeElement;return"horizontal"===t?i.clientWidth:i.clientHeight}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(py),D(pt),D(tl,8))},n.\u0275dir=Ae({type:n,features:[ft]}),n})();const pY=typeof requestAnimationFrame<"u"?LB:JD;let mY=(()=>{class n extends hY{get orientation(){return this._orientation}set orientation(t){this._orientation!==t&&(this._orientation=t,this._calculateSpacerSize())}get appendOnly(){return this._appendOnly}set appendOnly(t){this._appendOnly=Cn(t)}constructor(t,i,r,s,o,a,l,c){super(t,a,r,o),this.elementRef=t,this._changeDetectorRef=i,this._scrollStrategy=s,this.scrollable=c,this._platform=Ot(Fi),this._detachedSubject=new Ue,this._renderedRangeSubject=new Ue,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new Sn(u=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>u.next(h))))),this.renderedRangeStream=this._renderedRangeSubject,this._totalContentSize=0,this._totalContentWidth="",this._totalContentHeight="",this._renderedRange={start:0,end:0},this._dataLength=0,this._viewportSize=0,this._renderedContentOffset=0,this._renderedContentOffsetNeedsRewrite=!1,this._isChangeDetectionPending=!1,this._runAfterChangeDetection=[],this._viewportChanges=un.EMPTY,this._viewportChanges=l.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this)}ngOnInit(){this._platform.isBrowser&&(this.scrollable===this&&super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.scrollable.elementScrolled().pipe(No(null),fM(0,pY)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()})))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),super.ngOnDestroy()}attach(t){this.ngZone.runOutsideAngular(()=>{this._forOf=t,this._forOf.dataStream.pipe(et(this._detachedSubject)).subscribe(i=>{const r=i.length;r!==this._dataLength&&(this._dataLength=r,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}measureBoundingClientRectWithScrollOffset(t){return this.getElementRef().nativeElement.getBoundingClientRect()[t]}setTotalContentSize(t){this._totalContentSize!==t&&(this._totalContentSize=t,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(t){(function fY(n,e){return n.start==e.start&&n.end==e.end})(this._renderedRange,t)||(this.appendOnly&&(t={start:0,end:Math.max(this._renderedRange.end,t.end)}),this._renderedRangeSubject.next(this._renderedRange=t),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(t,i="to-start"){t=this.appendOnly&&"to-start"===i?0:t;const s="horizontal"==this.orientation,o=s?"X":"Y";let l=`translate${o}(${Number((s&&this.dir&&"rtl"==this.dir.value?-1:1)*t)}px)`;this._renderedContentOffset=t,"to-end"===i&&(l+=` translate${o}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=l&&(this._renderedContentTransform=l,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(t,i="auto"){const r={behavior:i};"horizontal"===this.orientation?r.start=t:r.top=t,this.scrollable.scrollTo(r)}scrollToIndex(t,i="auto"){this._scrollStrategy.scrollToIndex(t,i)}measureScrollOffset(t){let i;return i=this.scrollable==this?r=>super.measureScrollOffset(r):r=>this.scrollable.measureScrollOffset(r),Math.max(0,i(t??("horizontal"===this.orientation?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(t){let i;const r="left",s="right",o="rtl"==this.dir?.value;i="start"==t?o?s:r:"end"==t?o?r:s:t||("horizontal"===this.orientation?"left":"top");const a=this.scrollable.measureBoundingClientRectWithScrollOffset(i);return this.elementRef.nativeElement.getBoundingClientRect()[i]-a}measureRenderedContentSize(){const t=this._contentWrapper.nativeElement;return"horizontal"===this.orientation?t.offsetWidth:t.offsetHeight}measureRangeSize(t){return this._forOf?this._forOf.measureRangeSize(t,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){this._viewportSize=this.scrollable.measureViewportSize(this.orientation)}_markChangeDetectionNeeded(t){t&&this._runAfterChangeDetection.push(t),this._isChangeDetectionPending||(this._isChangeDetectionPending=!0,this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._doChangeDetection()})))}_doChangeDetection(){this._isChangeDetectionPending=!1,this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,this.ngZone.run(()=>this._changeDetectorRef.markForCheck());const t=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(const i of t)i()}_calculateSpacerSize(){this._totalContentHeight="horizontal"===this.orientation?"":`${this._totalContentSize}px`,this._totalContentWidth="horizontal"===this.orientation?`${this._totalContentSize}px`:""}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(ci),D(pt),D(cY,8),D(tl,8),D(py),D(gM),D(zB,8))},n.\u0275cmp=ht({type:n,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(t,i){if(1&t&&oi(aY,7),2&t){let r;Lt(r=Ft())&&(i._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(t,i){2&t&&Pn("cdk-virtual-scroll-orientation-horizontal","horizontal"===i.orientation)("cdk-virtual-scroll-orientation-vertical","horizontal"!==i.orientation)},inputs:{orientation:"orientation",appendOnly:"appendOnly"},outputs:{scrolledIndexChange:"scrolledIndexChange"},standalone:!0,features:[Hn([{provide:VB,useFactory:(e,t)=>e||t,deps:[[new Po,new rp(zB)],n]}]),ft,v1],ngContentSelectors:lY,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(t,i){1&t&&(Cr(),K(0,"div",0,1),Kt(2),J(),Fe(3,"div",2)),2&t&&(j(3),Pc("width",i._totalContentWidth)("height",i._totalContentHeight))},styles:["cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}"],encapsulation:2,changeDetection:0}),n})(),my=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({}),n})(),HB=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[fy,my,mY,fy,my]}),n})();class iI{attach(e){return this._attachedHost=e,e.attach(this)}detach(){let e=this._attachedHost;null!=e&&(this._attachedHost=null,e.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(e){this._attachedHost=e}}class lm extends iI{constructor(e,t,i,r,s){super(),this.component=e,this.viewContainerRef=t,this.injector=i,this.componentFactoryResolver=r,this.projectableNodes=s}}class cm extends iI{constructor(e,t,i,r){super(),this.templateRef=e,this.viewContainerRef=t,this.context=i,this.injector=r}get origin(){return this.templateRef.elementRef}attach(e,t=this.context){return this.context=t,super.attach(e)}detach(){return this.context=void 0,super.detach()}}class gY extends iI{constructor(e){super(),this.element=e instanceof yt?e.nativeElement:e}}class _M{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(e){return e instanceof lm?(this._attachedPortal=e,this.attachComponentPortal(e)):e instanceof cm?(this._attachedPortal=e,this.attachTemplatePortal(e)):this.attachDomPortal&&e instanceof gY?(this._attachedPortal=e,this.attachDomPortal(e)):void 0}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(e){this._disposeFn=e}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}class _Y extends _M{constructor(e,t,i,r,s){super(),this.outletElement=e,this._componentFactoryResolver=t,this._appRef=i,this._defaultInjector=r,this.attachDomPortal=o=>{const a=o.element,l=this._document.createComment("dom-portal");a.parentNode.insertBefore(l,a),this.outletElement.appendChild(a),this._attachedPortal=o,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=s}attachComponentPortal(e){const i=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component);let r;return e.viewContainerRef?(r=e.viewContainerRef.createComponent(i,e.viewContainerRef.length,e.injector||e.viewContainerRef.injector,e.projectableNodes||void 0),this.setDisposeFn(()=>r.destroy())):(r=i.create(e.injector||this._defaultInjector||ki.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=e,r}attachTemplatePortal(e){let t=e.viewContainerRef,i=t.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return i.rootNodes.forEach(r=>this.outletElement.appendChild(r)),i.detectChanges(),this.setDisposeFn(()=>{let r=t.indexOf(i);-1!==r&&t.remove(r)}),this._attachedPortal=e,i}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(e){return e.hostView.rootNodes[0]}}let dm=(()=>{class n extends _M{constructor(t,i,r){super(),this._componentFactoryResolver=t,this._viewContainerRef=i,this._isInitialized=!1,this.attached=new it,this.attachDomPortal=s=>{const o=s.element,a=this._document.createComment("dom-portal");s.setAttachedHost(this),o.parentNode.insertBefore(a,o),this._getRootNode().appendChild(o),this._attachedPortal=s,super.setDisposeFn(()=>{a.parentNode&&a.parentNode.replaceChild(o,a)})},this._document=r}get portal(){return this._attachedPortal}set portal(t){this.hasAttached()&&!t&&!this._isInitialized||(this.hasAttached()&&super.detach(),t&&super.attach(t),this._attachedPortal=t||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(t){t.setAttachedHost(this);const i=null!=t.viewContainerRef?t.viewContainerRef:this._viewContainerRef,s=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component),o=i.createComponent(s,i.length,t.injector||i.injector,t.projectableNodes||void 0);return i!==this._viewContainerRef&&this._getRootNode().appendChild(o.hostView.rootNodes[0]),super.setDisposeFn(()=>o.destroy()),this._attachedPortal=t,this._attachedRef=o,this.attached.emit(o),o}attachTemplatePortal(t){t.setAttachedHost(this);const i=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=t,this._attachedRef=i,this.attached.emit(i),i}_getRootNode(){const t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}}return n.\u0275fac=function(t){return new(t||n)(D(Ol),D(is),D(Ht))},n.\u0275dir=Ae({type:n,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[ft]}),n})(),um=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({}),n})();function nl(n,...e){return e.length?e.some(t=>n[t]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}const GB=UB();class RY{constructor(e,t){this._viewportRuler=e,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=t}attach(){}enable(){if(this._canBeEnabled()){const e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=mr(-this._previousScrollPosition.left),e.style.top=mr(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const e=this._document.documentElement,i=e.style,r=this._document.body.style,s=i.scrollBehavior||"",o=r.scrollBehavior||"";this._isEnabled=!1,i.left=this._previousHTMLStyles.left,i.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),GB&&(i.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),GB&&(i.scrollBehavior=s,r.scrollBehavior=o)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const t=this._document.body,i=this._viewportRuler.getViewportSize();return t.scrollHeight>i.height||t.scrollWidth>i.width}}class PY{constructor(e,t,i,r){this._scrollDispatcher=e,this._ngZone=t,this._viewportRuler=i,this._config=r,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(e){this._overlayRef=e}enable(){if(this._scrollSubscription)return;const e=this._scrollDispatcher.scrolled(0).pipe(On(t=>!t||!this._overlayRef.overlayElement.contains(t.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(()=>{const t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}class WB{enable(){}disable(){}attach(){}}function sI(n,e){return e.some(t=>n.bottomt.bottom||n.rightt.right)}function $B(n,e){return e.some(t=>n.topt.bottom||n.leftt.right)}class kY{constructor(e,t,i,r){this._scrollDispatcher=e,this._viewportRuler=t,this._ngZone=i,this._config=r,this._scrollSubscription=null}attach(e){this._overlayRef=e}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){const t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:i,height:r}=this._viewportRuler.getViewportSize();sI(t,[{width:i,height:r,bottom:r,right:i,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}let OY=(()=>{class n{constructor(t,i,r,s){this._scrollDispatcher=t,this._viewportRuler=i,this._ngZone=r,this.noop=()=>new WB,this.close=o=>new PY(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new RY(this._viewportRuler,this._document),this.reposition=o=>new kY(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}}return n.\u0275fac=function(t){return new(t||n)(Q(py),Q(gM),Q(pt),Q(Ht))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class _y{constructor(e){if(this.scrollStrategy=new WB,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,e){const t=Object.keys(e);for(const i of t)void 0!==e[i]&&(this[i]=e[i])}}}class LY{constructor(e,t){this.connectionPair=e,this.scrollableViewProperties=t}}let jB=(()=>{class n{constructor(t){this._attachedOverlays=[],this._document=t}ngOnDestroy(){this.detach()}add(t){this.remove(t),this._attachedOverlays.push(t)}remove(t){const i=this._attachedOverlays.indexOf(t);i>-1&&this._attachedOverlays.splice(i,1),0===this._attachedOverlays.length&&this.detach()}}return n.\u0275fac=function(t){return new(t||n)(Q(Ht))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),FY=(()=>{class n extends jB{constructor(t,i){super(t),this._ngZone=i,this._keydownListener=r=>{const s=this._attachedOverlays;for(let o=s.length-1;o>-1;o--)if(s[o]._keydownEvents.observers.length>0){const a=s[o]._keydownEvents;this._ngZone?this._ngZone.run(()=>a.next(r)):a.next(r);break}}}add(t){super.add(t),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}return n.\u0275fac=function(t){return new(t||n)(Q(Ht),Q(pt,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),NY=(()=>{class n extends jB{constructor(t,i,r){super(t),this._platform=i,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=Xd(s)},this._clickListener=s=>{const o=Xd(s),a="click"===s.type&&this._pointerDownEventTarget?this._pointerDownEventTarget:o;this._pointerDownEventTarget=null;const l=this._attachedOverlays.slice();for(let c=l.length-1;c>-1;c--){const u=l[c];if(u._outsidePointerEvents.observers.length<1||!u.hasAttached())continue;if(u.overlayElement.contains(o)||u.overlayElement.contains(a))break;const h=u._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>h.next(s)):h.next(s)}}}add(t){if(super.add(t),!this._isAttached){const i=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(i)):this._addEventListeners(i),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=i.style.cursor,i.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){const t=this._document.body;t.removeEventListener("pointerdown",this._pointerDownListener,!0),t.removeEventListener("click",this._clickListener,!0),t.removeEventListener("auxclick",this._clickListener,!0),t.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(t.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(t){t.addEventListener("pointerdown",this._pointerDownListener,!0),t.addEventListener("click",this._clickListener,!0),t.addEventListener("auxclick",this._clickListener,!0),t.addEventListener("contextmenu",this._clickListener,!0)}}return n.\u0275fac=function(t){return new(t||n)(Q(Ht),Q(Fi),Q(pt,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),wM=(()=>{class n{constructor(t,i){this._platform=i,this._document=t}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const t="cdk-overlay-container";if(this._platform.isBrowser||nI()){const r=this._document.querySelectorAll(`.${t}[platform="server"], .${t}[platform="test"]`);for(let s=0;sthis._backdropClick.next(h),this._backdropTransitionendHandler=h=>{this._disposeBackdrop(h.target)},this._keydownEvents=new Ue,this._outsidePointerEvents=new Ue,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(e){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);const t=this._portalOutlet.attach(e);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(Li(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),"function"==typeof t?.onDestroy&&t.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();const e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){const e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._previousHostParent=this._pane=this._host=null,e&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config={...this._config,...e},this._updateElementSize()}setDirection(e){this._config={...this._config,direction:e},this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){const e=this._config.direction;return e?"string"==typeof e?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;const e=this._pane.style;e.width=mr(this._config.width),e.height=mr(this._config.height),e.minWidth=mr(this._config.minWidth),e.minHeight=mr(this._config.minHeight),e.maxWidth=mr(this._config.maxWidth),e.maxHeight=mr(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){const e="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(e)})}):this._backdropElement.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){const e=this._backdropElement;if(e){if(this._animationsDisabled)return void this._disposeBackdrop(e);e.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{e.addEventListener("transitionend",this._backdropTransitionendHandler)}),e.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(e)},500))}}_toggleClasses(e,t,i){const r=lM(t||[]).filter(s=>!!s);r.length&&(i?e.classList.add(...r):e.classList.remove(...r))}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{const e=this._ngZone.onStable.pipe(et(cs(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||0===this._pane.children.length)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){const e=this._scrollStrategy;e&&(e.disable(),e.detach&&e.detach())}_disposeBackdrop(e){e&&(e.removeEventListener("click",this._backdropClickHandler),e.removeEventListener("transitionend",this._backdropTransitionendHandler),e.remove(),this._backdropElement===e&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}}const XB="cdk-overlay-connected-position-bounding-box",BY=/([A-Za-z%]+)$/;class UY{get positions(){return this._preferredPositions}constructor(e,t,i,r,s){this._viewportRuler=t,this._document=i,this._platform=r,this._overlayContainer=s,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new Ue,this._resizeSubscription=un.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(e)}attach(e){this._validatePositions(),e.hostElement.classList.add(XB),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const e=this._originRect,t=this._overlayRect,i=this._viewportRect,r=this._containerRect,s=[];let o;for(let a of this._preferredPositions){let l=this._getOriginPoint(e,r,a),c=this._getOverlayPoint(l,t,a),u=this._getOverlayFit(c,t,i,a);if(u.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(u,c,i)?s.push({position:a,origin:l,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!o||o.overlayFit.visibleAreal&&(l=u,a=c)}return this._isPushed=!1,void this._applyPosition(a.position,a.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(o.position,o.originPoint);this._applyPosition(o.position,o.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&Eh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(XB),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;const e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const t=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,t)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,-1===e.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,t,i){let r,s;if("center"==i.originX)r=e.left+e.width/2;else{const o=this._isRtl()?e.right:e.left,a=this._isRtl()?e.left:e.right;r="start"==i.originX?o:a}return t.left<0&&(r-=t.left),s="center"==i.originY?e.top+e.height/2:"top"==i.originY?e.top:e.bottom,t.top<0&&(s-=t.top),{x:r,y:s}}_getOverlayPoint(e,t,i){let r,s;return r="center"==i.overlayX?-t.width/2:"start"===i.overlayX?this._isRtl()?-t.width:0:this._isRtl()?0:-t.width,s="center"==i.overlayY?-t.height/2:"top"==i.overlayY?0:-t.height,{x:e.x+r,y:e.y+s}}_getOverlayFit(e,t,i,r){const s=YB(t);let{x:o,y:a}=e,l=this._getOffset(r,"x"),c=this._getOffset(r,"y");l&&(o+=l),c&&(a+=c);let p=0-a,m=a+s.height-i.height,g=this._subtractOverflows(s.width,0-o,o+s.width-i.width),b=this._subtractOverflows(s.height,p,m),y=g*b;return{visibleArea:y,isCompletelyWithinViewport:s.width*s.height===y,fitsInViewportVertically:b===s.height,fitsInViewportHorizontally:g==s.width}}_canFitWithFlexibleDimensions(e,t,i){if(this._hasFlexibleDimensions){const r=i.bottom-t.y,s=i.right-t.x,o=qB(this._overlayRef.getConfig().minHeight),a=qB(this._overlayRef.getConfig().minWidth);return(e.fitsInViewportVertically||null!=o&&o<=r)&&(e.fitsInViewportHorizontally||null!=a&&a<=s)}return!1}_pushOverlayOnScreen(e,t,i){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};const r=YB(t),s=this._viewportRect,o=Math.max(e.x+r.width-s.width,0),a=Math.max(e.y+r.height-s.height,0),l=Math.max(s.top-i.top-e.y,0),c=Math.max(s.left-i.left-e.x,0);let u=0,h=0;return u=r.width<=s.width?c||-o:e.xg&&!this._isInitialRender&&!this._growAfterOpen&&(o=e.y-g/2)}if("end"===t.overlayX&&!r||"start"===t.overlayX&&r)p=i.width-e.x+this._viewportMargin,u=e.x-this._viewportMargin;else if("start"===t.overlayX&&!r||"end"===t.overlayX&&r)h=e.x,u=i.right-e.x;else{const m=Math.min(i.right-e.x+i.left,e.x),g=this._lastBoundingBoxSize.width;u=2*m,h=e.x-m,u>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=e.x-g/2)}return{top:o,left:h,bottom:a,right:p,width:u,height:s}}_setBoundingBoxStyles(e,t){const i=this._calculateBoundingBoxRect(e,t);!this._isInitialRender&&!this._growAfterOpen&&(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));const r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{const s=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;r.height=mr(i.height),r.top=mr(i.top),r.bottom=mr(i.bottom),r.width=mr(i.width),r.left=mr(i.left),r.right=mr(i.right),r.alignItems="center"===t.overlayX?"center":"end"===t.overlayX?"flex-end":"flex-start",r.justifyContent="center"===t.overlayY?"center":"bottom"===t.overlayY?"flex-end":"flex-start",s&&(r.maxHeight=mr(s)),o&&(r.maxWidth=mr(o))}this._lastBoundingBoxSize=i,Eh(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Eh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Eh(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,t){const i={},r=this._hasExactPosition(),s=this._hasFlexibleDimensions,o=this._overlayRef.getConfig();if(r){const u=this._viewportRuler.getViewportScrollPosition();Eh(i,this._getExactOverlayY(t,e,u)),Eh(i,this._getExactOverlayX(t,e,u))}else i.position="static";let a="",l=this._getOffset(t,"x"),c=this._getOffset(t,"y");l&&(a+=`translateX(${l}px) `),c&&(a+=`translateY(${c}px)`),i.transform=a.trim(),o.maxHeight&&(r?i.maxHeight=mr(o.maxHeight):s&&(i.maxHeight="")),o.maxWidth&&(r?i.maxWidth=mr(o.maxWidth):s&&(i.maxWidth="")),Eh(this._pane.style,i)}_getExactOverlayY(e,t,i){let r={top:"",bottom:""},s=this._getOverlayPoint(t,this._overlayRect,e);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,i)),"bottom"===e.overlayY?r.bottom=this._document.documentElement.clientHeight-(s.y+this._overlayRect.height)+"px":r.top=mr(s.y),r}_getExactOverlayX(e,t,i){let o,r={left:"",right:""},s=this._getOverlayPoint(t,this._overlayRect,e);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,i)),o=this._isRtl()?"end"===e.overlayX?"left":"right":"end"===e.overlayX?"right":"left","right"===o?r.right=this._document.documentElement.clientWidth-(s.x+this._overlayRect.width)+"px":r.left=mr(s.x),r}_getScrollVisibility(){const e=this._getOriginRect(),t=this._pane.getBoundingClientRect(),i=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:$B(e,i),isOriginOutsideView:sI(e,i),isOverlayClipped:$B(t,i),isOverlayOutsideView:sI(t,i)}}_subtractOverflows(e,...t){return t.reduce((i,r)=>i-Math.max(r,0),e)}_getNarrowedViewportRect(){const e=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+e-this._viewportMargin,bottom:i.top+t-this._viewportMargin,width:e-2*this._viewportMargin,height:t-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,t){return"x"===t?null==e.offsetX?this._offsetX:e.offsetX:null==e.offsetY?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&lM(e).forEach(t=>{""!==t&&-1===this._appliedPanelClasses.indexOf(t)&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){const e=this._origin;if(e instanceof yt)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();const t=e.width||0,i=e.height||0;return{top:e.y,bottom:e.y+i,left:e.x,right:e.x+t,height:i,width:t}}}function Eh(n,e){for(let t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function qB(n){if("number"!=typeof n&&null!=n){const[e,t]=n.split(BY);return t&&"px"!==t?null:parseFloat(e)}return n||null}function YB(n){return{top:Math.floor(n.top),right:Math.floor(n.right),bottom:Math.floor(n.bottom),left:Math.floor(n.left),width:Math.floor(n.width),height:Math.floor(n.height)}}const KB="cdk-global-overlay-wrapper";class VY{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(e){const t=e.getConfig();this._overlayRef=e,this._width&&!t.width&&e.updateSize({width:this._width}),this._height&&!t.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(KB),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;const e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:r,height:s,maxWidth:o,maxHeight:a}=i,l=!("100%"!==r&&"100vw"!==r||o&&"100%"!==o&&"100vw"!==o),c=!("100%"!==s&&"100vh"!==s||a&&"100%"!==a&&"100vh"!==a),u=this._xPosition,h=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction;let m="",g="",b="";l?b="flex-start":"center"===u?(b="center",p?g=h:m=h):p?"left"===u||"end"===u?(b="flex-end",m=h):("right"===u||"start"===u)&&(b="flex-start",g=h):"left"===u||"start"===u?(b="flex-start",m=h):("right"===u||"end"===u)&&(b="flex-end",g=h),e.position=this._cssPosition,e.marginLeft=l?"0":m,e.marginTop=c?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=l?"0":g,t.justifyContent=b,t.alignItems=c?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;const e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,i=t.style;t.classList.remove(KB),i.justifyContent=i.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}}let zY=(()=>{class n{constructor(t,i,r,s){this._viewportRuler=t,this._document=i,this._platform=r,this._overlayContainer=s}global(){return new VY}flexibleConnectedTo(t){return new UY(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return n.\u0275fac=function(t){return new(t||n)(Q(gM),Q(Ht),Q(Fi),Q(wM))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),HY=0,mo=(()=>{class n{constructor(t,i,r,s,o,a,l,c,u,h,p,m){this.scrollStrategies=t,this._overlayContainer=i,this._componentFactoryResolver=r,this._positionBuilder=s,this._keyboardDispatcher=o,this._injector=a,this._ngZone=l,this._document=c,this._directionality=u,this._location=h,this._outsideClickDispatcher=p,this._animationsModuleType=m}create(t){const i=this._createHostElement(),r=this._createPaneElement(i),s=this._createPortalOutlet(r),o=new _y(t);return o.direction=o.direction||this._directionality.value,new vy(s,i,r,o,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,"NoopAnimations"===this._animationsModuleType)}position(){return this._positionBuilder}_createPaneElement(t){const i=this._document.createElement("div");return i.id="cdk-overlay-"+HY++,i.classList.add("cdk-overlay-pane"),t.appendChild(i),i}_createHostElement(){const t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}_createPortalOutlet(t){return this._appRef||(this._appRef=this._injector.get(qp)),new _Y(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return n.\u0275fac=function(t){return new(t||n)(Q(OY),Q(wM),Q(Ol),Q(zY),Q(FY),Q(ki),Q(pt),Q(Ht),Q(tl),Q(Lv),Q(NY),Q(rs,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const GY=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],ZB=new ge("cdk-connected-overlay-scroll-strategy");let oI=(()=>{class n{constructor(t){this.elementRef=t}}return n.\u0275fac=function(t){return new(t||n)(D(yt))},n.\u0275dir=Ae({type:n,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),n})(),QB=(()=>{class n{get offsetX(){return this._offsetX}set offsetX(t){this._offsetX=t,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(t){this._offsetY=t,this._position&&this._updatePositionStrategy(this._position)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(t){this._hasBackdrop=Cn(t)}get lockPosition(){return this._lockPosition}set lockPosition(t){this._lockPosition=Cn(t)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(t){this._flexibleDimensions=Cn(t)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(t){this._growAfterOpen=Cn(t)}get push(){return this._push}set push(t){this._push=Cn(t)}constructor(t,i,r,s,o){this._overlay=t,this._dir=o,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=un.EMPTY,this._attachSubscription=un.EMPTY,this._detachSubscription=un.EMPTY,this._positionSubscription=un.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new it,this.positionChange=new it,this.attach=new it,this.detach=new it,this.overlayKeydown=new it,this.overlayOutsideClick=new it,this._templatePortal=new cm(i,r),this._scrollStrategyFactory=s,this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(t){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),t.origin&&this.open&&this._position.apply()),t.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=GY);const t=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=t.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=t.detachments().subscribe(()=>this.detach.emit()),t.keydownEvents().subscribe(i=>{this.overlayKeydown.next(i),27===i.keyCode&&!this.disableClose&&!nl(i)&&(i.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(i=>{this.overlayOutsideClick.next(i)})}_buildConfig(){const t=this._position=this.positionStrategy||this._createPositionStrategy(),i=new _y({direction:this._dir,positionStrategy:t,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(i.width=this.width),(this.height||0===this.height)&&(i.height=this.height),(this.minWidth||0===this.minWidth)&&(i.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(i.minHeight=this.minHeight),this.backdropClass&&(i.backdropClass=this.backdropClass),this.panelClass&&(i.panelClass=this.panelClass),i}_updatePositionStrategy(t){const i=this.positions.map(r=>({originX:r.originX,originY:r.originY,overlayX:r.overlayX,overlayY:r.overlayY,offsetX:r.offsetX||this.offsetX,offsetY:r.offsetY||this.offsetY,panelClass:r.panelClass||void 0}));return t.setOrigin(this._getFlexibleConnectedPositionStrategyOrigin()).withPositions(i).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){const t=this._overlay.position().flexibleConnectedTo(this._getFlexibleConnectedPositionStrategyOrigin());return this._updatePositionStrategy(t),t}_getFlexibleConnectedPositionStrategyOrigin(){return this.origin instanceof oI?this.origin.elementRef:this.origin}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(t=>{this.backdropClick.emit(t)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(SN(()=>this.positionChange.observers.length>0)).subscribe(t=>{this.positionChange.emit(t),0===this.positionChange.observers.length&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(D(mo),D(fo),D(is),D(ZB),D(tl,8))},n.\u0275dir=Ae({type:n,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:["cdkConnectedOverlayOrigin","origin"],positions:["cdkConnectedOverlayPositions","positions"],positionStrategy:["cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:["cdkConnectedOverlayOffsetX","offsetX"],offsetY:["cdkConnectedOverlayOffsetY","offsetY"],width:["cdkConnectedOverlayWidth","width"],height:["cdkConnectedOverlayHeight","height"],minWidth:["cdkConnectedOverlayMinWidth","minWidth"],minHeight:["cdkConnectedOverlayMinHeight","minHeight"],backdropClass:["cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:["cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:["cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:["cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:["cdkConnectedOverlayOpen","open"],disableClose:["cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:["cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:["cdkConnectedOverlayHasBackdrop","hasBackdrop"],lockPosition:["cdkConnectedOverlayLockPosition","lockPosition"],flexibleDimensions:["cdkConnectedOverlayFlexibleDimensions","flexibleDimensions"],growAfterOpen:["cdkConnectedOverlayGrowAfterOpen","growAfterOpen"],push:["cdkConnectedOverlayPush","push"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],standalone:!0,features:[zi]}),n})();const $Y={provide:ZB,deps:[mo],useFactory:function WY(n){return()=>n.scrollStrategies.reposition()}};let pm=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({providers:[mo,$Y],imports:[fy,um,HB,HB]}),n})();function Ah(n,e=dy){return Gn((t,i)=>{let r=null,s=null,o=null;const a=()=>{if(r){r.unsubscribe(),r=null;const c=s;s=null,i.next(c)}};function l(){const c=o+n,u=e.now();if(u{s=c,o=e.now(),r||(r=e.schedule(l,n),i.add(r))},()=>{a(),i.complete()},void 0,()=>{s=r=null}))})}function JB(n){return On((e,t)=>n<=t)}function qd(n,e=Pa){return n=n??jY,Gn((t,i)=>{let r,s=!0;t.subscribe(Un(i,o=>{const a=e(o);(s||!n(r,a))&&(s=!1,r=a,i.next(o))}))})}function jY(n,e){return n===e}let eU=(()=>{class n{create(t){return typeof MutationObserver>"u"?null:new MutationObserver(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),XY=(()=>{class n{constructor(t){this._mutationObserverFactory=t,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((t,i)=>this._cleanupObserver(i))}observe(t){const i=Vc(t);return new Sn(r=>{const o=this._observeElement(i).subscribe(r);return()=>{o.unsubscribe(),this._unobserveElement(i)}})}_observeElement(t){if(this._observedElements.has(t))this._observedElements.get(t).count++;else{const i=new Ue,r=this._mutationObserverFactory.create(s=>i.next(s));r&&r.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:r,stream:i,count:1})}return this._observedElements.get(t).stream}_unobserveElement(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))}_cleanupObserver(t){if(this._observedElements.has(t)){const{observer:i,stream:r}=this._observedElements.get(t);i&&i.disconnect(),r.complete(),this._observedElements.delete(t)}}}return n.\u0275fac=function(t){return new(t||n)(Q(eU))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),tU=(()=>{class n{get disabled(){return this._disabled}set disabled(t){this._disabled=Cn(t),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(t){this._debounce=Ys(t),this._subscribe()}constructor(t,i,r){this._contentObserver=t,this._elementRef=i,this._ngZone=r,this.event=new it,this._disabled=!1,this._currentSubscription=null}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();const t=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(()=>{this._currentSubscription=(this.debounce?t.pipe(Ah(this.debounce)):t).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(D(XY),D(yt),D(pt))},n.\u0275dir=Ae({type:n,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),n})(),aI=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({providers:[eU]}),n})();const nU=new Set;let mm,qY=(()=>{class n{constructor(t){this._platform=t,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):KY}matchMedia(t){return(this._platform.WEBKIT||this._platform.BLINK)&&function YY(n){if(!nU.has(n))try{mm||(mm=document.createElement("style"),mm.setAttribute("type","text/css"),document.head.appendChild(mm)),mm.sheet&&(mm.sheet.insertRule(`@media ${n} {body{ }}`,0),nU.add(n))}catch(e){console.error(e)}}(t),this._matchMedia(t)}}return n.\u0275fac=function(t){return new(t||n)(Q(Fi))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function KY(n){return{matches:"all"===n||""===n,media:n,addListener:()=>{},removeListener:()=>{}}}let lI=(()=>{class n{constructor(t,i){this._mediaMatcher=t,this._zone=i,this._queries=new Map,this._destroySubject=new Ue}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return iU(lM(t)).some(r=>this._registerQuery(r).mql.matches)}observe(t){let s=Vd(iU(lM(t)).map(o=>this._registerQuery(o).observable));return s=$v(s.pipe(Li(1)),s.pipe(JB(1),Ah(0))),s.pipe(Ye(o=>{const a={matches:!1,breakpoints:{}};return o.forEach(({matches:l,query:c})=>{a.matches=a.matches||l,a.breakpoints[c]=l}),a}))}_registerQuery(t){if(this._queries.has(t))return this._queries.get(t);const i=this._mediaMatcher.matchMedia(t),s={observable:new Sn(o=>{const a=l=>this._zone.run(()=>o.next(l));return i.addListener(a),()=>{i.removeListener(a)}}).pipe(No(i),Ye(({matches:o})=>({query:t,matches:o})),et(this._destroySubject)),mql:i};return this._queries.set(t,s),s}}return n.\u0275fac=function(t){return new(t||n)(Q(qY),Q(pt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function iU(n){return n.map(e=>e.split(",")).reduce((e,t)=>e.concat(t)).map(e=>e.trim())}function MM(n,e){return(n.getAttribute(e)||"").match(/\S+/g)||[]}const sU="cdk-describedby-message",SM="cdk-describedby-host";let cI=0,eK=(()=>{class n{constructor(t,i){this._platform=i,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+cI++,this._document=t,this._id=Ot(Xp)+"-"+cI++}describe(t,i,r){if(!this._canBeDescribed(t,i))return;const s=dI(i,r);"string"!=typeof i?(oU(i,this._id),this._messageRegistry.set(s,{messageElement:i,referenceCount:0})):this._messageRegistry.has(s)||this._createMessageElement(i,r),this._isElementDescribedByMessage(t,s)||this._addMessageReference(t,s)}removeDescription(t,i,r){if(!i||!this._isElementNode(t))return;const s=dI(i,r);if(this._isElementDescribedByMessage(t,s)&&this._removeMessageReference(t,s),"string"==typeof i){const o=this._messageRegistry.get(s);o&&0===o.referenceCount&&this._deleteMessageElement(s)}0===this._messagesContainer?.childNodes.length&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){const t=this._document.querySelectorAll(`[${SM}="${this._id}"]`);for(let i=0;i0!=r.indexOf(sU));t.setAttribute("aria-describedby",i.join(" "))}_addMessageReference(t,i){const r=this._messageRegistry.get(i);(function QY(n,e,t){const i=MM(n,e);i.some(r=>r.trim()==t.trim())||(i.push(t.trim()),n.setAttribute(e,i.join(" ")))})(t,"aria-describedby",r.messageElement.id),t.setAttribute(SM,this._id),r.referenceCount++}_removeMessageReference(t,i){const r=this._messageRegistry.get(i);r.referenceCount--,function JY(n,e,t){const r=MM(n,e).filter(s=>s!=t.trim());r.length?n.setAttribute(e,r.join(" ")):n.removeAttribute(e)}(t,"aria-describedby",r.messageElement.id),t.removeAttribute(SM)}_isElementDescribedByMessage(t,i){const r=MM(t,"aria-describedby"),s=this._messageRegistry.get(i),o=s&&s.messageElement.id;return!!o&&-1!=r.indexOf(o)}_canBeDescribed(t,i){if(!this._isElementNode(t))return!1;if(i&&"object"==typeof i)return!0;const r=null==i?"":`${i}`.trim(),s=t.getAttribute("aria-label");return!(!r||s&&s.trim()===r)}_isElementNode(t){return t.nodeType===this._document.ELEMENT_NODE}}return n.\u0275fac=function(t){return new(t||n)(Q(Ht),Q(Fi))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function dI(n,e){return"string"==typeof n?`${e||""}/${n}`:n}function oU(n,e){n.id||(n.id=`${sU}-${e}-${cI++}`)}class aU{constructor(e){this._items=e,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Ue,this._typeaheadSubscription=un.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=t=>t.disabled,this._pressedLetters=[],this.tabOut=new Ue,this.change=new Ue,e instanceof Wp&&(this._itemChangesSubscription=e.changes.subscribe(t=>{if(this._activeItem){const r=t.toArray().indexOf(this._activeItem);r>-1&&r!==this._activeItemIndex&&(this._activeItemIndex=r)}}))}skipPredicate(e){return this._skipPredicateFn=e,this}withWrap(e=!0){return this._wrap=e,this}withVerticalOrientation(e=!0){return this._vertical=e,this}withHorizontalOrientation(e){return this._horizontal=e,this}withAllowedModifierKeys(e){return this._allowedModifierKeys=e,this}withTypeAhead(e=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Ii(t=>this._pressedLetters.push(t)),Ah(e),On(()=>this._pressedLetters.length>0),Ye(()=>this._pressedLetters.join(""))).subscribe(t=>{const i=this._getItemsArray();for(let r=1;r!e[s]||this._allowedModifierKeys.indexOf(s)>-1);switch(t){case 9:return void this.tabOut.next();case 40:if(this._vertical&&r){this.setNextItemActive();break}return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}return;case 33:if(this._pageUpAndDown.enabled&&r){const s=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(s>0?s:0,1);break}return;case 34:if(this._pageUpAndDown.enabled&&r){const s=this._activeItemIndex+this._pageUpAndDown.delta,o=this._getItemsArray().length;this._setActiveItemByIndex(s=65&&t<=90||t>=48&&t<=57)&&this._letterKeyStream.next(String.fromCharCode(t))))}this._pressedLetters=[],e.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(e){const t=this._getItemsArray(),i="number"==typeof e?e:t.indexOf(e);this._activeItem=t[i]??null,this._activeItemIndex=i}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(e){this._wrap?this._setActiveInWrapMode(e):this._setActiveInDefaultMode(e)}_setActiveInWrapMode(e){const t=this._getItemsArray();for(let i=1;i<=t.length;i++){const r=(this._activeItemIndex+e*i+t.length)%t.length;if(!this._skipPredicateFn(t[r]))return void this.setActiveItem(r)}}_setActiveInDefaultMode(e){this._setActiveItemByIndex(this._activeItemIndex+e,e)}_setActiveItemByIndex(e,t){const i=this._getItemsArray();if(i[e]){for(;this._skipPredicateFn(i[e]);)if(!i[e+=t])return;this.setActiveItem(e)}}_getItemsArray(){return this._items instanceof Wp?this._items.toArray():this._items}}class tK extends aU{setActiveItem(e){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(e),this.activeItem&&this.activeItem.setActiveStyles()}}class lU extends aU{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(e){return this._origin=e,this}setActiveItem(e){super.setActiveItem(e),this.activeItem&&this.activeItem.focus(this._origin)}}let CM=(()=>{class n{constructor(t){this._platform=t}isDisabled(t){return t.hasAttribute("disabled")}isVisible(t){return function iK(n){return!!(n.offsetWidth||n.offsetHeight||"function"==typeof n.getClientRects&&n.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility}isTabbable(t){if(!this._platform.isBrowser)return!1;const i=function nK(n){try{return n.frameElement}catch{return null}}(function uK(n){return n.ownerDocument&&n.ownerDocument.defaultView||window}(t));if(i&&(-1===dU(i)||!this.isVisible(i)))return!1;let r=t.nodeName.toLowerCase(),s=dU(t);return t.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function cK(n){let e=n.nodeName.toLowerCase(),t="input"===e&&n.type;return"text"===t||"password"===t||"select"===e||"textarea"===e}(t))&&("audio"===r?!!t.hasAttribute("controls")&&-1!==s:"video"===r?-1!==s&&(null!==s||this._platform.FIREFOX||t.hasAttribute("controls")):t.tabIndex>=0)}isFocusable(t,i){return function dK(n){return!function sK(n){return function aK(n){return"input"==n.nodeName.toLowerCase()}(n)&&"hidden"==n.type}(n)&&(function rK(n){let e=n.nodeName.toLowerCase();return"input"===e||"select"===e||"button"===e||"textarea"===e}(n)||function oK(n){return function lK(n){return"a"==n.nodeName.toLowerCase()}(n)&&n.hasAttribute("href")}(n)||n.hasAttribute("contenteditable")||cU(n))}(t)&&!this.isDisabled(t)&&(i?.ignoreVisibility||this.isVisible(t))}}return n.\u0275fac=function(t){return new(t||n)(Q(Fi))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function cU(n){if(!n.hasAttribute("tabindex")||void 0===n.tabIndex)return!1;let e=n.getAttribute("tabindex");return!(!e||isNaN(parseInt(e,10)))}function dU(n){if(!cU(n))return null;const e=parseInt(n.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}class hK{get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}constructor(e,t,i,r,s=!1){this._element=e,this._checker=t,this._ngZone=i,this._document=r,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,s||this.attachAnchors()}destroy(){const e=this._startAnchor,t=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.remove()),t&&(t.removeEventListener("focus",this.endAnchorListener),t.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement(e)))})}focusFirstTabbableElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement(e)))})}focusLastTabbableElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement(e)))})}_getRegionBoundary(e){const t=this._element.querySelectorAll(`[cdk-focus-region-${e}], [cdkFocusRegion${e}], [cdk-focus-${e}]`);return"start"==e?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(e){const t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(!this._checker.isFocusable(t)){const i=this._getFirstTabbableElement(t);return i?.focus(e),!!i}return t.focus(e),!0}return this.focusFirstTabbableElement(e)}focusFirstTabbableElement(e){const t=this._getRegionBoundary("start");return t&&t.focus(e),!!t}focusLastTabbableElement(e){const t=this._getRegionBoundary("end");return t&&t.focus(e),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;const t=e.children;for(let i=0;i=0;i--){const r=t[i].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[i]):null;if(r)return r}return null}_createAnchor(){const e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e}_toggleAnchorTabIndex(e,t){e?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}toggleAnchors(e){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_executeOnStable(e){this._ngZone.isStable?e():this._ngZone.onStable.pipe(Li(1)).subscribe(e)}}let uI=(()=>{class n{constructor(t,i,r){this._checker=t,this._ngZone=i,this._document=r}create(t,i=!1){return new hK(t,this._checker,this._ngZone,this._document,i)}}return n.\u0275fac=function(t){return new(t||n)(Q(CM),Q(pt),Q(Ht))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function hI(n){return 0===n.buttons||0===n.offsetX&&0===n.offsetY}function fI(n){const e=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!e||-1!==e.identifier||null!=e.radiusX&&1!==e.radiusX||null!=e.radiusY&&1!==e.radiusY)}const fK=new ge("cdk-input-modality-detector-options"),pK={ignoreKeys:[18,17,224,91,16]},gm=Sh({passive:!0,capture:!0});let mK=(()=>{class n{get mostRecentModality(){return this._modality.value}constructor(t,i,r,s){this._platform=t,this._mostRecentTarget=null,this._modality=new Ct(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(a=>a===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Xd(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(hI(o)?"keyboard":"mouse"),this._mostRecentTarget=Xd(o))},this._onTouchstart=o=>{fI(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Xd(o))},this._options={...pK,...s},this.modalityDetected=this._modality.pipe(JB(1)),this.modalityChanged=this.modalityDetected.pipe(qd()),t.isBrowser&&i.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,gm),r.addEventListener("mousedown",this._onMousedown,gm),r.addEventListener("touchstart",this._onTouchstart,gm)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,gm),document.removeEventListener("mousedown",this._onMousedown,gm),document.removeEventListener("touchstart",this._onTouchstart,gm))}}return n.\u0275fac=function(t){return new(t||n)(Q(Fi),Q(pt),Q(Ht),Q(fK,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const gK=new ge("liveAnnouncerElement",{providedIn:"root",factory:function _K(){return null}}),vK=new ge("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let yK=0,pI=(()=>{class n{constructor(t,i,r,s){this._ngZone=i,this._defaultOptions=s,this._document=r,this._liveElement=t||this._createLiveElement()}announce(t,...i){const r=this._defaultOptions;let s,o;return 1===i.length&&"number"==typeof i[0]?o=i[0]:[s,o]=i,this.clear(),clearTimeout(this._previousTimeout),s||(s=r&&r.politeness?r.politeness:"polite"),null==o&&r&&(o=r.duration),this._liveElement.setAttribute("aria-live",s),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(a=>this._currentResolve=a)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=t,"number"==typeof o&&(this._previousTimeout=setTimeout(()=>this.clear(),o)),this._currentResolve(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){const t="cdk-live-announcer-element",i=this._document.getElementsByClassName(t),r=this._document.createElement("div");for(let s=0;s .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{class n{constructor(t,i,r,s,o){this._ngZone=t,this._platform=i,this._inputModalityDetector=r,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new Ue,this._rootNodeFocusAndBlurListener=a=>{for(let c=Xd(a);c;c=c.parentElement)"focus"===a.type?this._onFocus(a,c):this._onBlur(a,c)},this._document=s,this._detectionMode=o?.detectionMode||0}monitor(t,i=!1){const r=Vc(t);if(!this._platform.isBrowser||1!==r.nodeType)return dt(null);const s=function nY(n){if(function tY(){if(null==tI){const n=typeof document<"u"?document.head:null;tI=!(!n||!n.createShadowRoot&&!n.attachShadow)}return tI}()){const e=n.getRootNode?n.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}(r)||this._getDocument(),o=this._elementInfo.get(r);if(o)return i&&(o.checkChildren=!0),o.subject;const a={checkChildren:i,subject:new Ue,rootNode:s};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(t){const i=Vc(t),r=this._elementInfo.get(i);r&&(r.subject.complete(),this._setClasses(i),this._elementInfo.delete(i),this._removeGlobalListeners(r))}focusVia(t,i,r){const s=Vc(t);s===this._getDocument().activeElement?this._getClosestElementsInfo(s).forEach(([a,l])=>this._originChanged(a,i,l)):(this._setOrigin(i),"function"==typeof s.focus&&s.focus(r))}ngOnDestroy(){this._elementInfo.forEach((t,i)=>this.stopMonitoring(i))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(t){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(t)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:t&&this._isLastInteractionFromInputLabel(t)?"mouse":"program"}_shouldBeAttributedToTouch(t){return 1===this._detectionMode||!!t?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(t,i){t.classList.toggle("cdk-focused",!!i),t.classList.toggle("cdk-touch-focused","touch"===i),t.classList.toggle("cdk-keyboard-focused","keyboard"===i),t.classList.toggle("cdk-mouse-focused","mouse"===i),t.classList.toggle("cdk-program-focused","program"===i)}_setOrigin(t,i=!1){this._ngZone.runOutsideAngular(()=>{this._origin=t,this._originFromTouchInteraction="touch"===t&&i,0===this._detectionMode&&(clearTimeout(this._originTimeoutId),this._originTimeoutId=setTimeout(()=>this._origin=null,this._originFromTouchInteraction?650:1))})}_onFocus(t,i){const r=this._elementInfo.get(i),s=Xd(t);!r||!r.checkChildren&&i!==s||this._originChanged(i,this._getFocusOrigin(s),r)}_onBlur(t,i){const r=this._elementInfo.get(i);!r||r.checkChildren&&t.relatedTarget instanceof Node&&i.contains(t.relatedTarget)||(this._setClasses(i),this._emitOrigin(r,null))}_emitOrigin(t,i){t.subject.observers.length&&this._ngZone.run(()=>t.subject.next(i))}_registerGlobalListeners(t){if(!this._platform.isBrowser)return;const i=t.rootNode,r=this._rootNodeFocusListenerCount.get(i)||0;r||this._ngZone.runOutsideAngular(()=>{i.addEventListener("focus",this._rootNodeFocusAndBlurListener,EM),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,EM)}),this._rootNodeFocusListenerCount.set(i,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(et(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(t){const i=t.rootNode;if(this._rootNodeFocusListenerCount.has(i)){const r=this._rootNodeFocusListenerCount.get(i);r>1?this._rootNodeFocusListenerCount.set(i,r-1):(i.removeEventListener("focus",this._rootNodeFocusAndBlurListener,EM),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,EM),this._rootNodeFocusListenerCount.delete(i))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(t,i,r){this._setClasses(t,i),this._emitOrigin(r,i),this._lastFocusOrigin=i}_getClosestElementsInfo(t){const i=[];return this._elementInfo.forEach((r,s)=>{(s===t||r.checkChildren&&s.contains(t))&&i.push([s,r])}),i}_isLastInteractionFromInputLabel(t){const{_mostRecentTarget:i,mostRecentModality:r}=this._inputModalityDetector;if("mouse"!==r||!i||i===t||"INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName||t.disabled)return!1;const s=t.labels;if(s)for(let o=0;o{class n{constructor(t,i){this._platform=t,this._document=i,this._breakpointSubscription=Ot(lI).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return 0;const t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);const i=this._document.defaultView||window,r=i&&i.getComputedStyle?i.getComputedStyle(t):null,s=(r&&r.backgroundColor||"").replace(/ /g,"");switch(t.remove(),s){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return 2;case"rgb(255,255,255)":case"rgb(255,250,239)":return 1}return 0}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){const t=this._document.body.classList;t.remove(mI,hU,fU),this._hasCheckedHighContrastMode=!0;const i=this.getHighContrastMode();1===i?t.add(mI,hU):2===i&&t.add(mI,fU)}}}return n.\u0275fac=function(t){return new(t||n)(Q(Fi),Q(Ht))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),mU=(()=>{class n{constructor(t){t._applyBodyHighContrastModeCssClasses()}}return n.\u0275fac=function(t){return new(t||n)(Q(pU))},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[aI]}),n})();function xK(n,e){}class AM{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0,this.closeOnOverlayDetachments=!0}}let gU=(()=>{class n extends _M{constructor(t,i,r,s,o,a,l,c){super(),this._elementRef=t,this._focusTrapFactory=i,this._config=s,this._interactivityChecker=o,this._ngZone=a,this._overlayRef=l,this._focusMonitor=c,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this.attachDomPortal=u=>{this._portalOutlet.hasAttached();const h=this._portalOutlet.attachDomPortal(u);return this._contentAttached(),h},this._ariaLabelledBy=this._config.ariaLabelledBy||null,this._document=r}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._restoreFocus()}attachComponentPortal(t){this._portalOutlet.hasAttached();const i=this._portalOutlet.attachComponentPortal(t);return this._contentAttached(),i}attachTemplatePortal(t){this._portalOutlet.hasAttached();const i=this._portalOutlet.attachTemplatePortal(t);return this._contentAttached(),i}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(t,i){this._interactivityChecker.isFocusable(t)||(t.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{const r=()=>{t.removeEventListener("blur",r),t.removeEventListener("mousedown",r),t.removeAttribute("tabindex")};t.addEventListener("blur",r),t.addEventListener("mousedown",r)})),t.focus(i)}_focusByCssSelector(t,i){let r=this._elementRef.nativeElement.querySelector(t);r&&this._forceFocus(r,i)}_trapFocus(){const t=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||t.focus();break;case!0:case"first-tabbable":this._focusTrap.focusInitialElementWhenReady().then(i=>{i||this._focusDialogContainer()});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus)}}_restoreFocus(){const t=this._config.restoreFocus;let i=null;if("string"==typeof t?i=this._document.querySelector(t):"boolean"==typeof t?i=t?this._elementFocusedBeforeDialogWasOpened:null:t&&(i=t),this._config.restoreFocus&&i&&"function"==typeof i.focus){const r=mM(),s=this._elementRef.nativeElement;(!r||r===this._document.body||r===s||s.contains(r))&&(this._focusMonitor?(this._focusMonitor.focusVia(i,this._closeInteractionType),this._closeInteractionType=null):i.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){const t=this._elementRef.nativeElement,i=mM();return t===i||t.contains(i)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=mM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(uI),D(Ht,8),D(AM),D(CM),D(pt),D(vy),D(Yd))},n.\u0275cmp=ht({type:n,selectors:[["cdk-dialog-container"]],viewQuery:function(t,i){if(1&t&&oi(dm,7),2&t){let r;Lt(r=Ft())&&(i._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(t,i){2&t&&Vt("id",i._config.id||null)("role",i._config.role)("aria-modal",i._config.ariaModal)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledBy)("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null)},features:[ft],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,i){1&t&&_e(0,xK,0,0,"ng-template",0)},dependencies:[dm],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2}),n})();class gI{constructor(e,t){this.overlayRef=e,this.config=t,this.closed=new Ue,this.disableClose=t.disableClose,this.backdropClick=e.backdropClick(),this.keydownEvents=e.keydownEvents(),this.outsidePointerEvents=e.outsidePointerEvents(),this.id=t.id,this.keydownEvents.subscribe(i=>{27===i.keyCode&&!this.disableClose&&!nl(i)&&(i.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=e.detachments().subscribe(()=>{!1!==t.closeOnOverlayDetachments&&this.close()})}close(e,t){if(this.containerInstance){const i=this.closed;this.containerInstance._closeInteractionType=t?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),i.next(e),i.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(e="",t=""){return this.overlayRef.updateSize({width:e,height:t}),this}addPanelClass(e){return this.overlayRef.addPanelClass(e),this}removePanelClass(e){return this.overlayRef.removePanelClass(e),this}}const _U=new ge("DialogScrollStrategy"),wK=new ge("DialogData"),MK=new ge("DefaultDialogConfig"),CK={provide:_U,deps:[mo],useFactory:function SK(n){return()=>n.scrollStrategies.block()}};let EK=0,vU=(()=>{class n{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(t,i,r,s,o,a){this._overlay=t,this._injector=i,this._defaultOptions=r,this._parentDialog=s,this._overlayContainer=o,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Ue,this._afterOpenedAtThisLevel=new Ue,this._ariaHiddenElements=new Map,this.afterAllClosed=jv(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(No(void 0))),this._scrollStrategy=a}open(t,i){(i={...this._defaultOptions||new AM,...i}).id=i.id||"cdk-dialog-"+EK++,i.id&&this.getDialogById(i.id);const s=this._getOverlayConfig(i),o=this._overlay.create(s),a=new gI(o,i),l=this._attachContainer(o,a,i);return a.containerInstance=l,this._attachDialogContent(t,a,l,i),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){_I(this.openDialogs,t=>t.close())}getDialogById(t){return this.openDialogs.find(i=>i.id===t)}ngOnDestroy(){_I(this._openDialogsAtThisLevel,t=>{!1===t.config.closeOnDestroy&&this._removeOpenDialog(t,!1)}),_I(this._openDialogsAtThisLevel,t=>t.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(t){const i=new _y({positionStrategy:t.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,width:t.width,height:t.height,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(i.backdropClass=t.backdropClass),i}_attachContainer(t,i,r){const s=r.injector||r.viewContainerRef?.injector,o=[{provide:AM,useValue:r},{provide:gI,useValue:i},{provide:vy,useValue:t}];let a;r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,o.push(...r.container.providers(r))):a=gU;const l=new lm(a,r.viewContainerRef,ki.create({parent:s||this._injector,providers:o}),r.componentFactoryResolver);return t.attach(l).instance}_attachDialogContent(t,i,r,s){if(t instanceof fo){const o=this._createInjector(s,i,r,void 0);let a={$implicit:s.data,dialogRef:i};s.templateContext&&(a={...a,..."function"==typeof s.templateContext?s.templateContext():s.templateContext}),r.attachTemplatePortal(new cm(t,null,a,o))}else{const o=this._createInjector(s,i,r,this._injector),a=r.attachComponentPortal(new lm(t,s.viewContainerRef,o,s.componentFactoryResolver));i.componentInstance=a.instance}}_createInjector(t,i,r,s){const o=t.injector||t.viewContainerRef?.injector,a=[{provide:wK,useValue:t.data},{provide:gI,useValue:i}];return t.providers&&("function"==typeof t.providers?a.push(...t.providers(i,t,r)):a.push(...t.providers)),t.direction&&(!o||!o.get(tl,null,{optional:!0}))&&a.push({provide:tl,useValue:{value:t.direction,change:dt()}}),ki.create({parent:o||s,providers:a})}_removeOpenDialog(t,i){const r=this.openDialogs.indexOf(t);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((s,o)=>{s?o.setAttribute("aria-hidden",s):o.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),i&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){const t=this._overlayContainer.getContainerElement();if(t.parentElement){const i=t.parentElement.children;for(let r=i.length-1;r>-1;r--){const s=i[r];s!==t&&"SCRIPT"!==s.nodeName&&"STYLE"!==s.nodeName&&!s.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(s,s.getAttribute("aria-hidden")),s.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){const t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}}return n.\u0275fac=function(t){return new(t||n)(Q(mo),Q(ki),Q(MK,8),Q(n,12),Q(wM),Q(_U))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();function _I(n,e){let t=n.length;for(;t--;)e(n[t])}let AK=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({providers:[vU,CK],imports:[pm,um,mU,um]}),n})();const TK=["text"];function DK(n,e){if(1&n&&Fe(0,"mat-pseudo-checkbox",6),2&n){const t=be();z("state",t.selected?"checked":"unchecked")("disabled",t.disabled)}}function IK(n,e){1&n&&Fe(0,"mat-pseudo-checkbox",7),2&n&&z("disabled",be().disabled)}function RK(n,e){if(1&n&&(K(0,"span",8),Je(1),J()),2&n){const t=be();j(1),nr("(",t.group.label,")")}}const PK=[[["mat-icon"]],"*"],kK=["mat-icon","*"],LK=new ge("mat-sanity-checks",{providedIn:"root",factory:function OK(){return!0}});let qn=(()=>{class n{constructor(t,i,r){this._sanityChecks=i,this._document=r,this._hasDoneGlobalChecks=!1,t._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(t){return!nI()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[t])}}return n.\u0275fac=function(t){return new(t||n)(Q(pU),Q(LK,8),Q(Ht))},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[fy,fy]}),n})();function TM(n){return class extends n{get disabled(){return this._disabled}set disabled(e){this._disabled=Cn(e)}constructor(...e){super(...e),this._disabled=!1}}}function DM(n,e){return class extends n{get color(){return this._color}set color(t){const i=t||this.defaultColor;i!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove(`mat-${this._color}`),i&&this._elementRef.nativeElement.classList.add(`mat-${i}`),this._color=i)}constructor(...t){super(...t),this.defaultColor=e,this.color=e}}}function vI(n){return class extends n{get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=Cn(e)}constructor(...e){super(...e),this._disableRipple=!1}}}function xU(n,e=0){return class extends n{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(t){this._tabIndex=null!=t?Ys(t):this.defaultTabIndex}constructor(...t){super(...t),this._tabIndex=e,this.defaultTabIndex=e}}}function wU(n){return class extends n{updateErrorState(){const e=this.errorState,s=(this.errorStateMatcher||this._defaultErrorStateMatcher).isErrorState(this.ngControl?this.ngControl.control:null,this._parentFormGroup||this._parentForm);s!==e&&(this.errorState=s,this.stateChanges.next())}constructor(...e){super(...e),this.errorState=!1}}}function FK(n){return class extends n{constructor(...e){super(...e),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new Sn(t=>{this._isInitialized?this._notifySubscriber(t):this._pendingSubscribers.push(t)})}_markInitialized(){this._isInitialized=!0,this._pendingSubscribers.forEach(this._notifySubscriber),this._pendingSubscribers=null}_notifySubscriber(e){e.next(),e.complete()}}}let MU=(()=>{class n{isErrorState(t,i){return!!(t&&t.invalid&&(t.touched||i&&i.submitted))}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class BK{constructor(e,t,i,r=!1){this._renderer=e,this.element=t,this.config=i,this._animationForciblyDisabledThroughCss=r,this.state=3}fadeOut(){this._renderer.fadeOutRipple(this)}}const SU=Sh({passive:!0,capture:!0});class UK{constructor(){this._events=new Map,this._delegateEventHandler=e=>{const t=Xd(e);t&&this._events.get(e.type)?.forEach((i,r)=>{(r===t||r.contains(t))&&i.forEach(s=>s.handleEvent(e))})}}addHandler(e,t,i,r){const s=this._events.get(t);if(s){const o=s.get(i);o?o.add(r):s.set(i,new Set([r]))}else this._events.set(t,new Map([[i,new Set([r])]])),e.runOutsideAngular(()=>{document.addEventListener(t,this._delegateEventHandler,SU)})}removeHandler(e,t,i){const r=this._events.get(e);if(!r)return;const s=r.get(t);s&&(s.delete(i),0===s.size&&r.delete(t),0===r.size&&(this._events.delete(e),document.removeEventListener(e,this._delegateEventHandler,SU)))}}const CU={enterDuration:225,exitDuration:150},EU=Sh({passive:!0,capture:!0}),AU=["mousedown","touchstart"],TU=["mouseup","mouseleave","touchend","touchcancel"];class _m{constructor(e,t,i,r){this._target=e,this._ngZone=t,this._platform=r,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=Vc(i))}fadeInRipple(e,t,i={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...CU,...i.animation};i.centered&&(e=r.left+r.width/2,t=r.top+r.height/2);const o=i.radius||function zK(n,e,t){const i=Math.max(Math.abs(n-t.left),Math.abs(n-t.right)),r=Math.max(Math.abs(e-t.top),Math.abs(e-t.bottom));return Math.sqrt(i*i+r*r)}(e,t,r),a=e-r.left,l=t-r.top,c=s.enterDuration,u=document.createElement("div");u.classList.add("mat-ripple-element"),u.style.left=a-o+"px",u.style.top=l-o+"px",u.style.height=2*o+"px",u.style.width=2*o+"px",null!=i.color&&(u.style.backgroundColor=i.color),u.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(u);const h=window.getComputedStyle(u),m=h.transitionDuration,g="none"===h.transitionProperty||"0s"===m||"0s, 0s"===m||0===r.width&&0===r.height,b=new BK(this,u,i,g);u.style.transform="scale3d(1, 1, 1)",b.state=0,i.persistent||(this._mostRecentTransientRipple=b);let y=null;return!g&&(c||s.exitDuration)&&this._ngZone.runOutsideAngular(()=>{const v=()=>this._finishRippleTransition(b),M=()=>this._destroyRipple(b);u.addEventListener("transitionend",v),u.addEventListener("transitioncancel",M),y={onTransitionEnd:v,onTransitionCancel:M}}),this._activeRipples.set(b,y),(g||!c)&&this._finishRippleTransition(b),b}fadeOutRipple(e){if(2===e.state||3===e.state)return;const t=e.element,i={...CU,...e.config.animation};t.style.transitionDuration=`${i.exitDuration}ms`,t.style.opacity="0",e.state=2,(e._animationForciblyDisabledThroughCss||!i.exitDuration)&&this._finishRippleTransition(e)}fadeOutAll(){this._getActiveRipples().forEach(e=>e.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(e=>{e.config.persistent||e.fadeOut()})}setupTriggerEvents(e){const t=Vc(e);!this._platform.isBrowser||!t||t===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=t,AU.forEach(i=>{_m._eventManager.addHandler(this._ngZone,i,t,this)}))}handleEvent(e){"mousedown"===e.type?this._onMousedown(e):"touchstart"===e.type?this._onTouchStart(e):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{TU.forEach(t=>{this._triggerElement.addEventListener(t,this,EU)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(e){0===e.state?this._startFadeOutTransition(e):2===e.state&&this._destroyRipple(e)}_startFadeOutTransition(e){const t=e===this._mostRecentTransientRipple,{persistent:i}=e.config;e.state=1,!i&&(!t||!this._isPointerDown)&&e.fadeOut()}_destroyRipple(e){const t=this._activeRipples.get(e)??null;this._activeRipples.delete(e),this._activeRipples.size||(this._containerRect=null),e===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),e.state=3,null!==t&&(e.element.removeEventListener("transitionend",t.onTransitionEnd),e.element.removeEventListener("transitioncancel",t.onTransitionCancel)),e.element.remove()}_onMousedown(e){const t=hI(e),i=this._lastTouchStartEvent&&Date.now(){!e.config.persistent&&(1===e.state||e.config.terminateOnPointerUp&&0===e.state)&&e.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){const e=this._triggerElement;e&&(AU.forEach(t=>_m._eventManager.removeHandler(t,e,this)),this._pointerUpEventsRegistered&&TU.forEach(t=>e.removeEventListener(t,this,EU)))}}_m._eventManager=new UK;const yI=new ge("mat-ripple-global-options");let by=(()=>{class n{get disabled(){return this._disabled}set disabled(t){t&&this.fadeOutAllNonPersistent(),this._disabled=t,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}constructor(t,i,r,s,o){this._elementRef=t,this._animationMode=o,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=s||{},this._rippleRenderer=new _m(this,i,t,r)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:{...this._globalOptions.animation,..."NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{},...this.animation},terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(t,i=0,r){return"number"==typeof t?this._rippleRenderer.fadeInRipple(t,i,{...this.rippleConfig,...r}):this._rippleRenderer.fadeInRipple(0,0,{...this.rippleConfig,...t})}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(pt),D(Fi),D(yI,8),D(rs,8))},n.\u0275dir=Ae({type:n,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(t,i){2&t&&Pn("mat-ripple-unbounded",i.unbounded)},inputs:{color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],radius:["matRippleRadius","radius"],animation:["matRippleAnimation","animation"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"]},exportAs:["matRipple"]}),n})(),IM=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[qn,qn]}),n})(),HK=(()=>{class n{constructor(t){this._animationMode=t,this.state="unchecked",this.disabled=!1,this.appearance="full"}}return n.\u0275fac=function(t){return new(t||n)(D(rs,8))},n.\u0275cmp=ht({type:n,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(t,i){2&t&&Pn("mat-pseudo-checkbox-indeterminate","indeterminate"===i.state)("mat-pseudo-checkbox-checked","checked"===i.state)("mat-pseudo-checkbox-disabled",i.disabled)("mat-pseudo-checkbox-minimal","minimal"===i.appearance)("mat-pseudo-checkbox-full","full"===i.appearance)("_mat-animation-noopable","NoopAnimations"===i._animationMode)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(t,i){},styles:['.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-full{border:2px solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}'],encapsulation:2,changeDetection:0}),n})(),DU=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[qn]}),n})();const IU=new ge("MAT_OPTION_PARENT_COMPONENT"),RU=new ge("MatOptgroup");let GK=0;class WK{constructor(e,t=!1){this.source=e,this.isUserInput=t}}let $K=(()=>{class n{get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(t){this._disabled=Cn(t)}get disableRipple(){return!(!this._parent||!this._parent.disableRipple)}get hideSingleSelectionIndicator(){return!(!this._parent||!this._parent.hideSingleSelectionIndicator)}constructor(t,i,r,s){this._element=t,this._changeDetectorRef=i,this._parent=r,this.group=s,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+GK++,this.onSelectionChange=new it,this._stateChanges=new Ue}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}deselect(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}focus(t,i){const r=this._getHostElement();"function"==typeof r.focus&&r.focus(i)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(t){(13===t.keyCode||32===t.keyCode)&&!nl(t)&&(this._selectViaInteraction(),t.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){const t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=t)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(t=!1){this.onSelectionChange.emit(new WK(this,t))}}return n.\u0275fac=function(t){Ya()},n.\u0275dir=Ae({type:n,viewQuery:function(t,i){if(1&t&&oi(TK,7),2&t){let r;Lt(r=Ft())&&(i._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),n})(),vm=(()=>{class n extends $K{constructor(t,i,r,s){super(t,i,r,s)}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(ci),D(IU,8),D(RU,8))},n.\u0275cmp=ht({type:n,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(t,i){1&t&&ct("click",function(){return i._selectViaInteraction()})("keydown",function(s){return i._handleKeydown(s)}),2&t&&(Nd("id",i.id),Vt("aria-selected",i.selected)("aria-disabled",i.disabled.toString()),Pn("mdc-list-item--selected",i.selected)("mat-mdc-option-multiple",i.multiple)("mat-mdc-option-active",i.active)("mdc-list-item--disabled",i.disabled))},exportAs:["matOption"],features:[ft],ngContentSelectors:kK,decls:8,vars:5,consts:[["class","mat-mdc-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mdc-list-item__primary-text"],["text",""],["class","mat-mdc-option-pseudo-checkbox","state","checked","appearance","minimal",3,"disabled",4,"ngIf"],["class","cdk-visually-hidden",4,"ngIf"],["mat-ripple","",1,"mat-mdc-option-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-mdc-option-pseudo-checkbox",3,"state","disabled"],["state","checked","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"]],template:function(t,i){1&t&&(Cr(PK),_e(0,DK,1,2,"mat-pseudo-checkbox",0),Kt(1),K(2,"span",1,2),Kt(4,1),J(),_e(5,IK,1,1,"mat-pseudo-checkbox",3),_e(6,RK,2,1,"span",4),Fe(7,"div",5)),2&t&&(z("ngIf",i.multiple),j(5),z("ngIf",!i.multiple&&i.selected&&!i.hideSingleSelectionIndicator),j(1),z("ngIf",i.group&&i.group._inert),j(1),z("matRippleTrigger",i._getHostElement())("matRippleDisabled",i.disabled||i.disableRipple))},dependencies:[by,gi,HK],styles:['.mat-mdc-option{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:16px;padding-right:16px;-webkit-user-select:none;user-select:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);min-height:48px}.mat-mdc-option:focus{outline:none}[dir=rtl] .mat-mdc-option,.mat-mdc-option[dir=rtl]{padding-left:16px;padding-right:16px}.mat-mdc-option.mdc-list-item{align-items:center}.mat-mdc-option.mdc-list-item--disabled{opacity:.38;cursor:default}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}.cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{right:auto;left:16px}.mat-mdc-option-active .mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0}),n})(),bI=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[IM,va,qn,DU]}),n})();class PU{}class qK{}const zc="*";function Gl(n,e){return{type:7,name:n,definitions:e,options:{}}}function go(n,e=null){return{type:4,styles:e,timings:n}}function OU(n,e=null){return{type:2,steps:n,options:e}}function Ci(n){return{type:6,styles:n,offset:null}}function _o(n,e,t){return{type:0,name:n,styles:e,options:t}}function Ks(n,e,t=null){return{type:1,expr:n,animation:e,options:t}}function xI(n=null){return{type:9,options:n}}function wI(n,e,t=null){return{type:11,selector:n,animation:e,options:t}}function LU(n){Promise.resolve().then(n)}class xy{constructor(e=0,t=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=e+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){LU(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(e){this._position=this.totalTime?e*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}class FU{constructor(e){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;let t=0,i=0,r=0;const s=this.players.length;0==s?LU(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++t==s&&this._onFinish()}),o.onDestroy(()=>{++i==s&&this._onDestroy()}),o.onStart(()=>{++r==s&&this._onStart()})}),this.totalTime=this.players.reduce((o,a)=>Math.max(o,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this.players.forEach(e=>e.init())}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(e=>e()),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play())}pause(){this.players.forEach(e=>e.pause())}restart(){this.players.forEach(e=>e.restart())}finish(){this._onFinish(),this.players.forEach(e=>e.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this.players.forEach(e=>e.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){const t=e*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,t/i.totalTime):1;i.setPosition(r)})}getPosition(){const e=this.players.reduce((t,i)=>null===t||i.totalTime>t.totalTime?i:t,null);return null!=e?e.getPosition():0}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}const MI="!";function YK(n,e){}class RM{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0}}const SI="mdc-dialog--open",NU="mdc-dialog--opening",BU="mdc-dialog--closing";let QK=(()=>{class n extends gU{constructor(t,i,r,s,o,a,l,c){super(t,i,r,s,o,a,l,c),this._animationStateChanged=new it}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(t){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:t})}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(uI),D(Ht,8),D(RM),D(CM),D(pt),D(vy),D(Yd))},n.\u0275cmp=ht({type:n,selectors:[["ng-component"]],features:[ft],decls:0,vars:0,template:function(t,i){},encapsulation:2}),n})();const UU="--mat-dialog-transition-duration";function VU(n){return null==n?null:"number"==typeof n?n:n.endsWith("ms")?Ys(n.substring(0,n.length-2)):n.endsWith("s")?1e3*Ys(n.substring(0,n.length-1)):"0"===n?0:null}let JK=(()=>{class n extends QK{constructor(t,i,r,s,o,a,l,c,u){super(t,i,r,s,o,a,l,u),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?VU(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?VU(this._config.exitAnimationDuration)??75:0,this._animationTimer=null,this._finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._openAnimationDuration)},this._finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._closeAnimationDuration})}}_contentAttached(){super._contentAttached(),this._startOpenAnimation()}ngOnDestroy(){super.ngOnDestroy(),null!==this._animationTimer&&clearTimeout(this._animationTimer)}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._openAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(UU,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(NU,SI)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(SI),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(SI),this._animationsEnabled?(this._hostElement.style.setProperty(UU,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(BU)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(NU,BU)}_waitForAnimationToComplete(t,i){null!==this._animationTimer&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(i,t)}_requestAnimationFrame(t){this._ngZone.runOutsideAngular(()=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(t):t()})}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(uI),D(Ht,8),D(RM),D(CM),D(pt),D(vy),D(rs,8),D(Yd))},n.\u0275cmp=ht({type:n,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(t,i){2&t&&(Nd("id",i._config.id),Vt("aria-modal",i._config.ariaModal)("role",i._config.role)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledBy)("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null),Pn("_mat-animation-noopable",!i._animationsEnabled))},features:[ft],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(t,i){1&t&&(K(0,"div",0)(1,"div",1),_e(2,YK,0,0,"ng-template",2),J()())},dependencies:[dm],styles:['.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog{display:none;z-index:var(--mdc-dialog-z-index, 7)}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media(max-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media(min-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media(max-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media(max-width: 720px)and (min-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media(max-width: 720px)and (max-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media(max-width: 720px)and (min-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media(max-width: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-height: 400px),(max-width: 600px),(min-width: 720px)and (max-height: 400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(min-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;transform:scale(0.8);opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}[dir=rtl] .mdc-dialog__surface,.mdc-dialog__surface[dir=rtl]{text-align:right}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-dialog__surface::before{border-color:CanvasText}}@media screen and (-ms-high-contrast: active),screen and (-ms-high-contrast: none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mdc-dialog__title,.mdc-dialog__title[dir=rtl]{text-align:right}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid rgba(0,0,0,0);display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}@media screen and (forced-colors: active){.mdc-dialog--fullscreen .mdc-dialog__header{border-bottom-color:CanvasText}}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--fullscreen--titleless .mdc-dialog__close{margin-top:4px}.mdc-dialog--fullscreen--titleless.mdc-dialog--scrollable .mdc-dialog__close{margin-top:0}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__title+.mdc-dialog__content,.mdc-dialog__header+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{margin-left:0;margin-right:8px}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button:first-child,.mdc-dialog__button:first-child[dir=rtl]{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{text-align:left}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--open,.mdc-dialog--opening,.mdc-dialog--closing{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear,transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-dialog--closing .mdc-dialog__scrim,.mdc-dialog--closing .mdc-dialog__container{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{transform:none;opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%;z-index:1}.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}.mdc-dialog--no-content-padding .mdc-dialog__content{padding:0}.mdc-dialog--sheet .mdc-dialog__close{right:12px;top:9px;position:absolute;z-index:1}.mdc-dialog__scrim--removed{pointer-events:none}.mdc-dialog__scrim--removed .mdc-dialog__scrim,.mdc-dialog__scrim--removed .mdc-dialog__surface-scrim{display:none}.mat-mdc-dialog-content{max-height:65vh}.mat-mdc-dialog-container{position:static;display:block}.mat-mdc-dialog-container,.mat-mdc-dialog-container .mdc-dialog__container,.mat-mdc-dialog-container .mdc-dialog__surface{max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mat-mdc-dialog-container .mdc-dialog__surface{display:block;width:100%;height:100%}.mat-mdc-dialog-container{outline:0}.mat-mdc-dialog-container .mdc-dialog__surface{background-color:var(--mdc-dialog-container-color, white)}.mat-mdc-dialog-container .mdc-dialog__surface{box-shadow:var(--mdc-dialog-container-elevation, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12))}.mat-mdc-dialog-container .mdc-dialog__surface{border-radius:var(--mdc-dialog-container-shape, var(--mdc-shape-medium, 4px))}.mat-mdc-dialog-container.mdc-dialog--scrollable .mdc-dialog__title,.mat-mdc-dialog-container.mdc-dialog--scrollable .mdc-dialog__actions,.mat-mdc-dialog-container.mdc-dialog--scrollable.mdc-dialog-scroll-divider-footer .mdc-dialog__actions{border-color:var(--mdc-dialog-with-divider-divider-color, black)}.mat-mdc-dialog-container.mdc-dialog--scrollable .mdc-dialog__title{border-bottom-color:var(--mdc-dialog-with-divider-divider-color, black)}.mat-mdc-dialog-container .mdc-dialog__title{font-family:var(--mdc-dialog-subhead-font, "Arial");line-height:var(--mdc-dialog-subhead-line-height, 14px);font-size:var(--mdc-dialog-subhead-size, 14px);font-weight:var(--mdc-dialog-subhead-weight, 500);letter-spacing:var(--mdc-dialog-subhead-tracking, 1px)}.mat-mdc-dialog-container .mdc-dialog__title{color:var(--mdc-dialog-subhead-color, black)}.mat-mdc-dialog-container .mdc-dialog__content{font-family:var(--mdc-dialog-supporting-text-font, "Arial");line-height:var(--mdc-dialog-supporting-text-line-height, 14px);font-size:var(--mdc-dialog-supporting-text-size, 14px);font-weight:var(--mdc-dialog-supporting-text-weight, 500);letter-spacing:var(--mdc-dialog-supporting-text-tracking, 1px)}.mat-mdc-dialog-container .mdc-dialog__content{color:var(--mdc-dialog-supporting-text-color, black)}.mat-mdc-dialog-container .mdc-dialog__container{transition-duration:var(--mat-dialog-transition-duration, 0ms)}.mat-mdc-dialog-container._mat-animation-noopable .mdc-dialog__container{transition:none}.mat-mdc-dialog-content{display:block}.mat-mdc-dialog-actions{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2}),n})();class wy{constructor(e,t,i){this._ref=e,this._containerInstance=i,this._afterOpened=new Ue,this._beforeClosed=new Ue,this._state=0,this.disableClose=t.disableClose,this.id=e.id,i._animationStateChanged.pipe(On(r=>"opened"===r.state),Li(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),i._animationStateChanged.pipe(On(r=>"closed"===r.state),Li(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),e.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),cs(this.backdropClick(),this.keydownEvents().pipe(On(r=>27===r.keyCode&&!this.disableClose&&!nl(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),zU(this,"keydown"===r.type?"keyboard":"mouse"))})}close(e){this._result=e,this._containerInstance._animationStateChanged.pipe(On(t=>"closing"===t.state),Li(1)).subscribe(t=>{this._beforeClosed.next(e),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),t.totalTime+100)}),this._state=1,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(e){let t=this._ref.config.positionStrategy;return e&&(e.left||e.right)?e.left?t.left(e.left):t.right(e.right):t.centerHorizontally(),e&&(e.top||e.bottom)?e.top?t.top(e.top):t.bottom(e.bottom):t.centerVertically(),this._ref.updatePosition(),this}updateSize(e="",t=""){return this._ref.updateSize(e,t),this}addPanelClass(e){return this._ref.addPanelClass(e),this}removePanelClass(e){return this._ref.removePanelClass(e),this}getState(){return this._state}_finishDialogClose(){this._state=2,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}}function zU(n,e,t){return n._closeInteractionType=e,n.close(t)}const CI=new ge("MatMdcDialogData"),eZ=new ge("mat-mdc-dialog-default-options"),HU=new ge("mat-mdc-dialog-scroll-strategy"),nZ={provide:HU,deps:[mo],useFactory:function tZ(n){return()=>n.scrollStrategies.block()}};let iZ=0,rZ=(()=>{class n{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){const t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}constructor(t,i,r,s,o,a,l,c,u,h){this._overlay=t,this._defaultOptions=r,this._parentDialog=s,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=u,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Ue,this._afterOpenedAtThisLevel=new Ue,this._idPrefix="mat-dialog-",this.dialogConfigClass=RM,this.afterAllClosed=jv(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(No(void 0))),this._scrollStrategy=a,this._dialog=i.get(vU)}open(t,i){let r;(i={...this._defaultOptions||new RM,...i}).id=i.id||`${this._idPrefix}${iZ++}`,i.scrollStrategy=i.scrollStrategy||this._scrollStrategy();const s=this._dialog.open(t,{...i,positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:i},{provide:AM,useValue:i}]},templateContext:()=>({dialogRef:r}),providers:(o,a,l)=>(r=new this._dialogRefConstructor(o,i,l),r.updatePosition(i?.position),[{provide:this._dialogContainerType,useValue:l},{provide:this._dialogDataToken,useValue:a.data},{provide:this._dialogRefConstructor,useValue:r}])});return r.componentInstance=s.componentInstance,this.openDialogs.push(r),this.afterOpened.next(r),r.afterClosed().subscribe(()=>{const o=this.openDialogs.indexOf(r);o>-1&&(this.openDialogs.splice(o,1),this.openDialogs.length||this._getAfterAllClosed().next())}),r}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(t){return this.openDialogs.find(i=>i.id===t)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(t){let i=t.length;for(;i--;)t[i].close()}}return n.\u0275fac=function(t){Ya()},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),My=(()=>{class n extends rZ{constructor(t,i,r,s,o,a,l,c){super(t,i,s,a,l,o,wy,JK,CI,c),this._idPrefix="mat-mdc-dialog-"}}return n.\u0275fac=function(t){return new(t||n)(Q(mo),Q(ki),Q(Lv,8),Q(eZ,8),Q(HU),Q(n,12),Q(wM),Q(rs,8))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),sZ=0,oZ=(()=>{class n{constructor(t,i,r){this.dialogRef=t,this._elementRef=i,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=jU(this._elementRef,this._dialog.openDialogs))}ngOnChanges(t){const i=t._matDialogClose||t._matDialogCloseResult;i&&(this.dialogResult=i.currentValue)}_onButtonClick(t){zU(this.dialogRef,0===t.screenX&&0===t.screenY?"keyboard":"mouse",this.dialogResult)}}return n.\u0275fac=function(t){return new(t||n)(D(wy,8),D(yt),D(My))},n.\u0275dir=Ae({type:n,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(t,i){1&t&&ct("click",function(s){return i._onButtonClick(s)}),2&t&&Vt("aria-label",i.ariaLabel||null)("type",i.type)},inputs:{ariaLabel:["aria-label","ariaLabel"],type:"type",dialogResult:["mat-dialog-close","dialogResult"],_matDialogClose:["matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[zi]}),n})(),GU=(()=>{class n{constructor(t,i,r){this._dialogRef=t,this._elementRef=i,this._dialog=r,this.id="mat-mdc-dialog-title-"+sZ++}ngOnInit(){this._dialogRef||(this._dialogRef=jU(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{const t=this._dialogRef._containerInstance;t&&!t._ariaLabelledBy&&(t._ariaLabelledBy=this.id)})}}return n.\u0275fac=function(t){return new(t||n)(D(wy,8),D(yt),D(My))},n.\u0275dir=Ae({type:n,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(t,i){2&t&&Nd("id",i.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),n})(),WU=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),n})(),$U=(()=>{class n{constructor(){this.align="start"}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:4,hostBindings:function(t,i){2&t&&Pn("mat-mdc-dialog-actions-align-center","center"===i.align)("mat-mdc-dialog-actions-align-end","end"===i.align)},inputs:{align:"align"}}),n})();function jU(n,e){let t=n.nativeElement.parentElement;for(;t&&!t.classList.contains("mat-mdc-dialog-container");)t=t.parentElement;return t?e.find(i=>i.id===t.id):null}let aZ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({providers:[My,nZ],imports:[AK,pm,um,qn,qn]}),n})();const lZ=["mat-button",""],cZ=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],dZ=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],hZ=["mat-icon-button",""],fZ=["*"],pZ=[{selector:"mat-button",mdcClasses:["mdc-button","mat-mdc-button"]},{selector:"mat-flat-button",mdcClasses:["mdc-button","mdc-button--unelevated","mat-mdc-unelevated-button"]},{selector:"mat-raised-button",mdcClasses:["mdc-button","mdc-button--raised","mat-mdc-raised-button"]},{selector:"mat-stroked-button",mdcClasses:["mdc-button","mdc-button--outlined","mat-mdc-outlined-button"]},{selector:"mat-fab",mdcClasses:["mdc-fab","mat-mdc-fab"]},{selector:"mat-mini-fab",mdcClasses:["mdc-fab","mdc-fab--mini","mat-mdc-mini-fab"]},{selector:"mat-icon-button",mdcClasses:["mdc-icon-button","mat-mdc-icon-button"]}],mZ=DM(TM(vI(class{constructor(n){this._elementRef=n}})));let qU=(()=>{class n extends mZ{constructor(t,i,r,s){super(t),this._platform=i,this._ngZone=r,this._animationMode=s,this._focusMonitor=Ot(Yd),this._isFab=!1;const o=t.nativeElement.classList;for(const a of pZ)this._hasHostAttributes(a.selector)&&a.mdcClasses.forEach(l=>{o.add(l)})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}focus(t="program",i){t?this._focusMonitor.focusVia(this._elementRef.nativeElement,t,i):this._elementRef.nativeElement.focus(i)}_hasHostAttributes(...t){return t.some(i=>this._elementRef.nativeElement.hasAttribute(i))}_isRippleDisabled(){return this.disableRipple||this.disabled}}return n.\u0275fac=function(t){Ya()},n.\u0275dir=Ae({type:n,viewQuery:function(t,i){if(1&t&&oi(by,5),2&t){let r;Lt(r=Ft())&&(i.ripple=r.first)}},features:[ft]}),n})(),PM=(()=>{class n extends qU{constructor(t,i,r,s){super(t,i,r,s)}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(Fi),D(pt),D(rs,8))},n.\u0275cmp=ht({type:n,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""]],hostVars:7,hostBindings:function(t,i){2&t&&(Vt("disabled",i.disabled||null),Pn("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-unthemed",!i.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[ft],attrs:lZ,ngContentSelectors:dZ,decls:8,vars:6,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(t,i){1&t&&(Cr(cZ),Fe(0,"span",0),Kt(1),K(2,"span",1),Kt(3,1),J(),Kt(4,2),Fe(5,"span",2)(6,"span",3)(7,"span",4)),2&t&&(Pn("mdc-button__ripple",!i._isFab)("mdc-fab__ripple",i._isFab),j(6),z("matRippleDisabled",i._isRippleDisabled())("matRippleTrigger",i._elementRef.nativeElement))},dependencies:[by],styles:['.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0)}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__progress-indicator{font-size:0;position:absolute;transform:translate(-50%, -50%);top:50%;left:50%;line-height:initial}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(\n 100% + 4px\n );width:calc(\n 100% + 4px\n );display:none}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring{border-color:CanvasText}}.mdc-button .mdc-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring::after{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{display:block}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button{height:var(--mdc-text-button-container-height, 36px);border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, inherit)}.mat-mdc-button:disabled{color:var(--mdc-text-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button{height:var(--mdc-filled-button-container-height, 36px);border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button:not(:disabled){background-color:var(--mdc-filled-button-container-color, transparent)}.mat-mdc-unelevated-button:disabled{background-color:var(--mdc-filled-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, inherit)}.mat-mdc-unelevated-button:disabled{color:var(--mdc-filled-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button{height:var(--mdc-protected-button-container-height, 36px);border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px));box-shadow:var(--mdc-protected-button-container-elevation, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){background-color:var(--mdc-protected-button-container-color, transparent)}.mat-mdc-raised-button:disabled{background-color:var(--mdc-protected-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, inherit)}.mat-mdc-raised-button:disabled{color:var(--mdc-protected-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button.mdc-ripple-upgraded--background-focused,.mat-mdc-raised-button:not(.mdc-ripple-upgraded):focus{box-shadow:var(--mdc-protected-button-focus-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled):active{box-shadow:var(--mdc-protected-button-pressed-container-elevation, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button{height:var(--mdc-outlined-button-container-height, 36px);border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px));padding:0 15px 0 15px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, inherit)}.mat-mdc-outlined-button:disabled{color:var(--mdc-outlined-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-outlined-button .mdc-button__ripple{border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-outlined-button:not(:disabled){border-color:var(--mdc-outlined-button-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button:disabled{border-color:var(--mdc-outlined-button-disabled-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button.mdc-button--icon-trailing{padding:0 11px 0 15px}.mat-mdc-outlined-button.mdc-button--icon-leading{padding:0 15px 0 11px}.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button .mdc-button__touch{left:calc(-1 * var(--mdc-outlined-button-outline-width, 1px));width:calc(100% + 2 * var(--mdc-outlined-button-outline-width, 1px))}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-button .mat-ripple-element,.mat-mdc-unelevated-button .mat-ripple-element,.mat-mdc-raised-button .mat-ripple-element,.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-button .mdc-button__label,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-outlined-button .mdc-button__label{z-index:1}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button[disabled],.mat-mdc-unelevated-button[disabled],.mat-mdc-raised-button[disabled],.mat-mdc-outlined-button[disabled]{cursor:default;pointer-events:none}.mat-mdc-button .mat-mdc-button-touch-target,.mat-mdc-unelevated-button .mat-mdc-button-touch-target,.mat-mdc-raised-button .mat-mdc-button-touch-target,.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}[dir=rtl] .mat-mdc-button>.mat-icon,.mat-mdc-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}.mat-mdc-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon,.mat-mdc-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem;margin-left:-4px;margin-right:8px}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:-4px}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon,.mat-mdc-raised-button .mdc-button__label+.mat-icon,.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:-4px}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon,.mat-mdc-unelevated-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-raised-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-outlined-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:-4px;margin-right:8px}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px) * -1)}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0}),n})(),EI=(()=>{class n extends qU{constructor(t,i,r,s){super(t,i,r,s)}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(Fi),D(pt),D(rs,8))},n.\u0275cmp=ht({type:n,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(t,i){2&t&&(Vt("disabled",i.disabled||null),Pn("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-unthemed",!i.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[ft],attrs:hZ,ngContentSelectors:fZ,decls:5,vars:3,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(t,i){1&t&&(Cr(),Fe(0,"span",0),Kt(1),Fe(2,"span",1)(3,"span",2)(4,"span",3)),2&t&&(j(3),z("matRippleDisabled",i._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",i._elementRef.nativeElement))},dependencies:[by],styles:['.mdc-icon-button{font-size:24px;width:48px;height:48px;padding:12px}.mdc-icon-button .mdc-icon-button__focus-ring{max-height:48px;max-width:48px}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:40px;height:40px;margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button svg,.mdc-icon-button img{width:24px;height:24px}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block}}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button[hidden]{display:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%;display:none}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring{border-color:CanvasText}}.mdc-icon-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}.mat-mdc-icon-button{height:var(--mdc-icon-button-state-layer-size, 48px);width:var(--mdc-icon-button-state-layer-size, 48px);color:var(--mdc-icon-button-icon-color, inherit);border-radius:50%;flex-shrink:0;text-align:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mdc-button__icon{font-size:var(--mdc-icon-button-icon-size, 24px)}.mat-mdc-icon-button svg,.mat-mdc-icon-button img{width:var(--mdc-icon-button-icon-size, 24px);height:var(--mdc-icon-button-icon-size, 24px)}.mat-mdc-icon-button:disabled{opacity:var(--mdc-icon-button-disabled-icon-opacity, 0.38)}.mat-mdc-icon-button:disabled{color:var(--mdc-icon-button-disabled-icon-color, #000)}.mat-mdc-icon-button svg{vertical-align:baseline}.mat-mdc-icon-button[disabled]{cursor:default;pointer-events:none;opacity:1}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-icon-button .mdc-button__label{z-index:1}.mat-mdc-icon-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0}),n})(),AI=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[qn,IM,qn]}),n})();const vZ=["class","dialog"];let YU=(()=>{class n{constructor(t,i){this.dialogRef=t,this.data=i}}return n.\u0275fac=function(t){return new(t||n)(D(wy),D(CI))},n.\u0275cmp=ht({type:n,selectors:[["app-confirm",8,"dialog"]],attrs:vZ,decls:10,vars:2,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["mat-dialog-actions",""],["mat-button","",3,"click"],["mat-button","","cdkFocusInitial","",3,"mat-dialog-close"]],template:function(t,i){1&t&&(K(0,"h1",0),Je(1,"Confirmation"),J(),K(2,"div",1)(3,"p"),Je(4),J()(),K(5,"div",2)(6,"button",3),ct("click",function(){return i.dialogRef.close()}),Je(7,"Cancel"),J(),K(8,"button",4),Je(9,"Yes"),J()()),2&t&&(j(4),$i(i.data.text),j(4),z("mat-dialog-close",!0))},dependencies:[PM,oZ,GU,WU,$U]}),n})();function TI(n,e){const t="object"==typeof e;return new Promise((i,r)=>{const s=new Qo({next:o=>{i(o),s.unsubscribe()},error:r,complete:()=>{t?i(e.defaultValue):r(new Wv)}});n.subscribe(s)})}let Hc=(()=>{class n{constructor(t){this.ngZone=t,this.openedResource$=new Ct(null),this.openedResourcePath$=new Ct(null),eel.expose(this.wrapHandler(this.openFile),"open_file"),eel.on_angular_ready(),setTimeout(xt(function*(){for(;;){if(eel._websocket){eel._websocket.onclose=()=>window.close();break}yield new Promise(i=>setTimeout(i,0))}}),0)}wrapHandler(t){return(...i)=>{try{pt.assertInAngularZone(),t.bind(this)(...i)}catch{this.ngZone.run(t,this,i)}}}openFile(t,i=!1){var r=this;return xt(function*(){r.openedResource$.next(null),r.openedResourcePath$.next(null);const s=yield eel.open_file(t,i)();r.openedResource$.next({...s,id:s.name}),r.openedResourcePath$.next(t)})()}openFileWithSystemApp(t){return xt(function*(){yield eel.open_file_with_system_app(t)()})()}retrieveValue(t){return xt(function*(){return yield eel.retrieve_value(t)()})()}runCustomAction(t,i,r){return xt(function*(){return eel.run_custom_action(t,i,r)()})()}saveFile(t){var i=this;return xt(function*(){const r=i.openedResource$.getValue();if(!r)return;const s=yield eel.save_file(i.openedResourcePath$.getValue(),t)();i.openedResource$.next({id:r.id,name:r.name,schema:r.schema,data:s})})()}serializeResource(t,i={}){return xt(function*(){return eel.serialize_resource(t,i)()})()}serializeResourceTmp(t,i,r={}){return xt(function*(){return eel.serialize_resource_tmp(t,i,r)()})()}serializeReversible(t,i){return xt(function*(){return eel.serialize_reversible(t,i)()})()}deserializeResource(t){return xt(function*(){return eel.deserialize_resource(t)()})()}}return n.\u0275fac=function(t){return new(t||n)(Q(pt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();var DI=qr(489);const KU=n=>!(!n||"object"!=typeof n),ZU=(n={},e,t,i=[])=>{const r=[];if(KU(n)){const s=Object.entries(n);for(let o=0;o{class n{constructor(t){var i=this;this.eelDelegate=t,this._hasUnsavedChanges$=new Ct(!1),this.resource$=new Ct(null),this.error$=new Ct(null),this.customActionRunning$=new Ct(!1),this.changedDataBlocks={},this.dataBlockChange$=new Ue,this.hideHiddenFields$=new Ct(!0),this.eelDelegate.openedResource$.subscribe(r=>{if(this.clearUnsavedChanges(),r?.data.error_class)this.error$.next(r),this.resource$.next(null);else if(r?.schema){const s=ZU(r.schema,"is_recursive_ref",!0);for(const[o,a]of s){const l=o.block_class_mro;let c=r.schema,u=c.block_class_mro===l?c:void 0;for(const h of a.slice(0,a.length-1))!u&&c[h]?.block_class_mro===l&&(u=c[h]),c=c[h];c[a[a.length-1]]=u}this.resource$.next(r),this.error$.next(null)}else this.resource$.next(null),this.error$.next(null)}),this.dataBlockChange$.subscribe(function(){var r=xt(function*([s,o]){i.changedDataBlocks[s]=o,i.updateUnsavedChanges();const a=yield i.eelDelegate.retrieveValue(s);i.changedDataBlocks[s]==o&&((0,DI.isNumber)(o)?Math.abs(o-a)<1e-10:(0,DI.isEqual)(o,a))&&(delete i.changedDataBlocks[s],i.updateUnsavedChanges())});return function(s){return r.apply(this,arguments)}}())}updateUnsavedChanges(){this._hasUnsavedChanges$.next(Object.keys(this.changedDataBlocks).length>0)}get hasUnsavedChanges$(){return this._hasUnsavedChanges$.asObservable()}get hasUnsavedChanges(){return this._hasUnsavedChanges$.getValue()}clearUnsavedChanges(){Object.keys(this.changedDataBlocks).forEach(t=>{delete this.changedDataBlocks[t]}),this.updateUnsavedChanges()}processExternalChanges(t,i){var r=this;return xt(function*(){r.customActionRunning$.next(!0);const s=yield i();if(s.error_class)throw r.customActionRunning$.next(!1),s;if(r.resource$.getValue().id===t)r.resource$.getValue().data=s;else{let o=t.substring(r.resource$.getValue().id.length).replace("__","/").split("/").filter(c=>c),a=r.resource$.getValue().data;for(const c of o.slice(0,o.length-1))a=a[c]||a[+c];let l=o[o.length-1];void 0===a[l]&&void 0!==a[+l]&&(l=+l),a[l]=s}r.clearUnsavedChanges(),r.changedDataBlocks.__has_external_changes__=1,r.updateUnsavedChanges(),r.customActionRunning$.next(!1)})()}runCustomAction(t,i,r){var s=this;return xt(function*(){return s.processExternalChanges(t,()=>s.eelDelegate.runCustomAction(t,i,r))})()}deserializeResource(t){var i=this;return xt(function*(){return i.processExternalChanges(t,()=>i.eelDelegate.deserializeResource(t))})()}reloadResource(){var t=this;return xt(function*(){const i=t.eelDelegate.openedResourcePath$.getValue();i&&t.eelDelegate.openFile(i,!0).then()})()}saveResource(){var t=this;return xt(function*(){const i=Object.entries(t.changedDataBlocks).filter(([r,s])=>"__has_external_changes__"!=r);yield t.eelDelegate.saveFile(i.map(([r,s])=>({id:r,value:s}))),t.clearUnsavedChanges()})()}}return n.\u0275fac=function(t){return new(t||n)(Q(Hc))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function yZ(n,e){if(1&n){const t=Wi();K(0,"div",2)(1,"button",3),ct("click",function(){return Dn(t),In(be().action())}),Je(2),J()()}if(2&n){const t=be();j(2),nr(" ",t.data.action," ")}}const bZ=["label"];function xZ(n,e){}const wZ=Math.pow(2,31)-1;class II{constructor(e,t){this._overlayRef=t,this._afterDismissed=new Ue,this._afterOpened=new Ue,this._onAction=new Ue,this._dismissedByAction=!1,this.containerInstance=e,e._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(e){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(e,wZ))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}}const QU=new ge("MatSnackBarData");class kM{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let MZ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),n})(),SZ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),n})(),CZ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),n})(),EZ=(()=>{class n{constructor(t,i){this.snackBarRef=t,this.data=i}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}}return n.\u0275fac=function(t){return new(t||n)(D(II),D(QU))},n.\u0275cmp=ht({type:n,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions","",4,"ngIf"],["matSnackBarActions",""],["mat-button","","matSnackBarAction","",3,"click"]],template:function(t,i){1&t&&(K(0,"div",0),Je(1),J(),_e(2,yZ,3,1,"div",1)),2&t&&(j(1),nr(" ",i.data.message,"\n"),j(1),z("ngIf",i.hasAction))},dependencies:[gi,PM,MZ,SZ,CZ],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),n})();const AZ={snackBarState:Gl("state",[_o("void, hidden",Ci({transform:"scale(0.8)",opacity:0})),_o("visible",Ci({transform:"scale(1)",opacity:1})),Ks("* => visible",go("150ms cubic-bezier(0, 0, 0.2, 1)")),Ks("* => void, * => hidden",go("75ms cubic-bezier(0.4, 0.0, 1, 1)",Ci({opacity:0})))])};let TZ=0,DZ=(()=>{class n extends _M{constructor(t,i,r,s,o){super(),this._ngZone=t,this._elementRef=i,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=Ot(Ht),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Ue,this._onExit=new Ue,this._onEnter=new Ue,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+TZ++,this.attachDomPortal=a=>{this._assertNotAttached();const l=this._portalOutlet.attachDomPortal(a);return this._afterPortalAttached(),l},this._live="assertive"!==o.politeness||o.announcementMessage?"off"===o.politeness?"off":"polite":"assertive",this._platform.FIREFOX&&("polite"===this._live&&(this._role="status"),"assertive"===this._live&&(this._role="alert"))}attachComponentPortal(t){this._assertNotAttached();const i=this._portalOutlet.attachComponentPortal(t);return this._afterPortalAttached(),i}attachTemplatePortal(t){this._assertNotAttached();const i=this._portalOutlet.attachTemplatePortal(t);return this._afterPortalAttached(),i}onAnimationEnd(t){const{fromState:i,toState:r}=t;if(("void"===r&&"void"!==i||"hidden"===r)&&this._completeExit(),"visible"===r){const s=this._onEnter;this._ngZone.run(()=>{s.next(),s.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._ngZone.run(()=>{this._animationState="hidden",this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId)}),this._onExit}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){this._ngZone.onMicrotaskEmpty.pipe(Li(1)).subscribe(()=>{this._ngZone.run(()=>{this._onExit.next(),this._onExit.complete()})})}_afterPortalAttached(){const t=this._elementRef.nativeElement,i=this.snackBarConfig.panelClass;i&&(Array.isArray(i)?i.forEach(r=>t.classList.add(r)):t.classList.add(i)),this._exposeToModals()}_exposeToModals(){const t=this._liveElementId,i=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{const i=t.getAttribute("aria-owns");if(i){const r=i.replace(this._liveElementId,"").trim();r.length>0?t.setAttribute("aria-owns",r):t.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{const t=this._elementRef.nativeElement.querySelector("[aria-hidden]"),i=this._elementRef.nativeElement.querySelector("[aria-live]");if(t&&i){let r=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)&&(r=document.activeElement),t.removeAttribute("aria-hidden"),i.appendChild(t),r?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}}return n.\u0275fac=function(t){return new(t||n)(D(pt),D(yt),D(ci),D(Fi),D(kM))},n.\u0275dir=Ae({type:n,viewQuery:function(t,i){if(1&t&&oi(dm,7),2&t){let r;Lt(r=Ft())&&(i._portalOutlet=r.first)}},features:[ft]}),n})(),IZ=(()=>{class n extends DZ{_afterPortalAttached(){super._afterPortalAttached();const t=this._label.nativeElement,i="mdc-snackbar__label";t.classList.toggle(i,!t.querySelector(`.${i}`))}}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275cmp=ht({type:n,selectors:[["mat-snack-bar-container"]],viewQuery:function(t,i){if(1&t&&oi(bZ,7),2&t){let r;Lt(r=Ft())&&(i._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(t,i){1&t&&n1("@state.done",function(s){return i.onAnimationEnd(s)}),2&t&&d1("@state",i._animationState)},features:[ft],decls:6,vars:3,consts:[[1,"mdc-snackbar__surface"],[1,"mat-mdc-snack-bar-label"],["label",""],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(t,i){1&t&&(K(0,"div",0)(1,"div",1,2)(3,"div",3),_e(4,xZ,0,0,"ng-template",4),J(),Fe(5,"div"),J()()),2&t&&(j(5),Vt("aria-live",i._live)("role",i._role)("id",i._liveElementId))},dependencies:[dm],styles:['.mdc-snackbar{display:none;position:fixed;right:0;bottom:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;pointer-events:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mdc-snackbar--opening,.mdc-snackbar--open,.mdc-snackbar--closing{display:flex}.mdc-snackbar--open .mdc-snackbar__label,.mdc-snackbar--open .mdc-snackbar__actions{visibility:visible}.mdc-snackbar__surface{padding-left:0;padding-right:8px;display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;transform:scale(0.8);opacity:0}.mdc-snackbar__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-snackbar__surface::before{border-color:CanvasText}}[dir=rtl] .mdc-snackbar__surface,.mdc-snackbar__surface[dir=rtl]{padding-left:8px;padding-right:0}.mdc-snackbar--open .mdc-snackbar__surface{transform:scale(1);opacity:1;pointer-events:auto}.mdc-snackbar--closing .mdc-snackbar__surface{transform:scale(1)}.mdc-snackbar__label{padding-left:16px;padding-right:8px;width:100%;flex-grow:1;box-sizing:border-box;margin:0;visibility:hidden;padding-top:14px;padding-bottom:14px}[dir=rtl] .mdc-snackbar__label,.mdc-snackbar__label[dir=rtl]{padding-left:8px;padding-right:16px}.mdc-snackbar__label::before{display:inline;content:attr(data-mdc-snackbar-label-text)}.mdc-snackbar__actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box;visibility:hidden}.mdc-snackbar__action+.mdc-snackbar__dismiss{margin-left:8px;margin-right:0}[dir=rtl] .mdc-snackbar__action+.mdc-snackbar__dismiss,.mdc-snackbar__action+.mdc-snackbar__dismiss[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-snack-bar-container{margin:8px;position:static}.mat-mdc-snack-bar-container .mdc-snackbar__surface{min-width:344px}@media(max-width: 480px),(max-width: 344px){.mat-mdc-snack-bar-container .mdc-snackbar__surface{min-width:100%}}@media(max-width: 480px),(max-width: 344px){.mat-mdc-snack-bar-container{width:100vw}}.mat-mdc-snack-bar-container .mdc-snackbar__surface{max-width:672px}.mat-mdc-snack-bar-container .mdc-snackbar__surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)}.mat-mdc-snack-bar-container .mdc-snackbar__dismiss .mdc-button__icon{font-size:var(--mdc-icon-button-icon-size, var(--mdc-snackbar-icon-size, 24px))}.mat-mdc-snack-bar-container .mdc-snackbar__dismiss svg,.mat-mdc-snack-bar-container .mdc-snackbar__dismiss img{width:var(--mdc-icon-button-icon-size, var(--mdc-snackbar-icon-size, 24px));height:var(--mdc-icon-button-icon-size, var(--mdc-snackbar-icon-size, 24px))}.mat-mdc-snack-bar-container .mdc-snackbar__surface{background-color:var(--mdc-snackbar-container-color, inherit)}.mat-mdc-snack-bar-container .mdc-snackbar__surface{border-radius:var(--mdc-snackbar-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-snack-bar-container .mdc-snackbar__label{color:var(--mdc-snackbar-supporting-text-color, inherit)}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-size:var(--mdc-snackbar-supporting-text-size, inherit);font-family:var(--mdc-snackbar-supporting-text-font, inherit);font-weight:var(--mdc-snackbar-supporting-text-weight, inherit);line-height:var(--mdc-snackbar-supporting-text-line-height, inherit)}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){color:var(--mat-mdc-snack-bar-button-color, transparent);--mat-mdc-button-persistent-ripple-color: currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{background-color:currentColor;opacity:.1}.mat-mdc-snack-bar-container .mdc-snackbar__label::before{display:none}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-handset .mdc-snackbar__surface{width:100%}'],encapsulation:2,data:{animation:[AZ.snackBarState]}}),n})(),JU=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[pm,um,va,AI,qn,qn]}),n})();const e3=new ge("mat-snack-bar-default-options",{providedIn:"root",factory:function RZ(){return new kM}});let PZ=(()=>{class n{get _openedSnackBarRef(){const t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t}constructor(t,i,r,s,o,a){this._overlay=t,this._live=i,this._injector=r,this._breakpointObserver=s,this._parentSnackBar=o,this._defaultConfig=a,this._snackBarRefAtThisLevel=null}openFromComponent(t,i){return this._attach(t,i)}openFromTemplate(t,i){return this._attach(t,i)}open(t,i="",r){const s={...this._defaultConfig,...r};return s.data={message:t,action:i},s.announcementMessage===t&&(s.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,s)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(t,i){const s=ki.create({parent:i&&i.viewContainerRef&&i.viewContainerRef.injector||this._injector,providers:[{provide:kM,useValue:i}]}),o=new lm(this.snackBarContainerComponent,i.viewContainerRef,s),a=t.attach(o);return a.instance.snackBarConfig=i,a.instance}_attach(t,i){const r={...new kM,...this._defaultConfig,...i},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),a=new II(o,s);if(t instanceof fo){const l=new cm(t,null,{$implicit:r.data,snackBarRef:a});a.instance=o.attachTemplatePortal(l)}else{const l=this._createInjector(r,a),c=new lm(t,void 0,l),u=o.attachComponentPortal(c);a.instance=u.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(et(s.detachments())).subscribe(l=>{s.overlayElement.classList.toggle(this.handsetCssClass,l.matches)}),r.announcementMessage&&o._onAnnounce.subscribe(()=>{this._live.announce(r.announcementMessage,r.politeness)}),this._animateSnackBar(a,r),this._openedSnackBarRef=a,this._openedSnackBarRef}_animateSnackBar(t,i){t.afterDismissed().subscribe(()=>{this._openedSnackBarRef==t&&(this._openedSnackBarRef=null),i.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{t.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):t.containerInstance.enter(),i.duration&&i.duration>0&&t.afterOpened().subscribe(()=>t._dismissAfter(i.duration))}_createOverlay(t){const i=new _y;i.direction=t.direction;let r=this._overlay.position().global();const s="rtl"===t.direction,o="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!s||"end"===t.horizontalPosition&&s,a=!o&&"center"!==t.horizontalPosition;return o?r.left("0"):a?r.right("0"):r.centerHorizontally(),"top"===t.verticalPosition?r.top("0"):r.bottom("0"),i.positionStrategy=r,this._overlay.create(i)}_createInjector(t,i){return ki.create({parent:t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,providers:[{provide:II,useValue:i},{provide:QU,useValue:t.data}]})}}return n.\u0275fac=function(t){return new(t||n)(Q(mo),Q(pI),Q(ki),Q(lI),Q(n,12),Q(e3))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),t3=(()=>{class n extends PZ{constructor(t,i,r,s,o,a){super(t,i,r,s,o,a),this.simpleSnackBarComponent=EZ,this.snackBarContainerComponent=IZ,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return n.\u0275fac=function(t){return new(t||n)(Q(mo),Q(pI),Q(ki),Q(lI),Q(n,12),Q(e3))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:JU}),n})();const kZ=["*",[["mat-toolbar-row"]]],OZ=["*","mat-toolbar-row"],LZ=DM(class{constructor(n){this._elementRef=n}});let FZ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),n})(),NZ=(()=>{class n extends LZ{constructor(t,i,r){super(t),this._platform=i,this._document=r}ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()))}_checkToolbarMixedModes(){}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(Fi),D(Ht))},n.\u0275cmp=ht({type:n,selectors:[["mat-toolbar"]],contentQueries:function(t,i,r){if(1&t&&Xi(r,FZ,5),2&t){let s;Lt(s=Ft())&&(i._toolbarRows=s)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(t,i){2&t&&Pn("mat-toolbar-multiple-rows",i._toolbarRows.length>0)("mat-toolbar-single-row",0===i._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[ft],ngContentSelectors:OZ,decls:2,vars:0,template:function(t,i){1&t&&(Cr(kZ),Kt(0),Kt(1,1))},styles:[".cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar .mat-mdc-button-base.mat-unthemed{--mdc-text-button-label-text-color: inherit;--mdc-outlined-button-label-text-color: inherit}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}"],encapsulation:2,changeDetection:0}),n})(),BZ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[qn,qn]}),n})(),UZ=(()=>{class n{constructor(){this._vertical=!1,this._inset=!1}get vertical(){return this._vertical}set vertical(t){this._vertical=Cn(t)}get inset(){return this._inset}set inset(t){this._inset=Cn(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=ht({type:n,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(t,i){2&t&&(Vt("aria-orientation",i.vertical?"vertical":"horizontal"),Pn("mat-divider-vertical",i.vertical)("mat-divider-horizontal",!i.vertical)("mat-divider-inset",i.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(t,i){},styles:[".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}"],encapsulation:2,changeDetection:0}),n})(),n3=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[qn,qn]}),n})();const VZ=["tooltip"],r3=new ge("mat-tooltip-scroll-strategy"),GZ={provide:r3,deps:[mo],useFactory:function HZ(n){return()=>n.scrollStrategies.reposition({scrollThrottle:20})}},$Z=new ge("mat-tooltip-default-options",{providedIn:"root",factory:function WZ(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),s3="tooltip-panel",o3=Sh({passive:!0});let ZZ=(()=>{class n{get position(){return this._position}set position(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(t){this._positionAtOrigin=Cn(t),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(t){this._disabled=Cn(t),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(t){this._showDelay=Ys(t)}get hideDelay(){return this._hideDelay}set hideDelay(t){this._hideDelay=Ys(t),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}get message(){return this._message}set message(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message,"tooltip"),this._message=null!=t?String(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")})}))}get tooltipClass(){return this._tooltipClass}set tooltipClass(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}constructor(t,i,r,s,o,a,l,c,u,h,p,m){this._overlay=t,this._elementRef=i,this._scrollDispatcher=r,this._viewContainerRef=s,this._ngZone=o,this._platform=a,this._ariaDescriber=l,this._focusMonitor=c,this._dir=h,this._defaultOptions=p,this._position="below",this._positionAtOrigin=!1,this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this._viewportMargin=8,this._cssClassPrefix="mat",this._showDelay=this._defaultOptions.showDelay,this._hideDelay=this._defaultOptions.hideDelay,this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new Ue,this._scrollStrategy=u,this._document=m,p&&(p.position&&(this.position=p.position),p.positionAtOrigin&&(this.positionAtOrigin=p.positionAtOrigin),p.touchGestures&&(this.touchGestures=p.touchGestures)),h.change.pipe(et(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(et(this._destroyed)).subscribe(t=>{t?"keyboard"===t&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){const t=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([i,r])=>{t.removeEventListener(i,r,o3)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(t,this.message,"tooltip"),this._focusMonitor.stopMonitoring(t)}show(t=this.showDelay,i){if(this.disabled||!this.message||this._isTooltipVisible())return void this._tooltipInstance?._cancelPendingAnimations();const r=this._createOverlay(i);this._detach(),this._portal=this._portal||new lm(this._tooltipComponent,this._viewContainerRef);const s=this._tooltipInstance=r.attach(this._portal).instance;s._triggerElement=this._elementRef.nativeElement,s._mouseLeaveHideDelay=this._hideDelay,s.afterHidden().pipe(et(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),s.show(t)}hide(t=this.hideDelay){const i=this._tooltipInstance;i&&(i.isVisible()?i.hide(t):(i._cancelPendingAnimations(),this._detach()))}toggle(t){this._isTooltipVisible()?this.hide():this.show(void 0,t)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(t){if(this._overlayRef){const s=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!t)&&s._origin instanceof yt)return this._overlayRef;this._detach()}const i=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),r=this._overlay.position().flexibleConnectedTo(this.positionAtOrigin&&t||this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(i);return r.positionChanges.pipe(et(this._destroyed)).subscribe(s=>{this._updateCurrentPositionClass(s.connectionPair),this._tooltipInstance&&s.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:r,panelClass:`${this._cssClassPrefix}-${s3}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(et(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(et(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(et(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!nl(s)&&(s.preventDefault(),s.stopPropagation(),this._ngZone.run(()=>this.hide(0)))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(t){const i=t.getConfig().positionStrategy,r=this._getOrigin(),s=this._getOverlayPosition();i.withPositions([this._addOffset({...r.main,...s.main}),this._addOffset({...r.fallback,...s.fallback})])}_addOffset(t){return t}_getOrigin(){const t=!this._dir||"ltr"==this._dir.value,i=this.position;let r;"above"==i||"below"==i?r={originX:"center",originY:"above"==i?"top":"bottom"}:"before"==i||"left"==i&&t||"right"==i&&!t?r={originX:"start",originY:"center"}:("after"==i||"right"==i&&t||"left"==i&&!t)&&(r={originX:"end",originY:"center"});const{x:s,y:o}=this._invertPosition(r.originX,r.originY);return{main:r,fallback:{originX:s,originY:o}}}_getOverlayPosition(){const t=!this._dir||"ltr"==this._dir.value,i=this.position;let r;"above"==i?r={overlayX:"center",overlayY:"bottom"}:"below"==i?r={overlayX:"center",overlayY:"top"}:"before"==i||"left"==i&&t||"right"==i&&!t?r={overlayX:"end",overlayY:"center"}:("after"==i||"right"==i&&t||"left"==i&&!t)&&(r={overlayX:"start",overlayY:"center"});const{x:s,y:o}=this._invertPosition(r.overlayX,r.overlayY);return{main:r,fallback:{overlayX:s,overlayY:o}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(Li(1),et(this._destroyed)).subscribe(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()}))}_setTooltipClass(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())}_invertPosition(t,i){return"above"===this.position||"below"===this.position?"top"===i?i="bottom":"bottom"===i&&(i="top"):"end"===t?t="start":"start"===t&&(t="end"),{x:t,y:i}}_updateCurrentPositionClass(t){const{overlayY:i,originX:r,originY:s}=t;let o;if(o="center"===i?this._dir&&"rtl"===this._dir.value?"end"===r?"left":"right":"start"===r?"left":"right":"bottom"===i&&"top"===s?"above":"below",o!==this._currentPosition){const a=this._overlayRef;if(a){const l=`${this._cssClassPrefix}-${s3}-`;a.removePanelClass(l+this._currentPosition),a.addPanelClass(l+o)}this._currentPosition=o}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",t=>{let i;this._setupPointerExitEventsIfNeeded(),void 0!==t.x&&void 0!==t.y&&(i=t),this.show(void 0,i)}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",t=>{const i=t.targetTouches?.[0],r=i?{x:i.clientX,y:i.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),clearTimeout(this._touchstartTimeout),this._touchstartTimeout=setTimeout(()=>this.show(void 0,r),500)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;const t=[];if(this._platformSupportsMouseEvents())t.push(["mouseleave",i=>{const r=i.relatedTarget;(!r||!this._overlayRef?.overlayElement.contains(r))&&this.hide()}],["wheel",i=>this._wheelListener(i)]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();const i=()=>{clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions.touchendHideDelay)};t.push(["touchend",i],["touchcancel",i])}this._addListeners(t),this._passiveListeners.push(...t)}_addListeners(t){t.forEach(([i,r])=>{this._elementRef.nativeElement.addEventListener(i,r,o3)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(t){if(this._isTooltipVisible()){const i=this._document.elementFromPoint(t.clientX,t.clientY),r=this._elementRef.nativeElement;i!==r&&!r.contains(i)&&this.hide()}}_disableNativeGesturesIfNecessary(){const t=this.touchGestures;if("off"!==t){const i=this._elementRef.nativeElement,r=i.style;("on"===t||"INPUT"!==i.nodeName&&"TEXTAREA"!==i.nodeName)&&(r.userSelect=r.msUserSelect=r.webkitUserSelect=r.MozUserSelect="none"),("on"===t||!i.draggable)&&(r.webkitUserDrag="none"),r.touchAction="none",r.webkitTapHighlightColor="transparent"}}}return n.\u0275fac=function(t){Ya()},n.\u0275dir=Ae({type:n,inputs:{position:["matTooltipPosition","position"],positionAtOrigin:["matTooltipPositionAtOrigin","positionAtOrigin"],disabled:["matTooltipDisabled","disabled"],showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],touchGestures:["matTooltipTouchGestures","touchGestures"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]}}),n})(),_s=(()=>{class n extends ZZ{constructor(t,i,r,s,o,a,l,c,u,h,p,m){super(t,i,r,s,o,a,l,c,u,h,p,m),this._tooltipComponent=JZ,this._cssClassPrefix="mat-mdc",this._viewportMargin=8}_addOffset(t){const r=!this._dir||"ltr"==this._dir.value;return"top"===t.originY?t.offsetY=-8:"bottom"===t.originY?t.offsetY=8:"start"===t.originX?t.offsetX=r?-8:8:"end"===t.originX&&(t.offsetX=r?8:-8),t}}return n.\u0275fac=function(t){return new(t||n)(D(mo),D(yt),D(py),D(is),D(pt),D(Fi),D(eK),D(Yd),D(r3),D(tl,8),D($Z,8),D(Ht))},n.\u0275dir=Ae({type:n,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[ft]}),n})(),QZ=(()=>{class n{constructor(t,i){this._changeDetectorRef=t,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Ue,this._animationsDisabled="NoopAnimations"===i}show(t){clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},t)}hide(t){clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},t)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:t}){(!t||!this._triggerElement.contains(t))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){}_handleAnimationEnd({animationName:t}){(t===this._showAnimation||t===this._hideAnimation)&&this._finalizeAnimation(t===this._showAnimation)}_cancelPendingAnimations(){clearTimeout(this._showTimeoutId),clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(t){t?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(t){const i=this._tooltip.nativeElement,r=this._showAnimation,s=this._hideAnimation;if(i.classList.remove(t?s:r),i.classList.add(t?r:s),this._isVisible=t,t&&!this._animationsDisabled&&"function"==typeof getComputedStyle){const o=getComputedStyle(i);("0s"===o.getPropertyValue("animation-duration")||"none"===o.getPropertyValue("animation-name"))&&(this._animationsDisabled=!0)}t&&this._onShow(),this._animationsDisabled&&(i.classList.add("_mat-animation-noopable"),this._finalizeAnimation(t))}}return n.\u0275fac=function(t){return new(t||n)(D(ci),D(rs,8))},n.\u0275dir=Ae({type:n}),n})(),JZ=(()=>{class n extends QZ{constructor(t,i,r){super(t,r),this._elementRef=i,this._isMultiline=!1,this._showAnimation="mat-mdc-tooltip-show",this._hideAnimation="mat-mdc-tooltip-hide"}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){const t=this._elementRef.nativeElement.getBoundingClientRect();return t.height>24&&t.width>=200}}return n.\u0275fac=function(t){return new(t||n)(D(ci),D(yt),D(rs,8))},n.\u0275cmp=ht({type:n,selectors:[["mat-tooltip-component"]],viewQuery:function(t,i){if(1&t&&oi(VZ,7),2&t){let r;Lt(r=Ft())&&(i._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(t,i){1&t&&ct("mouseleave",function(s){return i._handleMouseLeave(s)}),2&t&&Pc("zoom",i.isVisible()?1:null)},features:[ft],decls:4,vars:4,consts:[[1,"mdc-tooltip","mdc-tooltip--shown","mat-mdc-tooltip",3,"ngClass","animationend"],["tooltip",""],[1,"mdc-tooltip__surface","mdc-tooltip__surface-animation"]],template:function(t,i){1&t&&(K(0,"div",0,1),ct("animationend",function(s){return i._handleAnimationEnd(s)}),K(2,"div",2),Je(3),J()()),2&t&&(Pn("mdc-tooltip--multiline",i._isMultiline),z("ngClass",i.tooltipClass),j(3),$i(i.message))},dependencies:[Bv],styles:['.mdc-tooltip__surface{word-break:var(--mdc-tooltip-word-break, normal);overflow-wrap:anywhere}.mdc-tooltip{position:fixed;display:none;z-index:9}.mdc-tooltip-wrapper--rich{position:relative}.mdc-tooltip--shown,.mdc-tooltip--showing,.mdc-tooltip--hide{display:inline-flex}.mdc-tooltip--shown.mdc-tooltip--rich,.mdc-tooltip--showing.mdc-tooltip--rich,.mdc-tooltip--hide.mdc-tooltip--rich{display:inline-block;left:-320px;position:absolute}.mdc-tooltip__surface{line-height:16px;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center}.mdc-tooltip__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-tooltip__surface::before{border-color:CanvasText}}.mdc-tooltip--rich .mdc-tooltip__surface{align-items:flex-start;display:flex;flex-direction:column;min-height:24px;min-width:40px;max-width:320px;position:relative}.mdc-tooltip--multiline .mdc-tooltip__surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mdc-tooltip__surface,.mdc-tooltip--multiline .mdc-tooltip__surface[dir=rtl]{text-align:right}.mdc-tooltip__surface .mdc-tooltip__title{margin:0 8px}.mdc-tooltip__surface .mdc-tooltip__content{max-width:calc(200px - (2 * 8px));margin:8px;text-align:left}[dir=rtl] .mdc-tooltip__surface .mdc-tooltip__content,.mdc-tooltip__surface .mdc-tooltip__content[dir=rtl]{text-align:right}.mdc-tooltip--rich .mdc-tooltip__surface .mdc-tooltip__content{max-width:calc(320px - (2 * 8px));align-self:stretch}.mdc-tooltip__surface .mdc-tooltip__content-link{text-decoration:none}.mdc-tooltip--rich-actions,.mdc-tooltip__content,.mdc-tooltip__title{z-index:1}.mdc-tooltip__surface-animation{opacity:0;transform:scale(0.8);will-change:transform,opacity}.mdc-tooltip--shown .mdc-tooltip__surface-animation{transform:scale(1);opacity:1}.mdc-tooltip--hide .mdc-tooltip__surface-animation{transform:scale(1)}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{position:absolute;height:24px;width:24px;transform:rotate(35deg) skewY(20deg) scaleX(0.9396926208)}.mdc-tooltip__caret-surface-top .mdc-elevation-overlay,.mdc-tooltip__caret-surface-bottom .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-tooltip__caret-surface-bottom{outline:1px solid rgba(0,0,0,0);z-index:-1}@media screen and (forced-colors: active){.mdc-tooltip__caret-surface-bottom{outline-color:CanvasText}}.mdc-tooltip__surface{background-color:var(--mdc-plain-tooltip-container-color, #fff)}.mdc-tooltip__surface{border-radius:var(--mdc-plain-tooltip-container-shape, var(--mdc-shape-small, 4px))}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{border-radius:var(--mdc-plain-tooltip-container-shape, var(--mdc-shape-small, 4px))}.mdc-tooltip__surface{color:var(--mdc-plain-tooltip-supporting-text-color, #000)}.mdc-tooltip__surface{font-family:var(--mdc-plain-tooltip-supporting-text-font, inherit);font-size:var(--mdc-plain-tooltip-supporting-text-size, inherit);font-weight:var(--mdc-plain-tooltip-supporting-text-weight, inherit);letter-spacing:var(--mdc-plain-tooltip-supporting-text-tracking, inherit)}.mat-mdc-tooltip{position:relative;transform:scale(0)}.mat-mdc-tooltip::before{content:"";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}'],encapsulation:2,changeDetection:0}),n})(),a3=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({providers:[GZ],imports:[mU,va,pm,qn,qn,my]}),n})();function l3(...n){const e=Eu(n),{args:t,keys:i}=_N(n),r=new Sn(s=>{const{length:o}=t;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let u=0;u{h||(h=!0,c--),a[u]=p},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(i?vN(i,a):a),s.complete())}))}});return e?r.pipe(bD(e)):r}class RI{}class Kd{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?this.lazyInit="string"==typeof e?()=>{this.headers=new Map,e.split("\n").forEach(t=>{const i=t.indexOf(":");if(i>0){const r=t.slice(0,i),s=r.toLowerCase(),o=t.slice(i+1).trim();this.maybeSetNormalizedName(r,s),this.headers.has(s)?this.headers.get(s).push(o):this.headers.set(s,[o])}})}:()=>{this.headers=new Map,Object.entries(e).forEach(([t,i])=>{let r;if(r="string"==typeof i?[i]:"number"==typeof i?[i.toString()]:i.map(s=>s.toString()),r.length>0){const s=t.toLowerCase();this.headers.set(s,r),this.maybeSetNormalizedName(t,s)}})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();const 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 Kd?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){const t=new Kd;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof Kd?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){const t=e.name.toLowerCase();switch(e.op){case"a":case"s":let i=e.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(e.name,t);const r=("a"===e.op?this.headers.get(t):void 0)||[];r.push(...i),this.headers.set(t,r);break;case"d":const s=e.value;if(s){let o=this.headers.get(t);if(!o)return;o=o.filter(a=>-1===s.indexOf(a)),0===o.length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,o)}else this.headers.delete(t),this.normalizedNames.delete(t)}}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}}class eQ{encodeKey(e){return d3(e)}encodeValue(e){return d3(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}}const nQ=/%(\d[a-f0-9])/gi,iQ={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function d3(n){return encodeURIComponent(n).replace(nQ,(e,t)=>iQ[t]??e)}function OM(n){return`${n}`}class Zd{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new eQ,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function tQ(n,e){const t=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{const s=r.indexOf("="),[o,a]=-1==s?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,s)),e.decodeValue(r.slice(s+1))],l=t.get(o)||[];l.push(a),t.set(o,l)}),t}(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{const i=e.fromObject[t],r=Array.isArray(i)?i.map(OM):[OM(i)];this.map.set(t,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();const 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){const t=[];return Object.keys(e).forEach(i=>{const r=e[i];Array.isArray(r)?r.forEach(s=>{t.push({param:i,value:s,op:"a"})}):t.push({param:i,value:r,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{const t=this.encoder.encodeKey(e);return this.map.get(e).map(i=>t+"="+this.encoder.encodeValue(i)).join("&")}).filter(e=>""!==e).join("&")}clone(e){const t=new Zd({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(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":const t=("a"===e.op?this.map.get(e.param):void 0)||[];t.push(OM(e.value)),this.map.set(e.param,t);break;case"d":if(void 0===e.value){this.map.delete(e.param);break}{let i=this.map.get(e.param)||[];const r=i.indexOf(OM(e.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(e.param,i):this.map.delete(e.param)}}}),this.cloneFrom=this.updates=null)}}class rQ{constructor(){this.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()}}function u3(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function h3(n){return typeof Blob<"u"&&n instanceof Blob}function f3(n){return typeof FormData<"u"&&n instanceof FormData}class Sy{constructor(e,t,i,r){let s;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function sQ(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,s=r):s=i,s&&(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params)),this.headers||(this.headers=new Kd),this.context||(this.context=new rQ),this.params){const o=this.params.toString();if(0===o.length)this.urlWithParams=t;else{const a=t.indexOf("?");this.urlWithParams=t+(-1===a?"?":ah.set(p,e.setHeaders[p]),l)),e.setParams&&(c=Object.keys(e.setParams).reduce((h,p)=>h.set(p,e.setParams[p]),c)),new Sy(t,i,s,{params:c,headers:l,context:u,reportProgress:a,responseType:r,withCredentials:o})}}var os=(()=>((os=os||{})[os.Sent=0]="Sent",os[os.UploadProgress=1]="UploadProgress",os[os.ResponseHeader=2]="ResponseHeader",os[os.DownloadProgress=3]="DownloadProgress",os[os.Response=4]="Response",os[os.User=5]="User",os))();class aQ{constructor(e,t=200,i="OK"){this.headers=e.headers||new Kd,this.status=void 0!==e.status?e.status:t,this.statusText=e.statusText||i,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}}class PI extends aQ{constructor(e={}){super(e),this.type=os.Response,this.body=void 0!==e.body?e.body:null}clone(e={}){return new PI({body:void 0!==e.body?e.body:this.body,headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}function kI(n,e){return{body:e,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials}}let OI=(()=>{class n{constructor(t){this.handler=t}request(t,i,r={}){let s;if(t instanceof Sy)s=t;else{let l,c;l=r.headers instanceof Kd?r.headers:new Kd(r.headers),r.params&&(c=r.params instanceof Zd?r.params:new Zd({fromObject:r.params})),s=new Sy(t,i,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const o=dt(s).pipe(Hd(l=>this.handler.handle(l)));if(t instanceof Sy||"events"===r.observe)return o;const a=o.pipe(On(l=>l instanceof PI));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(Ye(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(Ye(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(Ye(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(Ye(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(t,i={}){return this.request("DELETE",t,i)}get(t,i={}){return this.request("GET",t,i)}head(t,i={}){return this.request("HEAD",t,i)}jsonp(t,i){return this.request("JSONP",t,{params:(new Zd).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,i={}){return this.request("OPTIONS",t,i)}patch(t,i,r={}){return this.request("PATCH",t,kI(r,i))}post(t,i,r={}){return this.request("POST",t,kI(r,i))}put(t,i,r={}){return this.request("PUT",t,kI(r,i))}}return n.\u0275fac=function(t){return new(t||n)(Q(RI))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();const bQ=["*"];let FM;function Cy(n){return function xQ(){if(void 0===FM&&(FM=null,typeof window<"u")){const n=window;void 0!==n.trustedTypes&&(FM=n.trustedTypes.createPolicy("angular#components",{createHTML:e=>e}))}return FM}()?.createHTML(n)||n}function x3(n){return Error(`Unable to find icon with the name "${n}"`)}function w3(n){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${n}".`)}function M3(n){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${n}".`)}class Th{constructor(e,t,i){this.url=e,this.svgText=t,this.options=i}}let NM=(()=>{class n{constructor(t,i,r,s){this._httpClient=t,this._sanitizer=i,this._errorHandler=s,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=r}addSvgIcon(t,i,r){return this.addSvgIconInNamespace("",t,i,r)}addSvgIconLiteral(t,i,r){return this.addSvgIconLiteralInNamespace("",t,i,r)}addSvgIconInNamespace(t,i,r,s){return this._addSvgIconConfig(t,i,new Th(r,null,s))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,i,r,s){const o=this._sanitizer.sanitize($n.HTML,r);if(!o)throw M3(r);const a=Cy(o);return this._addSvgIconConfig(t,i,new Th("",a,s))}addSvgIconSet(t,i){return this.addSvgIconSetInNamespace("",t,i)}addSvgIconSetLiteral(t,i){return this.addSvgIconSetLiteralInNamespace("",t,i)}addSvgIconSetInNamespace(t,i,r){return this._addSvgIconSetConfig(t,new Th(i,null,r))}addSvgIconSetLiteralInNamespace(t,i,r){const s=this._sanitizer.sanitize($n.HTML,i);if(!s)throw M3(i);const o=Cy(s);return this._addSvgIconSetConfig(t,new Th("",o,r))}registerFontClassAlias(t,i=t){return this._fontCssClassesByAlias.set(t,i),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(...t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){const i=this._sanitizer.sanitize($n.RESOURCE_URL,t);if(!i)throw w3(t);const r=this._cachedIconsByUrl.get(i);return r?dt(BM(r)):this._loadSvgIconFromConfig(new Th(t,null)).pipe(Ii(s=>this._cachedIconsByUrl.set(i,s)),Ye(s=>BM(s)))}getNamedSvgIcon(t,i=""){const r=S3(i,t);let s=this._svgIconConfigs.get(r);if(s)return this._getSvgFromConfig(s);if(s=this._getIconConfigFromResolvers(i,t),s)return this._svgIconConfigs.set(r,s),this._getSvgFromConfig(s);const o=this._iconSetConfigs.get(i);return o?this._getSvgFromIconSetConfigs(t,o):Kp(x3(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?dt(BM(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(Ye(i=>BM(i)))}_getSvgFromIconSetConfigs(t,i){const r=this._extractIconWithNameFromAnySet(t,i);return r?dt(r):l3(i.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(Bc(a=>{const c=`Loading icon set URL: ${this._sanitizer.sanitize($n.RESOURCE_URL,o.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),dt(null)})))).pipe(Ye(()=>{const o=this._extractIconWithNameFromAnySet(t,i);if(!o)throw x3(t);return o}))}_extractIconWithNameFromAnySet(t,i){for(let r=i.length-1;r>=0;r--){const s=i[r];if(s.svgText&&s.svgText.toString().indexOf(t)>-1){const o=this._svgElementFromConfig(s),a=this._extractSvgIconFromSet(o,t,s.options);if(a)return a}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(Ii(i=>t.svgText=i),Ye(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?dt(null):this._fetchIcon(t).pipe(Ii(i=>t.svgText=i))}_extractSvgIconFromSet(t,i,r){const s=t.querySelector(`[id="${i}"]`);if(!s)return null;const o=s.cloneNode(!0);if(o.removeAttribute("id"),"svg"===o.nodeName.toLowerCase())return this._setSvgAttributes(o,r);if("symbol"===o.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(o),r);const a=this._svgElementFromString(Cy(""));return a.appendChild(o),this._setSvgAttributes(a,r)}_svgElementFromString(t){const i=this._document.createElement("DIV");i.innerHTML=t;const r=i.querySelector("svg");if(!r)throw Error(" tag not found");return r}_toSvgElement(t){const i=this._svgElementFromString(Cy("")),r=t.attributes;for(let s=0;sCy(c)),Gd(()=>this._inProgressUrlFetches.delete(o)),Tu());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(t,i,r){return this._svgIconConfigs.set(S3(t,i),r),this}_addSvgIconSetConfig(t,i){const r=this._iconSetConfigs.get(t);return r?r.push(i):this._iconSetConfigs.set(t,[i]),this}_svgElementFromConfig(t){if(!t.svgElement){const i=this._svgElementFromString(t.svgText);this._setSvgAttributes(i,t.options),t.svgElement=i}return t.svgElement}_getIconConfigFromResolvers(t,i){for(let r=0;re?e.pathname+e.search:""}}}),C3=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],DQ=C3.map(n=>`[${n}]`).join(", "),IQ=/^url\(['"]?#(.*?)['"]?\)$/;let E3=(()=>{class n extends CQ{get inline(){return this._inline}set inline(t){this._inline=Cn(t)}get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}get fontSet(){return this._fontSet}set fontSet(t){const i=this._cleanupFontValue(t);i!==this._fontSet&&(this._fontSet=i,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(t){const i=this._cleanupFontValue(t);i!==this._fontIcon&&(this._fontIcon=i,this._updateFontIconClasses())}constructor(t,i,r,s,o,a){super(t),this._iconRegistry=i,this._location=s,this._errorHandler=o,this._inline=!1,this._previousFontSetClass=[],this._currentIconFetch=un.EMPTY,a&&(a.color&&(this.color=this.defaultColor=a.color),a.fontSet&&(this.fontSet=a.fontSet)),r||t.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(t){if(!t)return["",""];const i=t.split(":");switch(i.length){case 1:return["",i[0]];case 2:return i;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const t=this._elementsWithExternalReferences;if(t&&t.size){const i=this._location.getPathname();i!==this._previousPath&&(this._previousPath=i,this._prependPathToReferences(i))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();const i=this._location.getPathname();this._previousPath=i,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(i),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){const t=this._elementRef.nativeElement;let i=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();i--;){const r=t.childNodes[i];(1!==r.nodeType||"svg"===r.nodeName.toLowerCase())&&r.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const t=this._elementRef.nativeElement,i=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(r=>r.length>0);this._previousFontSetClass.forEach(r=>t.classList.remove(r)),i.forEach(r=>t.classList.add(r)),this._previousFontSetClass=i,this.fontIcon!==this._previousFontIconClass&&!i.includes("mat-ligature-font")&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return"string"==typeof t?t.trim().split(" ")[0]:t}_prependPathToReferences(t){const i=this._elementsWithExternalReferences;i&&i.forEach((r,s)=>{r.forEach(o=>{s.setAttribute(o.name,`url('${t}#${o.value}')`)})})}_cacheChildrenWithExternalReferences(t){const i=t.querySelectorAll(DQ),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const a=i[s],l=a.getAttribute(o),c=l?l.match(IQ):null;if(c){let u=r.get(a);u||(u=[],r.set(a,u)),u.push({name:o,value:c[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){const[i,r]=this._splitIconName(t);i&&(this._svgNamespace=i),r&&(this._svgName=r),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(r,i).pipe(Li(1)).subscribe(s=>this._setSvgElement(s),s=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${i}:${r}! ${s.message}`))})}}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(NM),Ua("aria-hidden"),D(AQ),D(Xa),D(EQ,8))},n.\u0275cmp=ht({type:n,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(t,i){2&t&&(Vt("data-mat-icon-type",i._usingFontIcon()?"font":"svg")("data-mat-icon-name",i._svgName||i.fontIcon)("data-mat-icon-namespace",i._svgNamespace||i.fontSet)("fontIcon",i._usingFontIcon()?i.fontIcon:null),Pn("mat-icon-inline",i.inline)("mat-icon-no-color","primary"!==i.color&&"accent"!==i.color&&"warn"!==i.color))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[ft],ngContentSelectors:bQ,decls:1,vars:0,template:function(t,i){1&t&&(Cr(),Kt(0))},styles:[".mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0}),n})(),RQ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[qn,qn]}),n})(),A3=(()=>{class n{constructor(t){this.viewContainerRef=t}}return n.\u0275fac=function(t){return new(t||n)(D(is))},n.\u0275dir=Ae({type:n,selectors:[["","dataBlockUI",""]]}),n})(),PQ=(()=>{class n{constructor(){this.resource=null,this.name="",this.resourceDescription="",this.changed=new it}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=ht({type:n,selectors:[["app-fallback-block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},decls:2,vars:3,consts:[["matTooltipPosition","above",3,"matTooltip"]],template:function(t,i){1&t&&(K(0,"p",0),Je(1),J()),2&t&&(z("matTooltip",i.resourceDescription),j(1),Vp("",null==i.resource?null:i.resource.name,"> GUI component for block ",((null==i.resource||null==i.resource.schema?null:i.resource.schema.block_class_mro)||"").split("__")[0]," not implemented :(\n"))},dependencies:[_s],changeDetection:0}),n})();function kQ(n,e){if(1&n&&(K(0,"h2",4),Je(1),J()),2&n){const t=be();z("matTooltip",t.resourceDescription),j(1),$i(t.name)}}function OQ(n,e){1&n&&Fe(0,"app-block-actions",5),2&n&&z("resource",be().resource)}const LQ=function(n,e,t,i){return{id:n,name:e,data:t,schema:i}};function FQ(n,e){if(1&n&&Fe(0,"app-editor",7),2&n){const t=be().$implicit,i=be();z("resource",hF(3,LQ,i.resource.id+(i.resource.id.includes("__")?"/":"__")+t.key,t.key,null==i.data?null:i.data[t.key],null==i.schema?null:i.schema.fields[t.index].schema))("resourceDescription",(null==i.schema?null:i.schema.fields[t.index].description)||"")("disabled",i.disabled||!(null==i.schema||!i.schema.fields[t.index].is_programmatic))}}function NQ(n,e){if(1&n&&(uo(0),_e(1,FQ,1,8,"app-editor",6),zt(2,"async"),ho()),2&n){const t=e.$implicit,i=be();j(1),z("ngIf",!(Xt(2,1,i.main.hideHiddenFields$)&&(null!=i.schema&&i.schema.fields[t.index].is_unknown||void 0!==(null==i.schema?null:i.schema.fields[t.index].schema.required_value)||null!=i.schema&&i.schema.fields[t.index].is_programmatic)))}}let Gc=(()=>{class n{constructor(t){this.main=t,this.resource=null,this.resourceDescription="",this.hideBlockActions=!1,this.disabled=!1,this.fieldWhitelist=null,this.fieldBlacklist=null,this.changed=new it,this.destroyed$=new Ue}get name(){return this.resource&&this.resource.name}get data(){return this.resource&&this.resource.data}get schema(){return this.resource&&this.resource.schema}get fieldKeys(){let t=this.schema?.fields.map((i,r)=>({index:r,key:i.name}))||[];return this.fieldWhitelist?t=t.filter(({key:i})=>this.fieldWhitelist?.includes(i)):this.fieldBlacklist&&(t=t.filter(({key:i})=>!this.fieldBlacklist?.includes(i))),t}fieldTrackBy(t,i){return i.index}ngAfterViewInit(){var t=this;this.main.dataBlockChange$.pipe(et(this.destroyed$),On(([i,r])=>!!this.resource&&i.startsWith(this.resource.id)&&!i.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var i=xt(function*([r,s]){const o=r.substring(t.resource.id.length+1);t.data[o]=s});return function(r){return i.apply(this,arguments)}}())}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return n.\u0275fac=function(t){return new(t||n)(D(il))},n.\u0275cmp=ht({type:n,selectors:[["app-compound-block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled",fieldWhitelist:"fieldWhitelist",fieldBlacklist:"fieldBlacklist"},outputs:{changed:"changed"},decls:5,vars:6,consts:[["matTooltipPosition","above",3,"matTooltip",4,"ngIf"],[3,"resource",4,"ngIf"],[1,"container"],[4,"ngFor","ngForOf","ngForTrackBy"],["matTooltipPosition","above",3,"matTooltip"],[3,"resource"],[3,"resource","resourceDescription","disabled",4,"ngIf"],[3,"resource","resourceDescription","disabled"]],template:function(t,i){if(1&t&&(_e(0,kQ,2,2,"h2",0),zt(1,"async"),_e(2,OQ,1,1,"app-block-actions",1),K(3,"div",2),_e(4,NQ,3,3,"ng-container",3),J()),2&t){let r;z("ngIf",i.name&&i.name!=(null==(r=Xt(1,4,i.main.resource$))?null:r.name)),j(2),z("ngIf",!i.hideBlockActions),j(2),z("ngForOf",i.fieldKeys)("ngForTrackBy",i.fieldTrackBy)}},styles:[".container[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-around;column-gap:1rem}"],changeDetection:0}),n})(),T3=(()=>{class n{constructor(t,i){this._renderer=t,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(t,i){this._renderer.setProperty(this._elementRef.nativeElement,t,i)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}}return n.\u0275fac=function(t){return new(t||n)(D(fa),D(yt))},n.\u0275dir=Ae({type:n}),n})(),Dh=(()=>{class n extends T3{}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275dir=Ae({type:n,features:[ft]}),n})();const rl=new ge("NgValueAccessor"),UQ={provide:rl,useExisting:Qn(()=>Wc),multi:!0},zQ=new ge("CompositionEventMode");let Wc=(()=>{class n extends T3{constructor(t,i,r){super(t,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function VQ(){const n=Lc()?Lc().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}())}writeValue(t){this.setProperty("value",t??"")}_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)}}return n.\u0275fac=function(t){return new(t||n)(D(fa),D(yt),D(zQ,8))},n.\u0275dir=Ae({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,i){1&t&&ct("input",function(s){return i._handleInput(s.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(s){return i._compositionEnd(s.target.value)})},features:[Hn([UQ]),ft]}),n})();const HQ=!1;function Qd(n){return null==n||("string"==typeof n||Array.isArray(n))&&0===n.length}function I3(n){return null!=n&&"number"==typeof n.length}const vs=new ge("NgValidators"),Jd=new ge("NgAsyncValidators"),GQ=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class FI{static min(e){return R3(e)}static max(e){return P3(e)}static required(e){return function k3(n){return Qd(n.value)?{required:!0}:null}(e)}static requiredTrue(e){return function O3(n){return!0===n.value?null:{required:!0}}(e)}static email(e){return function L3(n){return Qd(n.value)||GQ.test(n.value)?null:{email:!0}}(e)}static minLength(e){return F3(e)}static maxLength(e){return N3(e)}static pattern(e){return function B3(n){if(!n)return UM;let e,t;return"string"==typeof n?(t="","^"!==n.charAt(0)&&(t+="^"),t+=n,"$"!==n.charAt(n.length-1)&&(t+="$"),e=new RegExp(t)):(t=n.toString(),e=n),i=>{if(Qd(i.value))return null;const r=i.value;return e.test(r)?null:{pattern:{requiredPattern:t,actualValue:r}}}}(e)}static nullValidator(e){return null}static compose(e){return W3(e)}static composeAsync(e){return $3(e)}}function R3(n){return e=>{if(Qd(e.value)||Qd(n))return null;const t=parseFloat(e.value);return!isNaN(t)&&t{if(Qd(e.value)||Qd(n))return null;const t=parseFloat(e.value);return!isNaN(t)&&t>n?{max:{max:n,actual:e.value}}:null}}function F3(n){return e=>Qd(e.value)||!I3(e.value)?null:e.value.lengthI3(e.value)&&e.value.length>n?{maxlength:{requiredLength:n,actualLength:e.value.length}}:null}function UM(n){return null}function U3(n){return null!=n}function V3(n){const e=Sv(n)?Ri(n):n;if(HQ&&!t1(e)){let t="Expected async validator to return Promise or Observable.";throw"object"==typeof n&&(t+=" Are you using a synchronous validator where an async validator is expected?"),new fe(-1101,t)}return e}function z3(n){let e={};return n.forEach(t=>{e=null!=t?{...e,...t}:e}),0===Object.keys(e).length?null:e}function H3(n,e){return e.map(t=>t(n))}function G3(n){return n.map(e=>function WQ(n){return!n.validate}(e)?e:t=>e.validate(t))}function W3(n){if(!n)return null;const e=n.filter(U3);return 0==e.length?null:function(t){return z3(H3(t,e))}}function NI(n){return null!=n?W3(G3(n)):null}function $3(n){if(!n)return null;const e=n.filter(U3);return 0==e.length?null:function(t){return l3(H3(t,e).map(V3)).pipe(Ye(z3))}}function BI(n){return null!=n?$3(G3(n)):null}function j3(n,e){return null===n?[e]:Array.isArray(n)?[...n,e]:[n,e]}function X3(n){return n._rawValidators}function q3(n){return n._rawAsyncValidators}function UI(n){return n?Array.isArray(n)?n:[n]:[]}function VM(n,e){return Array.isArray(n)?n.includes(e):n===e}function Y3(n,e){const t=UI(e);return UI(n).forEach(r=>{VM(t,r)||t.push(r)}),t}function K3(n,e){return UI(e).filter(t=>!VM(n,t))}class Z3{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}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}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=NI(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=BI(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e){this.control&&this.control.reset(e)}hasError(e,t){return!!this.control&&this.control.hasError(e,t)}getError(e,t){return this.control?this.control.getError(e,t):null}}class Zs extends Z3{get formDirective(){return null}get path(){return null}}class Wl extends Z3{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Q3{constructor(e){this._cd=e}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let eu=(()=>{class n extends Q3{constructor(t){super(t)}}return n.\u0275fac=function(t){return new(t||n)(D(Wl,2))},n.\u0275dir=Ae({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,i){2&t&&Pn("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[ft]}),n})(),J3=(()=>{class n extends Q3{constructor(t){super(t)}}return n.\u0275fac=function(t){return new(t||n)(D(Zs,10))},n.\u0275dir=Ae({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(t,i){2&t&&Pn("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[ft]}),n})();function eV(n,e){return n?`with name: '${e}'`:`at index: ${e}`}const HI=!1,Ey="VALID",HM="INVALID",xm="PENDING",Ay="DISABLED";function GI(n){return(GM(n)?n.validators:n)||null}function WI(n,e){return(GM(e)?e.asyncValidators:n)||null}function GM(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}function tV(n,e,t){const i=n.controls;if(!(e?Object.keys(i):i).length)throw new fe(1e3,HI?function qQ(n){return`\n There are no form controls registered with this ${n?"group":"array"} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `}(e):"");if(!i[t])throw new fe(1001,HI?function YQ(n,e){return`Cannot find form control ${eV(n,e)}`}(e,t):"")}function nV(n,e,t){n._forEachChild((i,r)=>{if(void 0===t[r])throw new fe(1002,HI?function KQ(n,e){return`Must supply a value for form control ${eV(n,e)}`}(e,r):"")})}class WM{constructor(e,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],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 valid(){return this.status===Ey}get invalid(){return this.status===HM}get pending(){return this.status==xm}get disabled(){return this.status===Ay}get enabled(){return this.status!==Ay}get dirty(){return!this.pristine}get untouched(){return!this.touched}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(Y3(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(Y3(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(K3(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(K3(e,this._rawAsyncValidators))}hasValidator(e){return VM(this._rawValidators,e)}hasAsyncValidator(e){return VM(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=xm,!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=Ay,this.errors=null,this._forEachChild(i=>{i.disable({...e,onlySelf:!0})}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...e,skipPristineCheck:t}),this._onDisabledChange.forEach(i=>i(!0))}enable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=Ey,this._forEachChild(i=>{i.enable({...e,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors({...e,skipPristineCheck:t}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Ey||this.status===xm)&&this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Ay:Ey}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=xm,this._hasOwnPendingAsyncValidator=!0;const t=V3(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(!1!==t.emitEvent)}get(e){let t=e;return null==t||(Array.isArray(t)||(t=t.split(".")),0===t.length)?null:t.reduce((i,r)=>i&&i._find(r),this)}getError(e,t){const i=t?this.get(t):this;return i&&i.errors?i.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new it,this.statusChanges=new it}_calculateStatus(){return this._allControlsDisabled()?Ay:this.errors?HM:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(xm)?xm:this._anyControlsHaveStatus(HM)?HM:Ey}_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={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){GM(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=function ZQ(n){return Array.isArray(n)?NI(n):n||null}(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=function QQ(n){return Array.isArray(n)?BI(n):n||null}(this._rawAsyncValidators)}}class Ty extends WM{constructor(e,t,i){super(GI(t),WI(i,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(e,t,i={}){this.registerControl(e,t),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(e,t,i={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,t={}){nV(this,!0,e),Object.keys(e).forEach(i=>{tV(this,!0,i),this.controls[i].setValue(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){null!=e&&(Object.keys(e).forEach(i=>{const r=this.controls[i];r&&r.patchValue(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e={},t={}){this._forEachChild((i,r)=>{i.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(e,t,i)=>(e[i]=t.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(t,i)=>!!i._syncPendingControls()||t);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(t=>{const i=this.controls[t];i&&e(i,t)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(const[t,i]of Object.entries(this.controls))if(this.contains(t)&&e(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(t,i,r)=>((i.enabled||this.disabled)&&(t[r]=i.value),t))}_reduceChildren(e,t){let i=e;return this._forEachChild((r,s)=>{i=t(i,r,s)}),i}_allControlsDisabled(){for(const e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}}class iV extends Ty{}const Ih=new ge("CallSetDisabledState",{providedIn:"root",factory:()=>Dy}),Dy="always";function $M(n,e){return[...e.path,n]}function Iy(n,e,t=Dy){$I(n,e),e.valueAccessor.writeValue(n.value),(n.disabled||"always"===t)&&e.valueAccessor.setDisabledState?.(n.disabled),function eJ(n,e){e.valueAccessor.registerOnChange(t=>{n._pendingValue=t,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&rV(n,e)})}(n,e),function nJ(n,e){const t=(i,r)=>{e.valueAccessor.writeValue(i),r&&e.viewToModelUpdate(i)};n.registerOnChange(t),e._registerOnDestroy(()=>{n._unregisterOnChange(t)})}(n,e),function tJ(n,e){e.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,"blur"===n.updateOn&&n._pendingChange&&rV(n,e),"submit"!==n.updateOn&&n.markAsTouched()})}(n,e),function JQ(n,e){if(e.valueAccessor.setDisabledState){const t=i=>{e.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(t),e._registerOnDestroy(()=>{n._unregisterOnDisabledChange(t)})}}(n,e)}function jM(n,e,t=!0){const i=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(i),e.valueAccessor.registerOnTouched(i)),qM(n,e),n&&(e._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function XM(n,e){n.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function $I(n,e){const t=X3(n);null!==e.validator?n.setValidators(j3(t,e.validator)):"function"==typeof t&&n.setValidators([t]);const i=q3(n);null!==e.asyncValidator?n.setAsyncValidators(j3(i,e.asyncValidator)):"function"==typeof i&&n.setAsyncValidators([i]);const r=()=>n.updateValueAndValidity();XM(e._rawValidators,r),XM(e._rawAsyncValidators,r)}function qM(n,e){let t=!1;if(null!==n){if(null!==e.validator){const r=X3(n);if(Array.isArray(r)&&r.length>0){const s=r.filter(o=>o!==e.validator);s.length!==r.length&&(t=!0,n.setValidators(s))}}if(null!==e.asyncValidator){const r=q3(n);if(Array.isArray(r)&&r.length>0){const s=r.filter(o=>o!==e.asyncValidator);s.length!==r.length&&(t=!0,n.setAsyncValidators(s))}}}const i=()=>{};return XM(e._rawValidators,i),XM(e._rawAsyncValidators,i),t}function rV(n,e){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function sV(n,e){$I(n,e)}function XI(n,e){if(!n.hasOwnProperty("model"))return!1;const t=n.model;return!!t.isFirstChange()||!Object.is(e,t.currentValue)}function oV(n,e){n._syncPendingControls(),e.forEach(t=>{const i=t.control;"submit"===i.updateOn&&i._pendingChange&&(t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function qI(n,e){if(!e)return null;let t,i,r;return Array.isArray(e),e.forEach(s=>{s.constructor===Wc?t=s:function sJ(n){return Object.getPrototypeOf(n.constructor)===Dh}(s)?i=s:r=s}),r||i||t||null}const aJ={provide:Zs,useExisting:Qn(()=>Py)},Ry=(()=>Promise.resolve())();let Py=(()=>{class n extends Zs{constructor(t,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new it,this.form=new Ty({},NI(t),BI(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){Ry.then(()=>{const i=this._findContainer(t.path);t.control=i.registerControl(t.name,t.control),Iy(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){Ry.then(()=>{const i=this._findContainer(t.path);i&&i.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){Ry.then(()=>{const i=this._findContainer(t.path),r=new Ty({});sV(r,t),i.registerControl(t.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){Ry.then(()=>{const i=this._findContainer(t.path);i&&i.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,i){Ry.then(()=>{this.form.get(t.path).setValue(i)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,oV(this.form,this._directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}}return n.\u0275fac=function(t){return new(t||n)(D(vs,10),D(Jd,10),D(Ih,8))},n.\u0275dir=Ae({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,i){1&t&&ct("submit",function(s){return i.onSubmit(s)})("reset",function(){return i.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Hn([aJ]),ft]}),n})();function aV(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}function lV(n){return"object"==typeof n&&null!==n&&2===Object.keys(n).length&&"value"in n&&"disabled"in n}const ky=class extends WM{constructor(e=null,t,i){super(GI(t),WI(i,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),GM(t)&&(t.nonNullable||t.initialValueIsDefault)&&(this.defaultValue=lV(e)?e.value:e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==t.emitViewToModelChange)),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),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){aV(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){aV(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(e){lV(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}},dJ={provide:Wl,useExisting:Qn(()=>tu)},uV=(()=>Promise.resolve())();let tu=(()=>{class n extends Wl{constructor(t,i,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this.control=new ky,this._registered=!1,this.update=new it,this._parent=t,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=qI(0,s)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){const i=t.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),XI(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&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&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){Iy(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(t){uV.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){const i=t.isDisabled.currentValue,r=0!==i&&function Yp(n){return"boolean"==typeof n?n:null!=n&&"false"!==n}(i);uV.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?$M(t,this._parent):[t]}}return n.\u0275fac=function(t){return new(t||n)(D(Zs,9),D(vs,10),D(Jd,10),D(rl,10),D(ci,8),D(Ih,8))},n.\u0275dir=Ae({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Hn([dJ]),ft,zi]}),n})(),hV=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),n})();const uJ={provide:rl,useExisting:Qn(()=>wm),multi:!0};let wm=(()=>{class n extends Dh{writeValue(t){this.setProperty("value",t??"")}registerOnChange(t){this.onChange=i=>{t(""==i?null:parseFloat(i))}}}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275dir=Ae({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,i){1&t&&ct("input",function(s){return i.onChange(s.target.value)})("blur",function(){return i.onTouched()})},features:[Hn([uJ]),ft]}),n})(),fV=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({}),n})();const YI=new ge("NgModelWithFormControlWarning"),gJ={provide:Zs,useExisting:Qn(()=>Mm)};let Mm=(()=>{class n extends Zs{constructor(t,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new it,this._setValidators(t),this._setAsyncValidators(i)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(qM(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const i=this.form.get(t.path);return Iy(i,t,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),i}getControl(t){return this.form.get(t.path)}removeControl(t){jM(t.control||null,t,!1),function oJ(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,i){this.form.get(t.path).setValue(i)}onSubmit(t){return this.submitted=!0,oV(this.form,this.directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const i=t.control,r=this.form.get(t.path);i!==r&&(jM(i||null,t),(n=>n instanceof ky)(r)&&(Iy(r,t,this.callSetDisabledState),t.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){const i=this.form.get(t.path);sV(i,t),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){const i=this.form.get(t.path);i&&function iJ(n,e){return qM(n,e)}(i,t)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){$I(this.form,this),this._oldForm&&qM(this._oldForm,this)}_checkFormPresent(){}}return n.\u0275fac=function(t){return new(t||n)(D(vs,10),D(Jd,10),D(Ih,8))},n.\u0275dir=Ae({type:n,selectors:[["","formGroup",""]],hostBindings:function(t,i){1&t&&ct("submit",function(s){return i.onSubmit(s)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Hn([gJ]),ft,zi]}),n})();const yJ={provide:Wl,useExisting:Qn(()=>QI)};let QI=(()=>{class n extends Wl{set isDisabled(t){}constructor(t,i,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new it,this._ngModelWarningSent=!1,this._parent=t,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=qI(0,s)}ngOnChanges(t){this._added||this._setUpControl(),XI(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return $M(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return n._ngModelWarningSentOnce=!1,n.\u0275fac=function(t){return new(t||n)(D(Zs,13),D(vs,10),D(Jd,10),D(rl,10),D(YI,8))},n.\u0275dir=Ae({type:n,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Hn([yJ]),ft,zi]}),n})();function bV(n){return"number"==typeof n?n:parseInt(n,10)}function xV(n){return"number"==typeof n?n:parseFloat(n)}let Rh=(()=>{class n{constructor(){this._validator=UM}ngOnChanges(t){if(this.inputName in t){const i=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):UM,this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return null!=t}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,features:[zi]}),n})();const EJ={provide:vs,useExisting:Qn(()=>Sm),multi:!0};let Sm=(()=>{class n extends Rh{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=t=>xV(t),this.createValidator=t=>P3(t)}}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275dir=Ae({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(t,i){2&t&&Vt("max",i._enabled?i.max:null)},inputs:{max:"max"},features:[Hn([EJ]),ft]}),n})();const AJ={provide:vs,useExisting:Qn(()=>Cm),multi:!0};let Cm=(()=>{class n extends Rh{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=t=>xV(t),this.createValidator=t=>R3(t)}}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275dir=Ae({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(t,i){2&t&&Vt("min",i._enabled?i.min:null)},inputs:{min:"min"},features:[Hn([AJ]),ft]}),n})();const RJ={provide:vs,useExisting:Qn(()=>nR),multi:!0};let nR=(()=>{class n extends Rh{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=t=>bV(t),this.createValidator=t=>F3(t)}}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275dir=Ae({type:n,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(t,i){2&t&&Vt("minlength",i._enabled?i.minlength:null)},inputs:{minlength:"minlength"},features:[Hn([RJ]),ft]}),n})();const PJ={provide:vs,useExisting:Qn(()=>iR),multi:!0};let iR=(()=>{class n extends Rh{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=t=>bV(t),this.createValidator=t=>N3(t)}}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275dir=Ae({type:n,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(t,i){2&t&&Vt("maxlength",i._enabled?i.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Hn([PJ]),ft]}),n})(),CV=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[fV]}),n})();class EV extends WM{constructor(e,t,i){super(GI(t),WI(i,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[this._adjustIndex(e)]}push(e,t={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(e,t,i={}){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(e,t={}){let i=this._adjustIndex(e);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(e,t,i={}){let r=this._adjustIndex(e);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),t&&(this.controls.splice(r,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,t={}){nV(this,!1,e),e.forEach((i,r)=>{tV(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){null!=e&&(e.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e=[],t={}){this._forEachChild((i,r)=>{i.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(e=>e.getRawValue())}clear(e={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_adjustIndex(e){return e<0?e+this.length:e}_syncPendingControls(){let e=this.controls.reduce((t,i)=>!!i._syncPendingControls()||t,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((t,i)=>{e(t,i)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(t=>t.enabled&&e(t))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(const e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}_find(e){return this.at(e)??null}}function AV(n){return!!n&&(void 0!==n.asyncValidators||void 0!==n.validators||void 0!==n.updateOn)}let OJ=(()=>{class n{constructor(){this.useNonNullable=!1}get nonNullable(){const t=new n;return t.useNonNullable=!0,t}group(t,i=null){const r=this._reduceControls(t);let s={};return AV(i)?s=i:null!==i&&(s.validators=i.validator,s.asyncValidators=i.asyncValidator),new Ty(r,s)}record(t,i=null){const r=this._reduceControls(t);return new iV(r,i)}control(t,i,r){let s={};return this.useNonNullable?(AV(i)?s=i:(s.validators=i,s.asyncValidators=r),new ky(t,{...s,nonNullable:!0})):new ky(t,i,r)}array(t,i,r){const s=t.map(o=>this._createControl(o));return new EV(s,i,r)}_reduceControls(t){const i={};return Object.keys(t).forEach(r=>{i[r]=this._createControl(t[r])}),i}_createControl(t){return t instanceof ky||t instanceof WM?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),LJ=(()=>{class n{static withConfig(t){return{ngModule:n,providers:[{provide:Ih,useValue:t.callSetDisabledState??Dy}]}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[CV]}),n})(),FJ=(()=>{class n{static withConfig(t){return{ngModule:n,providers:[{provide:YI,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:Ih,useValue:t.callSetDisabledState??Dy}]}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[CV]}),n})();const NJ=["matFormFieldNotchedOutline",""],BJ=["*"],UJ=["textField"],VJ=["iconPrefixContainer"],zJ=["textPrefixContainer"];function HJ(n,e){1&n&&Fe(0,"span",19)}function GJ(n,e){if(1&n){const t=Wi();K(0,"label",17),ct("cdkObserveContent",function(){return Dn(t),In(be(2)._refreshOutlineNotchWidth())}),Kt(1,1),_e(2,HJ,1,0,"span",18),J()}if(2&n){const t=be(2);z("floating",t._shouldLabelFloat())("cdkObserveContentDisabled",!t._hasOutline())("id",t._labelId),Vt("for",t._control.id)("aria-owns",t._control.id),j(2),z("ngIf",!t.hideRequiredMarker&&t._control.required)}}function WJ(n,e){1&n&&_e(0,GJ,3,6,"label",16),2&n&&z("ngIf",be()._hasFloatingLabel())}function $J(n,e){1&n&&Fe(0,"div",20)}function jJ(n,e){}function XJ(n,e){1&n&&_e(0,jJ,0,0,"ng-template",22),2&n&&(be(2),z("ngTemplateOutlet",Vr(1)))}function qJ(n,e){if(1&n&&(K(0,"div",21),_e(1,XJ,1,1,"ng-template",9),J()),2&n){const t=be();z("matFormFieldNotchedOutlineOpen",t._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",t._labelWidth),j(1),z("ngIf",!t._forceDisplayInfixLabel())}}function YJ(n,e){1&n&&(K(0,"div",23,24),Kt(2,2),J())}function KJ(n,e){1&n&&(K(0,"div",25,26),Kt(2,3),J())}function ZJ(n,e){}function QJ(n,e){1&n&&_e(0,ZJ,0,0,"ng-template",22),2&n&&(be(),z("ngTemplateOutlet",Vr(1)))}function JJ(n,e){1&n&&(K(0,"div",27),Kt(1,4),J())}function eee(n,e){1&n&&(K(0,"div",28),Kt(1,5),J())}function tee(n,e){1&n&&Fe(0,"div",29)}function nee(n,e){1&n&&(K(0,"div",30),Kt(1,6),J()),2&n&&z("@transitionMessages",be()._subscriptAnimationState)}function iee(n,e){if(1&n&&(K(0,"mat-hint",34),Je(1),J()),2&n){const t=be(2);z("id",t._hintLabelId),j(1),$i(t.hintLabel)}}function ree(n,e){if(1&n&&(K(0,"div",31),_e(1,iee,2,2,"mat-hint",32),Kt(2,7),Fe(3,"div",33),Kt(4,8),J()),2&n){const t=be();z("@transitionMessages",t._subscriptAnimationState),j(1),z("ngIf",t.hintLabel)}}const see=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],oee=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];let xa=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["mat-label"]]}),n})(),aee=0;const TV=new ge("MatError");let lee=(()=>{class n{constructor(t,i){this.id="mat-mdc-error-"+aee++,t||i.nativeElement.setAttribute("aria-live","polite")}}return n.\u0275fac=function(t){return new(t||n)(Ua("aria-live"),D(yt))},n.\u0275dir=Ae({type:n,selectors:[["mat-error"],["","matError",""]],hostAttrs:["aria-atomic","true",1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(t,i){2&t&&Nd("id",i.id)},inputs:{id:"id"},features:[Hn([{provide:TV,useExisting:n}])]}),n})(),cee=0,DV=(()=>{class n{constructor(){this.align="start",this.id="mat-mdc-hint-"+cee++}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(t,i){2&t&&(Nd("id",i.id),Vt("align",null),Pn("mat-mdc-form-field-hint-end","end"===i.align))},inputs:{align:"align",id:"id"}}),n})();const dee=new ge("MatPrefix"),uee=new ge("MatSuffix");let IV=(()=>{class n{constructor(t){this._elementRef=t,this.floating=!1}getWidth(){return function hee(n){if(null!==n.offsetParent)return n.scrollWidth;const t=n.cloneNode(!0);t.style.setProperty("position","absolute"),t.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(t);const i=t.scrollWidth;return t.remove(),i}(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}}return n.\u0275fac=function(t){return new(t||n)(D(yt))},n.\u0275dir=Ae({type:n,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(t,i){2&t&&Pn("mdc-floating-label--float-above",i.floating)},inputs:{floating:"floating"}}),n})();const RV="mdc-line-ripple--active",YM="mdc-line-ripple--deactivating";let PV=(()=>{class n{constructor(t,i){this._elementRef=t,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(YM);"opacity"===r.propertyName&&o&&s.remove(RV,YM)},i.runOutsideAngular(()=>{t.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const t=this._elementRef.nativeElement.classList;t.remove(YM),t.add(RV)}deactivate(){this._elementRef.nativeElement.classList.add(YM)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(pt))},n.\u0275dir=Ae({type:n,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),n})(),kV=(()=>{class n{constructor(t,i){this._elementRef=t,this._ngZone=i,this.labelWidth=0,this.open=!1}ngAfterViewInit(){const t=this._elementRef.nativeElement.querySelector(".mdc-floating-label");t?(this._elementRef.nativeElement.classList.add("mdc-notched-outline--upgraded"),"function"==typeof requestAnimationFrame&&(t.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>t.style.transitionDuration="")}))):this._elementRef.nativeElement.classList.add("mdc-notched-outline--no-label")}_getNotchWidth(){return this.open?this.labelWidth>0?`calc(${this.labelWidth}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`:"0px":null}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(pt))},n.\u0275cmp=ht({type:n,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(t,i){2&t&&Pn("mdc-notched-outline--notched",i.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:NJ,ngContentSelectors:BJ,decls:4,vars:2,consts:[[1,"mdc-notched-outline__leading"],[1,"mdc-notched-outline__notch"],[1,"mdc-notched-outline__trailing"]],template:function(t,i){1&t&&(Cr(),Fe(0,"div",0),K(1,"div",1),Kt(2),J(),Fe(3,"div",2)),2&t&&(j(1),Pc("width",i._getNotchWidth()))},encapsulation:2,changeDetection:0}),n})();const fee={transitionMessages:Gl("transitionMessages",[_o("enter",Ci({opacity:1,transform:"translateY(0%)"})),Ks("void => enter",[Ci({opacity:0,transform:"translateY(-5px)"}),go("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let rR=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n}),n})();const sR=new ge("MatFormField"),pee=new ge("MAT_FORM_FIELD_DEFAULT_OPTIONS");let OV=0,nu=(()=>{class n{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(t){this._hideRequiredMarker=Cn(t)}get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||"auto"}set floatLabel(t){t!==this._floatLabel&&(this._floatLabel=t,this._changeDetectorRef.markForCheck())}get appearance(){return this._appearance}set appearance(t){const i=this._appearance;this._appearance=t||this._defaults?.appearance||"fill","outline"===this._appearance&&this._appearance!==i&&(this._refreshOutlineNotchWidth(),this._needsOutlineLabelOffsetUpdateOnStable=!0)}get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||"fixed"}set subscriptSizing(t){this._subscriptSizing=t||this._defaults?.subscriptSizing||"fixed"}get hintLabel(){return this._hintLabel}set hintLabel(t){this._hintLabel=t,this._processHints()}get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(t){this._explicitFormFieldControl=t}constructor(t,i,r,s,o,a,l,c){this._elementRef=t,this._changeDetectorRef=i,this._ngZone=r,this._dir=s,this._platform=o,this._defaults=a,this._animationMode=l,this._document=c,this._hideRequiredMarker=!1,this.color="primary",this._appearance="fill",this._subscriptSizing=null,this._hintLabel="",this._hasIconPrefix=!1,this._hasTextPrefix=!1,this._hasIconSuffix=!1,this._hasTextSuffix=!1,this._labelId="mat-mdc-form-field-label-"+OV++,this._hintLabelId="mat-mdc-hint-"+OV++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Ue,this._isFocused=null,this._needsOutlineLabelOffsetUpdateOnStable=!1,a&&(a.appearance&&(this.appearance=a.appearance),this._hideRequiredMarker=Boolean(a?.hideRequiredMarker),a.color&&(this.color=a.color))}ngAfterViewInit(){this._updateFocusState(),this._refreshOutlineNotchWidth(),this._document?.fonts?.ready?this._document.fonts.ready.then(()=>{this._refreshOutlineNotchWidth(),this._changeDetectorRef.markForCheck()}):setTimeout(()=>this._refreshOutlineNotchWidth(),100),this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeControl(),this._initializeSubscript(),this._initializePrefixAndSuffix(),this._initializeOutlineLabelOffsetSubscriptions()}ngAfterContentChecked(){this._assertFormFieldControl()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}getLabelId(){return this._hasFloatingLabel()?this._labelId:null}getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(){const t=this._control;t.controlType&&this._elementRef.nativeElement.classList.add(`mat-mdc-form-field-type-${t.controlType}`),t.stateChanges.subscribe(()=>{this._updateFocusState(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),t.ngControl&&t.ngControl.valueChanges&&t.ngControl.valueChanges.pipe(et(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck())}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(t=>!t._isText),this._hasTextPrefix=!!this._prefixChildren.find(t=>t._isText),this._hasIconSuffix=!!this._suffixChildren.find(t=>!t._isText),this._hasTextSuffix=!!this._suffixChildren.find(t=>t._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),cs(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){}_updateFocusState(){this._control.focused&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!this._control.focused&&(this._isFocused||null===this._isFocused)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_initializeOutlineLabelOffsetSubscriptions(){this._prefixChildren.changes.subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(et(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(et(this._destroyed)).subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0)}_shouldAlwaysFloat(){return"always"===this.floatLabel}_hasOutline(){return"outline"===this.appearance}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel(){return!!this._labelChildNonStatic||!!this._labelChildStatic}_shouldLabelFloat(){return this._control.shouldLabelFloat||this._shouldAlwaysFloat()}_shouldForward(t){const i=this._control?this._control.ngControl:null;return i&&i[t]}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||(this._labelWidth=this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){}_syncDescribedByIds(){if(this._control){let t=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&t.push(...this._control.userAriaDescribedBy.split(" ")),"hint"===this._getDisplayedMessages()){const i=this._hintChildren?this._hintChildren.find(s=>"start"===s.align):null,r=this._hintChildren?this._hintChildren.find(s=>"end"===s.align):null;i?t.push(i.id):this._hintLabel&&t.push(this._hintLabelId),r&&t.push(r.id)}else this._errorChildren&&t.push(...this._errorChildren.map(i=>i.id));this._control.setDescribedByIds(t)}}_updateOutlineLabelOffset(){if(!this._platform.isBrowser||!this._hasOutline()||!this._floatingLabel)return;const t=this._floatingLabel.element;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return void(t.style.transform="");if(!this._isAttachedToDom())return void(this._needsOutlineLabelOffsetUpdateOnStable=!0);const i=this._iconPrefixContainer?.nativeElement,r=this._textPrefixContainer?.nativeElement,s=i?.getBoundingClientRect().width??0,o=r?.getBoundingClientRect().width??0;t.style.transform=`var(\n --mat-mdc-form-field-label-transform,\n translateY(-50%) translateX(calc(${"rtl"===this._dir.value?"-1":"1"} * (${s+o}px + var(--mat-mdc-form-field-label-offset-x, 0px))))\n )`}_isAttachedToDom(){const t=this._elementRef.nativeElement;if(t.getRootNode){const i=t.getRootNode();return i&&i!==t}return document.documentElement.contains(t)}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(ci),D(pt),D(tl),D(Fi),D(pee,8),D(rs,8),D(Ht))},n.\u0275cmp=ht({type:n,selectors:[["mat-form-field"]],contentQueries:function(t,i,r){if(1&t&&(Xi(r,xa,5),Xi(r,xa,7),Xi(r,rR,5),Xi(r,dee,5),Xi(r,uee,5),Xi(r,TV,5),Xi(r,DV,5)),2&t){let s;Lt(s=Ft())&&(i._labelChildNonStatic=s.first),Lt(s=Ft())&&(i._labelChildStatic=s.first),Lt(s=Ft())&&(i._formFieldControl=s.first),Lt(s=Ft())&&(i._prefixChildren=s),Lt(s=Ft())&&(i._suffixChildren=s),Lt(s=Ft())&&(i._errorChildren=s),Lt(s=Ft())&&(i._hintChildren=s)}},viewQuery:function(t,i){if(1&t&&(oi(UJ,5),oi(VJ,5),oi(zJ,5),oi(IV,5),oi(kV,5),oi(PV,5)),2&t){let r;Lt(r=Ft())&&(i._textField=r.first),Lt(r=Ft())&&(i._iconPrefixContainer=r.first),Lt(r=Ft())&&(i._textPrefixContainer=r.first),Lt(r=Ft())&&(i._floatingLabel=r.first),Lt(r=Ft())&&(i._notchedOutline=r.first),Lt(r=Ft())&&(i._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(t,i){2&t&&Pn("mat-mdc-form-field-label-always-float",i._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",i._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",i._hasIconSuffix)("mat-form-field-invalid",i._control.errorState)("mat-form-field-disabled",i._control.disabled)("mat-form-field-autofilled",i._control.autofilled)("mat-form-field-no-animations","NoopAnimations"===i._animationMode)("mat-form-field-appearance-fill","fill"==i.appearance)("mat-form-field-appearance-outline","outline"==i.appearance)("mat-form-field-hide-placeholder",i._hasFloatingLabel()&&!i._shouldLabelFloat())("mat-focused",i._control.focused)("mat-primary","accent"!==i.color&&"warn"!==i.color)("mat-accent","accent"===i.color)("mat-warn","warn"===i.color)("ng-untouched",i._shouldForward("untouched"))("ng-touched",i._shouldForward("touched"))("ng-pristine",i._shouldForward("pristine"))("ng-dirty",i._shouldForward("dirty"))("ng-valid",i._shouldForward("valid"))("ng-invalid",i._shouldForward("invalid"))("ng-pending",i._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[Hn([{provide:sR,useExisting:n}])],ngContentSelectors:oee,decls:18,vars:23,consts:[["labelTemplate",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],["textField",""],["class","mat-mdc-form-field-focus-overlay",4,"ngIf"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen","matFormFieldNotchedOutlineLabelWidth",4,"ngIf"],["class","mat-mdc-form-field-icon-prefix",4,"ngIf"],["class","mat-mdc-form-field-text-prefix",4,"ngIf"],[1,"mat-mdc-form-field-infix"],[3,"ngIf"],["class","mat-mdc-form-field-text-suffix",4,"ngIf"],["class","mat-mdc-form-field-icon-suffix",4,"ngIf"],["matFormFieldLineRipple","",4,"ngIf"],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align",3,"ngSwitch"],["class","mat-mdc-form-field-error-wrapper",4,"ngSwitchCase"],["class","mat-mdc-form-field-hint-wrapper",4,"ngSwitchCase"],["matFormFieldFloatingLabel","",3,"floating","cdkObserveContentDisabled","id","cdkObserveContent",4,"ngIf"],["matFormFieldFloatingLabel","",3,"floating","cdkObserveContentDisabled","id","cdkObserveContent"],["aria-hidden","true","class","mat-mdc-form-field-required-marker mdc-floating-label--required",4,"ngIf"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[1,"mat-mdc-form-field-focus-overlay"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen","matFormFieldNotchedOutlineLabelWidth"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-icon-prefix"],["iconPrefixContainer",""],[1,"mat-mdc-form-field-text-prefix"],["textPrefixContainer",""],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],[3,"id",4,"ngIf"],[1,"mat-mdc-form-field-hint-spacer"],[3,"id"]],template:function(t,i){1&t&&(Cr(see),_e(0,WJ,1,1,"ng-template",null,0,kc),K(2,"div",1,2),ct("click",function(s){return i._control.onContainerClick&&i._control.onContainerClick(s)}),_e(4,$J,1,0,"div",3),K(5,"div",4),_e(6,qJ,2,3,"div",5),_e(7,YJ,3,0,"div",6),_e(8,KJ,3,0,"div",7),K(9,"div",8),_e(10,QJ,1,1,"ng-template",9),Kt(11),J(),_e(12,JJ,2,0,"div",10),_e(13,eee,2,0,"div",11),J(),_e(14,tee,1,0,"div",12),J(),K(15,"div",13),_e(16,nee,2,1,"div",14),_e(17,ree,5,2,"div",15),J()),2&t&&(j(2),Pn("mdc-text-field--filled",!i._hasOutline())("mdc-text-field--outlined",i._hasOutline())("mdc-text-field--no-label",!i._hasFloatingLabel())("mdc-text-field--disabled",i._control.disabled)("mdc-text-field--invalid",i._control.errorState),j(2),z("ngIf",!i._hasOutline()&&!i._control.disabled),j(2),z("ngIf",i._hasOutline()),j(1),z("ngIf",i._hasIconPrefix),j(1),z("ngIf",i._hasTextPrefix),j(2),z("ngIf",!i._hasOutline()||i._forceDisplayInfixLabel()),j(2),z("ngIf",i._hasTextSuffix),j(1),z("ngIf",i._hasIconSuffix),j(1),z("ngIf",!i._hasOutline()),j(1),Pn("mat-mdc-form-field-subscript-dynamic-size","dynamic"===i.subscriptSizing),z("ngSwitch",i._getDisplayedMessages()),j(1),z("ngSwitchCase","error"),j(1),z("ngSwitchCase","hint"))},dependencies:[gi,Vv,Uv,aD,tU,DV,IV,kV,PV],styles:['.mdc-text-field{border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{height:28px;width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}}.mdc-text-field__affix{height:28px;opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px))*2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px, var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-floating-label{position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after,.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::after{border-bottom-width:2px}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{line-height:normal;pointer-events:all}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-text-field-wrapper::before{content:none}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}.cdk-high-contrast-active .mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:12px;box-sizing:content-box}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__affix{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea{transition:none}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}'],encapsulation:2,data:{animation:[fee.transitionMessages]},changeDetection:0}),n})(),KM=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[qn,va,aI,qn]}),n})();const NV=Sh({passive:!0});let _ee=(()=>{class n{constructor(t,i){this._platform=t,this._ngZone=i,this._monitoredElements=new Map}monitor(t){if(!this._platform.isBrowser)return Is;const i=Vc(t),r=this._monitoredElements.get(i);if(r)return r.subject;const s=new Ue,o="cdk-text-field-autofilled",a=l=>{"cdk-text-field-autofill-start"!==l.animationName||i.classList.contains(o)?"cdk-text-field-autofill-end"===l.animationName&&i.classList.contains(o)&&(i.classList.remove(o),this._ngZone.run(()=>s.next({target:l.target,isAutofilled:!1}))):(i.classList.add(o),this._ngZone.run(()=>s.next({target:l.target,isAutofilled:!0})))};return this._ngZone.runOutsideAngular(()=>{i.addEventListener("animationstart",a,NV),i.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(i,{subject:s,unlisten:()=>{i.removeEventListener("animationstart",a,NV)}}),s}stopMonitoring(t){const i=Vc(t),r=this._monitoredElements.get(i);r&&(r.unlisten(),r.subject.complete(),i.classList.remove("cdk-text-field-autofill-monitored"),i.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(i))}ngOnDestroy(){this._monitoredElements.forEach((t,i)=>this.stopMonitoring(i))}}return n.\u0275fac=function(t){return new(t||n)(Q(Fi),Q(pt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),vee=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({}),n})();const yee=new ge("MAT_INPUT_VALUE_ACCESSOR"),bee=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let xee=0;const wee=wU(class{constructor(n,e,t,i){this._defaultErrorStateMatcher=n,this._parentForm=e,this._parentFormGroup=t,this.ngControl=i,this.stateChanges=new Ue}});let Em=(()=>{class n extends wee{get disabled(){return this._disabled}set disabled(t){this._disabled=Cn(t),this.focused&&(this.focused=!1,this.stateChanges.next())}get id(){return this._id}set id(t){this._id=t||this._uid}get required(){return this._required??this.ngControl?.control?.hasValidator(FI.required)??!1}set required(t){this._required=Cn(t)}get type(){return this._type}set type(t){this._type=t||"text",this._validateType(),!this._isTextarea&&BB().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}get value(){return this._inputValueAccessor.value}set value(t){t!==this.value&&(this._inputValueAccessor.value=t,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(t){this._readonly=Cn(t)}constructor(t,i,r,s,o,a,l,c,u,h){super(a,s,o,r),this._elementRef=t,this._platform=i,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+xee++,this.focused=!1,this.stateChanges=new Ue,this.controlType="mat-input",this.autofilled=!1,this._disabled=!1,this._type="text",this._readonly=!1,this._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(g=>BB().has(g)),this._iOSKeyupListener=g=>{const b=g.target;!b.value&&0===b.selectionStart&&0===b.selectionEnd&&(b.setSelectionRange(1,1),b.setSelectionRange(0,0))};const p=this._elementRef.nativeElement,m=p.nodeName.toLowerCase();this._inputValueAccessor=l||p,this._previousNativeValue=this.value,this.id=this.id,i.IOS&&u.runOutsideAngular(()=>{t.nativeElement.addEventListener("keyup",this._iOSKeyupListener)}),this._isServer=!this._platform.isBrowser,this._isNativeSelect="select"===m,this._isTextarea="textarea"===m,this._isInFormField=!!h,this._isNativeSelect&&(this.controlType=p.multiple?"mat-native-select-multiple":"mat-native-select")}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(t=>{this.autofilled=t.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._platform.IOS&&this._elementRef.nativeElement.removeEventListener("keyup",this._iOSKeyupListener)}ngDoCheck(){this.ngControl&&(this.updateErrorState(),null!==this.ngControl.disabled&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(t){this._elementRef.nativeElement.focus(t)}_focusChanged(t){t!==this.focused&&(this.focused=t,this.stateChanges.next())}_onInput(){}_dirtyCheckNativeValue(){const t=this._elementRef.nativeElement.value;this._previousNativeValue!==t&&(this._previousNativeValue=t,this.stateChanges.next())}_dirtyCheckPlaceholder(){const t=this._getPlaceholder();if(t!==this._previousPlaceholder){const i=this._elementRef.nativeElement;this._previousPlaceholder=t,t?i.setAttribute("placeholder",t):i.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){bee.indexOf(this._type)}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let t=this._elementRef.nativeElement.validity;return t&&t.badInput}get empty(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}get shouldLabelFloat(){if(this._isNativeSelect){const t=this._elementRef.nativeElement,i=t.options[0];return this.focused||t.multiple||!this.empty||!!(t.selectedIndex>-1&&i&&i.label)}return this.focused||!this.empty}setDescribedByIds(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){const t=this._elementRef.nativeElement;return this._isNativeSelect&&(t.multiple||t.size>1)}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(Fi),D(Wl,10),D(Py,8),D(Mm,8),D(MU),D(yee,10),D(_ee),D(pt),D(sR,8))},n.\u0275dir=Ae({type:n,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:18,hostBindings:function(t,i){1&t&&ct("focus",function(){return i._focusChanged(!0)})("blur",function(){return i._focusChanged(!1)})("input",function(){return i._onInput()}),2&t&&(Nd("id",i.id)("disabled",i.disabled)("required",i.required),Vt("name",i.name||null)("readonly",i.readonly&&!i._isNativeSelect||null)("aria-invalid",i.empty&&i.required?null:i.errorState)("aria-required",i.required)("id",i.id),Pn("mat-input-server",i._isServer)("mat-mdc-form-field-textarea-control",i._isInFormField&&i._isTextarea)("mat-mdc-form-field-input-control",i._isInFormField)("mdc-text-field__input",i._isInFormField)("mat-mdc-native-select-inline",i._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly"},exportAs:["matInput"],features:[Hn([{provide:rR,useExisting:n}]),ft,zi]}),n})(),Mee=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[qn,KM,KM,vee,qn]}),n})();function See(n,e){if(1&n&&(K(0,"mat-label"),Je(1),J()),2&n){const t=be(2);j(1),$i(t.resource.name)}}function Cee(n,e){if(1&n){const t=Wi();K(0,"mat-form-field",1),_e(1,See,2,1,"mat-label",2),K(2,"input",3),ct("ngModelChange",function(r){return Dn(t),In(be().resource.data=r)})("change",function(){return Dn(t),In(be().changed.emit())}),J()()}if(2&n){const t=be();z("matTooltip",t.resourceDescription),j(1),z("ngIf",t.resource.name),j(1),z("max",t.resource.schema.max_value)("min",t.resource.schema.min_value)("step",t.resource.schema.value_interval)("disabled",t.disabled||void 0!==t.resource.schema.required_value)("ngModel",t.resource.data)}}let Eee=(()=>{class n{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new it}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=ht({type:n,selectors:[["app-integer-block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:1,vars:1,consts:[["appearance","fill","matTooltipPosition","above",3,"matTooltip",4,"ngIf"],["appearance","fill","matTooltipPosition","above",3,"matTooltip"],[4,"ngIf"],["matInput","","type","number",3,"max","min","step","disabled","ngModel","ngModelChange","change"]],template:function(t,i){1&t&&_e(0,Cee,3,7,"mat-form-field",0),2&t&&z("ngIf",i.resource)},dependencies:[gi,Wc,wm,eu,Cm,Sm,tu,nu,xa,Em,_s],changeDetection:0}),n})();function Aee(n,e){if(1&n&&(K(0,"mat-label"),Je(1),J()),2&n){const t=be(2);j(1),$i(t.resource.name)}}function Tee(n,e){if(1&n){const t=Wi();K(0,"mat-form-field",1),_e(1,Aee,2,1,"mat-label",2),K(2,"input",3),ct("ngModelChange",function(r){return Dn(t),In(be().resource.data=r)})("change",function(){return Dn(t),In(be().changed.emit())}),J()()}if(2&n){const t=be();z("matTooltip",t.resourceDescription),j(1),z("ngIf",t.resource.name),j(1),z("disabled",t.disabled||void 0!==t.resource.schema.required_value)("maxlength",t.maxLength)("minlength",t.minLength)("ngModel",t.resource.data)}}let Dee=(()=>{class n{constructor(){this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new it,this.minLength=null,this.maxLength=null}get resource(){return this._resource}set resource(t){this._resource=t,isNaN(+this._resource?.schema.length)||(this.minLength=this.maxLength=+this._resource?.schema.length)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=ht({type:n,selectors:[["app-string-block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:1,vars:1,consts:[["appearance","fill","matTooltipPosition","above",3,"matTooltip",4,"ngIf"],["appearance","fill","matTooltipPosition","above",3,"matTooltip"],[4,"ngIf"],["matInput","","type","text",3,"disabled","maxlength","minlength","ngModel","ngModelChange","change"]],template:function(t,i){1&t&&_e(0,Tee,3,6,"mat-form-field",0),2&t&&z("ngIf",i.resource)},dependencies:[gi,Wc,eu,nR,iR,tu,nu,xa,Em,_s],changeDetection:0}),n})();const $l=(n,e)=>n+(n.includes("__")?"/":"__")+e,Ph=function(){return[]};function Iee(n,e){if(1&n&&(K(0,"mat-panel-description"),Je(1," Click to view items ("),K(2,"b"),Je(3),J(),Je(4,") "),J()),2&n){const t=be(2);j(3),$i((t.resourceData||Xs(1,Ph)).length)}}function Ree(n,e){1&n&&(K(0,"mat-panel-description"),Je(1," Empty array "),J())}function Pee(n,e){}function kee(n,e){if(1&n){const t=Wi();K(0,"mat-expansion-panel",4),ct("opened",function(){return Dn(t),In(be().onContentsTrigger(!0))})("closed",function(){return Dn(t),In(be().onContentsTrigger(!1))}),K(1,"mat-expansion-panel-header",5)(2,"mat-panel-title"),Je(3),J(),_e(4,Iee,5,2,"mat-panel-description",1),_e(5,Ree,2,0,"mat-panel-description",1),J(),_e(6,Pee,0,0,"ng-template",6),J()}if(2&n){const t=be(),i=Vr(3);j(1),z("matTooltip",t.resourceDescription),j(2),nr(" ",t.name," "),j(1),z("ngIf",(t.resourceData||Xs(5,Ph)).length>0),j(1),z("ngIf",0==(t.resourceData||Xs(6,Ph)).length),j(1),z("ngTemplateOutlet",i)}}function Oee(n,e){}function Lee(n,e){if(1&n&&(uo(0),K(1,"h2",5),Je(2),J(),K(3,"div",7),_e(4,Oee,0,0,"ng-template",6),J(),ho()),2&n){const t=be(),i=Vr(3);j(1),z("matTooltip",t.resourceDescription),j(1),$i(t.name),j(2),z("ngTemplateOutlet",i)}}function Fee(n,e){}function Nee(n,e){if(1&n&&Fe(0,"app-editor",10),2&n){const t=be().$implicit,i=be(3);z("resource",i.children[i.pageIndex*i.pageSize+t])("disabled",i.disabled)}}function Bee(n,e){if(1&n&&(uo(0),_e(1,Nee,1,2,"app-editor",9),ho()),2&n){const t=e.$implicit,i=be(3);j(1),z("ngIf",i.pageIndex*i.pageSize+t0)}let oR=(()=>{class n{constructor(t,i){this.main=t,this.cdr=i,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new it,this.showAsCollapsable=!1,this.renderContents=!1,this.minPageSize=10,this.pageIndex=0,this.pageSize=0,this.pageSizeOptions=[10,25,50,100],this.children=[],this.renderIndexes=[],this.goToIndex=0,this.pageIndexes=[],this.destroyed$=new Ue}set resource(t){this._resource=t,this.showAsCollapsable=this._resource?.data?.length>5,this.buildChildren(),this.renderPage(0,this.minPageSize),this.updatePageIndexes()}get resource(){return this._resource}get resourceData(){return this._resource?.data}buildChildren(){this.children=(this.resourceData||[]).map((t,i)=>({id:$l(this._resource.id,i),name:""+i,data:t,schema:this._resource.schema.child_schema}))}get schema(){return this._resource?.schema}get name(){return this._resource?.name||null}ngAfterViewInit(){var t=this;this.main.dataBlockChange$.pipe(et(this.destroyed$),On(([i,r])=>!!this.resource&&i.startsWith(this.resource.id)&&!i.substring(this.resource.id.length+1).includes("/"))).subscribe(function(){var i=xt(function*([r,s]){const o=r.substring(t.resource.id.length+1);t.resourceData[+o]=s});return function(r){return i.apply(this,arguments)}}())}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}onContentsTrigger(t){void 0!==this.contentsTimeout&&(clearTimeout(this.contentsTimeout),this.contentsTimeout=void 0),t?(this.renderContents=!0,this.cdr.markForCheck()):this.contentsTimeout=setTimeout(()=>{this.contentsTimeout=void 0,this.renderContents=!1,this.cdr.markForCheck()},2e3)}renderPage(t,i){this.pageSize!==i&&(this.renderIndexes=new Array(i).fill(null).map((r,s)=>s)),this.goToIndex=this.pageIndex=t,this.pageSize=i,this.cdr.markForCheck()}updatePageIndexes(){this.goToIndex=this.pageIndex,this.pageIndexes=[];for(let t=0;t{class n{constructor(t,i){this.eelDelegate=t,this.main=i,this._resource$=new Ct(null),this.imageUrl$=new Ct(null),this.destroyed$=new Ue,this.changed=new it}set resource(t){this._resource$.next(t)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var t=this;return xt(function*(){t._resource$.pipe(et(t.destroyed$)).subscribe(function(){var i=xt(function*(r){if(r){const s=yield t.eelDelegate.serializeResource(r.id);t.imageUrl$.next(s.find(o=>o.endsWith(".png"))||null)}else t.imageUrl$.next(null)});return function(r){return i.apply(this,arguments)}}())})()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return n.\u0275fac=function(t){return new(t||n)(D(Hc),D(il))},n.\u0275cmp=ht({type:n,selectors:[["app-bitmap-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:8,consts:[[3,"resource","fieldBlacklist"],[3,"src",4,"ngIf"],[3,"src"]],template:function(t,i){1&t&&(Fe(0,"app-compound-block-ui",0),zt(1,"async"),_e(2,Xee,2,3,"img",1),zt(3,"async")),2&t&&(z("resource",Xt(1,3,i._resource$))("fieldBlacklist",Xs(7,qee)),j(2),z("ngIf",Xt(3,5,i.imageUrl$)))},dependencies:[gi,Gc,Vl],styles:["[_nghost-%COMP%]{width:100%;display:flex;justify-content:center;flex-direction:column;align-items:center;row-gap:1rem}img[_ngcontent-%COMP%]{min-width:10rem;max-width:100%;max-height:25rem;object-fit:contain;background-image:linear-gradient(45deg,#808080 25%,transparent 25%),linear-gradient(-45deg,#808080 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#808080 75%),linear-gradient(-45deg,transparent 75%,#808080 75%);background-size:16px 16px;background-color:#aaa}"],changeDetection:0}),n})();const Kee=function(n){return{"background-color":n}};function Zee(n,e){if(1&n&&Fe(0,"div",3),2&n){const t=e.$implicit,i=e.index,r=be();z("ngStyle",pw(2,Kee,"#"+r.lpad(t.toString(16),"0",8)))("matTooltip",i+": #"+t.toString(16))}}const Qee=function(){return["colors"]};let Jee=(()=>{class n{constructor(){this.resource=null,this.changed=new it}get resourceData(){return this.resource?.data}lpad(t,i,r){for(;t.length{class n{constructor(t){this.cdr=t,this._resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new it,this.editorProps={showHeader:!1,height:"10rem",readonly:!1}}get resource(){return this._resource}set resource(t){this._resource=t,this.editor&&(this.editorProps.data=t?new Uint8Array(t.data):void 0,this.editorProps.height=Math.min(24,1.5*Math.ceil((t?.data||[]).length/8))+"rem",this.editor.$set({props:this.editorProps}),this.cdr.markForCheck())}ngAfterViewInit(){this.resource&&(this.editorProps.data=new Uint8Array(this.resource.data),this.editorProps.height=Math.min(24,1.5*Math.ceil(this.resource.data.length/8))+"rem"),this.editor=new HexEditor({target:this.editorDiv?.nativeElement,props:this.editorProps}),this.cdr.markForCheck()}ngOnDestroy(){this.editor&&this.editor.$destroy()}}return n.\u0275fac=function(t){return new(t||n)(D(ci))},n.\u0275cmp=ht({type:n,selectors:[["app-binary-block-ui"]],viewQuery:function(t,i){if(1&t&&oi(ete,5),2&t){let r;Lt(r=Ft())&&(i.editorDiv=r.first)}},inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:4,vars:2,consts:[["matTooltipPosition","above",3,"matTooltip"],["editor",""]],template:function(t,i){1&t&&(K(0,"h2",0),Je(1),J(),Fe(2,"div",null,1)),2&t&&(z("matTooltip",i.resourceDescription),j(1),$i(null==i.resource?null:i.resource.name))},dependencies:[_s],changeDetection:0}),n})();const nte=["picker"];function ite(n,e){if(1&n&&(K(0,"mat-label",8),Je(1),J()),2&n){const t=be();j(1),$i(null==t.resource?null:t.resource.name)}}const rte=function(n){return{transform:n}};let ste=(()=>{class n{constructor(t){this.cdr=t,this.resource=null,this.resourceDescription="",this.changed=new it,this.pi=Math.PI,this.dragging=!1}mousedown(t){this.dragging=!0,this.updateRotation(t)}mousemove(t){this.dragging&&this.updateRotation(t)}mouseout(){this.dragging=!1}updateRotation(t){const i=this.picker.nativeElement.getBoundingClientRect();let r=Math.atan2(t.clientY-i.top-i.height/2,t.clientX-i.left-i.width/2);t.shiftKey&&(r=15*Math.round(180*r/Math.PI/15)*Math.PI/180),this.resource.data=r,this.changed.emit(),this.cdr.markForCheck()}}return n.\u0275fac=function(t){return new(t||n)(D(ci))},n.\u0275cmp=ht({type:n,selectors:[["app-angle-block-ui"]],viewQuery:function(t,i){if(1&t&&oi(nte,5),2&t){let r;Lt(r=Ft())&&(i.picker=r.first)}},hostBindings:function(t,i){1&t&&ct("mousedown",function(s){return i.mousedown(s)})("mousemove",function(s){return i.mousemove(s)})("mouseup",function(){return i.mouseout()})("mouseleave",function(){return i.mouseout()})},inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},decls:14,vars:13,consts:[["id","wrapper","matTooltipPosition","above",3,"matTooltip"],[1,"circle-container"],["picker",""],[1,"ui-anglepicker-pointer",3,"ngStyle"],[1,"ui-anglepicker-dot"],[1,"ui-anglepicker-line"],["id","labels"],["id","name-span",4,"ngIf"],["id","name-span"]],template:function(t,i){1&t&&(K(0,"div",0)(1,"div",1,2)(3,"div",3),Fe(4,"div",4)(5,"div",5),J()(),K(6,"div",6),_e(7,ite,2,1,"mat-label",7),K(8,"mat-label"),Je(9),zt(10,"number"),J(),K(11,"mat-label"),Je(12),zt(13,"number"),J()()()),2&t&&(z("matTooltip",i.resourceDescription),j(3),z("ngStyle",pw(11,rte,"rotate("+((null==i.resource?null:i.resource.data)||0)+"rad)")),j(4),z("ngIf",null==i.resource?null:i.resource.name),j(2),nr("",b1(10,5,180*(null==i.resource?null:i.resource.data)/i.pi||0,"1.2-2")," deg"),j(3),nr("",b1(13,8,(null==i.resource?null:i.resource.data)||0,"1.2-2")," rad"))},dependencies:[gi,Ow,xa,_s,H2],styles:["#wrapper[_ngcontent-%COMP%]{display:flex;padding-bottom:1.34375em}#name-span[_ngcontent-%COMP%]{font-weight:500}.circle-container[_ngcontent-%COMP%]{width:52px;height:52px;background:rgba(0,0,0,.04);border:1px solid rgba(0,0,0,.6);border-radius:50%;position:relative;display:inline-block}.circle-container[_ngcontent-%COMP%] .ui-anglepicker-pointer[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;width:50%;margin:-2px 0 0 -2px;transform-origin:2px 2px}.circle-container[_ngcontent-%COMP%] .ui-anglepicker-pointer[_ngcontent-%COMP%] .ui-anglepicker-dot[_ngcontent-%COMP%]{height:4px;width:4px;position:absolute;background:#838383;border-radius:50%}.circle-container[_ngcontent-%COMP%] .ui-anglepicker-pointer[_ngcontent-%COMP%] .ui-anglepicker-line[_ngcontent-%COMP%]{margin-top:1.5px;margin-right:-2px;height:1px;background:#838383}#labels[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-left:1rem;min-width:6rem}"],changeDetection:0}),n})();class BV{constructor(){}deepEquals(e,t){if(null===e&&null!==t)return!1;if(null===t&&null!==e)return!1;if(!0===Array.isArray(e)){if(!1===Array.isArray(t))return!1;if(e.length!==t.length)return!1;{const i=new Set,r=new Set,s=new Set,o=new Set;for(const h of e)!0===Array.isArray(h)?i.add(h):"object"==typeof h?r.add(h):"function"==typeof h?o.add(JSON.stringify(""+h)):s.add(h);const a=new Set,l=new Set,c=new Set,u=new Set;for(const h of t)!0===Array.isArray(h)?a.add(h):"object"==typeof h?l.add(h):"function"==typeof h?u.add(JSON.stringify(""+h)):c.add(h);if(s.size!==c.size)return!1;{let h=!0;for(const p of s)if(!1===c.has(p)){h=!1;break}if(!1===h)return!1;if(r.size===l.size){h=!0;for(const p of r){let m=!1;for(const g of l)if(!0===this.deepEquals(p,g)){m=!0;break}if(!1===m){h=!1;break}}if(!1===h)return!1;if(i.size===a.size){h=!0;for(const p of i){let m=!1;for(const g of a)if(!0===this.deepEquals(p,g)){m=!0;break}if(!1===m){h=!1;break}}if(!1===h)return!1;if(o.size===u.size){h=!0;for(const p of o)if(!1===u.has(p)){h=!1;break}return!1!==h}return!1}return!1}return!1}}}if("object"==typeof e&&null!==e){if("object"!=typeof t)return!1;{let i=!0;if(Object.keys(e).length===Object.keys(t).length){for(const[r,s]of Object.entries(e))if(i=this.deepEquals(s,t[r]),!1===i)break}else i=!1;return i}}return!0!==Array.isArray(t)&&("object"!=typeof t||null===t)&&("function"==typeof e?"function"==typeof t&&JSON.stringify(""+e)===JSON.stringify(""+t):JSON.stringify(e)===JSON.stringify(t))}}function ote(n,e){if(1&n&&(K(0,"mat-list-option",3),Je(1),J()),2&n){const t=e.$implicit,i=be();z("value",t)("selected",i.selectedValue==t),j(1),nr(" ",t," ")}}function ate(n,e){if(1&n&&(K(0,"mat-card"),Fe(1,"app-editor",4),J()),2&n){const t=be();j(1),z("resource",t.resources[t.selectedValue])}}let ZM=(()=>{class n{constructor(t){this.deep=t,this._resources={},this._selectedValue=null}get resources(){return this._resources}set resources(t){const i=!this._resources||!this.deep.deepEquals(Object.keys(this._resources),Object.keys(t));this._resources=t,i&&(this.selectedValue=Object.keys(t).length>0?Object.keys(t)[0]:null)}set selectedValue(t){this._selectedValue=t}get selectedValue(){return this._selectedValue}get keys(){return Object.keys(this.resources)}}return n.\u0275fac=function(t){return new(t||n)(D(BV))},n.\u0275cmp=ht({type:n,selectors:[["app-sidenav-res-list"]],inputs:{resources:"resources"},decls:3,vars:3,consts:[[3,"multiple","selectionChange"],[3,"value","selected",4,"ngFor","ngForOf"],[4,"ngIf"],[3,"value","selected"],[3,"resource"]],template:function(t,i){1&t&&(K(0,"mat-selection-list",0),ct("selectionChange",function(s){return i.selectedValue=s.source.selectedOptions.selected[0].value}),_e(1,ote,2,3,"mat-list-option",1),J(),_e(2,ate,2,1,"mat-card",2)),2&t&&(z("multiple",!1),j(1),z("ngForOf",i.keys),j(1),z("ngIf",i.selectedValue))},styles:["[_nghost-%COMP%]{display:flex;align-items:flex-start;column-gap:1rem;height:inherit;scroll-snap-align:start;scroll-margin:.5rem}[_nghost-%COMP%] mat-selection-list[_ngcontent-%COMP%]{height:100%;max-height:calc(100vh - 54px - 1rem);overflow-y:auto;max-width:33%;flex-shrink:0;padding:0}[_nghost-%COMP%] mat-selection-list[_ngcontent-%COMP%] mat-list-option[aria-selected=true][_ngcontent-%COMP%]{background-color:#e0e0e0}[_nghost-%COMP%] mat-selection-list[_ngcontent-%COMP%] mat-list-option[aria-selected=true][_ngcontent-%COMP%]:focus{background-color:unset}[_nghost-%COMP%] mat-selection-list[_ngcontent-%COMP%] .mdc-radio{display:none}[_nghost-%COMP%] mat-card[_ngcontent-%COMP%]{width:100%;height:100%;padding:1rem}"],changeDetection:0}),n})(),lte=(()=>{class n{constructor(){this._resource=null,this.resourceMap={},this.changed=new it}get resource(){return this._resource}set resource(t){this._resource=t,this.resourceMap={};const i=(this._resource?.schema.fields||[]).find(r=>"children"===r.name)?.schema.child_schema;if(i)for(let r=0;rthis._markSelected(s)):this._markSelected(t[0]),this._selectedToEmit.length=0)}select(...e){this._verifyValueAssignment(e),e.forEach(i=>this._markSelected(i));const t=this._hasQueuedChanges();return this._emitChangeEvent(),t}deselect(...e){this._verifyValueAssignment(e),e.forEach(i=>this._unmarkSelected(i));const t=this._hasQueuedChanges();return this._emitChangeEvent(),t}setSelection(...e){this._verifyValueAssignment(e);const t=this.selected,i=new Set(e);e.forEach(s=>this._markSelected(s)),t.filter(s=>!i.has(s)).forEach(s=>this._unmarkSelected(s));const r=this._hasQueuedChanges();return this._emitChangeEvent(),r}toggle(e){return this.isSelected(e)?this.deselect(e):this.select(e)}clear(e=!0){this._unmarkAll();const t=this._hasQueuedChanges();return e&&this._emitChangeEvent(),t}isSelected(e){return this._selection.has(this._getConcreteValue(e))}isEmpty(){return 0===this._selection.size}hasValue(){return!this.isEmpty()}sort(e){this._multiple&&this.selected&&this._selected.sort(e)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(e){e=this._getConcreteValue(e),this.isSelected(e)||(this._multiple||this._unmarkAll(),this.isSelected(e)||this._selection.add(e),this._emitChanges&&this._selectedToEmit.push(e))}_unmarkSelected(e){e=this._getConcreteValue(e),this.isSelected(e)&&(this._selection.delete(e),this._emitChanges&&this._deselectedToEmit.push(e))}_unmarkAll(){this.isEmpty()||this._selection.forEach(e=>this._unmarkSelected(e))}_verifyValueAssignment(e){}_hasQueuedChanges(){return!(!this._deselectedToEmit.length&&!this._selectedToEmit.length)}_getConcreteValue(e){if(this.compareWith){for(let t of this._selection)if(this.compareWith(e,t))return t;return e}return e}}let UV=(()=>{class n{constructor(){this._listeners=[]}notify(t,i){for(let r of this._listeners)r(t,i)}listen(t){return this._listeners.push(t),()=>{this._listeners=this._listeners.filter(i=>t!==i)}}ngOnDestroy(){this._listeners=[]}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const cte=["trigger"],dte=["panel"];function ute(n,e){if(1&n&&(K(0,"span",10),Je(1),J()),2&n){const t=be();j(1),$i(t.placeholder)}}function hte(n,e){if(1&n&&(K(0,"span",14),Je(1),J()),2&n){const t=be(2);j(1),$i(t.triggerValue)}}function fte(n,e){1&n&&Kt(0,0,["*ngSwitchCase","true"])}function pte(n,e){1&n&&(K(0,"span",11),_e(1,hte,2,1,"span",12),_e(2,fte,1,0,"ng-content",13),J()),2&n&&(z("ngSwitch",!!be().customTrigger),j(2),z("ngSwitchCase",!0))}function mte(n,e){if(1&n){const t=Wi();Lr(),es(),K(0,"div",15,16),ct("@transformPanel.done",function(r){return Dn(t),In(be()._panelDoneAnimatingStream.next(r.toState))})("keydown",function(r){return Dn(t),In(be()._handleKeydown(r))}),Kt(2,1),J()}if(2&n){const t=be();bL("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",t._getPanelTheme(),""),z("ngClass",t.panelClass)("@transformPanel","showing"),Vt("id",t.id+"-panel")("aria-multiselectable",t.multiple)("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby())}}const gte=[[["mat-select-trigger"]],"*"],_te=["mat-select-trigger","*"],vte={transformPanelWrap:Gl("transformPanelWrap",[Ks("* => void",wI("@transformPanel",[xI()],{optional:!0}))]),transformPanel:Gl("transformPanel",[_o("void",Ci({opacity:0,transform:"scale(1, 0.8)"})),Ks("void => showing",go("120ms cubic-bezier(0, 0, 0.2, 1)",Ci({opacity:1,transform:"scale(1, 1)"}))),Ks("* => void",go("100ms linear",Ci({opacity:0})))])};let VV=0;const zV=new ge("mat-select-scroll-strategy"),bte=new ge("MAT_SELECT_CONFIG"),xte={provide:zV,deps:[mo],useFactory:function yte(n){return()=>n.scrollStrategies.reposition()}},wte=new ge("MatSelectTrigger");class Mte{constructor(e,t){this.source=e,this.value=t}}const Ste=vI(xU(TM(wU(class{constructor(n,e,t,i,r){this._elementRef=n,this._defaultErrorStateMatcher=e,this._parentForm=t,this._parentFormGroup=i,this.ngControl=r,this.stateChanges=new Ue}}))));let Cte=(()=>{class n extends Ste{get focused(){return this._focused||this._panelOpen}get placeholder(){return this._placeholder}set placeholder(t){this._placeholder=t,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(FI.required)??!1}set required(t){this._required=Cn(t),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(t){this._multiple=Cn(t)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(t){this._disableOptionCentering=Cn(t)}get compareWith(){return this._compareWith}set compareWith(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(t){this._assignValue(t)&&this._onChange(t)}get typeaheadDebounceInterval(){return this._typeaheadDebounceInterval}set typeaheadDebounceInterval(t){this._typeaheadDebounceInterval=Ys(t)}get id(){return this._id}set id(t){this._id=t||this._uid,this.stateChanges.next()}constructor(t,i,r,s,o,a,l,c,u,h,p,m,g,b){super(o,s,l,c,h),this._viewportRuler=t,this._changeDetectorRef=i,this._ngZone=r,this._dir=a,this._parentFormField=u,this._liveAnnouncer=g,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(y,v)=>y===v,this._uid="mat-select-"+VV++,this._triggerAriaLabelledBy=null,this._destroy=new Ue,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+VV++,this._panelDoneAnimatingStream=new Ue,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this._multiple=!1,this._disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.optionSelectionChanges=jv(()=>{const y=this.options;return y?y.changes.pipe(No(y),gs(()=>cs(...y.map(v=>v.onSelectionChange)))):this._ngZone.onStable.pipe(Li(1),gs(()=>this.optionSelectionChanges))}),this.openedChange=new it,this._openedStream=this.openedChange.pipe(On(y=>y),Ye(()=>{})),this._closedStream=this.openedChange.pipe(On(y=>!y),Ye(()=>{})),this.selectionChange=new it,this.valueChange=new it,this.ngControl&&(this.ngControl.valueAccessor=this),null!=b?.typeaheadDebounceInterval&&(this._typeaheadDebounceInterval=b.typeaheadDebounceInterval),this._scrollStrategyFactory=m,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(p)||0,this.id=this.id}ngOnInit(){this._selectionModel=new aR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(qd(),et(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(et(this._destroy)).subscribe(t=>{t.added.forEach(i=>i.select()),t.removed.forEach(i=>i.deselect())}),this.options.changes.pipe(No(null),et(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){const t=this._getTriggerAriaLabelledby(),i=this.ngControl;if(t!==this._triggerAriaLabelledBy){const r=this._elementRef.nativeElement;this._triggerAriaLabelledBy=t,t?r.setAttribute("aria-labelledby",t):r.removeAttribute("aria-labelledby")}i&&(this._previousControl!==i.control&&(void 0!==this._previousControl&&null!==i.disabled&&i.disabled!==this.disabled&&(this.disabled=i.disabled),this._previousControl=i.control),this.updateErrorState())}ngOnChanges(t){(t.disabled||t.userAriaDescribedBy)&&this.stateChanges.next(),t.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck())}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}writeValue(t){this._assignValue(t)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){const t=this._selectionModel.selected.map(i=>i.viewValue);return this._isRtl()&&t.reverse(),t.join(", ")}return this._selectionModel.selected[0].viewValue}_isRtl(){return!!this._dir&&"rtl"===this._dir.value}_handleKeydown(t){this.disabled||(this.panelOpen?this._handleOpenKeydown(t):this._handleClosedKeydown(t))}_handleClosedKeydown(t){const i=t.keyCode,r=40===i||38===i||37===i||39===i,s=13===i||32===i,o=this._keyManager;if(!o.isTyping()&&s&&!nl(t)||(this.multiple||t.altKey)&&r)t.preventDefault(),this.open();else if(!this.multiple){const a=this.selected;o.onKeydown(t);const l=this.selected;l&&a!==l&&this._liveAnnouncer.announce(l.viewValue,1e4)}}_handleOpenKeydown(t){const i=this._keyManager,r=t.keyCode,s=40===r||38===r,o=i.isTyping();if(s&&t.altKey)t.preventDefault(),this.close();else if(o||13!==r&&32!==r||!i.activeItem||nl(t))if(!o&&this._multiple&&65===r&&t.ctrlKey){t.preventDefault();const a=this.options.some(l=>!l.disabled&&!l.selected);this.options.forEach(l=>{l.disabled||(a?l.select():l.deselect())})}else{const a=i.activeItemIndex;i.onKeydown(t),this._multiple&&s&&t.shiftKey&&i.activeItem&&i.activeItemIndex!==a&&i.activeItem._selectViaInteraction()}else t.preventDefault(),i.activeItem._selectViaInteraction()}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(Li(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(t){if(this.options.forEach(i=>i.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&t)Array.isArray(t),t.forEach(i=>this._selectOptionByValue(i)),this._sortValues();else{const i=this._selectOptionByValue(t);i?this._keyManager.updateActiveItem(i):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(t){const i=this.options.find(r=>{if(this._selectionModel.isSelected(r))return!1;try{return null!=r.value&&this._compareWith(r.value,t)}catch{return!1}});return i&&this._selectionModel.select(i),i}_assignValue(t){return!!(t!==this._value||this._multiple&&Array.isArray(t))&&(this.options&&this._setSelectionByValue(t),this._value=t,!0)}_initKeyManager(){this._keyManager=new tK(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){const t=cs(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(et(t)).subscribe(i=>{this._onSelect(i.source,i.isUserInput),i.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),cs(...this.options.map(i=>i._stateChanges)).pipe(et(t)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(t,i){const r=this._selectionModel.isSelected(t);null!=t.value||this._multiple?(r!==t.selected&&(t.selected?this._selectionModel.select(t):this._selectionModel.deselect(t)),i&&this._keyManager.setActiveItem(t),this.multiple&&(this._sortValues(),i&&this.focus())):(t.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(t.value)),r!==this._selectionModel.isSelected(t)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){const t=this.options.toArray();this._selectionModel.sort((i,r)=>this.sortComparator?this.sortComparator(i,r,t):t.indexOf(i)-t.indexOf(r)),this.stateChanges.next()}}_propagateChanges(t){let i=null;i=this.multiple?this.selected.map(r=>r.value):this.selected?this.selected.value:t,this._value=i,this.valueChange.emit(i),this._onChange(i),this.selectionChange.emit(this._getChangeEvent(i)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0}focus(t){this._elementRef.nativeElement.focus(t)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;const t=this._parentFormField?.getLabelId();return this.ariaLabelledby?(t?t+" ":"")+this.ariaLabelledby:t}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;const t=this._parentFormField?.getLabelId();let i=(t?t+" ":"")+this._valueId;return this.ariaLabelledby&&(i+=" "+this.ariaLabelledby),i}_panelDoneAnimating(t){this.openedChange.emit(t)}setDescribedByIds(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this._panelOpen||!this.empty||this._focused&&!!this._placeholder}}return n.\u0275fac=function(t){return new(t||n)(D(gM),D(ci),D(pt),D(MU),D(yt),D(tl,8),D(Py,8),D(Mm,8),D(sR,8),D(Wl,10),Ua("tabindex"),D(zV),D(pI),D(bte,8))},n.\u0275dir=Ae({type:n,viewQuery:function(t,i){if(1&t&&(oi(cte,5),oi(dte,5),oi(QB,5)),2&t){let r;Lt(r=Ft())&&(i.trigger=r.first),Lt(r=Ft())&&(i.panel=r.first),Lt(r=Ft())&&(i._overlayDir=r.first)}},inputs:{userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:"typeaheadDebounceInterval",sortComparator:"sortComparator",id:"id"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},features:[ft,zi]}),n})(),Oy=(()=>{class n extends Cte{constructor(){super(...arguments),this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}ngOnInit(){super.ngOnInit(),this._viewportRuler.change().pipe(et(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(),this._changeDetectorRef.detectChanges())})}ngAfterViewInit(){this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin())}open(){this._overlayWidth=this._getOverlayWidth(),super.open(),this.stateChanges.next()}close(){super.close(),this.stateChanges.next()}_scrollOptionIntoView(t){const i=this.options.toArray()[t];if(i){const r=this.panel.nativeElement,s=function jK(n,e,t){if(t.length){let i=e.toArray(),r=t.toArray(),s=0;for(let o=0;ot+i?Math.max(0,n-i+e):t}(o.offsetTop,o.offsetHeight,r.scrollTop,r.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(t){return new Mte(this,t)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof oI?this._preferredOverlayOrigin.elementRef:this._preferredOverlayOrigin||this._elementRef).nativeElement.getBoundingClientRect().width}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=Cn(t),this._syncParentProperties()}_syncParentProperties(){if(this.options)for(const t of this.options)t._changeDetectorRef.markForCheck()}}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275cmp=ht({type:n,selectors:[["mat-select"]],contentQueries:function(t,i,r){if(1&t&&(Xi(r,wte,5),Xi(r,vm,5),Xi(r,RU,5)),2&t){let s;Lt(s=Ft())&&(i.customTrigger=s.first),Lt(s=Ft())&&(i.options=s),Lt(s=Ft())&&(i.optionGroups=s)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(t,i){1&t&&ct("keydown",function(s){return i._handleKeydown(s)})("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()}),2&t&&(Vt("id",i.id)("tabindex",i.tabIndex)("aria-controls",i.panelOpen?i.id+"-panel":null)("aria-expanded",i.panelOpen)("aria-label",i.ariaLabel||null)("aria-required",i.required.toString())("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-activedescendant",i._getAriaActiveDescendant()),Pn("mat-mdc-select-disabled",i.disabled)("mat-mdc-select-invalid",i.errorState)("mat-mdc-select-required",i.required)("mat-mdc-select-empty",i.empty)("mat-mdc-select-multiple",i.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",hideSingleSelectionIndicator:"hideSingleSelectionIndicator"},exportAs:["matSelect"],features:[Hn([{provide:rR,useExisting:n},{provide:IU,useExisting:n}]),ft],ngContentSelectors:_te,decls:11,vars:11,consts:[["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],[1,"mat-mdc-select-value",3,"ngSwitch"],["class","mat-mdc-select-placeholder mat-mdc-select-min-line",4,"ngSwitchCase"],["class","mat-mdc-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","backdropClick","attach","detach"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text",3,"ngSwitch"],["class","mat-mdc-select-min-line",4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(t,i){if(1&t&&(Cr(gte),K(0,"div",0,1),ct("click",function(){return i.toggle()}),K(3,"div",2),_e(4,ute,2,1,"span",3),_e(5,pte,3,2,"span",4),J(),K(6,"div",5)(7,"div",6),Lr(),K(8,"svg",7),Fe(9,"path",8),J()()()(),_e(10,mte,3,9,"ng-template",9),ct("backdropClick",function(){return i.close()})("attach",function(){return i._onAttached()})("detach",function(){return i.close()})),2&t){const r=Vr(1);Vt("aria-owns",i.panelOpen?i.id+"-panel":null),j(3),z("ngSwitch",i.empty),Vt("id",i._valueId),j(1),z("ngSwitchCase",!0),j(1),z("ngSwitchCase",!1),j(5),z("cdkConnectedOverlayPanelClass",i._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",i._scrollStrategy)("cdkConnectedOverlayOrigin",i._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",i.panelOpen)("cdkConnectedOverlayPositions",i._positions)("cdkConnectedOverlayWidth",i._overlayWidth)}},dependencies:[Bv,Uv,aD,B2,QB,oI],styles:['.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}.mat-mdc-select{display:inline-block;width:100%;outline:none}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:translateY(-8px)}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-select-arrow{width:10px;height:5px;position:relative}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}.mdc-menu-surface.mat-mdc-select-panel{width:100%;max-height:275px;position:static;outline:0;margin:0;padding:8px 0;list-style-type:none}.mdc-menu-surface.mat-mdc-select-panel:focus{outline:none}.cdk-high-contrast-active .mdc-menu-surface.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) .mdc-menu-surface.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above .mdc-menu-surface.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}'],encapsulation:2,data:{animation:[vte.transformPanel]},changeDetection:0}),n})(),HV=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({providers:[xte],imports:[va,pm,bI,qn,my,KM,bI,qn]}),n})();function Ete(n,e){if(1&n&&(K(0,"mat-label"),Je(1),J()),2&n){const t=be(3);j(1),$i(t.resource.name)}}function Ate(n,e){if(1&n&&(K(0,"mat-option",6),Je(1),J()),2&n){const t=e.$implicit,i=be(3);z("value",t[1])("disabled",i.disabled),j(1),nr(" ",t[1]," ")}}function Tte(n,e){if(1&n){const t=Wi();K(0,"mat-form-field",3),_e(1,Ete,2,1,"mat-label",0),K(2,"mat-select",4),ct("valueChange",function(r){return Dn(t),In(be(2).resource.data=r)})("selectionChange",function(){return Dn(t),In(be(2).changed.emit())}),_e(3,Ate,2,3,"mat-option",5),J()()}if(2&n){const t=be(2);z("matTooltip",t.resourceDescription),j(1),z("ngIf",t.resource.name),j(1),z("value",t.resource.data)("disabled",t.disabled),j(1),z("ngForOf",t.resource.schema.enum_names)}}function Dte(n,e){if(1&n&&(K(0,"mat-label"),Je(1),J()),2&n){const t=be(3);j(1),$i(t.resource.name)}}function Ite(n,e){if(1&n){const t=Wi();K(0,"mat-form-field",3),_e(1,Dte,2,1,"mat-label",0),K(2,"input",7),ct("ngModelChange",function(r){return Dn(t),In(be(2).resource.data=r)})("change",function(){return Dn(t),In(be(2).changed.emit())}),J()()}if(2&n){const t=be(2);z("matTooltip",t.resourceDescription),j(1),z("ngIf",t.resource.name),j(1),z("min",0)("max",256*(t.resource.schema.length||1)-1)("ngModel",t.resource.data)}}function Rte(n,e){if(1&n&&(uo(0),_e(1,Tte,4,5,"mat-form-field",1),_e(2,Ite,3,5,"ng-template",null,2,kc),ho()),2&n){const t=Vr(3),i=be();j(1),z("ngIf",i.isKnownEnumValue(i.resource.data))("ngIfElse",t)}}let Pte=(()=>{class n{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new it}isKnownEnumValue(t){return!!this.resource?.schema.enum_names.find(([i,r])=>r==t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=ht({type:n,selectors:[["app-enum-block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:1,vars:1,consts:[[4,"ngIf"],["appearance","fill","matTooltipPosition","above",3,"matTooltip",4,"ngIf","ngIfElse"],["unknownEnum",""],["appearance","fill","matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled","valueChange","selectionChange"],[3,"value","disabled",4,"ngFor","ngForOf"],[3,"value","disabled"],["matInput","","type","number",3,"min","max","ngModel","ngModelChange","change"]],template:function(t,i){1&t&&_e(0,Rte,4,2,"ng-container",0),2&t&&z("ngIf",i.resource)},dependencies:[Fo,gi,Wc,wm,eu,Cm,Sm,tu,nu,xa,Em,_s,Oy,vm],changeDetection:0}),n})();const kte=["*"],Lte=["unscopedContent"];function Fte(n,e){1&n&&Kt(0,4)}function Nte(n,e){if(1&n&&(K(0,"div",11),Fe(1,"input",12),K(2,"div",13),Lr(),K(3,"svg",14),Fe(4,"path",15),J(),es(),Fe(5,"div",16),J()()),2&n){const t=be();Pn("mdc-checkbox--disabled",t.disabled),j(1),z("checked",t.selected)("disabled",t.disabled)}}function Bte(n,e){if(1&n&&(K(0,"div",17),Fe(1,"input",18),K(2,"div",19),Fe(3,"div",20)(4,"div",21),J()()),2&n){const t=be();Pn("mdc-radio--disabled",t.disabled),j(1),z("checked",t.selected)("disabled",t.disabled)}}function Ute(n,e){}function Vte(n,e){if(1&n&&(K(0,"span",22),_e(1,Ute,0,0,"ng-template",23),J()),2&n){be();const t=Vr(3);j(1),z("ngTemplateOutlet",t)}}function zte(n,e){}function Hte(n,e){if(1&n&&(K(0,"span",24),_e(1,zte,0,0,"ng-template",23),J()),2&n){be();const t=Vr(5);j(1),z("ngTemplateOutlet",t)}}function Gte(n,e){}function Wte(n,e){1&n&&_e(0,Gte,0,0,"ng-template",23),2&n&&(be(),z("ngTemplateOutlet",Vr(1)))}function $te(n,e){}function jte(n,e){if(1&n&&(K(0,"span",25),_e(1,$te,0,0,"ng-template",23),J()),2&n){be();const t=Vr(3);j(1),z("ngTemplateOutlet",t)}}function Xte(n,e){}function qte(n,e){if(1&n&&(K(0,"span",25),_e(1,Xte,0,0,"ng-template",23),J()),2&n){be();const t=Vr(5);j(1),z("ngTemplateOutlet",t)}}function Yte(n,e){}function Kte(n,e){1&n&&_e(0,Yte,0,0,"ng-template",23),2&n&&(be(),z("ngTemplateOutlet",Vr(1)))}const Zte=[[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["mat-divider"]],[["","matListItemAvatar",""],["","matListItemIcon",""]]],Qte=["[matListItemTitle]","[matListItemLine]","*","mat-divider","[matListItemAvatar],[matListItemIcon]"],GV=new ge("ListOption");let Jte=(()=>{class n{constructor(t){this._elementRef=t}}return n.\u0275fac=function(t){return new(t||n)(D(yt))},n.\u0275dir=Ae({type:n,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]}),n})(),ene=(()=>{class n{constructor(t){this._elementRef=t}}return n.\u0275fac=function(t){return new(t||n)(D(yt))},n.\u0275dir=Ae({type:n,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]}),n})(),WV=(()=>{class n{constructor(t){this._listOption=t}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}}return n.\u0275fac=function(t){return new(t||n)(D(GV,8))},n.\u0275dir=Ae({type:n,hostVars:4,hostBindings:function(t,i){2&t&&Pn("mdc-list-item__start",i._isAlignedAtStart())("mdc-list-item__end",!i._isAlignedAtStart())}}),n})(),tne=(()=>{class n extends WV{}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275dir=Ae({type:n,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[ft]}),n})(),nne=(()=>{class n extends WV{}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275dir=Ae({type:n,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[ft]}),n})();const ine=new ge("MAT_LIST_CONFIG");let lR=(()=>{class n{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Ot(ine,{optional:!0})}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=Cn(t)}get disabled(){return this._disabled}set disabled(t){this._disabled=Cn(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,hostVars:1,hostBindings:function(t,i){2&t&&Vt("aria-disabled",i.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}}),n})(),$V=(()=>{class n{set lines(t){this._explicitLines=Ys(t,null),this._updateItemLines(!1)}get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(t){this._disableRipple=Cn(t)}get disabled(){return this._disabled||!!this._listBase?.disabled}set disabled(t){this._disabled=Cn(t)}get rippleDisabled(){return this.disableRipple||!!this.rippleConfig.disabled}constructor(t,i,r,s,o,a){this._elementRef=t,this._ngZone=i,this._listBase=r,this._platform=s,this._explicitLines=null,this._disableRipple=!1,this._disabled=!1,this._subscriptions=new un,this._rippleRenderer=null,this._hasUnscopedTextContent=!1,this.rippleConfig=o||{},this._hostElement=this._elementRef.nativeElement,this._isButtonElement="button"===this._hostElement.nodeName.toLowerCase(),this._noopAnimations="NoopAnimations"===a,r&&!r._isNonInteractive&&this._initInteractiveListItem(),this._isButtonElement&&!this._hostElement.hasAttribute("type")&&this._hostElement.setAttribute("type","button")}ngAfterViewInit(){this._monitorProjectedLinesAndTitle(),this._updateItemLines(!0)}ngOnDestroy(){this._subscriptions.unsubscribe(),null!==this._rippleRenderer&&this._rippleRenderer._removeTriggerEvents()}_hasIconOrAvatar(){return!(!this._avatars.length&&!this._icons.length)}_initInteractiveListItem(){this._hostElement.classList.add("mat-mdc-list-item-interactive"),this._rippleRenderer=new _m(this,this._ngZone,this._hostElement,this._platform),this._rippleRenderer.setupTriggerEvents(this._hostElement)}_monitorProjectedLinesAndTitle(){this._ngZone.runOutsideAngular(()=>{this._subscriptions.add(cs(this._lines.changes,this._titles.changes).subscribe(()=>this._updateItemLines(!1)))})}_updateItemLines(t){if(!this._lines||!this._titles||!this._unscopedContent)return;t&&this._checkDomForUnscopedTextContent();const i=this._explicitLines??this._inferLinesFromContent(),r=this._unscopedContent.nativeElement;if(this._hostElement.classList.toggle("mat-mdc-list-item-single-line",i<=1),this._hostElement.classList.toggle("mdc-list-item--with-one-line",i<=1),this._hostElement.classList.toggle("mdc-list-item--with-two-lines",2===i),this._hostElement.classList.toggle("mdc-list-item--with-three-lines",3===i),this._hasUnscopedTextContent){const s=0===this._titles.length&&1===i;r.classList.toggle("mdc-list-item__primary-text",s),r.classList.toggle("mdc-list-item__secondary-text",!s)}else r.classList.remove("mdc-list-item__primary-text"),r.classList.remove("mdc-list-item__secondary-text")}_inferLinesFromContent(){let t=this._titles.length+this._lines.length;return this._hasUnscopedTextContent&&(t+=1),t}_checkDomForUnscopedTextContent(){this._hasUnscopedTextContent=Array.from(this._unscopedContent.nativeElement.childNodes).filter(t=>t.nodeType!==t.COMMENT_NODE).some(t=>!(!t.textContent||!t.textContent.trim()))}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(pt),D(lR,8),D(Fi),D(yI,8),D(rs,8))},n.\u0275dir=Ae({type:n,contentQueries:function(t,i,r){if(1&t&&(Xi(r,tne,4),Xi(r,nne,4)),2&t){let s;Lt(s=Ft())&&(i._avatars=s),Lt(s=Ft())&&(i._icons=s)}},hostVars:4,hostBindings:function(t,i){2&t&&(Vt("aria-disabled",i.disabled)("disabled",i._isButtonElement&&i.disabled||null),Pn("mdc-list-item--disabled",i.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}}),n})();const jV=new ge("SelectionList");let QM=(()=>{class n extends $V{get checkboxPosition(){return this.togglePosition}set checkboxPosition(t){this.togglePosition=t}get color(){return this._color||this._selectionList.color}set color(t){this._color=t}get value(){return this._value}set value(t){this.selected&&t!==this.value&&this._inputsInitialized&&(this.selected=!1),this._value=t}get selected(){return this._selectionList.selectedOptions.isSelected(this)}set selected(t){const i=Cn(t);i!==this._selected&&(this._setSelected(i),(i||this._selectionList.multiple)&&this._selectionList._reportValueChange())}constructor(t,i,r,s,o,a,l){super(t,i,r,s,a,l),this._selectionList=r,this._changeDetectorRef=o,this.selectedChange=new it,this.togglePosition="after",this._selected=!1,this._inputsInitialized=!1}ngOnInit(){const t=this._selectionList;t._value&&t._value.some(r=>t.compareWith(this._value,r))&&this._setSelected(!0);const i=this._selected;Promise.resolve().then(()=>{(this._selected||i)&&(this.selected=!0,this._changeDetectorRef.markForCheck())}),this._inputsInitialized=!0}ngOnDestroy(){super.ngOnDestroy(),this.selected&&Promise.resolve().then(()=>{this.selected=!1})}toggle(){this.selected=!this.selected}focus(){this._hostElement.focus()}getLabel(){return(this._titles?.get(0)?._elementRef.nativeElement||this._unscopedContent?.nativeElement)?.textContent||""}_hasCheckboxAt(t){return this._selectionList.multiple&&this._getTogglePosition()===t}_hasRadioAt(t){return!this._selectionList.multiple&&this._getTogglePosition()===t&&!this._selectionList.hideSingleSelectionIndicator}_hasIconsOrAvatarsAt(t){return this._hasProjected("icons",t)||this._hasProjected("avatars",t)}_hasProjected(t,i){return this._getTogglePosition()!==i&&("avatars"===t?0!==this._avatars.length:0!==this._icons.length)}_handleBlur(){this._selectionList._onTouched()}_getTogglePosition(){return this.togglePosition||"after"}_setSelected(t){return t!==this._selected&&(this._selected=t,t?this._selectionList.selectedOptions.select(this):this._selectionList.selectedOptions.deselect(this),this.selectedChange.emit(t),this._changeDetectorRef.markForCheck(),!0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_toggleOnInteraction(){this.disabled||(this._selectionList.multiple?(this.selected=!this.selected,this._selectionList._emitChangeEvent([this])):this.selected||(this.selected=!0,this._selectionList._emitChangeEvent([this])))}_setTabindex(t){this._hostElement.setAttribute("tabindex",t+"")}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(pt),D(jV),D(Fi),D(ci),D(yI,8),D(rs,8))},n.\u0275cmp=ht({type:n,selectors:[["mat-list-option"]],contentQueries:function(t,i,r){if(1&t&&(Xi(r,ene,5),Xi(r,Jte,5)),2&t){let s;Lt(s=Ft())&&(i._lines=s),Lt(s=Ft())&&(i._titles=s)}},viewQuery:function(t,i){if(1&t&&oi(Lte,5),2&t){let r;Lt(r=Ft())&&(i._unscopedContent=r.first)}},hostAttrs:["role","option",1,"mat-mdc-list-item","mat-mdc-list-option","mdc-list-item"],hostVars:25,hostBindings:function(t,i){1&t&&ct("blur",function(){return i._handleBlur()})("click",function(){return i._toggleOnInteraction()}),2&t&&(Vt("aria-selected",i.selected),Pn("mdc-list-item--selected",i.selected&&!i._selectionList.multiple&&i._selectionList.hideSingleSelectionIndicator)("mdc-list-item--with-leading-avatar",i._hasProjected("avatars","before"))("mdc-list-item--with-leading-icon",i._hasProjected("icons","before"))("mdc-list-item--with-trailing-icon",i._hasProjected("icons","after"))("mat-mdc-list-option-with-trailing-avatar",i._hasProjected("avatars","after"))("mdc-list-item--with-leading-checkbox",i._hasCheckboxAt("before"))("mdc-list-item--with-trailing-checkbox",i._hasCheckboxAt("after"))("mdc-list-item--with-leading-radio",i._hasRadioAt("before"))("mdc-list-item--with-trailing-radio",i._hasRadioAt("after"))("mat-accent","primary"!==i.color&&"warn"!==i.color)("mat-warn","warn"===i.color)("_mat-animation-noopable",i._noopAnimations))},inputs:{togglePosition:"togglePosition",checkboxPosition:"checkboxPosition",color:"color",value:"value",selected:"selected"},outputs:{selectedChange:"selectedChange"},exportAs:["matListOption"],features:[Hn([{provide:$V,useExisting:n},{provide:GV,useExisting:n}]),ft],ngContentSelectors:Qte,decls:20,vars:6,consts:[["icons",""],["checkbox",""],["radio",""],["class","mdc-list-item__start mat-mdc-list-option-checkbox-before",4,"ngIf"],["class","mdc-list-item__start mat-mdc-list-option-radio-before",4,"ngIf"],[3,"ngIf"],[1,"mdc-list-item__content"],[1,"mat-mdc-list-item-unscoped-content",3,"cdkObserveContent"],["unscopedContent",""],["class","mdc-list-item__end",4,"ngIf"],[1,"mat-mdc-focus-indicator"],[1,"mdc-checkbox"],["type","checkbox",1,"mdc-checkbox__native-control",3,"checked","disabled"],[1,"mdc-checkbox__background"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],[1,"mdc-radio"],["type","radio",1,"mdc-radio__native-control",3,"checked","disabled"],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],[1,"mdc-list-item__start","mat-mdc-list-option-checkbox-before"],[3,"ngTemplateOutlet"],[1,"mdc-list-item__start","mat-mdc-list-option-radio-before"],[1,"mdc-list-item__end"]],template:function(t,i){1&t&&(Cr(Zte),_e(0,Fte,1,0,"ng-template",null,0,kc),_e(2,Nte,6,4,"ng-template",null,1,kc),_e(4,Bte,5,4,"ng-template",null,2,kc),_e(6,Vte,2,1,"span",3),_e(7,Hte,2,1,"span",4),_e(8,Wte,1,1,"ng-template",5),K(9,"span",6),Kt(10),Kt(11,1),K(12,"span",7,8),ct("cdkObserveContent",function(){return i._updateItemLines(!0)}),Kt(14,2),J()(),_e(15,jte,2,1,"span",9),_e(16,qte,2,1,"span",9),_e(17,Kte,1,1,"ng-template",5),Kt(18,3),Fe(19,"div",10)),2&t&&(j(6),z("ngIf",i._hasCheckboxAt("before")),j(1),z("ngIf",i._hasRadioAt("before")),j(1),z("ngIf",i._hasIconsOrAvatarsAt("before")),j(7),z("ngIf",i._hasCheckboxAt("after")),j(1),z("ngIf",i._hasRadioAt("after")),j(1),z("ngIf",i._hasIconsOrAvatarsAt("after")))},dependencies:[tU,gi,Vv],styles:['.mat-mdc-list-option-with-trailing-avatar.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mat-mdc-list-option-with-trailing-avatar.mdc-list-item,.mat-mdc-list-option-with-trailing-avatar.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mat-mdc-list-option-with-trailing-avatar .mdc-list-item__end{margin-left:16px;margin-right:16px}[dir=rtl] .mat-mdc-list-option-with-trailing-avatar .mdc-list-item__end,.mat-mdc-list-option-with-trailing-avatar .mdc-list-item__end[dir=rtl]{margin-left:16px;margin-right:16px}.mat-mdc-list-option-with-trailing-avatar .mdc-list-item__end{width:40px;height:40px}.mat-mdc-list-option-with-trailing-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mat-mdc-list-option-with-trailing-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mat-mdc-list-option-with-trailing-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mat-mdc-list-option-with-trailing-avatar .mdc-list-item__end{border-radius:50%}.mat-mdc-list-option .mdc-touch-target-wrapper{display:inline}.mat-mdc-list-option .mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}.mat-mdc-list-option .mdc-checkbox[hidden]{display:none}.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{border-color:CanvasText}}.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{border-color:CanvasText}}@media all and (-ms-high-contrast: none){.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__focus-ring{display:none}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-list-option .mdc-checkbox__mixedmark{margin:0 1px}}.mat-mdc-list-option .mdc-checkbox--disabled{cursor:default;pointer-events:none}.mat-mdc-list-option .mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color}.mat-mdc-list-option .mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0}.mdc-checkbox--upgraded .mat-mdc-list-option .mdc-checkbox__checkmark{opacity:1}.mat-mdc-list-option .mdc-checkbox__checkmark-path{stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mat-mdc-list-option .mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0}.mat-mdc-list-option .mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mat-mdc-list-option .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mat-mdc-list-option .mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mat-mdc-list-option .mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mat-mdc-list-option .mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mat-mdc-list-option .mdc-checkbox--touch{margin:calc((var(--mdc-checkbox-state-layer-size, 48px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mat-mdc-list-option .mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);width:var(--mdc-checkbox-state-layer-size, 48px);height:var(--mdc-checkbox-state-layer-size, 48px)}.mat-mdc-list-option .mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{opacity:1}.mat-mdc-list-option .mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-mdc-list-option .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mat-mdc-list-option .mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0}.mat-mdc-list-option .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mat-mdc-list-option .mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mat-mdc-list-option .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color}.mat-mdc-list-option .mdc-radio[hidden]{display:none}.mat-mdc-list-option .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-list-option .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:""}.mat-mdc-list-option .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%}.mat-mdc-list-option .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%}.mat-mdc-list-option .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1}.mat-mdc-list-option .mdc-radio--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mat-mdc-list-option .mdc-radio--touch .mdc-radio__native-control{top:calc((40px - 48px) / 2);right:calc((40px - 48px) / 2);left:calc((40px - 48px) / 2);width:48px;height:48px}.mat-mdc-list-option .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mat-mdc-list-option .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mat-mdc-list-option .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mat-mdc-list-option .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{border-color:CanvasText}}.mat-mdc-list-option .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mat-mdc-list-option .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mat-mdc-list-option .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mat-mdc-list-option .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{border-color:CanvasText}}.mat-mdc-list-option .mdc-radio--disabled{cursor:default;pointer-events:none}.mat-mdc-list-option .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5)}.mat-mdc-list-option .mdc-radio__native-control:disabled+.mdc-radio__background,.mat-mdc-list-option [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background{cursor:default}.mat-mdc-list-option .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}@media all and (-ms-high-contrast: none){.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox .mdc-checkbox__focus-ring{display:none}}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__background{transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__mixedmark{transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__background::before{transition:opacity 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__outer-circle{transition:border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__inner-circle{transition:transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:focus+.mdc-radio__background::before{transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option .mdc-checkbox{padding:calc((40px - 18px) / 2);padding:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2);margin:calc((40px - 40px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.38);border-color:var(--mdc-checkbox-disabled-unselected-icon-color, rgba(0, 0, 0, 0.38));background-color:transparent}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:rgba(0, 0, 0, 0.38);background-color:var(--mdc-checkbox-disabled-selected-icon-color, rgba(0, 0, 0, 0.38))}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-selected-checkmark-color, #fff)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-selected-checkmark-color, #fff)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-disabled-selected-checkmark-color, #fff)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-disabled-selected-checkmark-color, #fff)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:#018786;border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:#018786;border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:#018786;border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mat-mdc-list-option .mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mat-mdc-list-option .mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__background{top:calc((40px - 18px) / 2);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2);left:calc((40px - 18px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control{top:calc((40px - 40px) / 2);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);right:calc((40px - 40px) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);left:calc((40px - 40px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);width:40px;width:var(--mdc-checkbox-state-layer-size, 40px);height:40px;height:var(--mdc-checkbox-state-layer-size, 40px)}.mat-mdc-list-option .mdc-radio{padding:calc((40px - 20px) / 2);padding:calc((var(--mdc-radio-state-layer-size, 40px) - 20px) / 2)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:#000;border-color:var(--mdc-radio-disabled-selected-icon-color, #000)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:#000;border-color:var(--mdc-radio-disabled-selected-icon-color, #000)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{opacity:0.38;opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{opacity:0.38;opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:#000;border-color:var(--mdc-radio-disabled-unselected-icon-color, #000)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{opacity:0.38;opacity:var(--mdc-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:#6200ee;border-color:var(--mdc-radio-selected-icon-color, #6200ee)}.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:#6200ee;border-color:var(--mdc-radio-selected-icon-color, #6200ee)}.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:#000;border-color:var(--mdc-radio-unselected-icon-color, #000)}.mat-mdc-list-option .mdc-radio .mdc-radio__background::before{top:calc(-1 * (40px - 20px) / 2);top:calc(-1 * (var(--mdc-radio-state-layer-size, 40px) - 20px) / 2);left:calc(-1 * (40px - 20px) / 2);left:calc(-1 * (var(--mdc-radio-state-layer-size, 40px) - 20px) / 2);width:40px;width:var(--mdc-radio-state-layer-size, 40px);height:40px;height:var(--mdc-radio-state-layer-size, 40px)}.mat-mdc-list-option .mdc-radio .mdc-radio__native-control{top:calc((40px - 40px) / 2);top:calc((var(--mdc-radio-state-layer-size, 40px) - var(--mdc-radio-state-layer-size, 40px)) / 2);right:calc((40px - 40px) / 2);right:calc((var(--mdc-radio-state-layer-size, 40px) - var(--mdc-radio-state-layer-size, 40px)) / 2);left:calc((40px - 40px) / 2);left:calc((var(--mdc-radio-state-layer-size, 40px) - var(--mdc-radio-state-layer-size, 40px)) / 2);width:40px;width:var(--mdc-radio-state-layer-size, 40px);height:40px;height:var(--mdc-radio-state-layer-size, 40px)}.mat-mdc-list-option .mdc-checkbox__native-control,.mat-mdc-list-option .mdc-radio__native-control{display:none}.cdk-high-contrast-active .mat-mdc-list-option.mdc-list-item--selected::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}.cdk-high-contrast-active .mat-mdc-list-option.mdc-list-item--selected [dir=rtl]::after{right:auto;left:16px}'],encapsulation:2,changeDetection:0}),n})();const rne={provide:rl,useExisting:Qn(()=>JM),multi:!0};class sne{constructor(e,t){this.source=e,this.options=t}}let JM=(()=>{class n extends lR{get multiple(){return this._multiple}set multiple(t){const i=Cn(t);i!==this._multiple&&(this._multiple=i,this.selectedOptions=new aR(this._multiple,this.selectedOptions.selected))}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=Cn(t)}constructor(t,i){super(),this._element=t,this._ngZone=i,this._initialized=!1,this._destroyed=new Ue,this._onChange=r=>{},this.selectionChange=new it,this.color="accent",this.compareWith=(r,s)=>r===s,this._multiple=!0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.selectedOptions=new aR(this._multiple),this._onTouched=()=>{},this._selectionListDisabled=!1,this._handleFocusout=()=>{setTimeout(()=>{this._containsFocus()||this._resetActiveOption()})},this._handleFocusin=r=>{if(this.disabled)return;const s=this._items.toArray().findIndex(o=>o._elementRef.nativeElement.contains(r.target));s>-1?this._setActiveOption(s):this._resetActiveOption()},this._isNonInteractive=!1}ngAfterViewInit(){this._initialized=!0,this._setupRovingTabindex(),this._ngZone.runOutsideAngular(()=>{this._element.nativeElement.addEventListener("focusin",this._handleFocusin),this._element.nativeElement.addEventListener("focusout",this._handleFocusout)}),this._value&&this._setOptionsFromValues(this._value),this._watchForSelectionChange()}ngOnChanges(t){const i=t.disabled,r=t.disableRipple,s=t.hideSingleSelectionIndicator;(r&&!r.firstChange||i&&!i.firstChange||s&&!s.firstChange)&&this._markOptionsForCheck()}ngOnDestroy(){this._keyManager?.destroy(),this._element.nativeElement.removeEventListener("focusin",this._handleFocusin),this._element.nativeElement.removeEventListener("focusout",this._handleFocusout),this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=!0}focus(t){this._element.nativeElement.focus(t)}selectAll(){return this._setAllOptionsSelected(!0)}deselectAll(){return this._setAllOptionsSelected(!1)}_reportValueChange(){if(this.options&&!this._isDestroyed){const t=this._getSelectedOptionValues();this._onChange(t),this._value=t}}_emitChangeEvent(t){this.selectionChange.emit(new sne(this,t))}writeValue(t){this._value=t,this.options&&this._setOptionsFromValues(t||[])}setDisabledState(t){this.disabled=t}get disabled(){return this._selectionListDisabled}set disabled(t){this._selectionListDisabled=Cn(t),this._selectionListDisabled&&this._keyManager?.setActiveItem(-1)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}_watchForSelectionChange(){this.selectedOptions.changed.pipe(et(this._destroyed)).subscribe(t=>{for(let i of t.added)i.selected=!0;for(let i of t.removed)i.selected=!1;this._containsFocus()||this._resetActiveOption()})}_setOptionsFromValues(t){this.options.forEach(i=>i._setSelected(!1)),t.forEach(i=>{const r=this.options.find(s=>!s.selected&&this.compareWith(s.value,i));r&&r._setSelected(!0)})}_getSelectedOptionValues(){return this.options.filter(t=>t.selected).map(t=>t.value)}_markOptionsForCheck(){this.options&&this.options.forEach(t=>t._markForCheck())}_setAllOptionsSelected(t,i){const r=[];return this.options.forEach(s=>{(!i||!s.disabled)&&s._setSelected(t)&&r.push(s)}),r.length&&this._reportValueChange(),r}get options(){return this._items}_handleKeydown(t){const i=this._keyManager.activeItem;if(13!==t.keyCode&&32!==t.keyCode||this._keyManager.isTyping()||!i||i.disabled)if(65===t.keyCode&&this.multiple&&!this._keyManager.isTyping()&&nl(t,"ctrlKey")){const r=this.options.some(s=>!s.disabled&&!s.selected);t.preventDefault(),this._emitChangeEvent(this._setAllOptionsSelected(r,!0))}else this._keyManager.onKeydown(t);else t.preventDefault(),i._toggleOnInteraction()}_setupRovingTabindex(){this._keyManager=new lU(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(()=>this.disabled),this._resetActiveOption(),this._keyManager.change.subscribe(t=>this._setActiveOption(t)),this._items.changes.pipe(et(this._destroyed)).subscribe(()=>{const t=this._keyManager.activeItem;(!t||!this._items.toArray().indexOf(t))&&this._resetActiveOption()})}_setActiveOption(t){this._items.forEach((i,r)=>i._setTabindex(r===t?0:-1)),this._keyManager.updateActiveItem(t)}_resetActiveOption(){if(this.disabled)return void this._setActiveOption(-1);const t=this._items.find(i=>i.selected&&!i.disabled)||this._items.first;this._setActiveOption(t?this._items.toArray().indexOf(t):-1)}_containsFocus(){const t=mM();return t&&this._element.nativeElement.contains(t)}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(pt))},n.\u0275cmp=ht({type:n,selectors:[["mat-selection-list"]],contentQueries:function(t,i,r){if(1&t&&Xi(r,QM,5),2&t){let s;Lt(s=Ft())&&(i._items=s)}},hostAttrs:["role","listbox",1,"mat-mdc-selection-list","mat-mdc-list-base","mdc-list"],hostVars:1,hostBindings:function(t,i){1&t&&ct("keydown",function(s){return i._handleKeydown(s)}),2&t&&Vt("aria-multiselectable",i.multiple)},inputs:{color:"color",compareWith:"compareWith",multiple:"multiple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",disabled:"disabled"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[Hn([rne,{provide:lR,useExisting:n},{provide:jV,useExisting:n}]),ft,zi],ngContentSelectors:kte,decls:1,vars:0,template:function(t,i){1&t&&(Cr(),Kt(0))},styles:['@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-list-divider::after{content:"";display:block;border-bottom-width:1px;border-bottom-style:solid}}.mdc-list{margin:0;padding:8px 0;list-style-type:none}.mdc-list:focus{outline:none}.mdc-list-item__wrapper{display:block}.mdc-list-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;align-items:stretch;cursor:pointer}.mdc-list-item:focus{outline:none}.mdc-list-item.mdc-list-item--with-one-line{height:48px}.mdc-list-item.mdc-list-item--with-two-lines{height:64px}.mdc-list-item.mdc-list-item--with-three-lines{height:88px}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__start{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--disabled,.mdc-list-item.mdc-list-item--non-interactive{cursor:auto}.mdc-list-item:not(.mdc-list-item--selected):focus::before,.mdc-list-item.mdc-ripple-upgraded--background-focused::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-list-item:not(.mdc-list-item--selected):focus::before,.mdc-list-item.mdc-ripple-upgraded--background-focused::before{border-color:CanvasText}}.mdc-list-item.mdc-list-item--selected::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:3px double rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-list-item.mdc-list-item--selected::before{border-color:CanvasText}}.mdc-list-item.mdc-list-item--selected:focus::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:3px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-list-item.mdc-list-item--selected:focus::before{border-color:CanvasText}}a.mdc-list-item{color:inherit;text-decoration:none}.mdc-list-item__start{fill:currentColor;flex-shrink:0;pointer-events:none}.mdc-list-item__end{flex-shrink:0;pointer-events:none}.mdc-list-item__content{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;align-self:center;flex:1;pointer-events:none}.mdc-list-item--with-two-lines .mdc-list-item__content,.mdc-list-item--with-three-lines .mdc-list-item__content{align-self:stretch}.mdc-list-item__content[for]{pointer-events:none}.mdc-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-three-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-three-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-three-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item__secondary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal}.mdc-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-list-item--with-three-lines .mdc-list-item__secondary-text{white-space:normal;line-height:20px}.mdc-list-item--with-overline .mdc-list-item__secondary-text{white-space:nowrap;line-height:auto}.mdc-list-item__overline-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-three-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-three-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-three-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-avatar.mdc-list-item,.mdc-list-item--with-leading-avatar.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-avatar .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-avatar .mdc-list-item__start,.mdc-list-item--with-leading-avatar .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-avatar .mdc-list-item__start{border-radius:50%}.mdc-list-item--with-leading-icon.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-icon.mdc-list-item,.mdc-list-item--with-leading-icon.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-icon .mdc-list-item__start{margin-left:16px;margin-right:32px}[dir=rtl] .mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--with-leading-icon .mdc-list-item__start[dir=rtl]{margin-left:32px;margin-right:16px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-thumbnail.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-thumbnail.mdc-list-item,.mdc-list-item--with-leading-thumbnail.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-thumbnail .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-thumbnail .mdc-list-item__start,.mdc-list-item--with-leading-thumbnail .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-image.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-image.mdc-list-item,.mdc-list-item--with-leading-image.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-image .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-image .mdc-list-item__start,.mdc-list-item--with-leading-image .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-image.mdc-list-item--with-one-line{height:72px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-video.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-video.mdc-list-item,.mdc-list-item--with-leading-video.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-video .mdc-list-item__start{margin-left:0;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-video .mdc-list-item__start,.mdc-list-item--with-leading-video .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-video.mdc-list-item--with-one-line{height:72px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-checkbox.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-checkbox.mdc-list-item,.mdc-list-item--with-leading-checkbox.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:8px;margin-right:24px}[dir=rtl] .mdc-list-item--with-leading-checkbox .mdc-list-item__start,.mdc-list-item--with-leading-checkbox .mdc-list-item__start[dir=rtl]{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-radio.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-radio.mdc-list-item,.mdc-list-item--with-leading-radio.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-radio .mdc-list-item__start{margin-left:8px;margin-right:24px}[dir=rtl] .mdc-list-item--with-leading-radio .mdc-list-item__start,.mdc-list-item--with-leading-radio .mdc-list-item__start[dir=rtl]{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-switch.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-switch.mdc-list-item,.mdc-list-item--with-leading-switch.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-switch .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-switch .mdc-list-item__start,.mdc-list-item--with-leading-switch .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-trailing-icon.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-icon.mdc-list-item,.mdc-list-item--with-trailing-icon.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-icon .mdc-list-item__end{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-icon .mdc-list-item__end,.mdc-list-item--with-trailing-icon .mdc-list-item__end[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:flex-start;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-meta.mdc-list-item,.mdc-list-item--with-trailing-meta.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-meta .mdc-list-item__end{margin-left:28px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-meta .mdc-list-item__end,.mdc-list-item--with-trailing-meta .mdc-list-item__end[dir=rtl]{margin-left:16px;margin-right:28px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-trailing-meta .mdc-list-item__end{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-caption-font-family);font-size:var(--mdc-typography-caption-font-size);line-height:var(--mdc-typography-caption-line-height);font-weight:var(--mdc-typography-caption-font-weight);letter-spacing:var(--mdc-typography-caption-letter-spacing);text-decoration:var(--mdc-typography-caption-text-decoration);text-transform:var(--mdc-typography-caption-text-transform)}.mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item,.mdc-list-item--with-trailing-checkbox.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:24px;margin-right:8px}[dir=rtl] .mdc-list-item--with-trailing-checkbox .mdc-list-item__end,.mdc-list-item--with-trailing-checkbox .mdc-list-item__end[dir=rtl]{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-radio.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item,.mdc-list-item--with-trailing-radio.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-radio .mdc-list-item__end{margin-left:24px;margin-right:8px}[dir=rtl] .mdc-list-item--with-trailing-radio .mdc-list-item__end,.mdc-list-item--with-trailing-radio .mdc-list-item__end[dir=rtl]{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-radio.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-switch.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-switch.mdc-list-item,.mdc-list-item--with-trailing-switch.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-switch .mdc-list-item__end{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-switch .mdc-list-item__end,.mdc-list-item--with-trailing-switch .mdc-list-item__end[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-switch.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item--with-overline.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-overline.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-list-item--with-overline.mdc-list-item--with-three-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-overline.mdc-list-item--with-three-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-list-item{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-list-item,.mdc-list-item[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-list-group .mdc-deprecated-list{padding:0}.mdc-list-group__subheader{margin:calc((3rem - 1.5rem)/2) 16px}.mdc-list-divider{padding:0;background-clip:content-box}.mdc-list-divider.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset{padding-left:16px;padding-right:auto}[dir=rtl] .mdc-list-divider.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset,.mdc-list-divider.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset[dir=rtl]{padding-left:auto;padding-right:16px}.mdc-list-divider.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset{padding-left:auto;padding-right:16px}[dir=rtl] .mdc-list-divider.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset,.mdc-list-divider.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset[dir=rtl]{padding-left:16px;padding-right:auto}.mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset{padding-left:0px;padding-right:auto}[dir=rtl] .mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset[dir=rtl]{padding-left:auto;padding-right:0px}[dir=rtl] .mdc-list-divider,.mdc-list-divider[dir=rtl]{padding:0}.mdc-list-item{background-color:var(--mdc-list-list-item-container-color)}.mdc-list-item.mdc-list-item--selected{background-color:var(--mdc-list-list-item-selected-container-color)}.mdc-list-item--with-one-line{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-one-line.mdc-list-item--with-leading-avatar,.mdc-list-item--with-one-line.mdc-list-item--with-leading-icon,.mdc-list-item--with-one-line.mdc-list-item--with-leading-thumbnail,.mdc-list-item--with-one-line.mdc-list-item--with-leading-checkbox,.mdc-list-item--with-one-line.mdc-list-item--with-leading-radio,.mdc-list-item--with-one-line.mdc-list-item--with-leading-switch{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-one-line.mdc-list-item--with-leading-image,.mdc-list-item--with-one-line.mdc-list-item--with-leading-video{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-two-lines{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-two-lines.mdc-list-item--with-leading-avatar,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-icon,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-thumbnail,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-checkbox,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-radio,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-switch,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-image,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-video{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-three-lines{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item.mdc-list-item--with-one-line{height:var(--mdc-list-list-item-one-line-container-height)}.mdc-list-item.mdc-list-item--with-two-lines{height:var(--mdc-list-list-item-two-line-container-height)}.mdc-list-item.mdc-list-item--with-three-lines{height:var(--mdc-list-list-item-three-line-container-height)}.mdc-list-item__primary-text{color:var(--mdc-list-list-item-label-text-color)}.mdc-list-item__primary-text{font-family:var(--mdc-list-list-item-label-text-font);line-height:var(--mdc-list-list-item-label-text-line-height);font-size:var(--mdc-list-list-item-label-text-size);font-weight:var(--mdc-list-list-item-label-text-weight);letter-spacing:var(--mdc-list-list-item-label-text-tracking)}.mdc-list-item__secondary-text{color:var(--mdc-list-list-item-supporting-text-color)}.mdc-list-item__secondary-text{font-family:var(--mdc-list-list-item-supporting-text-font);line-height:var(--mdc-list-list-item-supporting-text-line-height);font-size:var(--mdc-list-list-item-supporting-text-size);font-weight:var(--mdc-list-list-item-supporting-text-weight);letter-spacing:var(--mdc-list-list-item-supporting-text-tracking)}.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mdc-list-list-item-leading-icon-color)}.mdc-list-item--with-leading-icon .mdc-list-item__start{width:var(--mdc-list-list-item-leading-icon-size);height:var(--mdc-list-list-item-leading-icon-size)}.mdc-list-item--with-leading-icon .mdc-list-item__start>i{font-size:var(--mdc-list-list-item-leading-icon-size)}.mdc-list-item--with-leading-icon .mdc-list-item__start .mdc-list-item__icon{font-size:var(--mdc-list-list-item-leading-icon-size);width:var(--mdc-list-list-item-leading-icon-size);height:var(--mdc-list-list-item-leading-icon-size)}.mdc-list-item--with-leading-avatar .mdc-list-item__start{width:var(--mdc-list-list-item-leading-avatar-size);height:var(--mdc-list-list-item-leading-avatar-size)}.mdc-list-item.mdc-list-item--with-trailing-meta .mdc-list-item__end{color:var(--mdc-list-list-item-trailing-supporting-text-color)}.mdc-list-item--with-trailing-meta .mdc-list-item__end{font-family:var(--mdc-list-list-item-trailing-supporting-text-font);line-height:var(--mdc-list-list-item-trailing-supporting-text-line-height);font-size:var(--mdc-list-list-item-trailing-supporting-text-size);font-weight:var(--mdc-list-list-item-trailing-supporting-text-weight);letter-spacing:var(--mdc-list-list-item-trailing-supporting-text-tracking)}.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-trailing-icon-color)}.mdc-list-item--with-trailing-icon .mdc-list-item__end{width:var(--mdc-list-list-item-trailing-icon-size);height:var(--mdc-list-list-item-trailing-icon-size)}.mdc-list-item--with-trailing-icon .mdc-list-item__end>i{font-size:var(--mdc-list-list-item-trailing-icon-size)}.mdc-list-item--with-trailing-icon .mdc-list-item__end .mdc-list-item__icon{font-size:var(--mdc-list-list-item-trailing-icon-size);width:var(--mdc-list-list-item-trailing-icon-size);height:var(--mdc-list-list-item-trailing-icon-size)}.mdc-list-item--selected.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-selected-trailing-icon-color)}.mdc-list-item--disabled .mdc-list-item__start,.mdc-list-item--disabled .mdc-list-item__content,.mdc-list-item--disabled .mdc-list-item__end{opacity:1}.mdc-list-item--disabled .mdc-list-item__primary-text,.mdc-list-item--disabled .mdc-list-item__secondary-text,.mdc-list-item--disabled .mdc-list-item__overline-text{opacity:var(--mdc-list-list-item-disabled-label-text-opacity)}.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mdc-list-list-item-disabled-leading-icon-color)}.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start{opacity:var(--mdc-list-list-item-disabled-leading-icon-opacity)}.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-disabled-trailing-icon-color)}.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end{opacity:var(--mdc-list-list-item-disabled-trailing-icon-opacity)}.mdc-list-item:hover .mdc-list-item__primary-text{color:var(--mdc-list-list-item-hover-label-text-color)}.mdc-list-item--with-leading-icon:hover .mdc-list-item__start{color:var(--mdc-list-list-item-hover-leading-icon-color)}.mdc-list-item--with-trailing-icon:hover .mdc-list-item__end{color:var(--mdc-list-list-item-hover-trailing-icon-color)}.mdc-list-item:focus .mdc-list-item__primary-text{color:var(--mdc-list-list-item-focus-label-text-color)}.mdc-list-item.mdc-list-item--disabled .mdc-list-item__primary-text{color:var(--mdc-list-list-item-disabled-label-text-color)}.mdc-list-item:hover::before{background-color:var(--mdc-list-list-item-hover-state-layer-color);opacity:var(--mdc-list-list-item-hover-state-layer-opacity)}.mdc-list-item.mdc-list-item--disabled::before{background-color:var(--mdc-list-list-item-disabled-state-layer-color);opacity:var(--mdc-list-list-item-disabled-state-layer-opacity)}.mdc-list-item:focus::before{background-color:var(--mdc-list-list-item-focus-state-layer-color);opacity:var(--mdc-list-list-item-focus-state-layer-opacity)}.mdc-list-item--disabled .mdc-radio,.mdc-list-item--disabled .mdc-checkbox{opacity:var(--mdc-list-list-item-disabled-label-text-opacity)}.mdc-list-item--with-leading-avatar .mat-mdc-list-item-avatar{border-radius:var(--mdc-list-list-item-leading-avatar-shape);background-color:var(--mdc-list-list-item-leading-avatar-color)}.mat-mdc-list-base{--mdc-list-list-item-container-shape:0;--mdc-list-list-item-leading-avatar-shape:50%;--mdc-list-list-item-container-color:transparent;--mdc-list-list-item-selected-container-color:transparent;--mdc-list-list-item-leading-avatar-color:transparent;--mdc-list-list-item-leading-icon-size:24px;--mdc-list-list-item-leading-avatar-size:40px;--mdc-list-list-item-trailing-icon-size:24px;--mdc-list-list-item-disabled-state-layer-color:transparent;--mdc-list-list-item-disabled-state-layer-opacity:0;--mdc-list-list-item-disabled-label-text-opacity:0.38;--mdc-list-list-item-disabled-leading-icon-opacity:0.38;--mdc-list-list-item-disabled-trailing-icon-opacity:0.38}.cdk-high-contrast-active a.mdc-list-item--activated::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}.cdk-high-contrast-active a.mdc-list-item--activated [dir=rtl]::after{right:auto;left:16px}.mat-mdc-list-base{display:block}.mat-mdc-list-base .mdc-list-item__start,.mat-mdc-list-base .mdc-list-item__end,.mat-mdc-list-base .mdc-list-item__content{pointer-events:auto}.mat-mdc-list-item,.mat-mdc-list-option{width:100%;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-list-item:not(.mat-mdc-list-item-interactive),.mat-mdc-list-option:not(.mat-mdc-list-item-interactive){cursor:default}.mat-mdc-list-item .mat-divider-inset,.mat-mdc-list-option .mat-divider-inset{position:absolute;left:0;right:0;bottom:0}.mat-mdc-list-item .mat-mdc-list-item-avatar~.mat-divider-inset,.mat-mdc-list-option .mat-mdc-list-item-avatar~.mat-divider-inset{margin-left:72px}[dir=rtl] .mat-mdc-list-item .mat-mdc-list-item-avatar~.mat-divider-inset,[dir=rtl] .mat-mdc-list-option .mat-mdc-list-item-avatar~.mat-divider-inset{margin-right:72px}.mat-mdc-list-item-interactive::before{top:0;left:0;right:0;bottom:0;position:absolute;content:"";opacity:0;pointer-events:none}.mat-mdc-list-item>.mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-list-item:focus>.mat-mdc-focus-indicator::before{content:""}.mat-mdc-list-item.mdc-list-item--with-three-lines .mat-mdc-list-item-line.mdc-list-item__secondary-text{white-space:nowrap;line-height:normal}.mat-mdc-list-item.mdc-list-item--with-three-lines .mat-mdc-list-item-unscoped-content.mdc-list-item__secondary-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}mat-action-list button{background:none;color:inherit;border:none;font:inherit;outline:inherit;-webkit-tap-highlight-color:rgba(0,0,0,0);text-align:left}[dir=rtl] mat-action-list button{text-align:right}mat-action-list button::-moz-focus-inner{border:0}'],encapsulation:2,changeDetection:0}),n})(),one=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[aI,va,qn,IM,DU,n3]}),n})();function ane(n,e){if(1&n&&(K(0,"mat-label"),Je(1),J()),2&n){const t=be(2);j(1),$i(t.resource.name)}}function lne(n,e){if(1&n&&(K(0,"mat-list-option",5),Je(1),J()),2&n){const t=e.$implicit,i=be(2);z("value",t.key)("selected",i.resource.data[t.key])("disabled",i.disabled),j(1),nr(" ",t.key," ")}}function cne(n,e){if(1&n){const t=Wi();uo(0,1),_e(1,ane,2,1,"mat-label",2),K(2,"mat-selection-list",3),ct("selectionChange",function(r){return Dn(t),In(be().onSelection(r))}),_e(3,lne,2,4,"mat-list-option",4),zt(4,"keyvalue"),J(),ho()}if(2&n){const t=be();z("matTooltip",t.resourceDescription),j(1),z("ngIf",t.resource.name),j(1),z("disabled",t.disabled),j(1),z("ngForOf",Xt(4,4,t.resource.data))}}let dne=(()=>{class n{constructor(){this.resource=null,this.resourceDescription="",this.disabled=!1,this.changed=new it}onSelection(t){for(const i of t.options)this.resource.data[i.value]=i.selected;this.changed.emit()}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=ht({type:n,selectors:[["app-flags-block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",disabled:"disabled"},outputs:{changed:"changed"},decls:1,vars:1,consts:[["matTooltipPosition","above",3,"matTooltip",4,"ngIf"],["matTooltipPosition","above",3,"matTooltip"],[4,"ngIf"],[3,"disabled","selectionChange"],[3,"value","selected","disabled",4,"ngFor","ngForOf"],[3,"value","selected","disabled"]],template:function(t,i){1&t&&_e(0,cne,5,6,"ng-container",0),2&t&&z("ngIf",i.resource)},dependencies:[Fo,gi,xa,_s,JM,QM,V2],styles:["[_nghost-%COMP%]{padding-bottom:1.34375em}"],changeDetection:0}),n})();class cR{constructor(e=!1,t=kh.instance){this.parentClock=t,this.tickSub=null,this._tick$=new Ue,this.startedAt=-1,this.oldRelativeTime=0,this.pausedAt=-1,e&&this.start()}get tick$(){return this._tick$.pipe(Ye(([e,t])=>[t,t-e]))}get isRunning(){return!!this.tickSub}get isPaused(){return-1!==this.pausedAt}get elapsedTime(){return this.isPaused?this.pausedAt-this.startedAt:this.parentClock.elapsedTime-this.startedAt}createChildClock(e){return new cR(e,this)}start(){this.isRunning||(this.oldRelativeTime=0,this.startedAt=this.parentClock.elapsedTime,this.startListeningTicks())}stop(){this.stopListeningTicks(),this.startedAt=this.pausedAt=-1}pause(){this.stopListeningTicks(),this.pausedAt=this.parentClock.elapsedTime}resume(){this.isRunning||-1==this.pausedAt||(this.startedAt+=this.parentClock.elapsedTime-this.pausedAt,this.pausedAt=-1,this.startListeningTicks())}startListeningTicks(){if(this.tickSub)throw new Error("Clock is already ticking!");this.tickSub=this.parentClock.tick$.pipe(Ye(([e,t])=>[this.oldRelativeTime,e-this.startedAt]),Ii(([e,t])=>this.oldRelativeTime=t)).subscribe(this._tick$)}stopListeningTicks(){var e;null===(e=this.tickSub)||void 0===e||e.unsubscribe(),this.tickSub=null}}class kh{constructor(){this._tick$=new Ue;let e=this.elapsedTime;dt(void 0,LB).pipe(function une(n){let t,e=1/0;return null!=n&&("object"==typeof n?({count:e=1/0,delay:t}=n):e=n),e<=0?()=>Is:Gn((i,r)=>{let o,s=0;const a=()=>{if(o?.unsubscribe(),o=null,null!=t){const c="number"==typeof t?hM(t):lr(t(s)),u=Un(r,()=>{u.unsubscribe(),l()});c.subscribe(u)}else l()},l=()=>{let c=!1;o=i.subscribe(Un(r,void 0,()=>{++s[e,this.elapsedTime]),Ii(([t,i])=>e=i)).subscribe(this._tick$)}static get instance(){return kh._instance||(kh._instance=new kh),kh._instance}get tick$(){return this._tick$.pipe(Ye(([e,t])=>[t,t-e]))}get elapsedTime(){return(typeof performance>"u"?Date:performance).now()}createChildClock(e){return new cR(e,this)}}const hne={transparent:!1,background:0,size:"fullscreen",antialias:!0};class fne{constructor(e,t,i={}){this.scene=e,this.canvas=t,this.entity=null,this.rendererOptions=Object.assign(Object.assign({},hne),i||{})}}class Ly{constructor(e){this.data=e,this.adjacent=new Set}static fromArray(e,t=!1){const i=new Ly(e[0]);let r=i;for(let s=1;si.map(r=>new Ly(r)));for(let i=0;i0&&t[i][r].addAdjacent(t[i][r-1]),i>0&&t[i][r].addAdjacent(t[i-1][r]);return t[0][0]}addAdjacent(e){return!this.adjacent.has(e)&&(this.adjacent.add(e),e.adjacent.add(this),!0)}removeAdjacent(e){return!!this.adjacent.has(e)&&(this.adjacent.delete(e),e.adjacent.delete(this),!0)}addEdge(e,t){return!!this.removeAdjacent(t)&&(this.addAdjacent(e),e.addAdjacent(t),!0)}removeEdge(e,t){return!(!e.adjacent.has(this)||!e.adjacent.has(t))&&(e.removeAdjacent(this),e.removeAdjacent(t),this.addAdjacent(t))}walkRead(e){const t=new Set,i=[[this,e]];for(t.add(this);i.length;){const r=i.shift(),[s,o]=r;if(0!==o){const a=Array.from(s.adjacent).filter(l=>!t.has(l));for(const l of a)t.add(l),i.push([l,o-1])}}return t}walkReadPreserveDepth(e){const t=new Set,i=[],r=[[this,e]];for(t.add(this);r.length;){const s=r.shift(),[o,a]=s,l=e-a;if(i[l]||(i[l]=new Set),i[l].add(o),0!==a){const c=Array.from(o.adjacent).filter(u=>!t.has(u));for(const u of c)t.add(u),r.push([u,a-1])}}return i}nodes(){return Array.from(this.walkRead(-1))}}var jl=(()=>{return(n=jl||(jl={}))[n.INPUT_CONTROLLERS=0]="INPUT_CONTROLLERS",n[n.PHYSICS_SIMULATION=200]="PHYSICS_SIMULATION",n[n.OBJECTS_BINDING=400]="OBJECTS_BINDING",n[n.ANIMATION_MIXERS=600]="ANIMATION_MIXERS",n[n.CONTROLLERS=800]="CONTROLLERS",n[n.RENDERING=1e3]="RENDERING",n[n.POST_RENDERING=1200]="POST_RENDERING",jl;var n})();let Fy=(()=>{class n{constructor(){this.tick$=new Ue,this._world=null,this._name="e0x"+(n.default_name_counter++).toString(16),this._active=!0,this.parent=null,this._children=[],this._components=[],this._onSpawned$=new Ue,this._onRemoved$=new Ue}get world(){return this._world}get name(){return this._name}set name(t){this._name=t}get active(){return this._active}set active(t){this._active=t}get children(){return[...this._children]}addChildren(...t){for(const i of t)i.parent&&i.parent.removeChildren([i]),i.parent=this;if(this._children.push(...t),this._world)for(const i of t)this._world.addEntity(i)}removeChildren(t,i=!1){this._children=this._children.filter(r=>!t.includes(r));for(const r of t)r.parent=null,this._world&&this._world.removeEntity(r,i)}get components(){return[...this._components]}addComponents(...t){for(const i of t)i.entity&&i.entity.removeComponents([i]),i.entity=this;if(this._components.push(...t),this._world)for(const i of t)i.addToWorld(this._world)}removeComponents(t,i=!1){this._components=this._components.filter(r=>!t.includes(r));for(const r of t)r.entity=null,this._world&&r.removeFromWorld(this._world,i)}onSpawned(t){this._world=t;for(const i of this._components)i.addToWorld(t);for(const i of this._children)t.addEntity(i);this._onSpawned$.next()}onRemoved(){const t=this._world;this._world=null;for(const i of this._children)t.removeEntity(i);for(const i of this._components)i.removeFromWorld(t,!1);this._onRemoved$.next()}dispose(){this.world&&this.world.removeEntity(this,!1),this._onSpawned$.complete(),this._onRemoved$.complete(),this.tick$.complete();for(const t of this._children)t.dispose();for(const t of this._components)t.dispose()}}return n.default_name_counter=0,n})();class pne extends Fy{constructor(e){super(),this.tickOrder=e}}function eS(n,e=jl.CONTROLLERS){const t=new pne(e);return n.addEntity(t),t.tick$.pipe(Gd(()=>{n.removeEntity(t,!0)}))}class mne extends Fy{constructor(e){super(),this.renderer=e,this.tickOrder=jl.RENDERING,this._rendererSize$=new Ct(null),this.addComponents(e),this.tick$.subscribe(()=>{this.renderer.render()})}get rendererSize$(){return this._rendererSize$.asObservable()}get rendererSize(){return this._rendererSize$.getValue()}get rendererOptions(){return this.renderer.rendererOptions}onSpawned(e){this._rendererSize$.next(null),"fullscreen"==this.rendererOptions.size||"function"==typeof this.rendererOptions.size?(this.renderer.canvas&&(this.renderer.canvas.style.position="absolute"),cs(ba(window,"resize").pipe(fM(100)),ba(window,"orientationchange")).pipe(et(this._onRemoved$),Ye(()=>({x:window.innerWidth,y:window.innerHeight})),No({x:window.innerWidth,y:window.innerHeight})).subscribe(t=>{this._rendererSize$.next("function"==typeof this.rendererOptions.size?this.rendererOptions.size(t):t)})):this.rendererOptions.size instanceof Sn||void 0!==this.rendererOptions.size.subscribe&&void 0!==this.rendererOptions.size.pipe?this.rendererOptions.size.pipe(et(this._onRemoved$)).subscribe(t=>{this._rendererSize$.next(t)}):this._rendererSize$.next(this.rendererOptions.size),this._rendererSize$.pipe(et(this._onRemoved$),qd((t,i)=>t?.x==i?.x&&t?.y==i?.y)).subscribe(t=>{t&&this.renderer.resizeRenderer(t)}),super.onSpawned(e)}dispose(){super.dispose(),this._rendererSize$.complete()}}const dR=n=>{n.updateVisibility?n.updateVisibility():XV(n)},XV=n=>{for(const e of n.children)dR(e)};class gne extends Fy{constructor(){super(...arguments),this._visible=!0}get visible(){return this._visible}get worldVisible(){let e=this;for(;;){if(!1===e.visible)return!1;if(!e.parent)break;e=e.parent}return!0}set visible(e){this._visible=e,this.updateVisibility()}updateVisibility(){XV(this)}addChildren(...e){super.addChildren(...e);for(const t of e)dR(t)}removeChildren(e,t=!1){if(super.removeChildren(e,t),!t)for(const i of e)dR(i)}}class uR{constructor(){this._running=!1,this.stop$=new Ue}get running(){return this._running}start(...e){this.running||(this.startInternal(...e),this._running=!0)}stop(...e){this.running&&(this.stop$.next(),this.stopInternal(...e),this._running=!1)}stopInternal(...e){}}class _ne extends uR{constructor(e,t){super(),this.keyboard=e,this.keymap=t,this._output$=new Ue}get output$(){return this._output$.asObservable()}startInternal(){const e=[[],[],[],[]];this.keymap.includes("wasd")&&(e[0].push("KeyW"),e[1].push("KeyA"),e[2].push("KeyS"),e[3].push("KeyD")),this.keymap.includes("arrows")&&(e[0].push("ArrowUp"),e[1].push("ArrowLeft"),e[2].push("ArrowDown"),e[3].push("ArrowRight")),Vd(e.map(t=>this.keyboard.bindMany(...t))).pipe(et(this.stop$),Ye(t=>{const i={};if(t.includes(!0)){const[r,s,o,a]=t;r!=o&&(i.upDown=r),s!=a&&(i.leftRight=s)}return i})).subscribe(t=>this._output$.next(t))}}const tS=new Sn(ls);class vne extends uR{constructor(){super(),this.bindings={},this.skipKeyDownsOnExternalFocus=!0,this.externalFocusBlacklist=[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement,HTMLButtonElement],this.handleKeys=this.handleKeys.bind(this),this.resetAllKeys=this.resetAllKeys.bind(this),this.onPointerLockChange=this.onPointerLockChange.bind(this)}startInternal(){window.addEventListener("keydown",this.handleKeys),window.addEventListener("keyup",this.handleKeys),window.addEventListener("blur",this.resetAllKeys),document.addEventListener("pointerlockchange",this.onPointerLockChange)}stopInternal(){window.removeEventListener("keydown",this.handleKeys),window.removeEventListener("keyup",this.handleKeys),window.removeEventListener("blur",this.resetAllKeys),document.addEventListener("pointerlockchange",this.onPointerLockChange),this.resetAllKeys()}bind(e){this.bindings[e]||(this.bindings[e]=[]);const t=new Ct(!1);return this.bindings[e].push(t),t.pipe(qd(),Gd(()=>{this.bindings[e].splice(this.bindings[e].indexOf(t),1),t.complete()}))}bindMany(...e){if(0==e.length)return console.warn("[KeyboardController] bindMany called without any key code"),tS;if(1==e.length)return this.bind(e[0]);const t=[];for(const i of e){this.bindings[i]||(this.bindings[i]=[]);const r=new Ct(!1);this.bindings[i].push(r),t.push(r)}return Vd(t).pipe(Gd(()=>{for(let i=0;ii.includes(!0)),qd())}emulateKeyDown(e){if(this.running)for(const t of this.bindings[e]||[])t.next(!0)}emulateKeyUp(e){if(this.running)for(const t of this.bindings[e]||[])t.next(!1)}emulateKeyPress(e){this.emulateKeyDown(e),this.emulateKeyUp(e)}handleKeys(e){if("keydown"!=e.type&&"keyup"!=e.type)return;const t="keydown"==e.type;if(t&&this.skipKeyDownsOnExternalFocus&&document.activeElement)for(const i of this.externalFocusBlacklist)if(document.activeElement instanceof i)return;for(const i of this.bindings[e.code]||[])i.next(t)}onPointerLockChange(){document.pointerLockElement||this.resetAllKeys()}resetAllKeys(){for(const e in this.bindings)for(const t of this.bindings[e]||[])t.next(!1)}}class Tr{static get O(){return{x:0,y:0}}static get X(){return{x:1,y:0}}static get Y(){return{x:0,y:1}}static get nX(){return{x:-1,y:0}}static get nY(){return{x:0,y:-1}}static clone(e){return{x:e.x,y:e.y}}static add(e,t){return{x:e.x+t.x,y:e.y+t.y}}static sub(e,t){return{x:e.x-t.x,y:e.y-t.y}}static avg(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}static lenSq(e){return e.x*e.x+e.y*e.y}static len(e){return Math.sqrt(e.x*e.x+e.y*e.y)}static dist(e,t){return Tr.len(Tr.sub(e,t))}static norm(e){const t=Tr.len(e);return{x:e.x/t,y:e.y/t}}static scalarMult(e,t){return{x:e.x*t,y:e.y*t}}static lerp(e,t,i){return{x:e.x+i*(t.x-e.x),y:e.y+i*(t.y-e.y)}}static angle(e,t){const i=e.x*t.x+e.y*t.y,r=Math.sqrt(e.x**2+e.y**2)*Math.sqrt(t.x**2+t.y**2);return Math.acos(i/r)}}const bne={pointerLock:!1};var ys=(()=>{return(n=ys||(ys={}))[n.NONE=0]="NONE",n[n.DRAG=1]="DRAG",n[n.DRAG_MIDDLE_BUTTON=2]="DRAG_MIDDLE_BUTTON",n[n.DRAG_RIGHT_BUTTON=3]="DRAG_RIGHT_BUTTON",n[n.DRAG_TOUCH_TWO_FINGERS=4]="DRAG_TOUCH_TWO_FINGERS",ys;var n})();class Am extends uR{constructor(e={}){super(),this._wheel$=null,this._delta$=new Ue,this._position$=new Ct(Tr.O),this._multiTouchPositions$=new Ct([]),this.stopped$=new Ue,this._state$=new Ct(ys.NONE),this.options=Object.assign(Object.assign({},bne),e),this.canvasClickListener=this.canvasClickListener.bind(this)}static isTouchDevice(){return"createTouch"in document||!!navigator.userAgent.match(/(iPhone|iPod|iPad)/)||!!navigator.userAgent.match(/Android/)}get delta$(){return this._delta$.asObservable()}get position(){return this._position$.getValue()}get position$(){return this._position$.asObservable()}get wheel$(){return this._wheel$||(this._wheel$=ba(this._element,"wheel",{passive:!1}).pipe(et(this.stopped$),Gd(()=>this._wheel$=null),Ii(e=>e.preventDefault()),Ye(e=>e.deltaY),Tu())),this._wheel$}get isPointerLocked(){return!!document.pointerLockElement}get state(){return this._state$.getValue()}get state$(){return this._state$.asObservable()}get multiTouchPositions$(){return this._multiTouchPositions$.asObservable()}get twoTouchGestureDelta$(){return this.state$.pipe(gs(e=>e==ys.DRAG_TOUCH_TWO_FINGERS?this.multiTouchPositions$:tS),Ye(e=>e.map(t=>({x:t.x,y:t.y}))),function yne(){return Gn((n,e)=>{let t,i=!1;n.subscribe(Un(e,r=>{const s=t;t=r,i&&e.next([s,r]),i=!0}))})}(),On(([e,t])=>e.length>1&&t.length>1),Ye(([e,t])=>({centerPointDelta:Tr.sub(Tr.scalarMult(t.reduce((i,r)=>Tr.add(i,r),Tr.O),1/t.length),Tr.scalarMult(e.reduce((i,r)=>Tr.add(i,r),Tr.O),1/t.length)),angleDelta:Tr.angle(t[1],t[0])-Tr.angle(e[1],e[0]),distanceDelta:Tr.dist(t[1],t[0])-Tr.dist(e[1],e[0])})))}get _element(){return this.options.canvas||window}startInternal(){this.options.canvas&&(this.options.canvas.style.touchAction="none"),this._state$.next(ys.NONE);const e=[ys.DRAG,ys.DRAG_MIDDLE_BUTTON,ys.DRAG_RIGHT_BUTTON],t=[ys.NONE,ys.DRAG,ys.DRAG_TOUCH_TWO_FINGERS],i=[],r={};ba(this._element,"mousemove").pipe(et(this.stopped$)).subscribe(o=>{this._delta$.next({x:o.movementX,y:o.movementY})}),ba(this._element,"pointermove").pipe(et(this.stopped$)).subscribe(o=>{o instanceof PointerEvent?("touch"===o.pointerType&&(r[o.pointerId]={x:o.pageX,y:o.pageY}),this._position$.next({x:o.pageX,y:o.pageY}),this._multiTouchPositions$.next(Object.values(r))):this._position$.next({x:o.clientX,y:o.clientY}),this._delta$.next({x:o.movementX,y:o.movementY})}),!Am.isTouchDevice()&&this.options.pointerLock&&this.options.canvas&&this.options.canvas.addEventListener("click",this.canvasClickListener);const s=o=>{delete r[o.pointerId];for(let a=0;a{0===i.length&&(this.options.canvas&&this.options.canvas.setPointerCapture(o.pointerId),this._element.addEventListener("pointerup",s),this._element.addEventListener("pointercancel",s)),i.push(o),"touch"===o.pointerType?(r[o.pointerId]={x:o.pageX,y:o.pageY},this._state$.next(t[Math.min(i.length,2)])):this._state$.next(e[o.button]||ys.NONE)}),ba(this._element,"contextmenu").pipe(et(this.stopped$)).subscribe(o=>{o.preventDefault()})}stopInternal(e=!0){this.stopped$.next(),e&&this.options.canvas&&(this.options.canvas.removeEventListener("click",this.canvasClickListener),document.exitPointerLock())}canvasClickListener(){this.options.canvas.requestPointerLock()}}class xne{static lookAt(e,t,i){let r=_t.sub(e,t);r=0===_t.lenSq(r)?Object.assign(Object.assign({},r),{z:1}):_t.norm(r);let s=_t.cross(i,r);0===_t.lenSq(s)&&(r=1===Math.abs(i.z)?Object.assign(Object.assign({},r),{x:r.x+1e-4}):Object.assign(Object.assign({},r),{z:r.z+1e-4}),r=_t.norm(r),s=_t.cross(i,r)),s=_t.norm(s);let o=_t.cross(r,s);return[s.x,s.y,s.z,0,o.x,o.y,o.z,0,r.x,r.y,r.z,0]}}class zr{static get O(){return{x:0,y:0,z:0,w:1}}static clone(e){return{x:e.x,y:e.y,z:e.z,w:e.w}}static add(e,t){const i=e.w+t.w,r=e.x+t.x,s=e.y+t.y,o=e.z+t.z,a=Math.sqrt(i*i+r*r+s*s+o*o);return{w:i/a,x:r/a,y:s/a,z:o/a}}static mult(e,t){return{w:e.w*t.w-e.x*t.x-e.y*t.y-e.z*t.z,x:e.w*t.x+e.x*t.w+e.y*t.z-e.z*t.y,y:e.w*t.y-e.x*t.z+e.y*t.w+e.z*t.x,z:e.w*t.z+e.x*t.y-e.y*t.x+e.z*t.w}}static conjugate(e){return{x:-e.x,y:-e.y,z:-e.z,w:e.w}}static opposite(e){return{x:-e.x,y:-e.y,z:-e.z,w:-e.w}}static combineRotations(...e){let t={w:1,x:0,y:0,z:0};for(const i of e)t=this.mult(t,i);return t}static lerp(e,t,i){return{x:e.x+i*(t.x-e.x),y:e.y+i*(t.y-e.y),z:e.z+i*(t.z-e.z),w:e.w+i*(t.w-e.w)}}static slerp(e,t,i){let s=Math.acos(e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w),o=Math.sin(s),a=e.x*Math.sin((1-i)*s)/o+t.x*Math.sin(i*s)/o,l=e.y*Math.sin((1-i)*s)/o+t.y*Math.sin(i*s)/o,c=e.z*Math.sin((1-i)*s)/o+t.z*Math.sin(i*s)/o,u=e.w*Math.sin((1-i)*s)/o+t.w*Math.sin(i*s)/o;return isNaN(a)||isNaN(l)||isNaN(c)||isNaN(u)?zr.clone(e):{x:a,y:l,z:c,w:u}}static fromAngle(e,t){const i=t/2,r=Math.sin(i);return Object.assign(Object.assign({},_t.scalarMult(e,r)),{w:Math.cos(i)})}static fromMatrix4(e){const t=e[0],i=e[4],r=e[8],s=e[1],o=e[5],a=e[9],l=e[2],c=e[6],u=e[10],h=t+o+u;if(h>0){const p=.5/Math.sqrt(h+1);return{x:(c-a)*p,y:(r-l)*p,z:(s-i)*p,w:.25/p}}if(t>o&&t>u){const p=2*Math.sqrt(1+t-o-u);return{x:.25*p,y:(i+s)/p,z:(r+l)/p,w:(c-a)/p}}if(o>u){const p=2*Math.sqrt(1+o-t-u);return{x:(i+s)/p,y:.25*p,z:(a+c)/p,w:(r-l)/p}}{const p=2*Math.sqrt(1+u-t-o);return{x:(r+l)/p,y:(a+c)/p,z:.25*p,w:(s-i)/p}}}static fromEuler(e){const t=e.x,i=e.y,r=e.z,s=Math.cos(.5*r),o=Math.sin(.5*r),a=Math.cos(.5*i),l=Math.sin(.5*i),c=Math.cos(.5*t),u=Math.sin(.5*t);return{w:c*a*s+u*l*o,x:u*a*s-c*l*o,y:c*l*s+u*a*o,z:c*a*o-u*l*s}}static toEuler(e){const t=e.w,i=e.x,r=e.y,s=e.z,c=2*(t*r-s*i);return{x:Math.atan2(2*(t*i+r*s),1-2*(i*i+r*r)),y:Math.abs(c)>=1?Math.sign(c)*Math.PI/2:Math.asin(c),z:Math.atan2(2*(t*s+i*r),1-2*(r*r+s*s))}}static lookAt(e,t,i=_t.Z){return this.fromMatrix4(xne.lookAt(e,t,i))}static rotAround(e,t,i){const r=Math.sin(i/2),s={w:Math.cos(i/2),x:t.x*r,y:t.y*r,z:t.z*r};return this.mult(s,e)}}class _t{static get O(){return{x:0,y:0,z:0}}static get X(){return{x:1,y:0,z:0}}static get Y(){return{x:0,y:1,z:0}}static get Z(){return{x:0,y:0,z:1}}static get nX(){return{x:-1,y:0,z:0}}static get nY(){return{x:0,y:-1,z:0}}static get nZ(){return{x:0,y:0,z:-1}}static clone(e){return{x:e.x,y:e.y,z:e.z}}static add(e,t){return{x:e.x+t.x,y:e.y+t.y,z:e.z+t.z}}static sub(e,t){return{x:e.x-t.x,y:e.y-t.y,z:e.z-t.z}}static avg(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2,z:(e.z+t.z)/2}}static lenSq(e){return e.x*e.x+e.y*e.y+e.z*e.z}static len(e){return Math.sqrt(e.x*e.x+e.y*e.y+e.z*e.z)}static dist(e,t){return _t.len(_t.sub(e,t))}static cross(e,t){const i=e.x,r=e.y,s=e.z,o=t.x,a=t.y,l=t.z;return{x:r*l-s*a,y:s*o-i*l,z:i*a-r*o}}static norm(e){const t=_t.len(e);return 0===t?e:{x:e.x/t,y:e.y/t,z:e.z/t}}static scalarMult(e,t){return{x:e.x*t,y:e.y*t,z:e.z*t}}static lerp(e,t,i){return{x:e.x+i*(t.x-e.x),y:e.y+i*(t.y-e.y),z:e.z+i*(t.z-e.z)}}static angle(e,t){const i=e.x*t.x+e.y*t.y+e.z*t.z,r=Math.sqrt(e.x**2+e.y**2+e.z**2)*Math.sqrt(t.x**2+t.y**2+t.z**2);return Math.acos(i/r)}static rot(e,t){const{x:i,y:r,z:s}=e;return{x:t.w*t.w*i+2*t.y*t.w*s-2*t.z*t.w*r+t.x*t.x*i+2*t.y*t.x*r+2*t.z*t.x*s-t.y*t.y*i-t.z*t.z*i,y:2*t.x*t.y*i+t.y*t.y*r+2*t.z*t.y*s+2*t.w*t.z*i-t.z*t.z*r+t.w*t.w*r-2*t.x*t.w*s-t.x*t.x*r,z:2*t.x*t.z*i+2*t.y*t.z*r+t.z*t.z*s-2*t.w*t.y*i-t.y*t.y*s+2*t.w*t.x*r-t.x*t.x*s+t.w*t.w*s}}static rotAround(e,t,i){return this.rot(e,zr.fromAngle(t,i))}static toSpherical(e){const t=Math.sqrt(e.x*e.x+e.y*e.y+e.z*e.z);return{radius:t,theta:0==t?0:Math.atan2(e.y,e.x),phi:0==t?0:Math.atan2(Math.sqrt(e.x*e.x+e.y*e.y),e.z)}}static fromSpherical(e){return{x:e.radius*Math.sin(e.phi)*Math.cos(e.theta),y:e.radius*Math.sin(e.phi)*Math.sin(e.theta),z:e.radius*Math.cos(e.phi)}}}var Ny=function(n,e,t,i){return new(t||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})};let nS=(()=>{class n{constructor(t,i){this.visualScene=t,this.physicsWorld=i,this.worldClock=kh.instance.createChildClock(!1),this.keyboardInput=new vne,this.name="w0x"+(n.default_name_counter++).toString(16),this.children=[],this.tickListeners=[],n._documentWorlds.push(this),this.keyboardInput.start(),window.ggstatic&&(window.ggstatic.registerConsoleCommand(this,"show_debugger",(...r)=>Ny(this,void 0,void 0,function*(){return window.ggstatic.showDebugControls=["1","true","+"].includes(r[0]),""+window.ggstatic.showDebugControls}),"args: [0 or 1]; turn on/off debug panel. Default value is 0"),window.ggstatic.registerConsoleCommand(this,"show_stats",(...r)=>Ny(this,void 0,void 0,function*(){return window.ggstatic.showStats=["1","true","+"].includes(r[0]),""+window.ggstatic.showStats}),"args: [0 or 1]; turn on/off stats. Default value is 0"),window.ggstatic.registerConsoleCommand(this,"ph_timescale",(...r)=>Ny(this,void 0,void 0,function*(){return this.physicsWorld.timeScale=+r[0],JSON.stringify(this.physicsWorld.timeScale)}),"args: [float]; change time scale of physics engine. Default value is 1.0"),window.ggstatic.registerConsoleCommand(this,"dr_drawphysics",(...r)=>Ny(this,void 0,void 0,function*(){return this.physicsDebugViewActive=["1","true","+"].includes(r[0]),""+this.physicsWorld.physicsDebugViewActive}),"args: [0 or 1]; turn on/off physics debug view. Default value is 0"))}static get documentWorlds(){return[...n._documentWorlds]}init(){return Ny(this,void 0,void 0,function*(){yield Promise.all([this.physicsWorld.init(),this.visualScene.init()]),this.worldClock.tick$.subscribe(([t,i])=>{let r=0;for(;r=jl.PHYSICS_SIMULATION);r++)this.tickListeners[r].active&&this.tickListeners[r].tick$.next([t,i]);for(this.physicsWorld.simulate(i);ri.tickOrder-r.tickOrder),t.onSpawned(this))}removeEntity(t,i=!1){if(t.world){if(t.world!==this)throw new Error("Entity is not a part of this world");this.children.splice(this.children.findIndex(r=>r===t),1),this.tickListeners.splice(this.tickListeners.findIndex(r=>r===t),1),t.onRemoved()}i&&t.dispose()}get physicsDebugViewActive(){return this.physicsWorld.physicsDebugViewActive}set physicsDebugViewActive(t){if(this.physicsDebugViewActive!==t)if(t){const i=this.visualScene.debugPhysicsDrawerClass;if(!i)throw new Error("Debug drawer is not available");this.physicsWorld.startDebugger(this,new i)}else this.physicsWorld.stopDebugger(this)}}return n.default_name_counter=0,n._documentWorlds=[],n})();class Mne extends fne{}class qV extends gne{}class iu extends qV{constructor(e,t=null){if(super(),this.object3D=e,this.objectBody=t,this.tickOrder=jl.OBJECTS_BINDING,this._position=_t.O,this._rotation=zr.O,t)this.tick$.subscribe(()=>{this.runTransformBinding(t,e)}),this.runTransformBinding(t,e),this.name=t.name;else{if(!e)throw new Error("Cannot create entity without a mesh and a body");this._position=e.position,this._rotation=e.rotation,this.name=e.name}t&&this.addComponents(t),e&&this.addComponents(e)}get position(){return this._position}set position(e){this.object3D&&(this.object3D.position=e),this.objectBody&&(this.objectBody.position=e),this._position=e}get rotation(){return this._rotation}set rotation(e){this.object3D&&(this.object3D.rotation=e),this.objectBody&&(this.objectBody.rotation=e),this._rotation=e}updateVisibility(){this.object3D&&(this.object3D.visible=this.worldVisible),super.updateVisibility()}runTransformBinding(e,t){const i=e.position,r=e.rotation;t&&(t.position=i,t.rotation=r),this._position=i,this._rotation=r}}const KV={leading:!0,trailing:!1};function ZV(n,e=dy,t=KV){const i=hM(n,e);return function Sne(n,e=KV){return Gn((t,i)=>{const{leading:r,trailing:s}=e;let o=!1,a=null,l=null,c=!1;const u=()=>{l?.unsubscribe(),l=null,s&&(m(),c&&i.complete())},h=()=>{l=null,c&&i.complete()},p=g=>l=lr(n(g)).subscribe(Un(i,u,h)),m=()=>{if(o){o=!1;const g=a;a=null,i.next(g),!c&&p(g)}};t.subscribe(Un(i,g=>{o=!0,a=g,(!l||l.closed)&&(r?m():p(g))},()=>{c=!0,(!(s&&o&&l)||l.closed)&&i.complete()}))})}(()=>i,t)}class By extends Ly{static fromMapArray(e,t=!1){const i=new By(e[0]);let r=i;for(let s=1;si.map(r=>new By(r)));for(let i=0;i0&&t[i][r].addAdjacent(t[i][r-1]),i>0&&t[i][r].addAdjacent(t[i-1][r]);return t[0][0]}getNearestDummy(e,t){let i=1/0,r=this;return e.forEach(s=>{let o=Math.sqrt(Math.pow(t.x-s.data.position.x,2)+Math.pow(t.y-s.data.position.y,2)+Math.pow(t.z-s.data.position.z,2));ot?this.tick$.pipe(No(null),ZV(1e3),Ye(()=>t.position)):tS),Ye(t=>this.mapGraph.getNearestDummy(this.mapGraphNodes,t)),Ii(t=>this._nearestDummy$.next(t)),qd()).subscribe(t=>{let r,i=new Set;if(this.options.inertia>0){r=new Set;const s=t.walkReadPreserveDepth(this.options.loadDepth+this.options.inertia);for(let o=0;or.add(a.data)),o<=this.options.loadDepth&&s[o].forEach(a=>i.add(a.data))}else t.walkRead(this.options.loadDepth).forEach(s=>i.add(s.data)),r=i;for(const s of this.loaded.keys())r.has(s)?i.delete(s):this.disposeChunk(s);Promise.all(Array.from(i.keys()).map(s=>this.loadChunk(s))).then(()=>this._initialLoadComplete$.next(!0))})}onRemoved(){super.onRemoved(),this.loaderCursorEntity$.next(null)}loadChunk(e){return function(n,e,t,i){return new(t||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})}(this,void 0,void 0,function*(){const t=yield this.world.loader.loadGgGlb(e.path,Object.assign({position:e.position,rotation:e.rotation||zr.O},e.loadOptions)),i=[...t.entities,...(t.props||[]).map(r=>r.entities).reduce((r,s)=>(r.push(...s),r),[])];return this.loaded.set(e,i),this.addChildren(...i),this._chunkLoaded$.next([t,{position:e.position,rotation:e.rotation||zr.O}]),[i,t]})}disposeChunk(e){this.loaded.has(e)&&(this.removeChildren(this.loaded.get(e),!0),this.loaded.delete(e))}}class Tne extends mne{get position(){return this.renderer.camera.position}set position(e){this.renderer.camera.position=e}get rotation(){return this.renderer.camera.rotation}set rotation(e){this.renderer.camera.rotation=e}get camera(){return this.renderer.camera}}var JV=function(n,e,t,i){return new(t||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})};const ez={keymap:"wasd",movementOptions:{speed:.5},mouseOptions:{},ignoreMouseUnlessPointerLocked:!1,ignoreKeyboardUnlessPointerLocked:!1};class Ine extends Fy{constructor(e,t,i={}){super(),this.keyboard=e,this.camera=t,this.tickOrder=jl.INPUT_CONTROLLERS,this.options=Object.assign(Object.assign({},ez),i),i.mouseOptions&&(this.options.movementOptions=Object.assign(Object.assign({},ez.movementOptions),i.mouseOptions)),this.mouseInput=new Am(i.mouseOptions),this.directionsInput=new _ne(e,this.options.keymap)}onSpawned(e){const t=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return JV(this,void 0,void 0,function*(){yield t.onSpawned.call(this,e);let i={direction:{},rest:[]};const r=["KeyE","KeyQ"];this.camera.camera.supportsFov&&r.push("KeyZ","KeyC"),r.push("ShiftLeft"),this.directionsInput.output$.pipe(et(this._onRemoved$)).subscribe(a=>{i.direction=a}),Vd(r.map(a=>this.keyboard.bind(a))).pipe(et(this._onRemoved$)).subscribe(a=>{i.rest=a});let s=Tr.O,o=Am.isTouchDevice();this.mouseInput.delta$.pipe(et(this._onRemoved$),On(()=>o||!this.options.ignoreMouseUnlessPointerLocked||this.mouseInput.isPointerLocked)).subscribe(a=>{s=Tr.add(s,a)}),this.camera.tick$.pipe(et(this._onRemoved$)).subscribe(()=>{let a=i;this.options.ignoreKeyboardUnlessPointerLocked&&!this.mouseInput.isPointerLocked&&(a={direction:{},rest:[!1,!1,!1,!1,!1]});let l=Object.assign({},_t.O);const[c,u,h,p,m]=a.rest;void 0!==a.direction.upDown&&(l.z=a.direction.upDown?-1:1),void 0!==a.direction.leftRight&&(l.x=a.direction.leftRight?-1:1),c!=u&&(l.y=u?-1:1),h!=p&&(this.camera.camera.fov+=h?1:-1);let g=this.options.movementOptions.speed;if(m&&(g*=2.5),this.camera.position=_t.add(this.camera.position,_t.rot(_t.scalarMult(_t.norm(l),g),this.camera.rotation)),0!=s.x||0!=s.y){const b=_t.toSpherical(_t.rot({x:0,y:0,z:-1},this.camera.rotation));b.theta-=s.x/300,b.phi+=s.y/300,b.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,b.phi)),this.camera.rotation=zr.lookAt(this.camera.position,_t.add(this.camera.position,_t.fromSpherical(b))),s=Tr.O}}),yield this.mouseInput.start(),yield this.directionsInput.start()})}onRemoved(){const e=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return JV(this,void 0,void 0,function*(){yield e.onRemoved.call(this),yield this.mouseInput.stop(!0),yield this.directionsInput.stop()})}}var tz=function(n,e,t,i){return new(t||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})};const Rne={mouseOptions:{},orbiting:{sensitivityX:1,sensitivityY:1},zooming:{sensitivity:1},panning:{sensitivityX:1,sensitivityY:1},dollying:{sensitivity:1}};class Pne extends Fy{constructor(e,t={}){super(),this.camera=e,this.tickOrder=jl.INPUT_CONTROLLERS,this.spherical={phi:0,radius:10,theta:0},this.target=_t.O,this.options=Object.assign(Object.assign({},Rne),t),this.mouseInput=new Am(this.options.mouseOptions)}get radius(){return this.spherical.radius}set radius(e){this.spherical.radius=e}get phi(){return this.spherical.phi}set phi(e){this.spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,e))}get theta(){return this.spherical.theta}set theta(e){this.spherical.theta=e}onSpawned(e){const t=Object.create(null,{onSpawned:{get:()=>super.onSpawned}});return tz(this,void 0,void 0,function*(){yield t.onSpawned.call(this,e),this.spherical=_t.toSpherical(_t.sub(this.camera.position,this.target)),this.options.orbiting&&this.mouseInput.delta$.pipe(et(this._onRemoved$),On(()=>this.mouseInput.state==ys.DRAG)).subscribe(r=>{this.spherical.theta-=r.x*this.options.orbiting.sensitivityX*Math.PI/900,this.spherical.phi-=r.y*this.options.orbiting.sensitivityY*Math.PI/900,this.spherical.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.spherical.phi))}),this.options.zooming&&this.mouseInput.wheel$.pipe(et(this._onRemoved$)).subscribe(r=>{0!=r&&(this.spherical.radius*=Math.pow(.95,this.options.zooming.sensitivity*(r>0?-1:1)))});const i=r=>{const s=_t.fromSpherical(this.spherical),o=_t.rotAround(s,{x:-Math.sin(this.spherical.theta),y:Math.cos(this.spherical.theta),z:0},Math.PI/2),a=_t.rotAround(s,_t.norm(o),Math.PI/2);this.target=_t.add(this.target,_t.add(_t.scalarMult(o,-this.options.panning.sensitivityY*r.y/1e3),_t.scalarMult(a,this.options.panning.sensitivityX*r.x/1e3)))};this.options.panning&&this.mouseInput.delta$.pipe(et(this._onRemoved$),On(()=>this.mouseInput.state==ys.DRAG_RIGHT_BUTTON)).subscribe(r=>{i(r)}),this.options.dollying&&this.mouseInput.delta$.pipe(et(this._onRemoved$),On(()=>this.mouseInput.state==ys.DRAG_MIDDLE_BUTTON)).subscribe(r=>{this.spherical.radius*=Math.pow(.95,-this.options.dollying.sensitivity*r.y/10)}),Am.isTouchDevice()&&(this.options.dollying||this.options.panning)&&this.mouseInput.twoTouchGestureDelta$.pipe(et(this._onRemoved$)).subscribe(r=>{this.options.dollying&&(this.spherical.radius*=Math.pow(.95,this.options.dollying.sensitivity*r.distanceDelta/10)),this.options.panning&&i(r.centerPointDelta)}),this.camera.tick$.pipe(et(this._onRemoved$),Ye(()=>this.spherical)).subscribe(r=>{this.camera.position=_t.add(this.target,_t.fromSpherical(r)),this.camera.rotation=zr.lookAt(this.camera.position,this.target)}),yield this.mouseInput.start()})}onRemoved(){const e=Object.create(null,{onRemoved:{get:()=>super.onRemoved}});return tz(this,void 0,void 0,function*(){yield e.onRemoved.call(this),yield this.mouseInput.stop(!0)})}}class One{randomColor(){return Math.floor(256*Math.random())<<16|Math.floor(256*Math.random())<<8|Math.floor(256*Math.random())}createPlane(e={}){return this.createPrimitive({shape:"PLANE"},e)}createBox(e,t={}){return this.createPrimitive({shape:"BOX",dimensions:e},t)}createCapsule(e,t,i={}){return this.createPrimitive({shape:"CAPSULE",radius:e,centersDistance:t},i)}createCylinder(e,t,i={}){return this.createPrimitive({shape:"CYLINDER",radius:e,height:t},i)}createCone(e,t,i={}){return this.createPrimitive({shape:"CONE",radius:e,height:t},i)}createSphere(e,t={}){return this.createPrimitive({shape:"SPHERE",radius:e},t)}}var pR=function(n,e,t,i){return new(t||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})},ru=(()=>{return(n=ru||(ru={}))[n.Nothing=0]="Nothing",n[n.Files=1]="Files",n[n.Entities=2]="Entities",ru;var n})();const nz={cachingStrategy:ru.Nothing,position:_t.O,rotation:zr.O,loadProps:!0},iz=n=>({meta:n.meta,resources:n.resources.map(({object3D:e,body:t})=>({object3D:e&&e.clone(),body:t&&t.clone()}))});class Lne{constructor(e){this.world=e,this.filesCache=new Map,this.loadResultCache=new Map}loadGgGlbFiles(e,t=!1){return pR(this,void 0,void 0,function*(){if(t&&this.filesCache.has(e))return this.filesCache.get(e);const i=Promise.all([fetch(`${e}.glb`).then(s=>s.arrayBuffer()),fetch(`${e}.meta`).then(s=>s.text()).then(s=>JSON.parse(s))]);t&&this.filesCache.set(e,i);const r=yield i;return t&&this.filesCache.set(e,r),r})}loadGgGlbResources(e,t=ru.Nothing){return pR(this,void 0,void 0,function*(){if(t==ru.Entities&&this.loadResultCache.has(e)){const l=this.loadResultCache.get(e),c=l instanceof Promise?yield l:l;return iz(c)}const[i,r]=yield this.loadGgGlbFiles(e,t==ru.Files);if(!i)throw new Error("GLB not found");const[s,o]=yield Promise.all([this.world.visualScene.loader.loadFromGgGlb(i,r),this.world.physicsWorld.loader.loadFromGgGlb(i,r)]),a={resources:[],meta:r};if(!s)return a;if(0==o.length)a.resources.push({object3D:s,body:null});else if(1==o.length)a.resources.push({object3D:s,body:o[0]});else{for(const l of o)a.resources.push({object3D:s.popChild(l.name),body:l});s.isEmpty()||a.resources.push({object3D:s,body:null})}return t==ru.Entities&&this.loadResultCache.set(e,iz(a)),a})}loadGgGlb(e,t=nz){return pR(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},nz),t),{resources:r,meta:s}=yield this.loadGgGlbResources(e,i.cachingStrategy),o={entities:r.map(({object3D:a,body:l})=>new iu(a,l)),meta:s};return i.loadProps&&(o.props=yield Promise.all(s.dummies.filter(a=>a.is_prop||a.is_scene).map(a=>this.loadGgGlb(a.is_prop?(i.propsPath||e.substring(0,e.lastIndexOf("/")+1))+a.prop_id:a.scene_id,{loadProps:!!a.is_scene,position:_t.add(_t.rot(a.position,i.rotation),i.position),rotation:zr.combineRotations(a.rotation,i.rotation)})))),o.entities.forEach(a=>{a.position=_t.add(_t.rot(_t.clone(a.position),i.rotation),i.position),a.rotation=zr.mult(zr.clone(a.rotation),i.rotation)}),o})}}class rz extends nS{constructor(e,t){super(e,t),this.visualScene=e,this.physicsWorld=t,this.loader=new Lne(this),window.ggstatic&&window.ggstatic.registerConsoleCommand(this,"ph_gravity",(...i)=>function(n,e,t,i){return new(t||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})}(this,void 0,void 0,function*(){return 1==i.length&&(i=["0","0",""+-+i[0]]),i.length>0&&(this.physicsWorld.gravity={x:+i[0],y:+i[1],z:+i[2]}),JSON.stringify(this.physicsWorld.gravity)}),'args: [float] or [float float float]; change 3D world gravity vector. 1 argument means {x: 0, y: 0, z: -value}, 3 arguments set the whole vector. Default value is "9.82" or "0 0 -9.82"')}addPrimitiveRigidBody(e,t=_t.O,i=zr.O,r={}){const s=new iu(this.visualScene.factory.createPrimitive(e.shape,r),this.physicsWorld.factory.createRigidBody(e));return s.position=t,s.rotation=i,this.addEntity(s),s}addRenderer(e,t,i){const r=new Tne(this.visualScene.createRenderer(e,t,i));return this.addEntity(r),r}}class Bne{constructor(){this.output="\n \u2584\u2588\u2588\u2588\u2588 \u2584\u2588\u2588\u2588\u2588 \u2588 \u2588\u2591\u2593\u2588\u2588\u2588\u2588\u2588 \u2584\u2584\u2584\u2584 \n \u2588\u2588\u2592 \u2580\u2588\u2592 \u2588\u2588\u2592 \u2580\u2588\u2592 \u2593\u2588\u2591 \u2588 \u2591\u2588\u2591\u2593\u2588 \u2580 \u2593\u2588\u2588\u2588\u2588\u2588\u2584 \n \u2592\u2588\u2588\u2591\u2584\u2584\u2584\u2591\u2592\u2588\u2588\u2591\u2584\u2584\u2584\u2591 \u2592\u2588\u2591 \u2588 \u2591\u2588 \u2592\u2588\u2588\u2588 \u2592\u2588\u2588\u2592 \u2584\u2588\u2588\n \u2591\u2593\u2588 \u2588\u2588\u2593\u2591\u2593\u2588 \u2588\u2588\u2593 \u2591\u2588\u2591 \u2588 \u2591\u2588 \u2592\u2593\u2588 \u2584 \u2592\u2588\u2588\u2591\u2588\u2580 \n \u2591\u2592\u2593\u2588\u2588\u2588\u2580\u2592\u2591\u2592\u2593\u2588\u2588\u2588\u2580\u2592 \u2591\u2591\u2588\u2588\u2592\u2588\u2588\u2593 \u2591\u2592\u2588\u2588\u2588\u2588\u2592\u2591\u2593\u2588 \u2580\u2588\u2593\n \u2591\u2592 \u2592 \u2591\u2592 \u2592 \u2591 \u2593\u2591\u2592 \u2592 \u2591\u2591 \u2592\u2591 \u2591\u2591\u2592\u2593\u2588\u2588\u2588\u2580\u2592\n \u2591 \u2591 \u2591 \u2591 \u2592 \u2591 \u2591 \u2591 \u2591 \u2591\u2592\u2591\u2592 \u2591 \n \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \n \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \n \u2591 \n >>> https://github.com/AndyGura/gg-web-engine <<<\nWelcome to GG web engine UI console. \nEnter command in input below.\n\nList of available commands: ".replace(/ /g," ")+'ls_commands',this.commandHistory=[],this.currentCommandIndex=0,this.elements=null}get isUIShown(){return!!this.elements}createUI(){if(this.elements)return;const e=document.createElement("div");e.innerHTML="\n
\n CONSOLE\n X\n
\n
\n ",e.style.position="absolute",e.style.zIndex="1000",e.style.backgroundColor="#343434",e.style.width="640px",e.style.height="480px",e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="stretch",e.style.padding="0.1rem",e.style.rowGap="3px",e.style.fontSize="14px",e.style.fontFamily="monospace",e.style.fontWeight="bold",e.style.color="white",e.style.textAlign="left",document.body.append(e),this.elements={main:e,input:document.getElementById("gg-console-input"),output:document.getElementById("gg-console-output")},document.getElementById("gg-console-close-icon").onmousedown=()=>this.destroyUI(),this.elements.input.onkeydown=t=>{13===t?.keyCode?(t.preventDefault(),this.onInput().then()):38===t?.keyCode?(t.preventDefault(),this.onUsePreviousCommand()):40===t?.keyCode&&(t.preventDefault(),this.onUseNextCommand())},this.elements.input.oninput=t=>{var i;let r=(null===(i=this.elements)||void 0===i?void 0:i.input.value)||"";if(r.length>0&&null===t.data&&(r=r.substring(0,r.length-1)),""===r.trim())return;let s=window.ggstatic.availableCommands.find(o=>o[0].startsWith(r));s&&(this.elements.input.value=s[0],this.elements.input.setSelectionRange(r.length,this.elements.input.value.length))},this.stdout(),this.setupDragging(),setTimeout(()=>this.elements.input.focus(),20)}destroyUI(){this.elements&&(document.body.removeChild(this.elements.main),this.elements=null)}onUsePreviousCommand(){0!==this.commandHistory.length&&(this.currentCommandIndex--,this.currentCommandIndex<0&&(this.currentCommandIndex+=this.commandHistory.length),this.elements.input.value=this.commandHistory[this.currentCommandIndex%this.commandHistory.length])}onUseNextCommand(){0!==this.commandHistory.length&&(this.currentCommandIndex++,this.elements.input.value=this.commandHistory[this.currentCommandIndex%this.commandHistory.length])}onInput(){return n=this,e=void 0,i=function*(){const e=this.elements.input.value;this.elements.input.value="",this.stdout("\n> "+e),this.stdout("\n"+(yield window.ggstatic.console(e))),this.commandHistory.push(e),this.currentCommandIndex=this.commandHistory.length},new((t=void 0)||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())});var n,e,t,i}stdout(e=""){this.output+=e,this.elements.output.innerHTML=this.output.replace(/\n/g,"
"),this.elements.output.scrollTop=this.elements.output.scrollHeight}setupDragging(){let e=0,t=0;const r=o=>{if(!this.elements)return void s();o.preventDefault();const a=e-o.clientX,l=t-o.clientY;e=o.clientX,t=o.clientY,this.elements.main.style.left=this.elements.main.offsetLeft-a+"px",this.elements.main.style.top=this.elements.main.offsetTop-l+"px"},s=()=>{document.onmouseup=null,document.onmousemove=null};document.getElementById("gg-console-header").onmousedown=o=>{(o=o||window.event).preventDefault(),e=o.clientX,t=o.clientY,document.onmouseup=s,document.onmousemove=r}}}var Une=qr(738),Vne=qr.n(Une);class zne{constructor(){this.ui={stats:null,debugControlsContainer:null},this.statsRemoved$=new Ue,this.currentWorld=null,this.debugControlsRemoved$=new Ue}get showStats(){return!!this.ui.stats}setShowStats(e,t){if(t===this.showStats){if(!t||this.currentWorld===e)return;this.setShowStats(this.currentWorld,!1)}if(this.currentWorld=e,t){const i=new(Vne());this.ui.stats=i,i.dom.style.left="unset",i.dom.style.right="0",i.showPanel(0),document.body.appendChild(i.dom),eS(e,-1).pipe(et(this.statsRemoved$)).subscribe(()=>{i?.begin()}),eS(e,1e4).pipe(et(this.statsRemoved$)).subscribe(()=>{i?.end()})}else this.statsRemoved$.next(),document.body.removeChild(this.ui.stats.dom),this.ui.stats.end(),this.ui.stats=null}get showDebugControls(){return!!this.ui.debugControlsContainer}setShowDebugControls(e,t){if(t===this.showDebugControls){if(!t||this.currentWorld===e)return;this.setShowDebugControls(this.currentWorld,!1)}if(this.currentWorld=e,t){const i=document.createElement("div");this.ui.debugControlsContainer=i;const r="style='display:flex;align-items:center;margin:0.25rem;'";i.style.cssText="position:fixed;top:48px;right:0;opacity:0.9;z-index:9999;background-color:#333;color:white;display:flex;flex-direction:column",i.innerHTML=`\n
\n \n \n
`,document.body.appendChild(i),ba(document.getElementById("physics_debugger_checkbox_id"),"change").pipe(et(this.debugControlsRemoved$)).subscribe(s=>{try{this.currentWorld.physicsDebugViewActive=s.target.checked}catch(o){console.error(o)}s.target.checked=this.currentWorld.physicsDebugViewActive})}else this.debugControlsRemoved$.next(),document.body.removeChild(this.ui.debugControlsContainer),this.ui.debugControlsContainer=null}}var Uy=function(n,e,t,i){return new(t||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})};class Tm{constructor(){this.debuggerUI=new zne,this.consoleUI=new Bne,this._devConsoleEnabled=!1,this.consoleKeyPressEventListener=e=>{"Backquote"===e.code&&(e.preventDefault(),this.consoleUI.isUIShown?this.consoleUI.destroyUI():this.consoleUI.createUI())},this._selectedWorld=null,this.consoleCommands=new Map,this.registerConsoleCommand(null,"ls_commands",()=>Uy(this,void 0,void 0,function*(){return this.availableCommands.map(([e,t])=>`${e}${t.doc?'\t// '+t.doc+"":""}`).sort().join("\n\n")}),"no args; print all available commands"),this.registerConsoleCommand(null,"ls_worlds",()=>Uy(this,void 0,void 0,function*(){return nS.documentWorlds.map(e=>e===this.selectedWorld?`* ${e.name}`:` ${e.name}`).join("\n")}),"no args; print all available worlds"),this.registerConsoleCommand(null,"select_world",(...e)=>Uy(this,void 0,void 0,function*(){var t;for(const i of nS.documentWorlds)if(i.name===e[0]){this._selectedWorld=i;break}return(null===(t=this.selectedWorld)||void 0===t?void 0:t.name)||"null"}),"args: [string]; select world by name")}static get instance(){return Tm._instance||(Tm._instance=new Tm),Tm._instance}get devConsoleEnabled(){return this._devConsoleEnabled}set devConsoleEnabled(e){this._devConsoleEnabled!==e&&(this._devConsoleEnabled=e,e?addEventListener("keypress",this.consoleKeyPressEventListener):(removeEventListener("keypress",this.consoleKeyPressEventListener),this.consoleUI.isUIShown&&this.consoleUI.destroyUI()))}get showStats(){return this.debuggerUI.showStats}set showStats(e){this.debuggerUI.setShowStats(this.selectedWorld,e)}get showDebugControls(){return this.debuggerUI.showDebugControls}set showDebugControls(e){this.debuggerUI.setShowDebugControls(this.selectedWorld,e)}get selectedWorld(){return this._selectedWorld||nS.documentWorlds[0]||null}get availableCommands(){let e=this.consoleCommands.get(null)||{};return this.selectedWorld&&(e=Object.assign(Object.assign({},this.consoleCommands.get(this.selectedWorld)||{}),e)),Object.entries(e)}registerConsoleCommand(e,t,i,r){let s={};this.consoleCommands.has(e)?s=this.consoleCommands.get(e):this.consoleCommands.set(e,s),s[t]={handler:i,doc:r}}deregisterWorldCommands(e){this.consoleCommands.delete(e)}console(e){return Uy(this,void 0,void 0,function*(){const t=e.split("\n");let i=[];for(const r of t){const s=r.split(" ");i.push(yield this.runConsoleCommand(s.splice(0,1)[0],s))}return i.join("\n")})}runConsoleCommand(e,t){return Uy(this,void 0,void 0,function*(){let i=(this.consoleCommands.get(null)||{})[e];if(!i&&(i=(this.consoleCommands.get(this.selectedWorld)||{})[e],!i))return`Unrecognized command: ${e}`;try{return yield i.handler(...t)}catch(r){return`${r}`}})}}window.ggstatic=Tm.instance;const Hne=0,sz=1,Gne=2,oz=1,az=2,$c=3,Xl=0,vo=1,Vo=2,su=0,Dm=1,lz=2,cz=3,dz=4,Wne=5,Oh=100,$ne=101,jne=102,uz=103,hz=104,Xne=200,qne=201,Yne=202,Kne=203,gR=204,_R=205,Zne=206,Qne=207,Jne=208,eie=209,tie=210,nie=211,iie=212,rie=213,sie=214,oie=0,aie=1,lie=2,iS=3,cie=4,die=5,uie=6,hie=7,rS=0,fie=1,pie=2,ou=0,mie=1,gie=2,_ie=3,vie=4,yie=5,bie=6,fz="attached",jc=301,Lh=302,sS=303,oS=304,Vy=306,ql=1e3,qi=1001,zy=1002,Ni=1003,aS=1004,Hy=1005,Yi=1006,yR=1007,Xc=1008,au=1009,wie=1010,Mie=1011,bR=1012,pz=1013,lu=1014,Yl=1015,Gy=1016,mz=1017,gz=1018,Fh=1020,Sie=1021,zo=1023,Cie=1024,Eie=1025,Nh=1026,Im=1027,Aie=1028,_z=1029,Tie=1030,vz=1031,yz=1033,xR=33776,wR=33777,MR=33778,SR=33779,bz=35840,xz=35841,wz=35842,Mz=35843,Sz=36196,Cz=37492,Ez=37496,Az=37808,Tz=37809,Dz=37810,Iz=37811,Rz=37812,Pz=37813,kz=37814,Oz=37815,Lz=37816,Fz=37817,Nz=37818,Bz=37819,Uz=37820,Vz=37821,CR=36492,zz=36494,Hz=36495,Die=36283,Gz=36284,Wz=36285,$z=36286,Wy=2300,Rm=2301,kie=0,Xz=1,TR=2,cu=3001,Lie=3201,Bh=0,Fie=1,wa="",Ei="srgb",Hr="srgb-linear",DR="display-p3",cS="display-p3-linear",dS="linear",Ai="srgb",uS="rec709",hS="p3",Om=7680,Nie=512,Bie=513,Uie=514,Kz=515,Vie=516,zie=517,Hie=518,Gie=519,Zz="300 es",IR=1035,Kl=2e3;class Lm{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const i=this._listeners;void 0===i[e]&&(i[e]=[]),-1===i[e].indexOf(t)&&i[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const i=this._listeners;return void 0!==i[e]&&-1!==i[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const r=this._listeners[e];if(void 0!==r){const s=r.indexOf(t);-1!==s&&r.splice(s,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const i=this._listeners[e.type];if(void 0!==i){e.target=this;const r=i.slice(0);for(let s=0,o=r.length;s>8&255]+bs[n>>16&255]+bs[n>>24&255]+"-"+bs[255&e]+bs[e>>8&255]+"-"+bs[e>>16&15|64]+bs[e>>24&255]+"-"+bs[63&t|128]+bs[t>>8&255]+"-"+bs[t>>16&255]+bs[t>>24&255]+bs[255&i]+bs[i>>8&255]+bs[i>>16&255]+bs[i>>24&255]).toLowerCase()}function Ki(n,e,t){return Math.max(e,Math.min(t,n))}function RR(n,e){return(n%e+e)%e}function jy(n,e,t){return(1-t)*n+t*e}function PR(n){return 0==(n&n-1)&&0!==n}function pS(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function yo(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function mn(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(4294967295*n);case Uint16Array:return Math.round(65535*n);case Uint8Array:return Math.round(255*n);case Int32Array:return Math.round(2147483647*n);case Int16Array:return Math.round(32767*n);case Int8Array:return Math.round(127*n);default:throw new Error("Invalid component type.")}}const rre_radToDeg=function tre(n){return n*Fm};class Ce{constructor(e=0,t=0){Ce.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){const t=this.x,i=this.y,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6],this.y=r[1]*t+r[4]*i+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(Ki(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),r=Math.sin(t),s=this.x-e.x,o=this.y-e.y;return this.x=s*i-o*r+e.x,this.y=s*r+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class wn{constructor(e,t,i,r,s,o,a,l,c){wn.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,t,i,r,s,o,a,l,c)}set(e,t,i,r,s,o,a,l,c){const u=this.elements;return u[0]=e,u[1]=r,u[2]=a,u[3]=t,u[4]=s,u[5]=l,u[6]=i,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const 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){const i=e.elements,r=t.elements,s=this.elements,o=i[0],a=i[3],l=i[6],c=i[1],u=i[4],h=i[7],p=i[2],m=i[5],g=i[8],b=r[0],y=r[3],v=r[6],M=r[1],x=r[4],S=r[7],P=r[2],A=r[5],R=r[8];return s[0]=o*b+a*M+l*P,s[3]=o*y+a*x+l*A,s[6]=o*v+a*S+l*R,s[1]=c*b+u*M+h*P,s[4]=c*y+u*x+h*A,s[7]=c*v+u*S+h*R,s[2]=p*b+m*M+g*P,s[5]=p*y+m*x+g*A,s[8]=p*v+m*S+g*R,this}multiplyScalar(e){const 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(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return t*o*u-t*a*c-i*s*u+i*a*l+r*s*c-r*o*l}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=u*o-a*c,p=a*l-u*s,m=c*s-o*l,g=t*h+i*p+r*m;if(0===g)return this.set(0,0,0,0,0,0,0,0,0);const b=1/g;return e[0]=h*b,e[1]=(r*c-u*i)*b,e[2]=(a*i-r*o)*b,e[3]=p*b,e[4]=(u*t-r*l)*b,e[5]=(r*s-a*t)*b,e[6]=m*b,e[7]=(i*l-c*t)*b,e[8]=(o*t-i*s)*b,this}transpose(){let e;const 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){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,r,s,o,a){const l=Math.cos(s),c=Math.sin(s);return this.set(i*l,i*c,-i*(l*o+c*a)+o+e,-r*c,r*l,-r*(-c*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(kR.makeScale(e,t)),this}rotate(e){return this.premultiply(kR.makeRotation(-e)),this}translate(e,t){return this.premultiply(kR.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){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<9;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}const kR=new wn;function Jz(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}function Xy(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function ore(){const n=Xy("canvas");return n.style.display="block",n}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const eH={};function qy(n){n in eH||(eH[n]=!0,console.warn(n))}const tH=(new wn).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),nH=(new wn).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),mS={[Hr]:{transfer:dS,primaries:uS,toReference:n=>n,fromReference:n=>n},[Ei]:{transfer:Ai,primaries:uS,toReference:n=>n.convertSRGBToLinear(),fromReference:n=>n.convertLinearToSRGB()},[cS]:{transfer:dS,primaries:hS,toReference:n=>n.applyMatrix3(nH),fromReference:n=>n.applyMatrix3(tH)},[DR]:{transfer:Ai,primaries:hS,toReference:n=>n.convertSRGBToLinear().applyMatrix3(nH),fromReference:n=>n.applyMatrix3(tH).convertLinearToSRGB()}},are=new Set([Hr,cS]),ii={enabled:!0,_workingColorSpace:Hr,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(n){if(!are.has(n))throw new Error(`Unsupported working color space, "${n}".`);this._workingColorSpace=n},convert:function(n,e,t){return!1!==this.enabled&&e!==t&&e&&t?(0,mS[t].fromReference)((0,mS[e].toReference)(n)):n},fromWorkingColorSpace:function(n,e){return this.convert(n,this._workingColorSpace,e)},toWorkingColorSpace:function(n,e){return this.convert(n,e,this._workingColorSpace)},getPrimaries:function(n){return mS[n].primaries},getTransfer:function(n){return n===wa?dS:mS[n].transfer}};function Bm(n){return n<.04045?.0773993808*n:Math.pow(.9478672986*n+.0521327014,2.4)}function OR(n){return n<.0031308?12.92*n:1.055*Math.pow(n,.41666)-.055}let Um;class iH{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===Um&&(Um=Xy("canvas")),Um.width=e.width,Um.height=e.height;const i=Um.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=Um}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=Xy("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height),s=r.data;for(let o=0;o{class n extends Lm{constructor(t=n.DEFAULT_IMAGE,i=n.DEFAULT_MAPPING,r=qi,s=qi,o=Yi,a=Xc,l=zo,c=au,u=n.DEFAULT_ANISOTROPY,h=wa){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:cre++}),this.uuid=Ho(),this.name="",this.source=new Vm(t),this.mipmaps=[],this.mapping=i,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=u,this.format=l,this.internalFormat=null,this.type=c,this.offset=new Ce(0,0),this.repeat=new Ce(1,1),this.center=new Ce(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wn,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,"string"==typeof h?this.colorSpace=h:(qy("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=h===cu?Ei:wa),this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}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)}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.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}toJSON(t){const i=void 0===t||"string"==typeof t;if(!i&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];const r={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(r.userData=this.userData),i||(t.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(300!==this.mapping)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case ql:t.x=t.x-Math.floor(t.x);break;case qi:t.x=t.x<0?0:1;break;case zy:t.x=1===Math.abs(Math.floor(t.x)%2)?Math.ceil(t.x)-t.x:t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case ql:t.y=t.y-Math.floor(t.y);break;case qi:t.y=t.y<0?0:1;break;case zy:t.y=1===Math.abs(Math.floor(t.y)%2)?Math.ceil(t.y)-t.y:t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){!0===t&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return qy("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Ei?cu:3e3}set encoding(t){qy("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=t===cu?Ei:wa}}return n.DEFAULT_IMAGE=null,n.DEFAULT_MAPPING=300,n.DEFAULT_ANISOTROPY=1,n})();class ai{constructor(e=0,t=0,i=0,r=1){ai.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,r){return this.x=e,this.y=t,this.z=i,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?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){const t=this.x,i=this.y,r=this.z,s=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*r+o[12]*s,this.y=o[1]*t+o[5]*i+o[9]*r+o[13]*s,this.z=o[2]*t+o[6]*i+o[10]*r+o[14]*s,this.w=o[3]*t+o[7]*i+o[11]*r+o[15]*s,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,r,s;const l=e.elements,c=l[0],u=l[4],h=l[8],p=l[1],m=l[5],g=l[9],b=l[2],y=l[6],v=l[10];if(Math.abs(u-p)<.01&&Math.abs(h-b)<.01&&Math.abs(g-y)<.01){if(Math.abs(u+p)<.1&&Math.abs(h+b)<.1&&Math.abs(g+y)<.1&&Math.abs(c+m+v-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const x=(c+1)/2,S=(m+1)/2,P=(v+1)/2,A=(u+p)/4,R=(h+b)/4,V=(g+y)/4;return x>S&&x>P?x<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(x),r=A/i,s=R/i):S>P?S<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(S),i=A/r,s=V/r):P<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(P),i=R/s,r=V/s),this.set(i,r,s,t),this}let M=Math.sqrt((y-g)*(y-g)+(h-b)*(h-b)+(p-u)*(p-u));return Math.abs(M)<.001&&(M=1),this.x=(y-g)/M,this.y=(h-b)/M,this.z=(p-u)/M,this.w=Math.acos((c+m+v-1)/2),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=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class dre extends Lm{constructor(e=1,t=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new ai(0,0,e,t),this.scissorTest=!1,this.viewport=new ai(0,0,e,t);const r={width:e,height:t,depth:1};void 0!==i.encoding&&(qy("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),i.colorSpace=i.encoding===cu?Ei:wa),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Yi,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},i),this.texture=new sl(r,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=i.generateMipmaps,this.texture.internalFormat=i.internalFormat,this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.depthTexture=i.depthTexture,this.samples=i.samples}setSize(e,t,i=1){(this.width!==e||this.height!==t||this.depth!==i)&&(this.width=e,this.height=t,this.depth=i,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=i,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.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new Vm(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Vh extends dre{constructor(e=1,t=1,i={}){super(e,t,i),this.isWebGLRenderTarget=!0}}class FR extends sl{constructor(e=null,t=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=Ni,this.minFilter=Ni,this.wrapR=qi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class rH extends sl{constructor(e=null,t=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=Ni,this.minFilter=Ni,this.wrapR=qi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Qs{constructor(e=0,t=0,i=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=r}static slerpFlat(e,t,i,r,s,o,a){let l=i[r+0],c=i[r+1],u=i[r+2],h=i[r+3];const p=s[o+0],m=s[o+1],g=s[o+2],b=s[o+3];if(0===a)return e[t+0]=l,e[t+1]=c,e[t+2]=u,void(e[t+3]=h);if(1===a)return e[t+0]=p,e[t+1]=m,e[t+2]=g,void(e[t+3]=b);if(h!==b||l!==p||c!==m||u!==g){let y=1-a;const v=l*p+c*m+u*g+h*b,M=v>=0?1:-1,x=1-v*v;if(x>Number.EPSILON){const P=Math.sqrt(x),A=Math.atan2(P,v*M);y=Math.sin(y*A)/P,a=Math.sin(a*A)/P}const S=a*M;if(l=l*y+p*S,c=c*y+m*S,u=u*y+g*S,h=h*y+b*S,y===1-a){const P=1/Math.sqrt(l*l+c*c+u*u+h*h);l*=P,c*=P,u*=P,h*=P}}e[t]=l,e[t+1]=c,e[t+2]=u,e[t+3]=h}static multiplyQuaternionsFlat(e,t,i,r,s,o){const a=i[r],l=i[r+1],c=i[r+2],u=i[r+3],h=s[o],p=s[o+1],m=s[o+2],g=s[o+3];return e[t]=a*g+u*h+l*m-c*p,e[t+1]=l*g+u*p+c*h-a*m,e[t+2]=c*g+u*m+a*p-l*h,e[t+3]=u*g-a*h-l*p-c*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,r){return this._x=e,this._y=t,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const i=e._x,r=e._y,s=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(i/2),u=a(r/2),h=a(s/2),p=l(i/2),m=l(r/2),g=l(s/2);switch(o){case"XYZ":this._x=p*u*h+c*m*g,this._y=c*m*h-p*u*g,this._z=c*u*g+p*m*h,this._w=c*u*h-p*m*g;break;case"YXZ":this._x=p*u*h+c*m*g,this._y=c*m*h-p*u*g,this._z=c*u*g-p*m*h,this._w=c*u*h+p*m*g;break;case"ZXY":this._x=p*u*h-c*m*g,this._y=c*m*h+p*u*g,this._z=c*u*g+p*m*h,this._w=c*u*h-p*m*g;break;case"ZYX":this._x=p*u*h-c*m*g,this._y=c*m*h+p*u*g,this._z=c*u*g-p*m*h,this._w=c*u*h+p*m*g;break;case"YZX":this._x=p*u*h+c*m*g,this._y=c*m*h+p*u*g,this._z=c*u*g-p*m*h,this._w=c*u*h-p*m*g;break;case"XZY":this._x=p*u*h-c*m*g,this._y=c*m*h-p*u*g,this._z=c*u*g+p*m*h,this._w=c*u*h+p*m*g;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return!0===t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],r=t[4],s=t[8],o=t[1],a=t[5],l=t[9],c=t[2],u=t[6],h=t[10],p=i+a+h;if(p>0){const m=.5/Math.sqrt(p+1);this._w=.25/m,this._x=(u-l)*m,this._y=(s-c)*m,this._z=(o-r)*m}else if(i>a&&i>h){const m=2*Math.sqrt(1+i-a-h);this._w=(u-l)/m,this._x=.25*m,this._y=(r+o)/m,this._z=(s+c)/m}else if(a>h){const m=2*Math.sqrt(1+a-i-h);this._w=(s-c)/m,this._x=(r+o)/m,this._y=.25*m,this._z=(l+u)/m}else{const m=2*Math.sqrt(1+h-i-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+u)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Ki(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(0===i)return this;const r=Math.min(1,t/i);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(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){const i=e._x,r=e._y,s=e._z,o=e._w,a=t._x,l=t._y,c=t._z,u=t._w;return this._x=i*u+o*a+r*c-s*l,this._y=r*u+o*l+s*a-i*c,this._z=s*u+o*c+i*l-r*a,this._w=o*u-i*a-r*l-s*c,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const i=this._x,r=this._y,s=this._z,o=this._w;let a=o*e._w+i*e._x+r*e._y+s*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=r,this._z=s,this;const l=1-a*a;if(l<=Number.EPSILON){const m=1-t;return this._w=m*o+t*this._w,this._x=m*i+t*this._x,this._y=m*r+t*this._y,this._z=m*s+t*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),h=Math.sin((1-t)*u)/c,p=Math.sin(t*u)/c;return this._w=o*h+this._w*p,this._x=i*h+this._x*p,this._y=r*h+this._y*p,this._z=s*h+this._z*p,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=Math.random(),t=Math.sqrt(1-e),i=Math.sqrt(e),r=2*Math.PI*Math.random(),s=2*Math.PI*Math.random();return this.set(t*Math.cos(r),i*Math.sin(s),i*Math.cos(s),t*Math.sin(r))}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}}class N{constructor(e=0,t=0,i=0){N.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return void 0===i&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(sH.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(sH.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6]*r,this.y=s[1]*t+s[4]*i+s[7]*r,this.z=s[2]*t+s[5]*i+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=e.elements,o=1/(s[3]*t+s[7]*i+s[11]*r+s[15]);return this.x=(s[0]*t+s[4]*i+s[8]*r+s[12])*o,this.y=(s[1]*t+s[5]*i+s[9]*r+s[13])*o,this.z=(s[2]*t+s[6]*i+s[10]*r+s[14])*o,this}applyQuaternion(e){const t=this.x,i=this.y,r=this.z,s=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*r-a*i),u=2*(a*t-s*r),h=2*(s*i-o*t);return this.x=t+l*c+o*h-a*u,this.y=i+l*u+a*c-s*h,this.z=r+l*h+s*u-o*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*r,this.y=s[1]*t+s[5]*i+s[9]*r,this.z=s[2]*t+s[6]*i+s[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=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,r=e.y,s=e.z,o=t.x,a=t.y,l=t.z;return this.x=r*l-s*a,this.y=s*o-i*l,this.z=i*a-r*o,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return NR.copy(this).projectOnVector(e),this.sub(NR)}reflect(e){return this.sub(NR.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(Ki(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+i*i+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}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(){const e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(t),this.y=i*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const NR=new N,sH=new Qs;class xs{constructor(e=new N(1/0,1/0,1/0),t=new N(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.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.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,ol),ol.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Yy),_S.subVectors(this.max,Yy),zm.subVectors(e.a,Yy),Hm.subVectors(e.b,Yy),Gm.subVectors(e.c,Yy),du.subVectors(Hm,zm),uu.subVectors(Gm,Hm),zh.subVectors(zm,Gm);let t=[0,-du.z,du.y,0,-uu.z,uu.y,0,-zh.z,zh.y,du.z,0,-du.x,uu.z,0,-uu.x,zh.z,0,-zh.x,-du.y,du.x,0,-uu.y,uu.x,0,-zh.y,zh.x,0];return!(!BR(t,zm,Hm,Gm,_S)||(t=[1,0,0,0,1,0,0,0,1],!BR(t,zm,Hm,Gm,_S)))&&(vS.crossVectors(du,uu),t=[vS.x,vS.y,vS.z],BR(t,zm,Hm,Gm,_S))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,ol).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(ol).length()),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()||(qc[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),qc[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),qc[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),qc[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),qc[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),qc[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),qc[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),qc[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(qc)),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)}}const qc=[new N,new N,new N,new N,new N,new N,new N,new N],ol=new N,gS=new xs,zm=new N,Hm=new N,Gm=new N,du=new N,uu=new N,zh=new N,Yy=new N,_S=new N,vS=new N,Hh=new N;function BR(n,e,t,i,r){for(let s=0,o=n.length-3;s<=o;s+=3){Hh.fromArray(n,s);const a=r.x*Math.abs(Hh.x)+r.y*Math.abs(Hh.y)+r.z*Math.abs(Hh.z),l=e.dot(Hh),c=t.dot(Hh),u=i.dot(Hh);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const ure=new xs,Ky=new N,UR=new N;class ws{constructor(e=new N,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){const i=this.center;void 0!==t?i.copy(t):ure.setFromPoints(e).getCenter(i);let r=0;for(let s=0,o=e.length;sthis.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;Ky.subVectors(e,this.center);const t=Ky.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),r=.5*(i-this.radius);this.center.addScaledVector(Ky,r/i),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(UR.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Ky.copy(e.center).add(UR)),this.expandByPoint(Ky.copy(e.center).sub(UR))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Yc=new N,VR=new N,yS=new N,hu=new N,zR=new N,bS=new N,HR=new N;class Zy{constructor(e=new N,t=new N(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,Yc)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Yc.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Yc.copy(this.origin).addScaledVector(this.direction,t),Yc.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){VR.copy(e).add(t).multiplyScalar(.5),yS.copy(t).sub(e).normalize(),hu.copy(this.origin).sub(VR);const s=.5*e.distanceTo(t),o=-this.direction.dot(yS),a=hu.dot(this.direction),l=-hu.dot(yS),c=hu.lengthSq(),u=Math.abs(1-o*o);let h,p,m,g;if(u>0)if(h=o*l-a,p=o*a-l,g=s*u,h>=0)if(p>=-g)if(p<=g){const b=1/u;h*=b,p*=b,m=h*(h+o*p+2*a)+p*(o*h+p+2*l)+c}else p=s,h=Math.max(0,-(o*p+a)),m=-h*h+p*(p+2*l)+c;else p=-s,h=Math.max(0,-(o*p+a)),m=-h*h+p*(p+2*l)+c;else p<=-g?(h=Math.max(0,-(-o*s+a)),p=h>0?-s:Math.min(Math.max(-s,-l),s),m=-h*h+p*(p+2*l)+c):p<=g?(h=0,p=Math.min(Math.max(-s,-l),s),m=p*(p+2*l)+c):(h=Math.max(0,-(o*s+a)),p=h>0?s:Math.min(Math.max(-s,-l),s),m=-h*h+p*(p+2*l)+c);else p=o>0?-s:s,h=Math.max(0,-(o*p+a)),m=-h*h+p*(p+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,h),r&&r.copy(VR).addScaledVector(yS,p),m}intersectSphere(e,t){Yc.subVectors(e.center,this.origin);const i=Yc.dot(this.direction),r=Yc.dot(Yc)-i*i,s=e.radius*e.radius;if(r>s)return null;const o=Math.sqrt(s-r),a=i-o,l=i+o;return l<0?null:this.at(a<0?l:a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return null===i?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,r,s,o,a,l;const c=1/this.direction.x,u=1/this.direction.y,h=1/this.direction.z,p=this.origin;return c>=0?(i=(e.min.x-p.x)*c,r=(e.max.x-p.x)*c):(i=(e.max.x-p.x)*c,r=(e.min.x-p.x)*c),u>=0?(s=(e.min.y-p.y)*u,o=(e.max.y-p.y)*u):(s=(e.max.y-p.y)*u,o=(e.min.y-p.y)*u),i>o||s>r||((s>i||isNaN(i))&&(i=s),(o=0?(a=(e.min.z-p.z)*h,l=(e.max.z-p.z)*h):(a=(e.max.z-p.z)*h,l=(e.min.z-p.z)*h),i>l||a>r)||((a>i||i!=i)&&(i=a),(l=0?i:r,t)}intersectsBox(e){return null!==this.intersectBox(e,Yc)}intersectTriangle(e,t,i,r,s){zR.subVectors(t,e),bS.subVectors(i,e),HR.crossVectors(zR,bS);let a,o=this.direction.dot(HR);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}hu.subVectors(this.origin,e);const l=a*this.direction.dot(bS.crossVectors(hu,bS));if(l<0)return null;const c=a*this.direction.dot(zR.cross(hu));if(c<0||l+c>o)return null;const u=-a*hu.dot(HR);return u<0?null:this.at(u/o,s)}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)}}class kt{constructor(e,t,i,r,s,o,a,l,c,u,h,p,m,g,b,y){kt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==e&&this.set(e,t,i,r,s,o,a,l,c,u,h,p,m,g,b,y)}set(e,t,i,r,s,o,a,l,c,u,h,p,m,g,b,y){const v=this.elements;return v[0]=e,v[4]=t,v[8]=i,v[12]=r,v[1]=s,v[5]=o,v[9]=a,v[13]=l,v[2]=c,v[6]=u,v[10]=h,v[14]=p,v[3]=m,v[7]=g,v[11]=b,v[15]=y,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 kt).fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,r=1/Wm.setFromMatrixColumn(e,0).length(),s=1/Wm.setFromMatrixColumn(e,1).length(),o=1/Wm.setFromMatrixColumn(e,2).length();return t[0]=i[0]*r,t[1]=i[1]*r,t[2]=i[2]*r,t[3]=0,t[4]=i[4]*s,t[5]=i[5]*s,t[6]=i[6]*s,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,r=e.y,s=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(r),c=Math.sin(r),u=Math.cos(s),h=Math.sin(s);if("XYZ"===e.order){const p=o*u,m=o*h,g=a*u,b=a*h;t[0]=l*u,t[4]=-l*h,t[8]=c,t[1]=m+g*c,t[5]=p-b*c,t[9]=-a*l,t[2]=b-p*c,t[6]=g+m*c,t[10]=o*l}else if("YXZ"===e.order){const p=l*u,m=l*h,g=c*u,b=c*h;t[0]=p+b*a,t[4]=g*a-m,t[8]=o*c,t[1]=o*h,t[5]=o*u,t[9]=-a,t[2]=m*a-g,t[6]=b+p*a,t[10]=o*l}else if("ZXY"===e.order){const p=l*u,m=l*h,g=c*u,b=c*h;t[0]=p-b*a,t[4]=-o*h,t[8]=g+m*a,t[1]=m+g*a,t[5]=o*u,t[9]=b-p*a,t[2]=-o*c,t[6]=a,t[10]=o*l}else if("ZYX"===e.order){const p=o*u,m=o*h,g=a*u,b=a*h;t[0]=l*u,t[4]=g*c-m,t[8]=p*c+b,t[1]=l*h,t[5]=b*c+p,t[9]=m*c-g,t[2]=-c,t[6]=a*l,t[10]=o*l}else if("YZX"===e.order){const p=o*l,m=o*c,g=a*l,b=a*c;t[0]=l*u,t[4]=b-p*h,t[8]=g*h+m,t[1]=h,t[5]=o*u,t[9]=-a*u,t[2]=-c*u,t[6]=m*h+g,t[10]=p-b*h}else if("XZY"===e.order){const p=o*l,m=o*c,g=a*l,b=a*c;t[0]=l*u,t[4]=-h,t[8]=c*u,t[1]=p*h+b,t[5]=o*u,t[9]=m*h-g,t[2]=g*h-m,t[6]=a*u,t[10]=b*h+p}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(hre,e,fre)}lookAt(e,t,i){const r=this.elements;return Go.subVectors(e,t),0===Go.lengthSq()&&(Go.z=1),Go.normalize(),fu.crossVectors(i,Go),0===fu.lengthSq()&&(1===Math.abs(i.z)?Go.x+=1e-4:Go.z+=1e-4,Go.normalize(),fu.crossVectors(i,Go)),fu.normalize(),xS.crossVectors(Go,fu),r[0]=fu.x,r[4]=xS.x,r[8]=Go.x,r[1]=fu.y,r[5]=xS.y,r[9]=Go.y,r[2]=fu.z,r[6]=xS.z,r[10]=Go.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,s=this.elements,o=i[0],a=i[4],l=i[8],c=i[12],u=i[1],h=i[5],p=i[9],m=i[13],g=i[2],b=i[6],y=i[10],v=i[14],M=i[3],x=i[7],S=i[11],P=i[15],A=r[0],R=r[4],V=r[8],E=r[12],k=r[1],Z=r[5],ue=r[9],Me=r[13],W=r[2],ne=r[6],$=r[10],ee=r[14],ie=r[3],se=r[7],ve=r[11],Se=r[15];return s[0]=o*A+a*k+l*W+c*ie,s[4]=o*R+a*Z+l*ne+c*se,s[8]=o*V+a*ue+l*$+c*ve,s[12]=o*E+a*Me+l*ee+c*Se,s[1]=u*A+h*k+p*W+m*ie,s[5]=u*R+h*Z+p*ne+m*se,s[9]=u*V+h*ue+p*$+m*ve,s[13]=u*E+h*Me+p*ee+m*Se,s[2]=g*A+b*k+y*W+v*ie,s[6]=g*R+b*Z+y*ne+v*se,s[10]=g*V+b*ue+y*$+v*ve,s[14]=g*E+b*Me+y*ee+v*Se,s[3]=M*A+x*k+S*W+P*ie,s[7]=M*R+x*Z+S*ne+P*se,s[11]=M*V+x*ue+S*$+P*ve,s[15]=M*E+x*Me+S*ee+P*Se,this}multiplyScalar(e){const 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(){const e=this.elements,t=e[0],i=e[4],r=e[8],s=e[12],o=e[1],a=e[5],l=e[9],c=e[13],u=e[2],h=e[6],p=e[10],m=e[14];return e[3]*(+s*l*h-r*c*h-s*a*p+i*c*p+r*a*m-i*l*m)+e[7]*(+t*l*m-t*c*p+s*o*p-r*o*m+r*c*u-s*l*u)+e[11]*(+t*c*h-t*a*m-s*o*h+i*o*m+s*a*u-i*c*u)+e[15]*(-r*a*u-t*l*h+t*a*p+r*o*h-i*o*p+i*l*u)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=e[9],p=e[10],m=e[11],g=e[12],b=e[13],y=e[14],v=e[15],M=h*y*c-b*p*c+b*l*m-a*y*m-h*l*v+a*p*v,x=g*p*c-u*y*c-g*l*m+o*y*m+u*l*v-o*p*v,S=u*b*c-g*h*c+g*a*m-o*b*m-u*a*v+o*h*v,P=g*h*l-u*b*l-g*a*p+o*b*p+u*a*y-o*h*y,A=t*M+i*x+r*S+s*P;if(0===A)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const R=1/A;return e[0]=M*R,e[1]=(b*p*s-h*y*s-b*r*m+i*y*m+h*r*v-i*p*v)*R,e[2]=(a*y*s-b*l*s+b*r*c-i*y*c-a*r*v+i*l*v)*R,e[3]=(h*l*s-a*p*s-h*r*c+i*p*c+a*r*m-i*l*m)*R,e[4]=x*R,e[5]=(u*y*s-g*p*s+g*r*m-t*y*m-u*r*v+t*p*v)*R,e[6]=(g*l*s-o*y*s-g*r*c+t*y*c+o*r*v-t*l*v)*R,e[7]=(o*p*s-u*l*s+u*r*c-t*p*c-o*r*m+t*l*m)*R,e[8]=S*R,e[9]=(g*h*s-u*b*s-g*i*m+t*b*m+u*i*v-t*h*v)*R,e[10]=(o*b*s-g*a*s+g*i*c-t*b*c-o*i*v+t*a*v)*R,e[11]=(u*a*s-o*h*s-u*i*c+t*h*c+o*i*m-t*a*m)*R,e[12]=P*R,e[13]=(u*b*r-g*h*r+g*i*p-t*b*p-u*i*y+t*h*y)*R,e[14]=(g*a*r-o*b*r-g*i*l+t*b*l+o*i*y-t*a*y)*R,e[15]=(o*h*r-u*a*r+u*i*l-t*h*l-o*i*p+t*a*p)*R,this}scale(e){const t=this.elements,i=e.x,r=e.y,s=e.z;return t[0]*=i,t[4]*=r,t[8]*=s,t[1]*=i,t[5]*=r,t[9]*=s,t[2]*=i,t[6]*=r,t[10]*=s,t[3]*=i,t[7]*=r,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements;return Math.sqrt(Math.max(e[0]*e[0]+e[1]*e[1]+e[2]*e[2],e[4]*e[4]+e[5]*e[5]+e[6]*e[6],e[8]*e[8]+e[9]*e[9]+e[10]*e[10]))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),r=Math.sin(t),s=1-i,o=e.x,a=e.y,l=e.z,c=s*o,u=s*a;return this.set(c*o+i,c*a-r*l,c*l+r*a,0,c*a+r*l,u*a+i,u*l-r*o,0,c*l-r*a,u*l+r*o,s*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,r,s,o){return this.set(1,i,s,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,i){const r=this.elements,s=t._x,o=t._y,a=t._z,l=t._w,c=s+s,u=o+o,h=a+a,p=s*c,m=s*u,g=s*h,b=o*u,y=o*h,v=a*h,M=l*c,x=l*u,S=l*h,P=i.x,A=i.y,R=i.z;return r[0]=(1-(b+v))*P,r[1]=(m+S)*P,r[2]=(g-x)*P,r[3]=0,r[4]=(m-S)*A,r[5]=(1-(p+v))*A,r[6]=(y+M)*A,r[7]=0,r[8]=(g+x)*R,r[9]=(y-M)*R,r[10]=(1-(p+b))*R,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,i){const r=this.elements;let s=Wm.set(r[0],r[1],r[2]).length();const o=Wm.set(r[4],r[5],r[6]).length(),a=Wm.set(r[8],r[9],r[10]).length();this.determinant()<0&&(s=-s),e.x=r[12],e.y=r[13],e.z=r[14],al.copy(this);const c=1/s,u=1/o,h=1/a;return al.elements[0]*=c,al.elements[1]*=c,al.elements[2]*=c,al.elements[4]*=u,al.elements[5]*=u,al.elements[6]*=u,al.elements[8]*=h,al.elements[9]*=h,al.elements[10]*=h,t.setFromRotationMatrix(al),i.x=s,i.y=o,i.z=a,this}makePerspective(e,t,i,r,s,o,a=Kl){const l=this.elements,c=2*s/(t-e),u=2*s/(i-r),h=(t+e)/(t-e),p=(i+r)/(i-r);let m,g;if(a===Kl)m=-(o+s)/(o-s),g=-2*o*s/(o-s);else{if(2001!==a)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);m=-o/(o-s),g=-o*s/(o-s)}return l[0]=c,l[4]=0,l[8]=h,l[12]=0,l[1]=0,l[5]=u,l[9]=p,l[13]=0,l[2]=0,l[6]=0,l[10]=m,l[14]=g,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,i,r,s,o,a=Kl){const l=this.elements,c=1/(t-e),u=1/(i-r),h=1/(o-s),p=(t+e)*c,m=(i+r)*u;let g,b;if(a===Kl)g=(o+s)*h,b=-2*h;else{if(2001!==a)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);g=s*h,b=-1*h}return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-p,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-m,l[2]=0,l[6]=0,l[10]=b,l[14]=-g,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<16;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const Wm=new N,al=new kt,hre=new N(0,0,0),fre=new N(1,1,1),fu=new N,xS=new N,Go=new N,oH=new kt,aH=new Qs;let pre=(()=>{class n{constructor(t=0,i=0,r=0,s=n.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=i,this._z=r,this._order=s}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,i,r,s=this._order){return this._x=t,this._y=i,this._z=r,this._order=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,i=this._order,r=!0){const s=t.elements,o=s[0],a=s[4],l=s[8],c=s[1],u=s[5],h=s[9],p=s[2],m=s[6],g=s[10];switch(i){case"XYZ":this._y=Math.asin(Ki(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,g),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(m,u),this._z=0);break;case"YXZ":this._x=Math.asin(-Ki(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,g),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-p,o),this._z=0);break;case"ZXY":this._x=Math.asin(Ki(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-Ki(p,-1,1)),Math.abs(p)<.9999999?(this._x=Math.atan2(m,g),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u));break;case"YZX":this._z=Math.asin(Ki(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,u),this._y=Math.atan2(-p,o)):(this._x=0,this._y=Math.atan2(l,g));break;case"XZY":this._z=Math.asin(-Ki(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,u),this._y=Math.atan2(l,o)):(this._x=Math.atan2(-h,g),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+i)}return this._order=i,!0===r&&this._onChangeCallback(),this}setFromQuaternion(t,i,r){return oH.makeRotationFromQuaternion(t),this.setFromRotationMatrix(oH,i,r)}setFromVector3(t,i=this._order){return this.set(t.x,t.y,t.z,i)}reorder(t){return aH.setFromEuler(this),this.setFromQuaternion(aH,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],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],i=0){return t[i]=this._x,t[i+1]=this._y,t[i+2]=this._z,t[i+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}return n.DEFAULT_ORDER="XYZ",n})();class GR{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<{class n extends Lm{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:mre++}),this.uuid=Ho(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=n.DEFAULT_UP.clone();const t=new N,i=new pre,r=new Qs,s=new N(1,1,1);i._onChange(function o(){r.setFromEuler(i,!1)}),r._onChange(function a(){i.setFromQuaternion(r,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:i},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:s},modelViewMatrix:{value:new kt},normalMatrix:{value:new wn}}),this.matrix=new kt,this.matrixWorld=new kt,this.matrixAutoUpdate=n.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=n.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new GR,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,i){this.quaternion.setFromAxisAngle(t,i)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,i){return $m.setFromAxisAngle(t,i),this.quaternion.multiply($m),this}rotateOnWorldAxis(t,i){return $m.setFromAxisAngle(t,i),this.quaternion.premultiply($m),this}rotateX(t){return this.rotateOnAxis(cH,t)}rotateY(t){return this.rotateOnAxis(dH,t)}rotateZ(t){return this.rotateOnAxis(uH,t)}translateOnAxis(t,i){return lH.copy(t).applyQuaternion(this.quaternion),this.position.add(lH.multiplyScalar(i)),this}translateX(t){return this.translateOnAxis(cH,t)}translateY(t){return this.translateOnAxis(dH,t)}translateZ(t){return this.translateOnAxis(uH,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(Kc.copy(this.matrixWorld).invert())}lookAt(t,i,r){t.isVector3?wS.copy(t):wS.set(t,i,r);const s=this.parent;this.updateWorldMatrix(!0,!1),Qy.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Kc.lookAt(Qy,wS,this.up):Kc.lookAt(wS,Qy,this.up),this.quaternion.setFromRotationMatrix(Kc),s&&(Kc.extractRotation(s.matrixWorld),$m.setFromRotationMatrix(Kc),this.quaternion.premultiply($m.invert()))}add(t){if(arguments.length>1){for(let i=0;i1){for(let r=0;r0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(s.matrixAutoUpdate=!1),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(s.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.visibility=this._visibility,s.active=this._active,s.bounds=this._bounds.map(l=>({boxInitialized:l.boxInitialized,boxMin:l.box.min.toArray(),boxMax:l.box.max.toArray(),sphereInitialized:l.sphereInitialized,sphereRadius:l.sphere.radius,sphereCenter:l.sphere.center.toArray()})),s.maxGeometryCount=this._maxGeometryCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(t),null!==this.boundingSphere&&(s.boundingSphere={center:s.boundingSphere.center.toArray(),radius:s.boundingSphere.radius}),null!==this.boundingBox&&(s.boundingBox={min:s.boundingBox.min.toArray(),max:s.boundingBox.max.toArray()})),this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(s.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=o(t.geometries,this.geometry);const l=this.geometry.parameters;if(void 0!==l&&void 0!==l.shapes){const c=l.shapes;if(Array.isArray(c))for(let u=0,h=c.length;u0){s.children=[];for(let l=0;l0){s.animations=[];for(let l=0;l0&&(r.geometries=l),c.length>0&&(r.materials=c),u.length>0&&(r.textures=u),h.length>0&&(r.images=h),p.length>0&&(r.shapes=p),m.length>0&&(r.skeletons=m),g.length>0&&(r.animations=g),b.length>0&&(r.nodes=b)}return r.object=s,r;function a(l){const c=[];for(const u in l){const h=l[u];delete h.metadata,c.push(h)}return c}}clone(t){return(new this.constructor).copy(this,t)}copy(t,i=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),!0===i)for(let r=0;r0?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,t,i,r,s){ll.subVectors(r,t),Zc.subVectors(i,t),WR.subVectors(e,t);const o=ll.dot(ll),a=ll.dot(Zc),l=ll.dot(WR),c=Zc.dot(Zc),u=Zc.dot(WR),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const p=1/h,m=(c*l-a*u)*p,g=(o*u-a*l)*p;return s.set(1-m-g,g,m)}static containsPoint(e,t,i,r){return null!==this.getBarycoord(e,t,i,r,Qc)&&Qc.x>=0&&Qc.y>=0&&Qc.x+Qc.y<=1}static getUV(e,t,i,r,s,o,a,l){return!1===MS&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),MS=!0),this.getInterpolation(e,t,i,r,s,o,a,l)}static getInterpolation(e,t,i,r,s,o,a,l){return null===this.getBarycoord(e,t,i,r,Qc)?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,Qc.x),l.addScaledVector(o,Qc.y),l.addScaledVector(a,Qc.z),l)}static isFrontFacing(e,t,i,r){return ll.subVectors(i,t),Zc.subVectors(e,t),ll.cross(Zc).dot(r)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,i,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return ll.subVectors(this.c,this.b),Zc.subVectors(this.a,this.b),.5*ll.cross(Zc).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Wo.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Wo.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,i,r,s){return!1===MS&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),MS=!0),Wo.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}getInterpolation(e,t,i,r,s){return Wo.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}containsPoint(e){return Wo.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Wo.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,r=this.b,s=this.c;let o,a;jm.subVectors(r,i),Xm.subVectors(s,i),$R.subVectors(e,i);const l=jm.dot($R),c=Xm.dot($R);if(l<=0&&c<=0)return t.copy(i);jR.subVectors(e,r);const u=jm.dot(jR),h=Xm.dot(jR);if(u>=0&&h<=u)return t.copy(r);const p=l*h-u*c;if(p<=0&&l>=0&&u<=0)return o=l/(l-u),t.copy(i).addScaledVector(jm,o);XR.subVectors(e,s);const m=jm.dot(XR),g=Xm.dot(XR);if(g>=0&&m<=g)return t.copy(s);const b=m*c-l*g;if(b<=0&&c>=0&&g<=0)return a=c/(c-g),t.copy(i).addScaledVector(Xm,a);const y=u*g-m*h;if(y<=0&&h-u>=0&&m-g>=0)return hH.subVectors(s,r),a=(h-u)/(h-u+(m-g)),t.copy(r).addScaledVector(hH,a);const v=1/(y+b+p);return o=b*v,a=p*v,t.copy(i).addScaledVector(jm,o).addScaledVector(Xm,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const fH={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},pu={h:0,s:0,l:0},SS={h:0,s:0,l:0};function qR(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+6*(e-n)*t:t<.5?e:t<2/3?n+6*(e-n)*(2/3-t):n}class We{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(void 0===t&&void 0===i){const r=e;r&&r.isColor?this.copy(r):"number"==typeof r?this.setHex(r):"string"==typeof r&&this.setStyle(r)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Ei){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,ii.toWorkingColorSpace(this,t),this}setRGB(e,t,i,r=ii.workingColorSpace){return this.r=e,this.g=t,this.b=i,ii.toWorkingColorSpace(this,r),this}setHSL(e,t,i,r=ii.workingColorSpace){if(e=RR(e,1),t=Ki(t,0,1),i=Ki(i,0,1),0===t)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+t):i+t-i*t,o=2*i-s;this.r=qR(o,s,e+1/3),this.g=qR(o,s,e),this.b=qR(o,s,e-1/3)}return ii.toWorkingColorSpace(this,r),this}setStyle(e,t=Ei){function i(s){void 0!==s&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const a=r[2];switch(r[1]){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,t);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,t);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=r[1],o=s.length;if(3===o)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(6===o)return this.setHex(parseInt(s,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Ei){const i=fH[e.toLowerCase()];return void 0!==i?this.setHex(i,t):console.warn("THREE.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=Bm(e.r),this.g=Bm(e.g),this.b=Bm(e.b),this}copyLinearToSRGB(e){return this.r=OR(e.r),this.g=OR(e.g),this.b=OR(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Ei){return ii.fromWorkingColorSpace(Ms.copy(this),e),65536*Math.round(Ki(255*Ms.r,0,255))+256*Math.round(Ki(255*Ms.g,0,255))+Math.round(Ki(255*Ms.b,0,255))}getHexString(e=Ei){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=ii.workingColorSpace){ii.fromWorkingColorSpace(Ms.copy(this),t);const i=Ms.r,r=Ms.g,s=Ms.b,o=Math.max(i,r,s),a=Math.min(i,r,s);let l,c;const u=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=u<=.5?h/(o+a):h/(2-o-a),o){case i:l=(r-s)/h+(r0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const i=e[t];if(void 0===i){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[t]=i:console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`)}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function r(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),void 0!==this.sheen&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearcoat&&(i.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(i.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(i.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),void 0!==this.anisotropy&&(i.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(i.combine=this.combine)),void 0!==this.envMapIntensity&&(i.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(i.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(i.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(i.size=this.size),null!==this.shadowSide&&(i.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Dm&&(i.blending=this.blending),this.side!==Xl&&(i.side=this.side),!0===this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),!0===this.transparent&&(i.transparent=!0),this.blendSrc!==gR&&(i.blendSrc=this.blendSrc),this.blendDst!==_R&&(i.blendDst=this.blendDst),this.blendEquation!==Oh&&(i.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(i.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(i.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==iS&&(i.depthFunc=this.depthFunc),!1===this.depthTest&&(i.depthTest=this.depthTest),!1===this.depthWrite&&(i.depthWrite=this.depthWrite),!1===this.colorWrite&&(i.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(i.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(i.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(i.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Om&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Om&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Om&&(i.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(i.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(i.rotation=this.rotation),!0===this.polygonOffset&&(i.polygonOffset=!0),0!==this.polygonOffsetFactor&&(i.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(i.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(i.linewidth=this.linewidth),void 0!==this.dashSize&&(i.dashSize=this.dashSize),void 0!==this.gapSize&&(i.gapSize=this.gapSize),void 0!==this.scale&&(i.scale=this.scale),!0===this.dithering&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),!0===this.alphaHash&&(i.alphaHash=!0),!0===this.alphaToCoverage&&(i.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(i.premultipliedAlpha=!0),!0===this.forceSinglePass&&(i.forceSinglePass=!0),!0===this.wireframe&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(i.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(i.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(i.flatShading=!0),!1===this.visible&&(i.visible=!1),!1===this.toneMapped&&(i.toneMapped=!1),!1===this.fog&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData),t){const s=r(e.textures),o=r(e.images);s.length>0&&(i.textures=s),o.length>0&&(i.images=o)}return i}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(null!==t){const r=t.length;i=new Array(r);for(let s=0;s!==r;++s)i[s]=t[s].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}class as extends bo{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new We(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.combine=rS,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.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}}const gr=new N,CS=new Ce;class _i{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=i,this.usage=35044,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Yl,this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}get updateRange(){return console.warn("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let r=0,s=this.itemSize;r0&&(e.userData=this.userData),void 0!==this.parameters){const l=this.parameters;for(const c in l)void 0!==l[c]&&(e[c]=l[c]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const l in i)e.data.attributes[l]=i[l].toJSON(e.data);const r={};let s=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let h=0,p=c.length;h0&&(r[l]=u,s=!0)}s&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return null!==a&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),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;const t={};this.name=e.name;const i=e.index;null!==i&&this.setIndex(i.clone(t));const r=e.attributes;for(const c in r)this.setAttribute(c,r[c].clone(t));const s=e.morphAttributes;for(const c in s){const u=[],h=s[c];for(let p=0,m=h.length;p0){const r=t[i[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s(e.far-e.near)**2))&&(gH.copy(s).invert(),Gh.copy(e.ray).applyMatrix4(gH),(null===i.boundingBox||!1!==Gh.intersectsBox(i.boundingBox))&&this._computeIntersections(e,t,Gh)))}_computeIntersections(e,t,i){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,u=s.attributes.uv1,h=s.attributes.normal,p=s.groups,m=s.drawRange;if(null!==a)if(Array.isArray(o))for(let g=0,b=p.length;gt.far?null:{distance:c,point:PS.clone(),object:n}}(n,e,t,i,Ym,Km,Zm,RS);if(u){r&&(TS.fromBufferAttribute(r,a),DS.fromBufferAttribute(r,l),IS.fromBufferAttribute(r,c),u.uv=Wo.getInterpolation(RS,Ym,Km,Zm,TS,DS,IS,new Ce)),s&&(TS.fromBufferAttribute(s,a),DS.fromBufferAttribute(s,l),IS.fromBufferAttribute(s,c),u.uv1=Wo.getInterpolation(RS,Ym,Km,Zm,TS,DS,IS,new Ce),u.uv2=u.uv1),o&&(vH.fromBufferAttribute(o,a),yH.fromBufferAttribute(o,l),bH.fromBufferAttribute(o,c),u.normal=Wo.getInterpolation(RS,Ym,Km,Zm,vH,yH,bH,new N),u.normal.dot(i.direction)>0&&u.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new N,materialIndex:0};Wo.getNormal(Ym,Km,Zm,h.normal),u.face=h}return u}class Wh extends cn{constructor(e=1,t=1,i=1,r=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:r,heightSegments:s,depthSegments:o};const a=this;r=Math.floor(r),s=Math.floor(s),o=Math.floor(o);const l=[],c=[],u=[],h=[];let p=0,m=0;function g(b,y,v,M,x,S,P,A,R,V,E){const k=S/R,Z=P/V,ue=S/2,Me=P/2,W=A/2,ne=R+1,$=V+1;let ee=0,ie=0;const se=new N;for(let ve=0;ve<$;ve++){const Se=ve*Z-Me;for(let Oe=0;Oe0?1:-1,u.push(se.x,se.y,se.z),h.push(Oe/R),h.push(1-ve/V),ee+=1}for(let ve=0;ve0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const i={};for(const r in this.extensions)!0===this.extensions[r]&&(i[r]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class ZR extends Gr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new kt,this.projectionMatrix=new kt,this.projectionMatrixInverse=new kt,this.coordinateSystem=Kl}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}class _r extends ZR{constructor(e=50,t=1,i=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*Fm*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*Uh*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*Fm*Math.atan(Math.tan(.5*Uh*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,i,r,s,o){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*Uh*this.fov)/this.zoom,i=2*t,r=this.aspect*i,s=-.5*r;const o=this.view;if(null!==this.view&&this.view.enabled){const l=o.fullWidth,c=o.fullHeight;s+=o.offsetX*r/l,t-=o.offsetY*i/c,r*=o.width/l,i*=o.height/c}const a=this.filmOffset;0!==a&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+r,t,t-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}class Tre extends Gr{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new _r(-90,1,e,t);r.layers=this.layers,this.add(r);const s=new _r(-90,1,e,t);s.layers=this.layers,this.add(s);const o=new _r(-90,1,e,t);o.layers=this.layers,this.add(o);const a=new _r(-90,1,e,t);a.layers=this.layers,this.add(a);const l=new _r(-90,1,e,t);l.layers=this.layers,this.add(l);const c=new _r(-90,1,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,r,s,o,a,l]=t;for(const c of t)this.remove(c);if(e===Kl)i.up.set(0,1,0),i.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),s.up.set(0,0,-1),s.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else{if(2001!==e)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);i.up.set(0,-1,0),i.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),s.up.set(0,0,1),s.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1)}for(const c of t)this.add(c),c.updateMatrixWorld()}update(e,t){null===this.parent&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,o,a,l,c,u]=this.children,h=e.getRenderTarget(),p=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),g=e.xr.enabled;e.xr.enabled=!1;const b=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,r),e.render(t,s),e.setRenderTarget(i,1,r),e.render(t,o),e.setRenderTarget(i,2,r),e.render(t,a),e.setRenderTarget(i,3,r),e.render(t,l),e.setRenderTarget(i,4,r),e.render(t,c),i.texture.generateMipmaps=b,e.setRenderTarget(i,5,r),e.render(t,u),e.setRenderTarget(h,p,m),e.xr.enabled=g,i.texture.needsPMREMUpdate=!0}}class OS extends sl{constructor(e,t,i,r,s,o,a,l,c,u){super(e=void 0!==e?e:[],t=void 0!==t?t:jc,i,r,s,o,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class Dre extends Vh{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},r=[i,i,i,i,i,i];void 0!==t.encoding&&(qy("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===cu?Ei:wa),this.texture=new OS(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:Yi}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const i_uniforms={tEquirect:{value:null}},i_vertexShader="\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",i_fragmentShader="\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",r=new Wh(5,5,5),s=new mu({name:"CubemapFromEquirect",uniforms:Qm(i_uniforms),vertexShader:i_vertexShader,fragmentShader:i_fragmentShader,side:vo,blending:su});s.uniforms.tEquirect.value=t;const o=new Yn(r,s),a=t.minFilter;return t.minFilter===Xc&&(t.minFilter=Yi),new Tre(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,i,r){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,i,r);e.setRenderTarget(s)}}const QR=new N,Ire=new N,Rre=new wn;class $h{constructor(e=new N(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,r){return this.normal.set(e,t,i),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const r=QR.subVectors(i,t).cross(Ire.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const i=e.delta(QR),r=this.normal.dot(i);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/r;return s<0||s>1?null:t.copy(e.start).addScaledVector(i,s)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||Rre.getNormalMatrix(e),r=this.coplanarPoint(QR).applyMatrix4(e),s=this.normal.applyMatrix3(i).normalize();return this.constant=-r.dot(s),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const jh=new ws,LS=new N;class FS{constructor(e=new $h,t=new $h,i=new $h,r=new $h,s=new $h,o=new $h){this.planes=[e,t,i,r,s,o]}set(e,t,i,r,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(r),a[4].copy(s),a[5].copy(o),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=Kl){const i=this.planes,r=e.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],u=r[5],h=r[6],p=r[7],m=r[8],g=r[9],b=r[10],y=r[11],v=r[12],M=r[13],x=r[14],S=r[15];if(i[0].setComponents(l-s,p-c,y-m,S-v).normalize(),i[1].setComponents(l+s,p+c,y+m,S+v).normalize(),i[2].setComponents(l+o,p+u,y+g,S+M).normalize(),i[3].setComponents(l-o,p-u,y-g,S-M).normalize(),i[4].setComponents(l-a,p-h,y-b,S-x).normalize(),t===Kl)i[5].setComponents(l+a,p+h,y+b,S+x).normalize();else{if(2001!==t)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);i[5].setComponents(a,h,b,x).normalize()}return this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),jh.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),jh.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(jh)}intersectsSprite(e){return jh.center.set(0,0,0),jh.radius=.7071067811865476,jh.applyMatrix4(e.matrixWorld),this.intersectsSphere(jh)}intersectsSphere(e){const t=this.planes,i=e.center,r=-e.radius;for(let s=0;s<6;s++)if(t[s].distanceToPoint(i)0?e.max.x:e.min.x,LS.y=r.normal.y>0?e.max.y:e.min.y,LS.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(LS)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function wH(){let n=null,e=!1,t=null,i=null;function r(s,o){t(s,o),i=n.requestAnimationFrame(r)}return{start:function(){!0!==e&&null!==t&&(i=n.requestAnimationFrame(r),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(s){t=s},setContext:function(s){n=s}}}function Pre(n,e){const t=e.isWebGL2,i=new WeakMap;return{get:function o(c){return c.isInterleavedBufferAttribute&&(c=c.data),i.get(c)},remove:function a(c){c.isInterleavedBufferAttribute&&(c=c.data);const u=i.get(c);u&&(n.deleteBuffer(u.buffer),i.delete(c))},update:function l(c,u){if(c.isGLBufferAttribute){const p=i.get(c);return void((!p||p.version 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn sRGBTransferOETF( value );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor *= toneMappingExposure;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\treturn color;\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"},He={common:{diffuse:{value:new We(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new wn}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new wn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new wn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new wn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new wn},normalScale:{value:new Ce(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new wn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new wn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new wn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new wn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new We(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new We(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0},uvTransform:{value:new wn}},sprite:{diffuse:{value:new We(16777215)},opacity:{value:1},center:{value:new Ce(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new wn},alphaMap:{value:null},alphaMapTransform:{value:new wn},alphaTest:{value:0}}},Zl={basic:{uniforms:Js([He.common,He.specularmap,He.envmap,He.aomap,He.lightmap,He.fog]),vertexShader:vn.meshbasic_vert,fragmentShader:vn.meshbasic_frag},lambert:{uniforms:Js([He.common,He.specularmap,He.envmap,He.aomap,He.lightmap,He.emissivemap,He.bumpmap,He.normalmap,He.displacementmap,He.fog,He.lights,{emissive:{value:new We(0)}}]),vertexShader:vn.meshlambert_vert,fragmentShader:vn.meshlambert_frag},phong:{uniforms:Js([He.common,He.specularmap,He.envmap,He.aomap,He.lightmap,He.emissivemap,He.bumpmap,He.normalmap,He.displacementmap,He.fog,He.lights,{emissive:{value:new We(0)},specular:{value:new We(1118481)},shininess:{value:30}}]),vertexShader:vn.meshphong_vert,fragmentShader:vn.meshphong_frag},standard:{uniforms:Js([He.common,He.envmap,He.aomap,He.lightmap,He.emissivemap,He.bumpmap,He.normalmap,He.displacementmap,He.roughnessmap,He.metalnessmap,He.fog,He.lights,{emissive:{value:new We(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:vn.meshphysical_vert,fragmentShader:vn.meshphysical_frag},toon:{uniforms:Js([He.common,He.aomap,He.lightmap,He.emissivemap,He.bumpmap,He.normalmap,He.displacementmap,He.gradientmap,He.fog,He.lights,{emissive:{value:new We(0)}}]),vertexShader:vn.meshtoon_vert,fragmentShader:vn.meshtoon_frag},matcap:{uniforms:Js([He.common,He.bumpmap,He.normalmap,He.displacementmap,He.fog,{matcap:{value:null}}]),vertexShader:vn.meshmatcap_vert,fragmentShader:vn.meshmatcap_frag},points:{uniforms:Js([He.points,He.fog]),vertexShader:vn.points_vert,fragmentShader:vn.points_frag},dashed:{uniforms:Js([He.common,He.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:vn.linedashed_vert,fragmentShader:vn.linedashed_frag},depth:{uniforms:Js([He.common,He.displacementmap]),vertexShader:vn.depth_vert,fragmentShader:vn.depth_frag},normal:{uniforms:Js([He.common,He.bumpmap,He.normalmap,He.displacementmap,{opacity:{value:1}}]),vertexShader:vn.meshnormal_vert,fragmentShader:vn.meshnormal_frag},sprite:{uniforms:Js([He.sprite,He.fog]),vertexShader:vn.sprite_vert,fragmentShader:vn.sprite_frag},background:{uniforms:{uvTransform:{value:new wn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:vn.background_vert,fragmentShader:vn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:vn.backgroundCube_vert,fragmentShader:vn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:vn.cube_vert,fragmentShader:vn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:vn.equirect_vert,fragmentShader:vn.equirect_frag},distanceRGBA:{uniforms:Js([He.common,He.displacementmap,{referencePosition:{value:new N},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:vn.distanceRGBA_vert,fragmentShader:vn.distanceRGBA_frag},shadow:{uniforms:Js([He.lights,He.fog,{color:{value:new We(0)},opacity:{value:1}}]),vertexShader:vn.shadow_vert,fragmentShader:vn.shadow_frag}};Zl.physical={uniforms:Js([Zl.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new wn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new wn},clearcoatNormalScale:{value:new Ce(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new wn},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new wn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new wn},sheen:{value:0},sheenColor:{value:new We(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new wn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new wn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new wn},transmissionSamplerSize:{value:new Ce},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new wn},attenuationDistance:{value:0},attenuationColor:{value:new We(0)},specularColor:{value:new We(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new wn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new wn},anisotropyVector:{value:new Ce},anisotropyMap:{value:null},anisotropyMapTransform:{value:new wn}}]),vertexShader:vn.meshphysical_vert,fragmentShader:vn.meshphysical_frag};const NS={r:0,b:0,g:0};function Poe(n,e,t,i,r,s,o){const a=new We(0);let c,u,l=!0===s?0:1,h=null,p=0,m=null;function b(y,v){y.getRGB(NS,xH(n)),i.buffers.color.setClear(NS.r,NS.g,NS.b,v,o)}return{getClearColor:function(){return a},setClearColor:function(y,v=1){a.set(y),l=v,b(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(y){l=y,b(a,l)},render:function g(y,v){let M=!1,x=!0===v.isScene?v.background:null;x&&x.isTexture&&(x=(v.backgroundBlurriness>0?t:e).get(x)),null===x?b(a,l):x&&x.isColor&&(b(x,1),M=!0);const S=n.xr.getEnvironmentBlendMode();"additive"===S?i.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===S&&i.buffers.color.setClear(0,0,0,0,o),(n.autoClear||M)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),x&&(x.isCubeTexture||x.mapping===Vy)?(void 0===u&&(u=new Yn(new Wh(1,1,1),new mu({name:"BackgroundCubeMaterial",uniforms:Qm(Zl.backgroundCube.uniforms),vertexShader:Zl.backgroundCube.vertexShader,fragmentShader:Zl.backgroundCube.fragmentShader,side:vo,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(P,A,R){this.matrixWorld.copyPosition(R.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(u)),u.material.uniforms.envMap.value=x,u.material.uniforms.flipEnvMap.value=x.isCubeTexture&&!1===x.isRenderTargetTexture?-1:1,u.material.uniforms.backgroundBlurriness.value=v.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,u.material.toneMapped=ii.getTransfer(x.colorSpace)!==Ai,(h!==x||p!==x.version||m!==n.toneMapping)&&(u.material.needsUpdate=!0,h=x,p=x.version,m=n.toneMapping),u.layers.enableAll(),y.unshift(u,u.geometry,u.material,0,0,null)):x&&x.isTexture&&(void 0===c&&(c=new Yn(new tg(2,2),new mu({name:"BackgroundMaterial",uniforms:Qm(Zl.background.uniforms),vertexShader:Zl.background.vertexShader,fragmentShader:Zl.background.fragmentShader,side:Xl,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(c)),c.material.uniforms.t2D.value=x,c.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,c.material.toneMapped=ii.getTransfer(x.colorSpace)!==Ai,!0===x.matrixAutoUpdate&&x.updateMatrix(),c.material.uniforms.uvTransform.value.copy(x.matrix),(h!==x||p!==x.version||m!==n.toneMapping)&&(c.material.needsUpdate=!0,h=x,p=x.version,m=n.toneMapping),c.layers.enableAll(),y.unshift(c,c.geometry,c.material,0,0,null))}}}function koe(n,e,t,i){const r=n.getParameter(n.MAX_VERTEX_ATTRIBS),s=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||null!==s,a={},l=y(null);let c=l,u=!1;function m(W){return i.isWebGL2?n.bindVertexArray(W):s.bindVertexArrayOES(W)}function g(W){return i.isWebGL2?n.deleteVertexArray(W):s.deleteVertexArrayOES(W)}function y(W){const ne=[],$=[],ee=[];for(let ie=0;ie=0){const me=ie[Oe];let Ve=se[Oe];if(void 0===Ve&&("instanceMatrix"===Oe&&W.instanceMatrix&&(Ve=W.instanceMatrix),"instanceColor"===Oe&&W.instanceColor&&(Ve=W.instanceColor)),void 0===me||me.attribute!==Ve||Ve&&me.data!==Ve.data)return!0;ve++}return c.attributesNum!==ve||c.index!==ee}(W,ee,$,ie),se&&function M(W,ne,$,ee){const ie={},se=ne.attributes;let ve=0;const Se=$.getAttributes();for(const Oe in Se)if(Se[Oe].location>=0){let me=se[Oe];void 0===me&&("instanceMatrix"===Oe&&W.instanceMatrix&&(me=W.instanceMatrix),"instanceColor"===Oe&&W.instanceColor&&(me=W.instanceColor));const Ve={};Ve.attribute=me,me&&me.data&&(Ve.data=me.data),ie[Oe]=Ve,ve++}c.attributes=ie,c.attributesNum=ve,c.index=ee}(W,ee,$,ie)}else{const ve=!0===ne.wireframe;(c.geometry!==ee.id||c.program!==$.id||c.wireframe!==ve)&&(c.geometry=ee.id,c.program=$.id,c.wireframe=ve,se=!0)}null!==ie&&t.update(ie,n.ELEMENT_ARRAY_BUFFER),(se||u)&&(u=!1,function V(W,ne,$,ee){if(!1===i.isWebGL2&&(W.isInstancedMesh||ee.isInstancedBufferGeometry)&&null===e.get("ANGLE_instanced_arrays"))return;x();const ie=ee.attributes,se=$.getAttributes(),ve=ne.defaultAttributeValues;for(const Se in se){const Oe=se[Se];if(Oe.location>=0){let le=ie[Se];if(void 0===le&&("instanceMatrix"===Se&&W.instanceMatrix&&(le=W.instanceMatrix),"instanceColor"===Se&&W.instanceColor&&(le=W.instanceColor)),void 0!==le){const me=le.normalized,Ve=le.itemSize,rt=t.get(le);if(void 0===rt)continue;const Be=rt.buffer,mt=rt.type,gt=rt.bytesPerElement,tt=!0===i.isWebGL2&&(mt===n.INT||mt===n.UNSIGNED_INT||le.gpuType===pz);if(le.isInterleavedBufferAttribute){const Rt=le.data,H=Rt.stride,ze=le.offset;if(Rt.isInstancedInterleavedBuffer){for(let we=0;we0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";R="mediump"}return"mediump"===R&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&"WebGL2RenderingContext"===n.constructor.name;let a=void 0!==t.precision?t.precision:"highp";const l=s(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const c=o||e.has("WEBGL_draw_buffers"),u=!0===t.logarithmicDepthBuffer,h=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),p=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),m=n.getParameter(n.MAX_TEXTURE_SIZE),g=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),b=n.getParameter(n.MAX_VERTEX_ATTRIBS),y=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),v=n.getParameter(n.MAX_VARYING_VECTORS),M=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),x=p>0,S=o||e.has("OES_texture_float");return{isWebGL2:o,drawBuffers:c,getMaxAnisotropy:function r(){if(void 0!==i)return i;if(!0===e.has("EXT_texture_filter_anisotropic")){const R=e.get("EXT_texture_filter_anisotropic");i=n.getParameter(R.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i},getMaxPrecision:s,precision:a,logarithmicDepthBuffer:u,maxTextures:h,maxVertexTextures:p,maxTextureSize:m,maxCubemapSize:g,maxAttributes:b,maxVertexUniforms:y,maxVaryings:v,maxFragmentUniforms:M,vertexTextures:x,floatFragmentTextures:S,floatVertexTextures:x&&S,maxSamples:o?n.getParameter(n.MAX_SAMPLES):0}}function Foe(n){const e=this;let t=null,i=0,r=!1,s=!1;const o=new $h,a=new wn,l={value:null,needsUpdate:!1};function u(h,p,m,g){const b=null!==h?h.length:0;let y=null;if(0!==b){if(y=l.value,!0!==g||null===y){const v=m+4*b,M=p.matrixWorldInverse;a.getNormalMatrix(M),(null===y||y.length0),e.numPlanes=i,e.numIntersection=0}();else{const M=s?0:i,x=4*M;let S=v.clippingState||null;l.value=S,S=u(g,p,x,m);for(let P=0;P!==x;++P)S[P]=t[P];v.clippingState=S,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=M}}}function Noe(n){let e=new WeakMap;function t(o,a){return a===sS?o.mapping=jc:a===oS&&(o.mapping=Lh),o}function r(o){const a=o.target;a.removeEventListener("dispose",r);const l=e.get(a);void 0!==l&&(e.delete(a),l.dispose())}return{get:function i(o){if(o&&o.isTexture){const a=o.mapping;if(a===sS||a===oS){if(e.has(o))return t(e.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new Dre(l.height/2);return c.fromEquirectangularTexture(n,o),e.set(o,c),o.addEventListener("dispose",r),t(c.texture,o.mapping)}return null}}}return o},dispose:function s(){e=new WeakMap}}}class BS extends ZR{constructor(e=-1,t=1,i=1,r=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=r,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,i,r,s,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let s=i-e,o=i+e,a=r+t,l=r-t;if(null!==this.view&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=u*this.view.offsetY,l=a-u*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}const MH=[.125,.215,.35,.446,.526,.582],JR=new BS,SH=new We;let eP=null,tP=0,nP=0;const qh=(1+Math.sqrt(5))/2,ig=1/qh,CH=[new N(1,1,1),new N(-1,1,1),new N(1,1,-1),new N(-1,1,-1),new N(0,qh,ig),new N(0,qh,-ig),new N(ig,0,qh),new N(-ig,0,qh),new N(qh,ig,0),new N(-qh,ig,0)];class EH{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,r=100){eP=this._renderer.getRenderTarget(),tP=this._renderer.getActiveCubeFace(),nP=this._renderer.getActiveMipmapLevel(),this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,i,r,s),t>0&&this._blur(s,0,0,t),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=DH(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=TH(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;en-4?l=MH[o-n+4-1]:0===o&&(l=0),i.push(l);const c=1/(a-2),u=-c,h=1+c,p=[u,u,h,u,h,h,u,u,h,h,u,h],m=6,g=6,b=3,y=2,v=1,M=new Float32Array(b*g*m),x=new Float32Array(y*g*m),S=new Float32Array(v*g*m);for(let A=0;A2?0:-1;M.set([R,V,0,R+2/3,V,0,R+2/3,V+1,0,R,V,0,R+2/3,V+1,0,R,V+1,0],b*g*A),x.set(p,y*g*A),S.set([A,A,A,A,A,A],v*g*A)}const P=new cn;P.setAttribute("position",new _i(M,b)),P.setAttribute("uv",new _i(x,y)),P.setAttribute("faceIndex",new _i(S,v)),e.push(P),r>4&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}(s)),this._blurMaterial=function Uoe(n,e,t){const i=new Float32Array(20),r=new N(0,1,0);return new mu({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:su,depthTest:!1,depthWrite:!1})}(s,e,t)}return r}_compileMaterial(e){const t=new Yn(this._lodPlanes[0],e);this._renderer.compile(t,JR)}_sceneToCubeUV(e,t,i,r){const a=new _r(90,1,t,i),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],u=this._renderer,h=u.autoClear,p=u.toneMapping;u.getClearColor(SH),u.toneMapping=ou,u.autoClear=!1;const m=new as({name:"PMREM.Background",side:vo,depthWrite:!1,depthTest:!1}),g=new Yn(new Wh,m);let b=!1;const y=e.background;y?y.isColor&&(m.color.copy(y),e.background=null,b=!0):(m.color.copy(SH),b=!0);for(let v=0;v<6;v++){const M=v%3;0===M?(a.up.set(0,l[v],0),a.lookAt(c[v],0,0)):1===M?(a.up.set(0,0,l[v]),a.lookAt(0,c[v],0)):(a.up.set(0,l[v],0),a.lookAt(0,0,c[v]));const x=this._cubeSize;US(r,M*x,v>2?x:0,x,x),u.setRenderTarget(r),b&&u.render(g,a),u.render(e,a)}g.geometry.dispose(),g.material.dispose(),u.toneMapping=p,u.autoClear=h,e.background=y}_textureToCubeUV(e,t){const i=this._renderer,r=e.mapping===jc||e.mapping===Lh;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=DH()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=TH());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Yn(this._lodPlanes[0],s);s.uniforms.envMap.value=e;const l=this._cubeSize;US(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,JR)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let r=1;r20&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${y} samples when the maximum is set to 20`);const v=[];let M=0;for(let R=0;R<20;++R){const V=R/b,E=Math.exp(-V*V/2);v.push(E),0===R?M+=E:Rx-4?r-x+4:0),4*(this._cubeSize-S),3*S,2*S),l.setRenderTarget(t),l.render(h,JR)}}function AH(n,e,t){const i=new Vh(n,e,t);return i.texture.mapping=Vy,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function US(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function TH(){return new mu({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:su,depthTest:!1,depthWrite:!1})}function DH(){return new mu({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:su,depthTest:!1,depthWrite:!1})}function Voe(n){let e=new WeakMap,t=null;function s(a){const l=a.target;l.removeEventListener("dispose",s);const c=e.get(l);void 0!==c&&(e.delete(l),c.dispose())}return{get:function i(a){if(a&&a.isTexture){const l=a.mapping,c=l===sS||l===oS,u=l===jc||l===Lh;if(c||u){if(a.isRenderTargetTexture&&!0===a.needsPMREMUpdate){a.needsPMREMUpdate=!1;let h=e.get(a);return null===t&&(t=new EH(n)),h=c?t.fromEquirectangular(a,h):t.fromCubemap(a,h),e.set(a,h),h.texture}if(e.has(a))return e.get(a).texture;{const h=a.image;if(c&&h&&h.height>0||u&&h&&function r(a){let l=0;for(let u=0;u<6;u++)void 0!==a[u]&&l++;return 6===l}(h)){null===t&&(t=new EH(n));const p=c?t.fromEquirectangular(a):t.fromCubemap(a);return e.set(a,p),a.addEventListener("dispose",s),p.texture}return null}}}return a},dispose:function o(){e=new WeakMap,null!==t&&(t.dispose(),t=null)}}}function zoe(n){const e={};function t(i){if(void 0!==e[i])return e[i];let r;switch(i){case"WEBGL_depth_texture":r=n.getExtension("WEBGL_depth_texture")||n.getExtension("MOZ_WEBGL_depth_texture")||n.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("MOZ_EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=n.getExtension("WEBGL_compressed_texture_s3tc")||n.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||n.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=n.getExtension("WEBGL_compressed_texture_pvrtc")||n.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=n.getExtension(i)}return e[i]=r,r}return{has:function(i){return null!==t(i)},init:function(i){i.isWebGL2?(t("EXT_color_buffer_float"),t("WEBGL_clip_cull_distance")):(t("WEBGL_depth_texture"),t("OES_texture_float"),t("OES_texture_half_float"),t("OES_texture_half_float_linear"),t("OES_standard_derivatives"),t("OES_element_index_uint"),t("OES_vertex_array_object"),t("ANGLE_instanced_arrays")),t("OES_texture_float_linear"),t("EXT_color_buffer_half_float"),t("WEBGL_multisampled_render_to_texture")},get:function(i){const r=t(i);return null===r&&console.warn("THREE.WebGLRenderer: "+i+" extension not supported."),r}}}function Hoe(n,e,t,i){const r={},s=new WeakMap;function o(h){const p=h.target;null!==p.index&&e.remove(p.index);for(const g in p.attributes)e.remove(p.attributes[g]);for(const g in p.morphAttributes){const b=p.morphAttributes[g];for(let y=0,v=b.length;ye.maxTextureSize&&(k=Math.ceil(E/e.maxTextureSize),E=e.maxTextureSize);const Z=new Float32Array(E*k*4*g),ue=new FR(Z,E,k,g);ue.type=Yl,ue.needsUpdate=!0;const Me=4*V;for(let ne=0;ne0)return n;const r=e*t;let s=FH[r];if(void 0===s&&(s=new Float32Array(r),FH[r]=s),0!==e){i.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(s,a)}return s}function Dr(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t":" "} ${a}: ${t[o]}`)}return i.join("\n")}(n.getShaderSource(e),o)}return r}function Gae(n,e){const t=function Hae(n){const e=ii.getPrimaries(ii.workingColorSpace),t=ii.getPrimaries(n);let i;switch(e===t?i="":e===hS&&t===uS?i="LinearDisplayP3ToLinearSRGB":e===uS&&t===hS&&(i="LinearSRGBToLinearDisplayP3"),n){case Hr:case cS:return[i,"LinearTransferOETF"];case Ei:case DR:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",n),[i,"LinearTransferOETF"]}}(e);return`vec4 ${n}( vec4 value ) { return ${t[0]}( ${t[1]}( value ) ); }`}function Wae(n,e){let t;switch(e){case mie:t="Linear";break;case gie:t="Reinhard";break;case _ie:t="OptimizedCineon";break;case vie:t="ACESFilmic";break;case bie:t="AgX";break;case yie:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+n+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function sg(n){return""!==n}function WH(n,e){const t=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return n.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,t).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function $H(n,e){return n.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const Yae=/^[ \t]*#include +<([\w\d./]+)>/gm;function sP(n){return n.replace(Yae,Zae)}const Kae=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function Zae(n,e){let t=vn[e];if(void 0===t){const i=Kae.get(e);if(void 0===i)throw new Error("Can not resolve #include <"+e+">");t=vn[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i)}return sP(t)}const Qae=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function jH(n){return n.replace(Qae,Jae)}function Jae(n,e,t,i){let r="";for(let s=parseInt(e);s0&&(v+="\n"),M=[m,"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,b].filter(sg).join("\n"),M.length>0&&(M+="\n")):(v=[XH(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,b,t.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",t.batching?"#define USE_BATCHING":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+u:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&!1===t.flatShading?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&!1===t.flatShading?"#define USE_MORPHNORMALS":"",t.morphColors&&t.isWebGL2?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(sg).join("\n"),M=[m,XH(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,b,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+c:"",t.envMap?"#define "+u:"",t.envMap?"#define "+h:"",p?"#define CUBEUV_TEXEL_WIDTH "+p.texelWidth:"",p?"#define CUBEUV_TEXEL_HEIGHT "+p.texelHeight:"",p?"#define CUBEUV_MAX_MIP "+p.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&!1===t.flatShading?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==ou?"#define TONE_MAPPING":"",t.toneMapping!==ou?vn.tonemapping_pars_fragment:"",t.toneMapping!==ou?Wae("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",vn.colorspace_pars_fragment,Gae("linearToOutputTexel",t.outputColorSpace),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"","\n"].filter(sg).join("\n")),o=sP(o),o=WH(o,t),o=$H(o,t),a=sP(a),a=WH(a,t),a=$H(a,t),o=jH(o),a=jH(a),t.isWebGL2&&!0!==t.isRawShaderMaterial&&(x="#version 300 es\n",v=[g,"precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+v,M=["precision mediump sampler2DArray;","#define varying in",t.glslVersion===Zz?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===Zz?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+M);const P=x+M+a,A=HH(r,r.VERTEX_SHADER,x+v+o),R=HH(r,r.FRAGMENT_SHADER,P);function V(ue){if(n.debug.checkShaderErrors){const Me=r.getProgramInfoLog(y).trim(),W=r.getShaderInfoLog(A).trim(),ne=r.getShaderInfoLog(R).trim();let $=!0,ee=!0;if(!1===r.getProgramParameter(y,r.LINK_STATUS))if($=!1,"function"==typeof n.debug.onShaderError)n.debug.onShaderError(r,y,A,R);else{const ie=GH(r,A,"vertex"),se=GH(r,R,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(y,r.VALIDATE_STATUS)+"\n\nProgram Info Log: "+Me+"\n"+ie+"\n"+se)}else""!==Me?console.warn("THREE.WebGLProgram: Program Info Log:",Me):(""===W||""===ne)&&(ee=!1);ee&&(ue.diagnostics={runnable:$,programLog:Me,vertexShader:{log:W,prefix:v},fragmentShader:{log:ne,prefix:M}})}r.deleteShader(A),r.deleteShader(R),E=new zS(r,y),k=function qae(n,e){const t={},i=n.getProgramParameter(e,n.ACTIVE_ATTRIBUTES);for(let r=0;r0,Pe=E.clearcoat>0,Ie=E.iridescence>0,De=E.sheen>0,vt=E.transmission>0,je=re&&!!E.anisotropyMap,at=Pe&&!!E.clearcoatMap,Bt=Pe&&!!E.clearcoatNormalMap,gn=Pe&&!!E.clearcoatRoughnessMap,Re=Ie&&!!E.iridescenceMap,Kn=Ie&&!!E.iridescenceThicknessMap,Ln=De&&!!E.sheenColorMap,on=De&&!!E.sheenRoughnessMap,Pt=!!E.specularMap,ut=!!E.specularColorMap,yn=!!E.specularIntensityMap,si=vt&&!!E.transmissionMap,Qi=vt&&!!E.thicknessMap,Ge=!!E.alphaMap,qe=!!E.extensions,qt=!!ne.attributes.uv1,Ut=!!ne.attributes.uv2,yi=!!ne.attributes.uv3;let bi=ou;return E.toneMapped&&(null===Be||!0===Be.isXRRenderTarget)&&(bi=n.toneMapping),{isWebGL2:u,shaderID:se,shaderType:E.type,shaderName:E.name,vertexShader:le,fragmentShader:me,defines:E.defines,customVertexShaderID:Ve,customFragmentShaderID:rt,isRawShaderMaterial:!0===E.isRawShaderMaterial,glslVersion:E.glslVersion,precision:m,batching:!0===Me.isBatchedMesh,instancing:mt,instancingColor:mt&&null!==Me.instanceColor,supportsVertexTextures:p,outputColorSpace:null===Be?n.outputColorSpace:!0===Be.isXRRenderTarget?Be.texture.colorSpace:Hr,map:tt,matcap:!!E.matcap,envMap:H,envMapMode:H&&ee.mapping,envMapCubeUVHeight:ie,aoMap:ze,lightMap:we,bumpMap:Le,normalMap:xe,displacementMap:p&&Et,emissiveMap:nt,normalMapObjectSpace:xe&&E.normalMapType===Fie,normalMapTangentSpace:xe&&E.normalMapType===Bh,metalnessMap:L,roughnessMap:I,anisotropy:re,anisotropyMap:je,clearcoat:Pe,clearcoatMap:at,clearcoatNormalMap:Bt,clearcoatRoughnessMap:gn,iridescence:Ie,iridescenceMap:Re,iridescenceThicknessMap:Kn,sheen:De,sheenColorMap:Ln,sheenRoughnessMap:on,specularMap:Pt,specularColorMap:ut,specularIntensityMap:yn,transmission:vt,transmissionMap:si,thicknessMap:Qi,gradientMap:!!E.gradientMap,opaque:!1===E.transparent&&E.blending===Dm,alphaMap:Ge,alphaTest:E.alphaTest>0,alphaHash:!!E.alphaHash,combine:E.combine,mapUv:tt&&b(E.map.channel),aoMapUv:ze&&b(E.aoMap.channel),lightMapUv:we&&b(E.lightMap.channel),bumpMapUv:Le&&b(E.bumpMap.channel),normalMapUv:xe&&b(E.normalMap.channel),displacementMapUv:Et&&b(E.displacementMap.channel),emissiveMapUv:nt&&b(E.emissiveMap.channel),metalnessMapUv:L&&b(E.metalnessMap.channel),roughnessMapUv:I&&b(E.roughnessMap.channel),anisotropyMapUv:je&&b(E.anisotropyMap.channel),clearcoatMapUv:at&&b(E.clearcoatMap.channel),clearcoatNormalMapUv:Bt&&b(E.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:gn&&b(E.clearcoatRoughnessMap.channel),iridescenceMapUv:Re&&b(E.iridescenceMap.channel),iridescenceThicknessMapUv:Kn&&b(E.iridescenceThicknessMap.channel),sheenColorMapUv:Ln&&b(E.sheenColorMap.channel),sheenRoughnessMapUv:on&&b(E.sheenRoughnessMap.channel),specularMapUv:Pt&&b(E.specularMap.channel),specularColorMapUv:ut&&b(E.specularColorMap.channel),specularIntensityMapUv:yn&&b(E.specularIntensityMap.channel),transmissionMapUv:si&&b(E.transmissionMap.channel),thicknessMapUv:Qi&&b(E.thicknessMap.channel),alphaMapUv:Ge&&b(E.alphaMap.channel),vertexTangents:!!ne.attributes.tangent&&(xe||re),vertexColors:E.vertexColors,vertexAlphas:!0===E.vertexColors&&!!ne.attributes.color&&4===ne.attributes.color.itemSize,vertexUv1s:qt,vertexUv2s:Ut,vertexUv3s:yi,pointsUvs:!0===Me.isPoints&&!!ne.attributes.uv&&(tt||Ge),fog:!!W,useFog:!0===E.fog,fogExp2:W&&W.isFogExp2,flatShading:!0===E.flatShading,sizeAttenuation:!0===E.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===Me.isSkinnedMesh,morphTargets:void 0!==ne.morphAttributes.position,morphNormals:void 0!==ne.morphAttributes.normal,morphColors:void 0!==ne.morphAttributes.color,morphTargetsCount:Se,morphTextureStride:Oe,numDirLights:k.directional.length,numPointLights:k.point.length,numSpotLights:k.spot.length,numSpotLightMaps:k.spotLightMap.length,numRectAreaLights:k.rectArea.length,numHemiLights:k.hemi.length,numDirLightShadows:k.directionalShadowMap.length,numPointLightShadows:k.pointShadowMap.length,numSpotLightShadows:k.spotShadowMap.length,numSpotLightShadowsWithMaps:k.numSpotLightShadowsWithMaps,numLightProbes:k.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:E.dithering,shadowMapEnabled:n.shadowMap.enabled&&Z.length>0,shadowMapType:n.shadowMap.type,toneMapping:bi,useLegacyLights:n._useLegacyLights,decodeVideoTexture:tt&&!0===E.map.isVideoTexture&&ii.getTransfer(E.map.colorSpace)===Ai,premultipliedAlpha:E.premultipliedAlpha,doubleSided:E.side===Vo,flipSided:E.side===vo,useDepthPacking:E.depthPacking>=0,depthPacking:E.depthPacking||0,index0AttributeName:E.index0AttributeName,extensionDerivatives:qe&&!0===E.extensions.derivatives,extensionFragDepth:qe&&!0===E.extensions.fragDepth,extensionDrawBuffers:qe&&!0===E.extensions.drawBuffers,extensionShaderTextureLOD:qe&&!0===E.extensions.shaderTextureLOD,extensionClipCullDistance:qe&&E.extensions.clipCullDistance&&i.has("WEBGL_clip_cull_distance"),rendererExtensionFragDepth:u||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||i.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:E.customProgramCacheKey()}},getProgramCacheKey:function v(E){const k=[];if(E.shaderID?k.push(E.shaderID):(k.push(E.customVertexShaderID),k.push(E.customFragmentShaderID)),void 0!==E.defines)for(const Z in E.defines)k.push(Z),k.push(E.defines[Z]);return!1===E.isRawShaderMaterial&&(function M(E,k){E.push(k.precision),E.push(k.outputColorSpace),E.push(k.envMapMode),E.push(k.envMapCubeUVHeight),E.push(k.mapUv),E.push(k.alphaMapUv),E.push(k.lightMapUv),E.push(k.aoMapUv),E.push(k.bumpMapUv),E.push(k.normalMapUv),E.push(k.displacementMapUv),E.push(k.emissiveMapUv),E.push(k.metalnessMapUv),E.push(k.roughnessMapUv),E.push(k.anisotropyMapUv),E.push(k.clearcoatMapUv),E.push(k.clearcoatNormalMapUv),E.push(k.clearcoatRoughnessMapUv),E.push(k.iridescenceMapUv),E.push(k.iridescenceThicknessMapUv),E.push(k.sheenColorMapUv),E.push(k.sheenRoughnessMapUv),E.push(k.specularMapUv),E.push(k.specularColorMapUv),E.push(k.specularIntensityMapUv),E.push(k.transmissionMapUv),E.push(k.thicknessMapUv),E.push(k.combine),E.push(k.fogExp2),E.push(k.sizeAttenuation),E.push(k.morphTargetsCount),E.push(k.morphAttributeCount),E.push(k.numDirLights),E.push(k.numPointLights),E.push(k.numSpotLights),E.push(k.numSpotLightMaps),E.push(k.numHemiLights),E.push(k.numRectAreaLights),E.push(k.numDirLightShadows),E.push(k.numPointLightShadows),E.push(k.numSpotLightShadows),E.push(k.numSpotLightShadowsWithMaps),E.push(k.numLightProbes),E.push(k.shadowMapType),E.push(k.toneMapping),E.push(k.numClippingPlanes),E.push(k.numClipIntersection),E.push(k.depthPacking)}(k,E),function x(E,k){a.disableAll(),k.isWebGL2&&a.enable(0),k.supportsVertexTextures&&a.enable(1),k.instancing&&a.enable(2),k.instancingColor&&a.enable(3),k.matcap&&a.enable(4),k.envMap&&a.enable(5),k.normalMapObjectSpace&&a.enable(6),k.normalMapTangentSpace&&a.enable(7),k.clearcoat&&a.enable(8),k.iridescence&&a.enable(9),k.alphaTest&&a.enable(10),k.vertexColors&&a.enable(11),k.vertexAlphas&&a.enable(12),k.vertexUv1s&&a.enable(13),k.vertexUv2s&&a.enable(14),k.vertexUv3s&&a.enable(15),k.vertexTangents&&a.enable(16),k.anisotropy&&a.enable(17),k.alphaHash&&a.enable(18),k.batching&&a.enable(19),E.push(a.mask),a.disableAll(),k.fog&&a.enable(0),k.useFog&&a.enable(1),k.flatShading&&a.enable(2),k.logarithmicDepthBuffer&&a.enable(3),k.skinning&&a.enable(4),k.morphTargets&&a.enable(5),k.morphNormals&&a.enable(6),k.morphColors&&a.enable(7),k.premultipliedAlpha&&a.enable(8),k.shadowMapEnabled&&a.enable(9),k.useLegacyLights&&a.enable(10),k.doubleSided&&a.enable(11),k.flipSided&&a.enable(12),k.useDepthPacking&&a.enable(13),k.dithering&&a.enable(14),k.transmission&&a.enable(15),k.sheen&&a.enable(16),k.opaque&&a.enable(17),k.pointsUvs&&a.enable(18),k.decodeVideoTexture&&a.enable(19),E.push(a.mask)}(k,E),k.push(n.outputColorSpace)),k.push(E.customProgramCacheKey),k.join()},getUniforms:function S(E){const k=g[E.type];let Z;return Z=k?Cre.clone(Zl[k].uniforms):E.uniforms,Z},acquireProgram:function P(E,k){let Z;for(let ue=0,Me=c.length;ue0?i.push(v):!0===m.transparent?r.push(v):t.push(v)},unshift:function l(h,p,m,g,b,y){const v=o(h,p,m,g,b,y);m.transmission>0?i.unshift(v):!0===m.transparent?r.unshift(v):t.unshift(v)},finish:function u(){for(let h=e,p=n.length;h1&&t.sort(h||ule),i.length>1&&i.sort(p||qH),r.length>1&&r.sort(p||qH)}}}function hle(){let n=new WeakMap;return{get:function e(i,r){const s=n.get(i);let o;return void 0===s?(o=new YH,n.set(i,[o])):r>=s.length?(o=new YH,s.push(o)):o=s[r],o},dispose:function t(){n=new WeakMap}}}function fle(){const n={};return{get:function(e){if(void 0!==n[e.id])return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new N,color:new We};break;case"SpotLight":t={position:new N,direction:new N,color:new We,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new N,color:new We,distance:0,decay:0};break;case"HemisphereLight":t={direction:new N,skyColor:new We,groundColor:new We};break;case"RectAreaLight":t={color:new We,position:new N,halfWidth:new N,halfHeight:new N}}return n[e.id]=t,t}}}let mle=0;function gle(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function _le(n,e){const t=new fle,i=function ple(){const n={};return{get:function(e){if(void 0!==n[e.id])return n[e.id];let t;switch(e.type){case"DirectionalLight":case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ce};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ce,shadowCameraNear:1,shadowCameraFar:1e3}}return n[e.id]=t,t}}}(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let u=0;u<9;u++)r.probe.push(new N);const s=new N,o=new kt,a=new kt;return{setup:function l(u,h){let p=0,m=0,g=0;for(let ue=0;ue<9;ue++)r.probe[ue].set(0,0,0);let b=0,y=0,v=0,M=0,x=0,S=0,P=0,A=0,R=0,V=0,E=0;u.sort(gle);const k=!0===h?Math.PI:1;for(let ue=0,Me=u.length;ue0&&(e.isWebGL2?!0===n.has("OES_texture_float_linear")?(r.rectAreaLTC1=He.LTC_FLOAT_1,r.rectAreaLTC2=He.LTC_FLOAT_2):(r.rectAreaLTC1=He.LTC_HALF_1,r.rectAreaLTC2=He.LTC_HALF_2):!0===n.has("OES_texture_float_linear")?(r.rectAreaLTC1=He.LTC_FLOAT_1,r.rectAreaLTC2=He.LTC_FLOAT_2):!0===n.has("OES_texture_half_float_linear")?(r.rectAreaLTC1=He.LTC_HALF_1,r.rectAreaLTC2=He.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=p,r.ambient[1]=m,r.ambient[2]=g;const Z=r.hash;(Z.directionalLength!==b||Z.pointLength!==y||Z.spotLength!==v||Z.rectAreaLength!==M||Z.hemiLength!==x||Z.numDirectionalShadows!==S||Z.numPointShadows!==P||Z.numSpotShadows!==A||Z.numSpotMaps!==R||Z.numLightProbes!==E)&&(r.directional.length=b,r.spot.length=v,r.rectArea.length=M,r.point.length=y,r.hemi.length=x,r.directionalShadow.length=S,r.directionalShadowMap.length=S,r.pointShadow.length=P,r.pointShadowMap.length=P,r.spotShadow.length=A,r.spotShadowMap.length=A,r.directionalShadowMatrix.length=S,r.pointShadowMatrix.length=P,r.spotLightMatrix.length=A+R-V,r.spotLightMap.length=R,r.numSpotLightShadowsWithMaps=V,r.numLightProbes=E,Z.directionalLength=b,Z.pointLength=y,Z.spotLength=v,Z.rectAreaLength=M,Z.hemiLength=x,Z.numDirectionalShadows=S,Z.numPointShadows=P,Z.numSpotShadows=A,Z.numSpotMaps=R,Z.numLightProbes=E,r.version=mle++)},setupView:function c(u,h){let p=0,m=0,g=0,b=0,y=0;const v=h.matrixWorldInverse;for(let M=0,x=u.length;M=a.length?(l=new KH(n,e),a.push(l)):l=a[o],l},dispose:function r(){t=new WeakMap}}}class ZH extends bo{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class QH extends bo{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const yle="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",ble="uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}";function xle(n,e,t){let i=new FS;const r=new Ce,s=new Ce,o=new ai,a=new ZH({depthPacking:Lie}),l=new QH,c={},u=t.maxTextureSize,h={[Xl]:vo,[vo]:Xl,[Vo]:Vo},p=new mu({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Ce},radius:{value:4}},vertexShader:yle,fragmentShader:ble}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const g=new cn;g.setAttribute("position",new _i(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Yn(g,p),y=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=oz;let v=this.type;function M(A,R){const V=e.update(b);p.defines.VSM_SAMPLES!==A.blurSamples&&(p.defines.VSM_SAMPLES=A.blurSamples,m.defines.VSM_SAMPLES=A.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),null===A.mapPass&&(A.mapPass=new Vh(r.x,r.y)),p.uniforms.shadow_pass.value=A.map.texture,p.uniforms.resolution.value=A.mapSize,p.uniforms.radius.value=A.radius,n.setRenderTarget(A.mapPass),n.clear(),n.renderBufferDirect(R,null,V,p,b,null),m.uniforms.shadow_pass.value=A.mapPass.texture,m.uniforms.resolution.value=A.mapSize,m.uniforms.radius.value=A.radius,n.setRenderTarget(A.map),n.clear(),n.renderBufferDirect(R,null,V,m,b,null)}function x(A,R,V,E){let k=null;const Z=!0===V.isPointLight?A.customDistanceMaterial:A.customDepthMaterial;if(void 0!==Z)k=Z;else if(k=!0===V.isPointLight?l:a,n.localClippingEnabled&&!0===R.clipShadows&&Array.isArray(R.clippingPlanes)&&0!==R.clippingPlanes.length||R.displacementMap&&0!==R.displacementScale||R.alphaMap&&R.alphaTest>0||R.map&&R.alphaTest>0){const ue=k.uuid,Me=R.uuid;let W=c[ue];void 0===W&&(W={},c[ue]=W);let ne=W[Me];void 0===ne&&(ne=k.clone(),W[Me]=ne,R.addEventListener("dispose",P)),k=ne}return k.visible=R.visible,k.wireframe=R.wireframe,k.side=E===$c?null!==R.shadowSide?R.shadowSide:R.side:null!==R.shadowSide?R.shadowSide:h[R.side],k.alphaMap=R.alphaMap,k.alphaTest=R.alphaTest,k.map=R.map,k.clipShadows=R.clipShadows,k.clippingPlanes=R.clippingPlanes,k.clipIntersection=R.clipIntersection,k.displacementMap=R.displacementMap,k.displacementScale=R.displacementScale,k.displacementBias=R.displacementBias,k.wireframeLinewidth=R.wireframeLinewidth,k.linewidth=R.linewidth,!0===V.isPointLight&&!0===k.isMeshDistanceMaterial&&(n.properties.get(k).light=V),k}function S(A,R,V,E,k){if(!1===A.visible)return;if(A.layers.test(R.layers)&&(A.isMesh||A.isLine||A.isPoints)&&(A.castShadow||A.receiveShadow&&k===$c)&&(!A.frustumCulled||i.intersectsObject(A))){A.modelViewMatrix.multiplyMatrices(V.matrixWorldInverse,A.matrixWorld);const Me=e.update(A),W=A.material;if(Array.isArray(W)){const ne=Me.groups;for(let $=0,ee=ne.length;$u||r.y>u)&&(r.x>u&&(s.x=Math.floor(u/se.x),r.x=s.x*se.x,ie.mapSize.x=s.x),r.y>u&&(s.y=Math.floor(u/se.y),r.y=s.y*se.y,ie.mapSize.y=s.y)),null===ie.map||!0===Me||!0===W){const Se=this.type!==$c?{minFilter:Ni,magFilter:Ni}:{};null!==ie.map&&ie.map.dispose(),ie.map=new Vh(r.x,r.y,Se),ie.map.texture.name=ee.name+".shadowMap",ie.camera.updateProjectionMatrix()}n.setRenderTarget(ie.map),n.clear();const ve=ie.getViewportCount();for(let Se=0;Se=1):-1!==ve.indexOf("OpenGL ES")&&(se=parseFloat(/^OpenGL ES (\d)/.exec(ve)[1]),ie=se>=2);let Se=null,Oe={};const le=n.getParameter(n.SCISSOR_BOX),me=n.getParameter(n.VIEWPORT),Ve=(new ai).fromArray(le),rt=(new ai).fromArray(me);function Be(X,Xe,qe,qt){const Ut=new Uint8Array(4),yi=n.createTexture();n.bindTexture(X,yi),n.texParameteri(X,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(X,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let bi=0;bi"u")&&/OculusBrowser/g.test(navigator.userAgent),u=new WeakMap;let h;const p=new WeakMap;let m=!1;try{m=typeof OffscreenCanvas<"u"&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch{}function g(L,I){return m?new OffscreenCanvas(L,I):Xy("canvas")}function b(L,I,re,Pe){let Ie=1;if((L.width>Pe||L.height>Pe)&&(Ie=Pe/Math.max(L.width,L.height)),Ie<1||!0===I){if(typeof HTMLImageElement<"u"&&L instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&L instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&L instanceof ImageBitmap){const De=I?pS:Math.floor,vt=De(Ie*L.width),je=De(Ie*L.height);void 0===h&&(h=g(vt,je));const at=re?g(vt,je):h;return at.width=vt,at.height=je,at.getContext("2d").drawImage(L,0,0,vt,je),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+L.width+"x"+L.height+") to ("+vt+"x"+je+")."),at}return"data"in L&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+L.width+"x"+L.height+")."),L}return L}function y(L){return PR(L.width)&&PR(L.height)}function M(L,I){return L.generateMipmaps&&I&&L.minFilter!==Ni&&L.minFilter!==Yi}function x(L){n.generateMipmap(L)}function S(L,I,re,Pe,Ie=!1){if(!1===a)return I;if(null!==L){if(void 0!==n[L])return n[L];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+L+"'")}let De=I;if(I===n.RED&&(re===n.FLOAT&&(De=n.R32F),re===n.HALF_FLOAT&&(De=n.R16F),re===n.UNSIGNED_BYTE&&(De=n.R8)),I===n.RED_INTEGER&&(re===n.UNSIGNED_BYTE&&(De=n.R8UI),re===n.UNSIGNED_SHORT&&(De=n.R16UI),re===n.UNSIGNED_INT&&(De=n.R32UI),re===n.BYTE&&(De=n.R8I),re===n.SHORT&&(De=n.R16I),re===n.INT&&(De=n.R32I)),I===n.RG&&(re===n.FLOAT&&(De=n.RG32F),re===n.HALF_FLOAT&&(De=n.RG16F),re===n.UNSIGNED_BYTE&&(De=n.RG8)),I===n.RGBA){const vt=Ie?dS:ii.getTransfer(Pe);re===n.FLOAT&&(De=n.RGBA32F),re===n.HALF_FLOAT&&(De=n.RGBA16F),re===n.UNSIGNED_BYTE&&(De=vt===Ai?n.SRGB8_ALPHA8:n.RGBA8),re===n.UNSIGNED_SHORT_4_4_4_4&&(De=n.RGBA4),re===n.UNSIGNED_SHORT_5_5_5_1&&(De=n.RGB5_A1)}return(De===n.R16F||De===n.R32F||De===n.RG16F||De===n.RG32F||De===n.RGBA16F||De===n.RGBA32F)&&e.get("EXT_color_buffer_float"),De}function P(L,I,re){return!0===M(L,re)||L.isFramebufferTexture&&L.minFilter!==Ni&&L.minFilter!==Yi?Math.log2(Math.max(I.width,I.height))+1:void 0!==L.mipmaps&&L.mipmaps.length>0?L.mipmaps.length:L.isCompressedTexture&&Array.isArray(L.image)?I.mipmaps.length:1}function A(L){return L===Ni||L===aS||L===Hy?n.NEAREST:n.LINEAR}function R(L){const I=L.target;I.removeEventListener("dispose",R),function E(L){const I=i.get(L);if(void 0===I.__webglInit)return;const re=L.source,Pe=p.get(re);if(Pe){const Ie=Pe[I.__cacheKey];Ie.usedTimes--,0===Ie.usedTimes&&k(L),0===Object.keys(Pe).length&&p.delete(re)}i.remove(L)}(I),I.isVideoTexture&&u.delete(I)}function V(L){const I=L.target;I.removeEventListener("dispose",V),function Z(L){const I=L.texture,re=i.get(L),Pe=i.get(I);if(void 0!==Pe.__webglTexture&&(n.deleteTexture(Pe.__webglTexture),o.memory.textures--),L.depthTexture&&L.depthTexture.dispose(),L.isWebGLCubeRenderTarget)for(let Ie=0;Ie<6;Ie++){if(Array.isArray(re.__webglFramebuffer[Ie]))for(let De=0;De0&&re.__version!==L.version){const Pe=L.image;if(null===Pe)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==Pe.complete)return void Ve(re,L,I);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}t.bindTexture(n.TEXTURE_2D,re.__webglTexture,n.TEXTURE0+I)}const ve={[ql]:n.REPEAT,[qi]:n.CLAMP_TO_EDGE,[zy]:n.MIRRORED_REPEAT},Se={[Ni]:n.NEAREST,[aS]:n.NEAREST_MIPMAP_NEAREST,[Hy]:n.NEAREST_MIPMAP_LINEAR,[Yi]:n.LINEAR,[yR]:n.LINEAR_MIPMAP_NEAREST,[Xc]:n.LINEAR_MIPMAP_LINEAR},Oe={[Nie]:n.NEVER,[Gie]:n.ALWAYS,[Bie]:n.LESS,[Kz]:n.LEQUAL,[Uie]:n.EQUAL,[Hie]:n.GEQUAL,[Vie]:n.GREATER,[zie]:n.NOTEQUAL};function le(L,I,re){if(re?(n.texParameteri(L,n.TEXTURE_WRAP_S,ve[I.wrapS]),n.texParameteri(L,n.TEXTURE_WRAP_T,ve[I.wrapT]),(L===n.TEXTURE_3D||L===n.TEXTURE_2D_ARRAY)&&n.texParameteri(L,n.TEXTURE_WRAP_R,ve[I.wrapR]),n.texParameteri(L,n.TEXTURE_MAG_FILTER,Se[I.magFilter]),n.texParameteri(L,n.TEXTURE_MIN_FILTER,Se[I.minFilter])):(n.texParameteri(L,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(L,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),(L===n.TEXTURE_3D||L===n.TEXTURE_2D_ARRAY)&&n.texParameteri(L,n.TEXTURE_WRAP_R,n.CLAMP_TO_EDGE),(I.wrapS!==qi||I.wrapT!==qi)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(L,n.TEXTURE_MAG_FILTER,A(I.magFilter)),n.texParameteri(L,n.TEXTURE_MIN_FILTER,A(I.minFilter)),I.minFilter!==Ni&&I.minFilter!==Yi&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),I.compareFunction&&(n.texParameteri(L,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(L,n.TEXTURE_COMPARE_FUNC,Oe[I.compareFunction])),!0===e.has("EXT_texture_filter_anisotropic")){const Pe=e.get("EXT_texture_filter_anisotropic");if(I.magFilter===Ni||I.minFilter!==Hy&&I.minFilter!==Xc||I.type===Yl&&!1===e.has("OES_texture_float_linear")||!1===a&&I.type===Gy&&!1===e.has("OES_texture_half_float_linear"))return;(I.anisotropy>1||i.get(I).__currentAnisotropy)&&(n.texParameterf(L,Pe.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(I.anisotropy,r.getMaxAnisotropy())),i.get(I).__currentAnisotropy=I.anisotropy)}}function me(L,I){let re=!1;void 0===L.__webglInit&&(L.__webglInit=!0,I.addEventListener("dispose",R));const Pe=I.source;let Ie=p.get(Pe);void 0===Ie&&(Ie={},p.set(Pe,Ie));const De=function ne(L){const I=[];return I.push(L.wrapS),I.push(L.wrapT),I.push(L.wrapR||0),I.push(L.magFilter),I.push(L.minFilter),I.push(L.anisotropy),I.push(L.internalFormat),I.push(L.format),I.push(L.type),I.push(L.generateMipmaps),I.push(L.premultiplyAlpha),I.push(L.flipY),I.push(L.unpackAlignment),I.push(L.colorSpace),I.join()}(I);if(De!==L.__cacheKey){void 0===Ie[De]&&(Ie[De]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,re=!0),Ie[De].usedTimes++;const vt=Ie[L.__cacheKey];void 0!==vt&&(Ie[L.__cacheKey].usedTimes--,0===vt.usedTimes&&k(I)),L.__cacheKey=De,L.__webglTexture=Ie[De].texture}return re}function Ve(L,I,re){let Pe=n.TEXTURE_2D;(I.isDataArrayTexture||I.isCompressedArrayTexture)&&(Pe=n.TEXTURE_2D_ARRAY),I.isData3DTexture&&(Pe=n.TEXTURE_3D);const Ie=me(L,I),De=I.source;t.bindTexture(Pe,L.__webglTexture,n.TEXTURE0+re);const vt=i.get(De);if(De.version!==vt.__version||!0===Ie){t.activeTexture(n.TEXTURE0+re);const je=ii.getPrimaries(ii.workingColorSpace),at=I.colorSpace===wa?null:ii.getPrimaries(I.colorSpace),Bt=I.colorSpace===wa||je===at?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,I.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,I.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,Bt);const gn=function v(L){return!a&&(L.wrapS!==qi||L.wrapT!==qi||L.minFilter!==Ni&&L.minFilter!==Yi)}(I)&&!1===y(I.image);let Re=b(I.image,gn,!1,r.maxTextureSize);Re=nt(I,Re);const Kn=y(Re)||a,Ln=s.convert(I.format,I.colorSpace);let ut,on=s.convert(I.type),Pt=S(I.internalFormat,Ln,on,I.colorSpace,I.isVideoTexture);le(Pe,I,Kn);const yn=I.mipmaps,si=a&&!0!==I.isVideoTexture&&Pt!==Sz,Qi=void 0===vt.__version||!0===Ie,En=P(I,Re,Kn);if(I.isDepthTexture)Pt=n.DEPTH_COMPONENT,a?Pt=I.type===Yl?n.DEPTH_COMPONENT32F:I.type===lu?n.DEPTH_COMPONENT24:I.type===Fh?n.DEPTH24_STENCIL8:n.DEPTH_COMPONENT16:I.type===Yl&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),I.format===Nh&&Pt===n.DEPTH_COMPONENT&&I.type!==bR&&I.type!==lu&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),I.type=lu,on=s.convert(I.type)),I.format===Im&&Pt===n.DEPTH_COMPONENT&&(Pt=n.DEPTH_STENCIL,I.type!==Fh&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),I.type=Fh,on=s.convert(I.type))),Qi&&(si?t.texStorage2D(n.TEXTURE_2D,1,Pt,Re.width,Re.height):t.texImage2D(n.TEXTURE_2D,0,Pt,Re.width,Re.height,0,Ln,on,null));else if(I.isDataTexture)if(yn.length>0&&Kn){si&&Qi&&t.texStorage2D(n.TEXTURE_2D,En,Pt,yn[0].width,yn[0].height);for(let Ge=0,X=yn.length;Ge>=1,X>>=1}}else if(yn.length>0&&Kn){si&&Qi&&t.texStorage2D(n.TEXTURE_2D,En,Pt,yn[0].width,yn[0].height);for(let Ge=0,X=yn.length;Ge>De),Re=Math.max(1,I.height>>De);Ie===n.TEXTURE_3D||Ie===n.TEXTURE_2D_ARRAY?t.texImage3D(Ie,De,at,gn,Re,I.depth,0,vt,je,null):t.texImage2D(Ie,De,at,gn,Re,0,vt,je,null)}t.bindFramebuffer(n.FRAMEBUFFER,L),xe(I)?l.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,Pe,Ie,i.get(re).__webglTexture,0,Le(I)):(Ie===n.TEXTURE_2D||Ie>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&Ie<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,Pe,Ie,i.get(re).__webglTexture,De),t.bindFramebuffer(n.FRAMEBUFFER,null)}function mt(L,I,re){if(n.bindRenderbuffer(n.RENDERBUFFER,L),I.depthBuffer&&!I.stencilBuffer){let Pe=!0===a?n.DEPTH_COMPONENT24:n.DEPTH_COMPONENT16;if(re||xe(I)){const Ie=I.depthTexture;Ie&&Ie.isDepthTexture&&(Ie.type===Yl?Pe=n.DEPTH_COMPONENT32F:Ie.type===lu&&(Pe=n.DEPTH_COMPONENT24));const De=Le(I);xe(I)?l.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,De,Pe,I.width,I.height):n.renderbufferStorageMultisample(n.RENDERBUFFER,De,Pe,I.width,I.height)}else n.renderbufferStorage(n.RENDERBUFFER,Pe,I.width,I.height);n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,L)}else if(I.depthBuffer&&I.stencilBuffer){const Pe=Le(I);re&&!1===xe(I)?n.renderbufferStorageMultisample(n.RENDERBUFFER,Pe,n.DEPTH24_STENCIL8,I.width,I.height):xe(I)?l.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,Pe,n.DEPTH24_STENCIL8,I.width,I.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,I.width,I.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,L)}else{const Pe=!0===I.isWebGLMultipleRenderTargets?I.texture:[I.texture];for(let Ie=0;Ie0&&!0===e.has("WEBGL_multisampled_render_to_texture")&&!1!==I.__useRenderToTexture}function nt(L,I){const re=L.colorSpace,Pe=L.format,Ie=L.type;return!0===L.isCompressedTexture||!0===L.isVideoTexture||L.format===IR||re!==Hr&&re!==wa&&(ii.getTransfer(re)===Ai?!1===a?!0===e.has("EXT_sRGB")&&Pe===zo?(L.format=IR,L.minFilter=Yi,L.generateMipmaps=!1):I=iH.sRGBToLinear(I):(Pe!==zo||Ie!==au)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",re)),I}this.allocateTextureUnit=function W(){const L=ue;return L>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+L+" texture units while this GPU supports only "+r.maxTextures),ue+=1,L},this.resetTextureUnits=function Me(){ue=0},this.setTexture2D=$,this.setTexture2DArray=function ee(L,I){const re=i.get(L);L.version>0&&re.__version!==L.version?Ve(re,L,I):t.bindTexture(n.TEXTURE_2D_ARRAY,re.__webglTexture,n.TEXTURE0+I)},this.setTexture3D=function ie(L,I){const re=i.get(L);L.version>0&&re.__version!==L.version?Ve(re,L,I):t.bindTexture(n.TEXTURE_3D,re.__webglTexture,n.TEXTURE0+I)},this.setTextureCube=function se(L,I){const re=i.get(L);L.version>0&&re.__version!==L.version?function rt(L,I,re){if(6!==I.image.length)return;const Pe=me(L,I),Ie=I.source;t.bindTexture(n.TEXTURE_CUBE_MAP,L.__webglTexture,n.TEXTURE0+re);const De=i.get(Ie);if(Ie.version!==De.__version||!0===Pe){t.activeTexture(n.TEXTURE0+re);const vt=ii.getPrimaries(ii.workingColorSpace),je=I.colorSpace===wa?null:ii.getPrimaries(I.colorSpace),at=I.colorSpace===wa||vt===je?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,I.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,I.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,at);const Bt=I.isCompressedTexture||I.image[0].isCompressedTexture,gn=I.image[0]&&I.image[0].isDataTexture,Re=[];for(let Ge=0;Ge<6;Ge++)Re[Ge]=Bt||gn?gn?I.image[Ge].image:I.image[Ge]:b(I.image[Ge],!1,!0,r.maxCubemapSize),Re[Ge]=nt(I,Re[Ge]);const Kn=Re[0],Ln=y(Kn)||a,on=s.convert(I.format,I.colorSpace),Pt=s.convert(I.type),ut=S(I.internalFormat,on,Pt,I.colorSpace),yn=a&&!0!==I.isVideoTexture,si=void 0===De.__version||!0===Pe;let En,Qi=P(I,Kn,Ln);if(le(n.TEXTURE_CUBE_MAP,I,Ln),Bt){yn&&si&&t.texStorage2D(n.TEXTURE_CUBE_MAP,Qi,ut,Kn.width,Kn.height);for(let Ge=0;Ge<6;Ge++){En=Re[Ge].mipmaps;for(let X=0;X0&&Qi++,t.texStorage2D(n.TEXTURE_CUBE_MAP,Qi,ut,Re[0].width,Re[0].height));for(let Ge=0;Ge<6;Ge++)if(gn){yn?t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Ge,0,0,0,Re[Ge].width,Re[Ge].height,on,Pt,Re[Ge].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Ge,0,ut,Re[Ge].width,Re[Ge].height,0,on,Pt,Re[Ge].data);for(let X=0;X0){re.__webglFramebuffer[je]=[];for(let at=0;at0){re.__webglFramebuffer=[];for(let je=0;je0&&!1===xe(L)){const je=De?I:[I];re.__webglMultisampledFramebuffer=n.createFramebuffer(),re.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,re.__webglMultisampledFramebuffer);for(let at=0;at0)for(let at=0;at0)for(let at=0;at0&&!1===xe(L)){const I=L.isWebGLMultipleRenderTargets?L.texture:[L.texture],re=L.width,Pe=L.height;let Ie=n.COLOR_BUFFER_BIT;const De=[],vt=L.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,je=i.get(L),at=!0===L.isWebGLMultipleRenderTargets;if(at)for(let Bt=0;Btm+g?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&p<=m-g&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==l&&e.gripSpace&&(s=t.getPose(e.gripSpace,i),null!==s&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));null!==a&&(r=t.getPose(e.targetRaySpace,i),null===r&&null!==s&&(r=s),null!==r&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(Ele)))}return null!==a&&(a.visible=null!==r),null!==l&&(l.visible=null!==s),null!==c&&(c.visible=null!==o),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){const i=new jo;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class Ale extends Lm{constructor(e,t){super();const i=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,u=null,h=null,p=null,m=null,g=null;const b=t.getContextAttributes();let y=null,v=null;const M=[],x=[],S=new Ce;let P=null;const A=new _r;A.layers.enable(1),A.viewport=new ai;const R=new _r;R.layers.enable(2),R.viewport=new ai;const V=[A,R],E=new Cle;E.layers.enable(1),E.layers.enable(2);let k=null,Z=null;function ue(le){const me=x.indexOf(le.inputSource);if(-1===me)return;const Ve=M[me];void 0!==Ve&&(Ve.update(le.inputSource,le.frame,c||o),Ve.dispatchEvent({type:le.type,data:le.inputSource}))}function Me(){r.removeEventListener("select",ue),r.removeEventListener("selectstart",ue),r.removeEventListener("selectend",ue),r.removeEventListener("squeeze",ue),r.removeEventListener("squeezestart",ue),r.removeEventListener("squeezeend",ue),r.removeEventListener("end",Me),r.removeEventListener("inputsourceschange",W);for(let le=0;le=0&&(x[rt]=null,M[rt].disconnect(Ve))}for(let me=0;me=x.length){x.push(Ve),rt=mt;break}if(null===x[mt]){x[mt]=Ve,rt=mt;break}}if(-1===rt)break}const Be=M[rt];Be&&Be.connect(Ve)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(le){let me=M[le];return void 0===me&&(me=new oP,M[le]=me),me.getTargetRaySpace()},this.getControllerGrip=function(le){let me=M[le];return void 0===me&&(me=new oP,M[le]=me),me.getGripSpace()},this.getHand=function(le){let me=M[le];return void 0===me&&(me=new oP,M[le]=me),me.getHandSpace()},this.setFramebufferScaleFactor=function(le){s=le,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(le){a=le,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(le){c=le},this.getBaseLayer=function(){return null!==p?p:m},this.getBinding=function(){return h},this.getFrame=function(){return g},this.getSession=function(){return r},this.setSession=function(){var le=xt(function*(me){if(r=me,null!==r){if(y=e.getRenderTarget(),r.addEventListener("select",ue),r.addEventListener("selectstart",ue),r.addEventListener("selectend",ue),r.addEventListener("squeeze",ue),r.addEventListener("squeezestart",ue),r.addEventListener("squeezeend",ue),r.addEventListener("end",Me),r.addEventListener("inputsourceschange",W),!0!==b.xrCompatible&&(yield t.makeXRCompatible()),P=e.getPixelRatio(),e.getSize(S),void 0===r.renderState.layers||!1===e.capabilities.isWebGL2)m=new XRWebGLLayer(r,t,{antialias:void 0!==r.renderState.layers||b.antialias,alpha:!0,depth:b.depth,stencil:b.stencil,framebufferScaleFactor:s}),r.updateRenderState({baseLayer:m}),e.setPixelRatio(1),e.setSize(m.framebufferWidth,m.framebufferHeight,!1),v=new Vh(m.framebufferWidth,m.framebufferHeight,{format:zo,type:au,colorSpace:e.outputColorSpace,stencilBuffer:b.stencil});else{let Ve=null,rt=null,Be=null;b.depth&&(Be=b.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,Ve=b.stencil?Im:Nh,rt=b.stencil?Fh:lu);const mt={colorFormat:t.RGBA8,depthFormat:Be,scaleFactor:s};h=new XRWebGLBinding(r,t),p=h.createProjectionLayer(mt),r.updateRenderState({layers:[p]}),e.setPixelRatio(1),e.setSize(p.textureWidth,p.textureHeight,!1),v=new Vh(p.textureWidth,p.textureHeight,{format:zo,type:au,depthTexture:new IH(p.textureWidth,p.textureHeight,rt,void 0,void 0,void 0,void 0,void 0,void 0,Ve),stencilBuffer:b.stencil,colorSpace:e.outputColorSpace,samples:b.antialias?4:0}),e.properties.get(v).__ignoreDepthValues=p.ignoreDepthValues}v.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),Oe.setContext(r),Oe.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}});return function(me){return le.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode};const ne=new N,$=new N;function ie(le,me){null===me?le.matrixWorld.copy(le.matrix):le.matrixWorld.multiplyMatrices(me.matrixWorld,le.matrix),le.matrixWorldInverse.copy(le.matrixWorld).invert()}this.updateCamera=function(le){if(null===r)return;E.near=R.near=A.near=le.near,E.far=R.far=A.far=le.far,(k!==E.near||Z!==E.far)&&(r.updateRenderState({depthNear:E.near,depthFar:E.far}),k=E.near,Z=E.far);const me=le.parent,Ve=E.cameras;ie(E,me);for(let rt=0;rt0&&(y.alphaTest.value=v.alphaTest);const M=e.get(v).envMap;if(M&&(y.envMap.value=M,y.flipEnvMap.value=M.isCubeTexture&&!1===M.isRenderTargetTexture?-1:1,y.reflectivity.value=v.reflectivity,y.ior.value=v.ior,y.refractionRatio.value=v.refractionRatio),v.lightMap){y.lightMap.value=v.lightMap;const x=!0===n._useLegacyLights?Math.PI:1;y.lightMapIntensity.value=v.lightMapIntensity*x,t(v.lightMap,y.lightMapTransform)}v.aoMap&&(y.aoMap.value=v.aoMap,y.aoMapIntensity.value=v.aoMapIntensity,t(v.aoMap,y.aoMapTransform))}return{refreshFogUniforms:function i(y,v){v.color.getRGB(y.fogColor.value,xH(n)),v.isFog?(y.fogNear.value=v.near,y.fogFar.value=v.far):v.isFogExp2&&(y.fogDensity.value=v.density)},refreshMaterialUniforms:function r(y,v,M,x,S){v.isMeshBasicMaterial||v.isMeshLambertMaterial?s(y,v):v.isMeshToonMaterial?(s(y,v),function h(y,v){v.gradientMap&&(y.gradientMap.value=v.gradientMap)}(y,v)):v.isMeshPhongMaterial?(s(y,v),function u(y,v){y.specular.value.copy(v.specular),y.shininess.value=Math.max(v.shininess,1e-4)}(y,v)):v.isMeshStandardMaterial?(s(y,v),function p(y,v){y.metalness.value=v.metalness,v.metalnessMap&&(y.metalnessMap.value=v.metalnessMap,t(v.metalnessMap,y.metalnessMapTransform)),y.roughness.value=v.roughness,v.roughnessMap&&(y.roughnessMap.value=v.roughnessMap,t(v.roughnessMap,y.roughnessMapTransform)),e.get(v).envMap&&(y.envMapIntensity.value=v.envMapIntensity)}(y,v),v.isMeshPhysicalMaterial&&function m(y,v,M){y.ior.value=v.ior,v.sheen>0&&(y.sheenColor.value.copy(v.sheenColor).multiplyScalar(v.sheen),y.sheenRoughness.value=v.sheenRoughness,v.sheenColorMap&&(y.sheenColorMap.value=v.sheenColorMap,t(v.sheenColorMap,y.sheenColorMapTransform)),v.sheenRoughnessMap&&(y.sheenRoughnessMap.value=v.sheenRoughnessMap,t(v.sheenRoughnessMap,y.sheenRoughnessMapTransform))),v.clearcoat>0&&(y.clearcoat.value=v.clearcoat,y.clearcoatRoughness.value=v.clearcoatRoughness,v.clearcoatMap&&(y.clearcoatMap.value=v.clearcoatMap,t(v.clearcoatMap,y.clearcoatMapTransform)),v.clearcoatRoughnessMap&&(y.clearcoatRoughnessMap.value=v.clearcoatRoughnessMap,t(v.clearcoatRoughnessMap,y.clearcoatRoughnessMapTransform)),v.clearcoatNormalMap&&(y.clearcoatNormalMap.value=v.clearcoatNormalMap,t(v.clearcoatNormalMap,y.clearcoatNormalMapTransform),y.clearcoatNormalScale.value.copy(v.clearcoatNormalScale),v.side===vo&&y.clearcoatNormalScale.value.negate())),v.iridescence>0&&(y.iridescence.value=v.iridescence,y.iridescenceIOR.value=v.iridescenceIOR,y.iridescenceThicknessMinimum.value=v.iridescenceThicknessRange[0],y.iridescenceThicknessMaximum.value=v.iridescenceThicknessRange[1],v.iridescenceMap&&(y.iridescenceMap.value=v.iridescenceMap,t(v.iridescenceMap,y.iridescenceMapTransform)),v.iridescenceThicknessMap&&(y.iridescenceThicknessMap.value=v.iridescenceThicknessMap,t(v.iridescenceThicknessMap,y.iridescenceThicknessMapTransform))),v.transmission>0&&(y.transmission.value=v.transmission,y.transmissionSamplerMap.value=M.texture,y.transmissionSamplerSize.value.set(M.width,M.height),v.transmissionMap&&(y.transmissionMap.value=v.transmissionMap,t(v.transmissionMap,y.transmissionMapTransform)),y.thickness.value=v.thickness,v.thicknessMap&&(y.thicknessMap.value=v.thicknessMap,t(v.thicknessMap,y.thicknessMapTransform)),y.attenuationDistance.value=v.attenuationDistance,y.attenuationColor.value.copy(v.attenuationColor)),v.anisotropy>0&&(y.anisotropyVector.value.set(v.anisotropy*Math.cos(v.anisotropyRotation),v.anisotropy*Math.sin(v.anisotropyRotation)),v.anisotropyMap&&(y.anisotropyMap.value=v.anisotropyMap,t(v.anisotropyMap,y.anisotropyMapTransform))),y.specularIntensity.value=v.specularIntensity,y.specularColor.value.copy(v.specularColor),v.specularColorMap&&(y.specularColorMap.value=v.specularColorMap,t(v.specularColorMap,y.specularColorMapTransform)),v.specularIntensityMap&&(y.specularIntensityMap.value=v.specularIntensityMap,t(v.specularIntensityMap,y.specularIntensityMapTransform))}(y,v,S)):v.isMeshMatcapMaterial?(s(y,v),function g(y,v){v.matcap&&(y.matcap.value=v.matcap)}(y,v)):v.isMeshDepthMaterial?s(y,v):v.isMeshDistanceMaterial?(s(y,v),function b(y,v){const M=e.get(v).light;y.referencePosition.value.setFromMatrixPosition(M.matrixWorld),y.nearDistance.value=M.shadow.camera.near,y.farDistance.value=M.shadow.camera.far}(y,v)):v.isMeshNormalMaterial?s(y,v):v.isLineBasicMaterial?(function o(y,v){y.diffuse.value.copy(v.color),y.opacity.value=v.opacity,v.map&&(y.map.value=v.map,t(v.map,y.mapTransform))}(y,v),v.isLineDashedMaterial&&function a(y,v){y.dashSize.value=v.dashSize,y.totalSize.value=v.dashSize+v.gapSize,y.scale.value=v.scale}(y,v)):v.isPointsMaterial?function l(y,v,M,x){y.diffuse.value.copy(v.color),y.opacity.value=v.opacity,y.size.value=v.size*M,y.scale.value=.5*x,v.map&&(y.map.value=v.map,t(v.map,y.uvTransform)),v.alphaMap&&(y.alphaMap.value=v.alphaMap,t(v.alphaMap,y.alphaMapTransform)),v.alphaTest>0&&(y.alphaTest.value=v.alphaTest)}(y,v,M,x):v.isSpriteMaterial?function c(y,v){y.diffuse.value.copy(v.color),y.opacity.value=v.opacity,y.rotation.value=v.rotation,v.map&&(y.map.value=v.map,t(v.map,y.mapTransform)),v.alphaMap&&(y.alphaMap.value=v.alphaMap,t(v.alphaMap,y.alphaMapTransform)),v.alphaTest>0&&(y.alphaTest.value=v.alphaTest)}(y,v):v.isShadowMaterial?(y.color.value.copy(v.color),y.opacity.value=v.opacity):v.isShaderMaterial&&(v.uniformsNeedUpdate=!1)}}}function Dle(n,e,t,i){let r={},s={},o=[];const a=t.isWebGL2?n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS):0;function m(M,x,S,P){const A=M.value,R=x+"_"+S;if(void 0===P[R])return P[R]="number"==typeof A||"boolean"==typeof A?A:A.clone(),!0;{const V=P[R];if("number"==typeof A||"boolean"==typeof A){if(V!==A)return P[R]=A,!0}else if(!1===V.equals(A))return V.copy(A),!0}return!1}function b(M){const x={boundary:0,storage:0};return"number"==typeof M||"boolean"==typeof M?(x.boundary=4,x.storage=4):M.isVector2?(x.boundary=8,x.storage=8):M.isVector3||M.isColor?(x.boundary=16,x.storage=12):M.isVector4?(x.boundary=16,x.storage=16):M.isMatrix3?(x.boundary=48,x.storage=48):M.isMatrix4?(x.boundary=64,x.storage=64):M.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",M),x}function y(M){const x=M.target;x.removeEventListener("dispose",y);const S=o.indexOf(x.__bindingPointIndex);o.splice(S,1),n.deleteBuffer(r[x.id]),delete r[x.id],delete s[x.id]}return{bind:function l(M,x){i.uniformBlockBinding(M,x.program)},update:function c(M,x){let S=r[M.id];void 0===S&&(function g(M){const x=M.uniforms;let S=0;for(let R=0,V=x.length;R0&&(S+=16-A),M.__size=S,M.__cache={}}(M),S=function u(M){const x=function h(){for(let M=0;M0),_n=!!de.morphAttributes.position,or=!!de.morphAttributes.normal,Yo=!!de.morphAttributes.color;let Xr=ou;he.toneMapped&&(null===R||!0===R.isXRRenderTarget)&&(Xr=x.toneMapping);const id=de.morphAttributes.position||de.morphAttributes.normal||de.morphAttributes.color,Ui=void 0!==id?id.length:0,An=nt.get(he),Dk=y.state.lights;!0!==me||!0!==Ve&&F===E||gn.setState(he,F,F===E&&he.id===V);let Ji=!1;he.version===An.__version?(An.needsLights&&An.lightsStateVersion!==Dk.state.version||An.outputColorSpace!==Gt||ce.isBatchedMesh&&!1===An.batching||!ce.isBatchedMesh&&!0===An.batching||ce.isInstancedMesh&&!1===An.instancing||!ce.isInstancedMesh&&!0===An.instancing||ce.isSkinnedMesh&&!1===An.skinning||!ce.isSkinnedMesh&&!0===An.skinning||ce.isInstancedMesh&&!0===An.instancingColor&&null===ce.instanceColor||ce.isInstancedMesh&&!1===An.instancingColor&&null!==ce.instanceColor||An.envMap!==Zt||!0===he.fog&&An.fog!==st||void 0!==An.numClippingPlanes&&(An.numClippingPlanes!==gn.numPlanes||An.numIntersection!==gn.numIntersection)||An.vertexAlphas!==Mn||An.vertexTangents!==dn||An.morphTargets!==_n||An.morphNormals!==or||An.morphColors!==Yo||An.toneMapping!==Xr||!0===Le.isWebGL2&&An.morphTargetsCount!==Ui)&&(Ji=!0):(Ji=!0,An.__version=he.version);let gf=An.currentProgram;!0===Ji&&(gf=qC(he,te,ce));let PG=!1,Eb=!1,Ik=!1;const Cs=gf.getUniforms(),_f=An.uniforms;if(xe.useProgram(gf.program)&&(PG=!0,Eb=!0,Ik=!0),he.id!==V&&(V=he.id,Eb=!0),PG||E!==F){Cs.setValue(H,"projectionMatrix",F.projectionMatrix),Cs.setValue(H,"viewMatrix",F.matrixWorldInverse);const Da=Cs.map.cameraPosition;void 0!==Da&&Da.setValue(H,gt.setFromMatrixPosition(F.matrixWorld)),Le.logarithmicDepthBuffer&&Cs.setValue(H,"logDepthBufFC",2/(Math.log(F.far+1)/Math.LN2)),(he.isMeshPhongMaterial||he.isMeshToonMaterial||he.isMeshLambertMaterial||he.isMeshBasicMaterial||he.isMeshStandardMaterial||he.isShaderMaterial)&&Cs.setValue(H,"isOrthographic",!0===F.isOrthographicCamera),E!==F&&(E=F,Eb=!0,Ik=!0)}if(ce.isSkinnedMesh){Cs.setOptional(H,ce,"bindMatrix"),Cs.setOptional(H,ce,"bindMatrixInverse");const Da=ce.skeleton;Da&&(Le.floatVertexTextures?(null===Da.boneTexture&&Da.computeBoneTexture(),Cs.setValue(H,"boneTexture",Da.boneTexture,L)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}ce.isBatchedMesh&&(Cs.setOptional(H,ce,"batchingTexture"),Cs.setValue(H,"batchingTexture",ce._matricesTexture,L));const Rk=de.morphAttributes;if((void 0!==Rk.position||void 0!==Rk.normal||void 0!==Rk.color&&!0===Le.isWebGL2)&&Ln.update(ce,de,gf),(Eb||An.receiveShadow!==ce.receiveShadow)&&(An.receiveShadow=ce.receiveShadow,Cs.setValue(H,"receiveShadow",ce.receiveShadow)),he.isMeshGouraudMaterial&&null!==he.envMap&&(_f.envMap.value=Zt,_f.flipEnvMap.value=Zt.isCubeTexture&&!1===Zt.isRenderTargetTexture?-1:1),Eb&&(Cs.setValue(H,"toneMappingExposure",x.toneMappingExposure),An.needsLights&&function Rme(F,te){F.ambientLightColor.needsUpdate=te,F.lightProbe.needsUpdate=te,F.directionalLights.needsUpdate=te,F.directionalLightShadows.needsUpdate=te,F.pointLights.needsUpdate=te,F.pointLightShadows.needsUpdate=te,F.spotLights.needsUpdate=te,F.spotLightShadows.needsUpdate=te,F.rectAreaLights.needsUpdate=te,F.hemisphereLights.needsUpdate=te}(_f,Ik),st&&!0===he.fog&&je.refreshFogUniforms(_f,st),je.refreshMaterialUniforms(_f,he,ee,$,rt),zS.upload(H,IG(An),_f,L)),he.isShaderMaterial&&!0===he.uniformsNeedUpdate&&(zS.upload(H,IG(An),_f,L),he.uniformsNeedUpdate=!1),he.isSpriteMaterial&&Cs.setValue(H,"center",ce.center),Cs.setValue(H,"modelViewMatrix",ce.modelViewMatrix),Cs.setValue(H,"normalMatrix",ce.normalMatrix),Cs.setValue(H,"modelMatrix",ce.matrixWorld),he.isShaderMaterial||he.isRawShaderMaterial){const Da=he.uniformsGroups;for(let Pk=0,kme=Da.length;Pk{function st(){he.forEach(function(wt){nt.get(wt).currentProgram.isReady()&&he.delete(wt)}),0!==he.size?setTimeout(st,10):ce(F)}null!==we.get("KHR_parallel_shader_compile")?st():setTimeout(st,10)})};let bi=null;function to(){no.stop()}function xi(){no.start()}const no=new wH;function nc(F,te,de,he){if(!1===F.visible)return;if(F.layers.test(te.layers))if(F.isGroup)de=F.renderOrder;else if(F.isLOD)!0===F.autoUpdate&&F.update(te);else if(F.isLight)y.pushLight(F),F.castShadow&&y.pushShadow(F);else if(F.isSprite){if(!F.frustumCulled||le.intersectsSprite(F)){he&>.setFromMatrixPosition(F.matrixWorld).applyMatrix4(Be);const wt=De.update(F),Gt=F.material;Gt.visible&&b.push(F,wt,Gt,de,gt.z,null)}}else if((F.isMesh||F.isLine||F.isPoints)&&(!F.frustumCulled||le.intersectsObject(F))){const wt=De.update(F),Gt=F.material;if(he&&(void 0!==F.boundingSphere?(null===F.boundingSphere&&F.computeBoundingSphere(),gt.copy(F.boundingSphere.center)):(null===wt.boundingSphere&&wt.computeBoundingSphere(),gt.copy(wt.boundingSphere.center)),gt.applyMatrix4(F.matrixWorld).applyMatrix4(Be)),Array.isArray(Gt)){const Zt=wt.groups;for(let Mn=0,dn=Zt.length;Mn0&&function Dme(F,te,de,he){if(null!==(!0===de.isScene?de.overrideMaterial:null))return;const st=Le.isWebGL2;null===rt&&(rt=new Vh(1,1,{generateMipmaps:!0,type:we.has("EXT_color_buffer_half_float")?Gy:au,minFilter:Xc,samples:st?4:0})),x.getDrawingBufferSize(mt),st?rt.setSize(mt.x,mt.y):rt.setSize(pS(mt.x),pS(mt.y));const wt=x.getRenderTarget();x.setRenderTarget(rt),x.getClearColor(Me),W=x.getClearAlpha(),W<1&&x.setClearColor(16777215,.5),x.clear();const Gt=x.toneMapping;x.toneMapping=ou,XC(F,de,he),L.updateMultisampleRenderTarget(rt),L.updateRenderTargetMipmap(rt);let Zt=!1;for(let Mn=0,dn=te.length;Mn0&&XC(ce,te,de),st.length>0&&XC(st,te,de),wt.length>0&&XC(wt,te,de),xe.buffers.depth.setTest(!0),xe.buffers.depth.setMask(!0),xe.buffers.color.setMask(!0),xe.setPolygonOffset(!1)}function XC(F,te,de){const he=!0===te.isScene?te.overrideMaterial:null;for(let ce=0,st=F.length;ce0?M[M.length-1]:null,v.pop(),b=v.length>0?v[v.length-1]:null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.getActiveCubeFace=function(){return P},this.getActiveMipmapLevel=function(){return A},this.getRenderTarget=function(){return R},this.setRenderTargetTextures=function(F,te,de){nt.get(F.texture).__webglTexture=te,nt.get(F.depthTexture).__webglTexture=de;const he=nt.get(F);he.__hasExternalTextures=!0,he.__hasExternalTextures&&(he.__autoAllocateDepthBuffer=void 0===de,he.__autoAllocateDepthBuffer||!0===we.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),he.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(F,te){const de=nt.get(F);de.__webglFramebuffer=te,de.__useDefaultFramebuffer=void 0===te},this.setRenderTarget=function(F,te=0,de=0){R=F,P=te,A=de;let he=!0,ce=null,st=!1,wt=!1;if(F){const Zt=nt.get(F);void 0!==Zt.__useDefaultFramebuffer?(xe.bindFramebuffer(H.FRAMEBUFFER,null),he=!1):void 0===Zt.__webglFramebuffer?L.setupRenderTarget(F):Zt.__hasExternalTextures&&L.rebindTextures(F,nt.get(F.texture).__webglTexture,nt.get(F.depthTexture).__webglTexture);const Mn=F.texture;(Mn.isData3DTexture||Mn.isDataArrayTexture||Mn.isCompressedArrayTexture)&&(wt=!0);const dn=nt.get(F).__webglFramebuffer;F.isWebGLCubeRenderTarget?(ce=Array.isArray(dn[te])?dn[te][de]:dn[te],st=!0):ce=Le.isWebGL2&&F.samples>0&&!1===L.useMultisampledRTT(F)?nt.get(F).__webglMultisampledFramebuffer:Array.isArray(dn)?dn[de]:dn,k.copy(F.viewport),Z.copy(F.scissor),ue=F.scissorTest}else k.copy(ve).multiplyScalar(ee).floor(),Z.copy(Se).multiplyScalar(ee).floor(),ue=Oe;if(xe.bindFramebuffer(H.FRAMEBUFFER,ce)&&Le.drawBuffers&&he&&xe.drawBuffers(F,ce),xe.viewport(k),xe.scissor(Z),xe.setScissorTest(ue),st){const Zt=nt.get(F.texture);H.framebufferTexture2D(H.FRAMEBUFFER,H.COLOR_ATTACHMENT0,H.TEXTURE_CUBE_MAP_POSITIVE_X+te,Zt.__webglTexture,de)}else if(wt){const Zt=nt.get(F.texture);H.framebufferTextureLayer(H.FRAMEBUFFER,H.COLOR_ATTACHMENT0,Zt.__webglTexture,de||0,te||0)}V=-1},this.readRenderTargetPixels=function(F,te,de,he,ce,st,wt){if(!F||!F.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Gt=nt.get(F).__webglFramebuffer;if(F.isWebGLCubeRenderTarget&&void 0!==wt&&(Gt=Gt[wt]),Gt){xe.bindFramebuffer(H.FRAMEBUFFER,Gt);try{const Zt=F.texture,Mn=Zt.format,dn=Zt.type;if(Mn!==zo&&ut.convert(Mn)!==H.getParameter(H.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const _n=dn===Gy&&(we.has("EXT_color_buffer_half_float")||Le.isWebGL2&&we.has("EXT_color_buffer_float"));if(!(dn===au||ut.convert(dn)===H.getParameter(H.IMPLEMENTATION_COLOR_READ_TYPE)||dn===Yl&&(Le.isWebGL2||we.has("OES_texture_float")||we.has("WEBGL_color_buffer_float"))||_n))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");te>=0&&te<=F.width-he&&de>=0&&de<=F.height-ce&&H.readPixels(te,de,he,ce,ut.convert(Mn),ut.convert(dn),st)}finally{const Zt=null!==R?nt.get(R).__webglFramebuffer:null;xe.bindFramebuffer(H.FRAMEBUFFER,Zt)}}},this.copyFramebufferToTexture=function(F,te,de=0){const he=Math.pow(2,-de),ce=Math.floor(te.image.width*he),st=Math.floor(te.image.height*he);L.setTexture2D(te,0),H.copyTexSubImage2D(H.TEXTURE_2D,de,0,0,F.x,F.y,ce,st),xe.unbindTexture()},this.copyTextureToTexture=function(F,te,de,he=0){const ce=te.image.width,st=te.image.height,wt=ut.convert(de.format),Gt=ut.convert(de.type);L.setTexture2D(de,0),H.pixelStorei(H.UNPACK_FLIP_Y_WEBGL,de.flipY),H.pixelStorei(H.UNPACK_PREMULTIPLY_ALPHA_WEBGL,de.premultiplyAlpha),H.pixelStorei(H.UNPACK_ALIGNMENT,de.unpackAlignment),te.isDataTexture?H.texSubImage2D(H.TEXTURE_2D,he,F.x,F.y,ce,st,wt,Gt,te.image.data):te.isCompressedTexture?H.compressedTexSubImage2D(H.TEXTURE_2D,he,F.x,F.y,te.mipmaps[0].width,te.mipmaps[0].height,wt,te.mipmaps[0].data):H.texSubImage2D(H.TEXTURE_2D,he,F.x,F.y,wt,Gt,te.image),0===he&&de.generateMipmaps&&H.generateMipmap(H.TEXTURE_2D),xe.unbindTexture()},this.copyTextureToTexture3D=function(F,te,de,he,ce=0){if(x.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const st=F.max.x-F.min.x+1,wt=F.max.y-F.min.y+1,Gt=F.max.z-F.min.z+1,Zt=ut.convert(he.format),Mn=ut.convert(he.type);let dn;if(he.isData3DTexture)L.setTexture3D(he,0),dn=H.TEXTURE_3D;else{if(!he.isDataArrayTexture&&!he.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");L.setTexture2DArray(he,0),dn=H.TEXTURE_2D_ARRAY}H.pixelStorei(H.UNPACK_FLIP_Y_WEBGL,he.flipY),H.pixelStorei(H.UNPACK_PREMULTIPLY_ALPHA_WEBGL,he.premultiplyAlpha),H.pixelStorei(H.UNPACK_ALIGNMENT,he.unpackAlignment);const _n=H.getParameter(H.UNPACK_ROW_LENGTH),or=H.getParameter(H.UNPACK_IMAGE_HEIGHT),Yo=H.getParameter(H.UNPACK_SKIP_PIXELS),Xr=H.getParameter(H.UNPACK_SKIP_ROWS),id=H.getParameter(H.UNPACK_SKIP_IMAGES),Ui=de.isCompressedTexture?de.mipmaps[ce]:de.image;H.pixelStorei(H.UNPACK_ROW_LENGTH,Ui.width),H.pixelStorei(H.UNPACK_IMAGE_HEIGHT,Ui.height),H.pixelStorei(H.UNPACK_SKIP_PIXELS,F.min.x),H.pixelStorei(H.UNPACK_SKIP_ROWS,F.min.y),H.pixelStorei(H.UNPACK_SKIP_IMAGES,F.min.z),de.isDataTexture||de.isData3DTexture?H.texSubImage3D(dn,ce,te.x,te.y,te.z,st,wt,Gt,Zt,Mn,Ui.data):de.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),H.compressedTexSubImage3D(dn,ce,te.x,te.y,te.z,st,wt,Gt,Zt,Ui.data)):H.texSubImage3D(dn,ce,te.x,te.y,te.z,st,wt,Gt,Zt,Mn,Ui),H.pixelStorei(H.UNPACK_ROW_LENGTH,_n),H.pixelStorei(H.UNPACK_IMAGE_HEIGHT,or),H.pixelStorei(H.UNPACK_SKIP_PIXELS,Yo),H.pixelStorei(H.UNPACK_SKIP_ROWS,Xr),H.pixelStorei(H.UNPACK_SKIP_IMAGES,id),0===ce&&he.generateMipmaps&&H.generateMipmap(dn),xe.unbindTexture()},this.initTexture=function(F){F.isCubeTexture?L.setTextureCube(F,0):F.isData3DTexture?L.setTexture3D(F,0):F.isDataArrayTexture||F.isCompressedArrayTexture?L.setTexture2DArray(F,0):L.setTexture2D(F,0),xe.unbindTexture()},this.resetState=function(){P=0,A=0,R=null,xe.reset(),yn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Kl}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===DR?"display-p3":"srgb",t.unpackColorSpace=ii.workingColorSpace===cS?"display-p3":"srgb"}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Ei?cu:3e3}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===cu?Ei:Hr}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}(class Ile extends JH{}).prototype.isWebGL1Renderer=!0;class HS extends Gr{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t}}class cP{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=35044,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=Ho()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}get updateRange(){return console.warn("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}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.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let r=0,s=this.stride;rl)continue;p.applyMatrix4(this.matrixWorld);const V=e.ray.origin.distanceTo(p);Ve.far||t.push({distance:V,point:h.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}else for(let x=Math.max(0,o.start),S=Math.min(y.count,o.start+o.count)-1;xl)continue;p.applyMatrix4(this.matrixWorld);const A=e.ray.origin.distanceTo(p);Ae.far||t.push({distance:A,point:h.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const r=t[i[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s0){const r=t[i[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sr.far)return;s.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:o})}}class Ql{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let i,r=this.getPoint(0),s=0;t.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),s+=i.distanceTo(r),t.push(s),r=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const i=this.getLengths();let r=0;const s=i.length;let o;o=t||e*i[s-1];let c,a=0,l=s-1;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),c=i[r]-o,c<0)a=r+1;else{if(!(c>0)){l=r;break}l=r-1}if(r=l,i[r]===o)return r/(s-1);const u=i[r];return(r+(o-u)/(i[r+1]-u))/(s-1)}getTangent(e,t){let r=e-1e-4,s=e+1e-4;r<0&&(r=0),s>1&&(s=1);const o=this.getPoint(r),a=this.getPoint(s),l=t||(o.isVector2?new Ce:new N);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){const i=new N,r=[],s=[],o=[],a=new N,l=new kt;for(let m=0;m<=e;m++)r[m]=this.getTangentAt(m/e,new N);s[0]=new N,o[0]=new N;let c=Number.MAX_VALUE;const u=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);u<=c&&(c=u,i.set(1,0,0)),h<=c&&(c=h,i.set(0,1,0)),p<=c&&i.set(0,0,1),a.crossVectors(r[0],i).normalize(),s[0].crossVectors(r[0],a),o[0].crossVectors(r[0],s[0]);for(let m=1;m<=e;m++){if(s[m]=s[m-1].clone(),o[m]=o[m-1].clone(),a.crossVectors(r[m-1],r[m]),a.length()>Number.EPSILON){a.normalize();const g=Math.acos(Ki(r[m-1].dot(r[m]),-1,1));s[m].applyMatrix4(l.makeRotationAxis(a,g))}o[m].crossVectors(r[m],s[m])}if(!0===t){let m=Math.acos(Ki(s[0].dot(s[e]),-1,1));m/=e,r[0].dot(a.crossVectors(s[0],s[e]))>0&&(m=-m);for(let g=1;g<=e;g++)s[g].applyMatrix4(l.makeRotationAxis(r[g],m*g)),o[g].crossVectors(r[g],s[g])}return{tangents:r,normals:s,binormals:o}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class vP extends Ql{constructor(e=0,t=0,i=1,r=1,s=0,o=2*Math.PI,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=r,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t){const i=t||new Ce,r=2*Math.PI;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)r;)s-=r;sr.length-2?r.length-1:o+1],h=r[o>r.length-3?r.length-1:o+2];return i.set(C4(a,l.x,c.x,u.x,h.x),C4(a,l.y,c.y,u.y,h.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t0?0:(Math.floor(Math.abs(a)/s)+1)*s:0===l&&a===s-1&&(a=s-2,l=1),this.closed||a>0?c=r[(a-1)%s]:(tC.subVectors(r[0],r[1]).add(r[0]),c=tC);const h=r[a%s],p=r[(a+1)%s];if(this.closed||a+2=i){const o=r[s]-i,a=this.curves[s],l=a.getLength();return a.getPointAt(0===l?0:1-o/l,t)}s++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let i=0,r=this.curves.length;i1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t0){const h=c.getPoint(0);h.equals(this.currentPoint)||this.lineTo(h.x,h.y)}this.curves.push(c);const u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class rC extends cn{constructor(e=[new Ce(0,-.5),new Ce(.5,0),new Ce(0,.5)],t=12,i=0,r=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:r},t=Math.floor(t),r=Ki(r,0,2*Math.PI);const s=[],o=[],a=[],l=[],c=[],u=1/t,h=new N,p=new Ce,m=new N,g=new N,b=new N;let y=0,v=0;for(let M=0;M<=e.length-1;M++)switch(M){case 0:y=e[M+1].x-e[M].x,v=e[M+1].y-e[M].y,m.x=1*v,m.y=-y,m.z=0*v,b.copy(m),m.normalize(),l.push(m.x,m.y,m.z);break;case e.length-1:l.push(b.x,b.y,b.z);break;default:y=e[M+1].x-e[M].x,v=e[M+1].y-e[M].y,m.x=1*v,m.y=-y,m.z=0*v,g.copy(m),m.x+=b.x,m.y+=b.y,m.z+=b.z,m.normalize(),l.push(m.x,m.y,m.z),b.copy(g)}for(let M=0;M<=t;M++){const x=i+M*u*r,S=Math.sin(x),P=Math.cos(x);for(let A=0;A<=e.length-1;A++)h.x=e[A].x*S,h.y=e[A].y,h.z=e[A].x*P,o.push(h.x,h.y,h.z),p.x=M/t,p.y=A/(e.length-1),a.push(p.x,p.y),c.push(l[3*A+0]*S,l[3*A+1],l[3*A+0]*P)}for(let M=0;M0&&x(!0),t>0&&x(!1)),this.setIndex(u),this.setAttribute("position",new ot(h,3)),this.setAttribute("normal",new ot(p,3)),this.setAttribute("uv",new ot(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new mg(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class oC extends mg{constructor(e=1,t=1,i=32,r=1,s=!1,o=0,a=2*Math.PI){super(0,e,t,i,r,s,o,a),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:i,heightSegments:r,openEnded:s,thetaStart:o,thetaLength:a}}static fromJSON(e){return new oC(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class fb extends cn{constructor(e=1,t=32,i=16,r=0,s=2*Math.PI,o=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:i,phiStart:r,phiLength:s,thetaStart:o,thetaLength:a},t=Math.max(3,Math.floor(t)),i=Math.max(2,Math.floor(i));const l=Math.min(o+a,Math.PI);let c=0;const u=[],h=new N,p=new N,m=[],g=[],b=[],y=[];for(let v=0;v<=i;v++){const M=[],x=v/i;let S=0;0===v&&0===o?S=.5/t:v===i&&l===Math.PI&&(S=-.5/t);for(let P=0;P<=t;P++){const A=P/t;h.x=-e*Math.cos(r+A*s)*Math.sin(o+x*a),h.y=e*Math.cos(o+x*a),h.z=e*Math.sin(r+A*s)*Math.sin(o+x*a),g.push(h.x,h.y,h.z),p.copy(h).normalize(),b.push(p.x,p.y,p.z),y.push(A+S,1-x),M.push(c++)}u.push(M)}for(let v=0;v0)&&m.push(u[v][M+1],S,A),(v!==i-1||l0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class pC extends bo{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new We(16777215),this.specular=new We(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new We(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Bh,this.normalScale=new Ce(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=rS,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,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.flatShading=e.flatShading,this.fog=e.fog,this}}function tf(n,e,t){return!n||!t&&n.constructor===e?n:"number"==typeof e.BYTES_PER_ELEMENT?new e(n):Array.prototype.slice.call(n)}function V4(n){const t=n.length,i=new Array(t);for(let r=0;r!==t;++r)i[r]=r;return i.sort(function e(r,s){return n[r]-n[s]}),i}function FP(n,e,t){const i=n.length,r=new n.constructor(i);for(let s=0,o=0;o!==i;++s){const a=t[s]*e;for(let l=0;l!==e;++l)r[o++]=n[a+l]}return r}function NP(n,e,t,i){let r=1,s=n[0];for(;void 0!==s&&void 0===s[i];)s=n[r++];if(void 0===s)return;let o=s[i];if(void 0!==o)if(Array.isArray(o))do{o=s[i],void 0!==o&&(e.push(s.time),t.push.apply(t,o)),s=n[r++]}while(void 0!==s);else if(void 0!==o.toArray)do{o=s[i],void 0!==o&&(e.push(s.time),o.toArray(t,t.length)),s=n[r++]}while(void 0!==s);else do{o=s[i],void 0!==o&&(e.push(s.time),t.push(o)),s=n[r++]}while(void 0!==s)}class mb{constructor(e,t,i,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(i),this.sampleValues=t,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let i=this._cachedIndex,r=t[i],s=t[i-1];e:{t:{let o;n:{i:if(!(e=s)break e;{const a=t[1];e=s)break t}o=i,i=0}}for(;i>>1;et;)--o;if(++o,0!==s||o!==r){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=i.slice(s,o),this.values=this.values.slice(s*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,r=this.values,s=i.length;0===s&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const l=i[a];if("number"==typeof l&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(null!==o&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(void 0!==r&&function U4(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}(r))for(let a=0,l=r.length;a!==l;++a){const c=r[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),i=this.getValueSize(),r=2302===this.getInterpolation(),s=e.length-1;let o=1;for(let a=1;a0){e[o]=e[s];for(let a=s*i,l=o*i,c=0;c!==i;++c)t[l+c]=t[a+c];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*i)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),r=new(0,this.constructor)(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}ec.prototype.TimeBufferType=Float32Array,ec.prototype.ValueBufferType=Float32Array,ec.prototype.DefaultInterpolation=Rm;class vg extends ec{}vg.prototype.ValueTypeName="bool",vg.prototype.ValueBufferType=Array,vg.prototype.DefaultInterpolation=Wy,vg.prototype.InterpolantFactoryMethodLinear=void 0,vg.prototype.InterpolantFactoryMethodSmooth=void 0;class H4 extends ec{}H4.prototype.ValueTypeName="color";class yg extends ec{}yg.prototype.ValueTypeName="number";class Oce extends mb{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-t)/(r-t);let c=e*a;for(let u=c+a;c!==u;c+=4)Qs.slerpFlat(s,0,o,c-a,o,c,l);return s}}class nf extends ec{InterpolantFactoryMethodLinear(e){return new Oce(this.times,this.values,this.getValueSize(),e)}}nf.prototype.ValueTypeName="quaternion",nf.prototype.DefaultInterpolation=Rm,nf.prototype.InterpolantFactoryMethodSmooth=void 0;class bg extends ec{}bg.prototype.ValueTypeName="string",bg.prototype.ValueBufferType=Array,bg.prototype.DefaultInterpolation=Wy,bg.prototype.InterpolantFactoryMethodLinear=void 0,bg.prototype.InterpolantFactoryMethodSmooth=void 0;class xg extends ec{}xg.prototype.ValueTypeName="vector";class gb{constructor(e,t=-1,i,r=2500){this.name=e,this.tracks=i,this.duration=t,this.blendMode=r,this.uuid=Ho(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,r=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(Fce(i[o]).scale(r));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const t=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=i.length;s!==o;++s)t.push(ec.toJSON(i[s]));return r}static CreateFromMorphTargetSequence(e,t,i,r){const s=t.length,o=[];for(let a=0;a1){const h=u[1];let p=r[h];p||(r[h]=p=[]),p.push(c)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],t,i));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(h,p,m,g,b){if(0!==m.length){const y=[],v=[];NP(m,y,v,g),0!==y.length&&b.push(new h(p,y,v))}},r=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let h=0;h{class n{constructor(t){this.manager=void 0!==t?t:W4,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,i){const r=this;return new Promise(function(s,o){r.load(t,s,i,o)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}}return n.DEFAULT_MATERIAL_NAME="__DEFAULT",n})();const td={};class Nce extends Error{constructor(e,t){super(e),this.response=t}}class Sa extends rf{constructor(e){super(e)}load(e,t,i,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const s=_u.get(e);if(void 0!==s)return this.manager.itemStart(e),setTimeout(()=>{t&&t(s),this.manager.itemEnd(e)},0),s;if(void 0!==td[e])return void td[e].push({onLoad:t,onProgress:i,onError:r});td[e]=[],td[e].push({onLoad:t,onProgress:i,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(200===c.status||0===c.status){if(0===c.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||void 0===c.body||void 0===c.body.getReader)return c;const u=td[e],h=c.body.getReader(),p=c.headers.get("Content-Length")||c.headers.get("X-File-Size"),m=p?parseInt(p):0,g=0!==m;let b=0;const y=new ReadableStream({start(v){!function M(){h.read().then(({done:x,value:S})=>{if(x)v.close();else{b+=S.byteLength;const P=new ProgressEvent("progress",{lengthComputable:g,loaded:b,total:m});for(let A=0,R=u.length;A{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>(new DOMParser).parseFromString(u,a));case"json":return c.json();default:if(void 0===a)return c.text();{const h=/charset="?([^;"\s]*)"?/i.exec(a),p=h&&h[1]?h[1].toLowerCase():void 0,m=new TextDecoder(p);return c.arrayBuffer().then(g=>m.decode(g))}}}).then(c=>{_u.add(e,c);const u=td[e];delete td[e];for(let h=0,p=u.length;h{const u=td[e];if(void 0===u)throw this.manager.itemError(e),c;delete td[e];for(let h=0,p=u.length;h{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class mC extends rf{constructor(e){super(e)}load(e,t,i,r){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=_u.get(e);if(void 0!==o)return s.manager.itemStart(e),setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o;const a=Xy("img");function l(){u(),_u.add(e,this),t&&t(this),s.manager.itemEnd(e)}function c(h){u(),r&&r(h),s.manager.itemError(e),s.manager.itemEnd(e)}function u(){a.removeEventListener("load",l,!1),a.removeEventListener("error",c,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",c,!1),"data:"!==e.slice(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),s.manager.itemStart(e),a.src=e,a}}class gC extends rf{constructor(e){super(e)}load(e,t,i,r){const s=new sl,o=new mC(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){s.image=a,s.needsUpdate=!0,void 0!==t&&t(s)},i,r),s}}class _C extends Gr{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new We(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}const BP=new kt,$4=new N,j4=new N;class UP{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Ce(512,512),this.map=null,this.mapPass=null,this.matrix=new kt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new FS,this._frameExtents=new Ce(1,1),this._viewportCount=1,this._viewports=[new ai(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,i=this.matrix;$4.setFromMatrixPosition(e.matrixWorld),t.position.copy($4),j4.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(j4),t.updateMatrixWorld(),BP.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(BP),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(BP)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),(512!==this.mapSize.x||512!==this.mapSize.y)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class Uce extends UP{constructor(){super(new _r(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,i=2*Fm*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,s=e.distance||t.far;(i!==t.fov||r!==t.aspect||s!==t.far)&&(t.fov=i,t.aspect=r,t.far=s,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class X4 extends _C{constructor(e,t,i=0,r=Math.PI/3,s=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Gr.DEFAULT_UP),this.updateMatrix(),this.target=new Gr,this.distance=i,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Uce}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const q4=new kt,_b=new N,VP=new N;class Vce extends UP{constructor(){super(new _r(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Ce(4,2),this._viewportCount=6,this._viewports=[new ai(2,1,1,1),new ai(0,1,1,1),new ai(3,1,1,1),new ai(1,1,1,1),new ai(3,0,1,1),new ai(1,0,1,1)],this._cubeDirections=[new N(1,0,0),new N(-1,0,0),new N(0,0,1),new N(0,0,-1),new N(0,1,0),new N(0,-1,0)],this._cubeUps=[new N(0,1,0),new N(0,1,0),new N(0,1,0),new N(0,1,0),new N(0,0,1),new N(0,0,-1)]}updateMatrices(e,t=0){const i=this.camera,r=this.matrix,s=e.distance||i.far;s!==i.far&&(i.far=s,i.updateProjectionMatrix()),_b.setFromMatrixPosition(e.matrixWorld),i.position.copy(_b),VP.copy(i.position),VP.add(this._cubeDirections[t]),i.up.copy(this._cubeUps[t]),i.lookAt(VP),i.updateMatrixWorld(),r.makeTranslation(-_b.x,-_b.y,-_b.z),q4.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(q4)}}class Y4 extends _C{constructor(e,t,i=0,r=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=r,this.shadow=new Vce}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class zce extends UP{constructor(){super(new BS(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class K4 extends _C{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Gr.DEFAULT_UP),this.updateMatrix(),this.target=new Gr,this.shadow=new zce}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class zP extends _C{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class vu{static decodeText(e){if(typeof TextDecoder<"u")return(new TextDecoder).decode(e);let t="";for(let i=0,r=e.length;i"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,i,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=_u.get(e);if(void 0!==o)return s.manager.itemStart(e),o.then?void o.then(c=>{t&&t(c),s.manager.itemEnd(e)}).catch(c=>{r&&r(c)}):(setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o);const a={};a.credentials="anonymous"===this.crossOrigin?"same-origin":"include",a.headers=this.requestHeader;const l=fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(c){return _u.add(e,c),t&&t(c),s.manager.itemEnd(e),c}).catch(function(c){r&&r(c),_u.remove(e),s.manager.itemError(e),s.manager.itemEnd(e)});_u.add(e,l),s.manager.itemStart(e)}}const GP="\\[\\]\\.:\\/",Jce=new RegExp("["+GP+"]","g"),WP="[^"+GP+"]",ede="[^"+GP.replace("\\.","")+"]",sde=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",WP)+/(WCOD+)?/.source.replace("WCOD",ede)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",WP)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",WP)+"$"),ode=["material","materials","bones","map"];class ade{constructor(e,t,i){const r=i||vi.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const r=this._bindings[this._targetGroup.nCachedObjects_];void 0!==r&&r.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=i.length;r!==s;++r)i[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}let vi=(()=>{class n{constructor(t,i,r){this.path=i,this.parsedPath=r||n.parseTrackName(i),this.node=n.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,i,r){return t&&t.isAnimationObjectGroup?new n.Composite(t,i,r):new n(t,i,r)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(Jce,"")}static parseTrackName(t){const i=sde.exec(t);if(null===i)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const r={nodeName:i[2],objectName:i[3],objectIndex:i[4],propertyName:i[5],propertyIndex:i[6]},s=r.nodeName&&r.nodeName.lastIndexOf(".");if(void 0!==s&&-1!==s){const o=r.nodeName.substring(s+1);-1!==ode.indexOf(o)&&(r.nodeName=r.nodeName.substring(0,s),r.objectName=o)}if(null===r.propertyName||0===r.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return r}static findNode(t,i){if(void 0===i||""===i||"."===i||-1===i||i===t.name||i===t.uuid)return t;if(t.skeleton){const r=t.skeleton.getBoneByName(i);if(void 0!==r)return r}if(t.children){const r=function(o){for(let a=0;a=2.0 are supported.")));const c=new $de(s,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u=0&&void 0===a[h]&&console.warn('THREE.GLTFLoader: Unknown extension "'+h+'".')}}c.setExtensions(o),c.setPlugins(a),c.parse(i,r)}parseAsync(e,t){const i=this;return new Promise(function(r,s){i.parse(e,t,r,s)})}}function pde(){let n={};return{get:function(e){return n[e]},add:function(e,t){n[e]=t},remove:function(e){delete n[e]},removeAll:function(){n={}}}}const Bn={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class mde{constructor(e){this.parser=e,this.name=Bn.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let i=0,r=t.length;i=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,s.source,o)}}class Tde{constructor(e){this.parser=e,this.name=Bn.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,r=i.json,s=r.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],a=r.images[o.source];let l=i.textureLoader;if(a.uri){const c=i.options.manager.getHandler(a.uri);null!==c&&(l=c)}return this.detectSupport().then(function(c){if(c)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(1===t.height)}})),this.isSupported}}class Dde{constructor(e){this.parser=e,this.name=Bn.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,r=i.json,s=r.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],a=r.images[o.source];let l=i.textureLoader;if(a.uri){const c=i.options.manager.getHandler(a.uri);null!==c&&(l=c)}return this.detectSupport().then(function(c){if(c)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(1===t.height)}})),this.isSupported}}class Ide{constructor(e){this.name=Bn.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,i=t.bufferViews[e];if(i.extensions&&i.extensions[this.name]){const r=i.extensions[this.name],s=this.parser.getDependency("buffer",r.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(a){const u=r.count,h=r.byteStride,p=new Uint8Array(a,r.byteOffset||0,r.byteLength||0);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(u,h,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(u*h);return o.decodeGltfBuffer(new Uint8Array(m),u,h,p,r.mode,r.filter),m})})}return null}}class Rde{constructor(e){this.name=Bn.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,i=t.nodes[e];if(!i.extensions||!i.extensions[this.name]||void 0===i.mesh)return null;const r=t.meshes[i.mesh];for(const c of r.primitives)if(c.mode!==Ca.TRIANGLES&&c.mode!==Ca.TRIANGLE_STRIP&&c.mode!==Ca.TRIANGLE_FAN&&void 0!==c.mode)return null;const o=i.extensions[this.name].attributes,a=[],l={};for(const c in o)a.push(this.parser.getDependency("accessor",o[c]).then(u=>(l[c]=u,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(c=>{const u=c.pop(),h=u.isGroup?u.children:[u],p=c[0].count,m=[];for(const g of h){const b=new kt,y=new N,v=new Qs,M=new N(1,1,1),x=new p4(g.geometry,g.material,p);for(let S=0;S-1,s=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),this.textureLoader=typeof createImageBitmap>"u"||i||r&&s<98?new gC(this.options.manager):new qce(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Sa(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const i=this,r=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(o){const a={scene:o[0][r.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:r.asset,parser:i,userData:{}};return uf(s,a,r),xu(a,r),Promise.all(i._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){e(a)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],i=this.json.meshes||[];for(let r=0,s=t.length;r{const l=this.associations.get(o);null!=l&&this.associations.set(a,l);for(const[c,u]of o.children.entries())s(u,a.children[c])};return s(i,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let i=0;i=2&&y.setY(E,A[R*l+1]),l>=3&&y.setZ(E,A[R*l+2]),l>=4&&y.setW(E,A[R*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return y})}loadTexture(e){const t=this.json,s=t.textures[e].source,o=t.images[s];let a=this.textureLoader;if(o.uri){const l=this.options.manager.getHandler(o.uri);null!==l&&(a=l)}return this.loadTextureImage(e,s,a)}loadTextureImage(e,t,i){const r=this,s=this.json,o=s.textures[e],a=s.images[t],l=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const c=this.loadImageSource(t,i).then(function(u){u.flipY=!1,u.name=o.name||a.name||"",""===u.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(u.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return u.magFilter=b5[p.magFilter]||Yi,u.minFilter=b5[p.minFilter]||Xc,u.wrapS=x5[p.wrapS]||ql,u.wrapT=x5[p.wrapT]||ql,r.associations.set(u,{textures:e}),u}).catch(function(){return null});return this.textureCache[l]=c,c}loadImageSource(e,t){const r=this.json,s=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then(h=>h.clone());const o=r.images[e],a=self.URL||self.webkitURL;let l=o.uri||"",c=!1;if(void 0!==o.bufferView)l=this.getDependency("bufferView",o.bufferView).then(function(h){c=!0;const p=new Blob([h],{type:o.mimeType});return l=a.createObjectURL(p),l});else if(void 0===o.uri)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const u=Promise.resolve(l).then(function(h){return new Promise(function(p,m){let g=p;!0===t.isImageBitmapLoader&&(g=function(b){const y=new sl(b);y.needsUpdate=!0,p(y)}),t.load(vu.resolveURL(h,s.path),g,void 0,m)})}).then(function(h){return!0===c&&a.revokeObjectURL(l),h.userData.mimeType=o.mimeType||function Gde(n){return n.search(/\.jpe?g($|\?)/i)>0||0===n.search(/^data\:image\/jpeg/)?"image/jpeg":n.search(/\.webp($|\?)/i)>0||0===n.search(/^data\:image\/webp/)?"image/webp":"image/png"}(o.uri),h}).catch(function(h){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),h});return this.sourceCache[e]=u,u}assignTexture(e,t,i,r){const s=this;return this.getDependency("texture",i.index).then(function(o){if(!o)return null;if(void 0!==i.texCoord&&i.texCoord>0&&((o=o.clone()).channel=i.texCoord),s.extensions[Bn.KHR_TEXTURE_TRANSFORM]){const a=void 0!==i.extensions?i.extensions[Bn.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Bn.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),s.associations.set(o,l)}}return void 0!==r&&(o.colorSpace=r),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let i=e.material;const r=void 0===t.attributes.tangent,s=void 0!==t.attributes.color,o=void 0===t.attributes.normal;if(e.isPoints){const a="PointsMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new Qh,bo.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,l.sizeAttenuation=!1,this.cache.add(a,l)),i=l}else if(e.isLine){const a="LineBasicMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new $r,bo.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,this.cache.add(a,l)),i=l}if(r||s||o){let a="ClonedMaterial:"+i.uuid+":";r&&(a+="derivative-tangents:"),s&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=i.clone(),s&&(l.vertexColors=!0),o&&(l.flatShading=!0),r&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(i))),i=l}e.material=i}getMaterialType(){return pb}loadMaterial(e){const t=this,r=this.extensions,s=this.json.materials[e];let o;const a={},c=[];if((s.extensions||{})[Bn.KHR_MATERIALS_UNLIT]){const h=r[Bn.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),c.push(h.extendParams(a,s,t))}else{const h=s.pbrMetallicRoughness||{};if(a.color=new We(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const p=h.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],Hr),a.opacity=p[3]}void 0!==h.baseColorTexture&&c.push(t.assignTexture(a,"map",h.baseColorTexture,Ei)),a.metalness=void 0!==h.metallicFactor?h.metallicFactor:1,a.roughness=void 0!==h.roughnessFactor?h.roughnessFactor:1,void 0!==h.metallicRoughnessTexture&&(c.push(t.assignTexture(a,"metalnessMap",h.metallicRoughnessTexture)),c.push(t.assignTexture(a,"roughnessMap",h.metallicRoughnessTexture))),o=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(e)}),c.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(e,a)})))}!0===s.doubleSided&&(a.side=Vo);const u=s.alphaMode||"OPAQUE";if("BLEND"===u?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,"MASK"===u&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&o!==as&&(c.push(t.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new Ce(1,1),void 0!==s.normalTexture.scale)){const h=s.normalTexture.scale;a.normalScale.set(h,h)}if(void 0!==s.occlusionTexture&&o!==as&&(c.push(t.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&o!==as){const h=s.emissiveFactor;a.emissive=(new We).setRGB(h[0],h[1],h[2],Hr)}return void 0!==s.emissiveTexture&&o!==as&&c.push(t.assignTexture(a,"emissiveMap",s.emissiveTexture,Ei)),Promise.all(c).then(function(){const h=new o(a);return s.name&&(h.name=s.name),xu(h,s),t.associations.set(h,{materials:e}),s.extensions&&uf(r,h,s),h})}createUniqueName(e){const t=vi.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,i=this.extensions,r=this.primitiveCache;function s(a){return i[Bn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,t).then(function(l){return w5(l,a,t)})}const o=[];for(let a=0,l=e.length;a0&&zde(v,s),v.name=t.createUniqueName(s.name||"mesh_"+e),xu(v,s),y.extensions&&uf(r,v,y),t.assignFinalMaterial(v),h.push(v)}for(let m=0,g=h.length;m1?new jo:1===c.length?c[0]:new Gr,u!==c[0])for(let h=0,p=c.length;h{const h=new Map;for(const[p,m]of r.associations)(p instanceof bo||p instanceof sl)&&h.set(p,m);return u.traverse(p=>{const m=r.associations.get(p);null!=m&&h.set(p,m)}),h})(s),s})}_createAnimationTracks(e,t,i,r,s){const o=[],a=e.name?e.name:e.uuid,l=[];let c;switch(bu[s.path]===bu.weights?e.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a),bu[s.path]){case bu.weights:c=yg;break;case bu.rotation:c=nf;break;case bu.position:case bu.scale:c=xg;break;default:c=1===i.itemSize?yg:xg}const u=void 0!==r.interpolation?Bde[r.interpolation]:Rm,h=this._getArrayFromAccessor(i);for(let p=0,m=l.length;pi.name===e||i.userData.name===e);return t?(t.removeFromParent(),new cl(t)):null}getBoundings(){return(new xs).setFromObject(this.nativeMesh)}clone(){return new cl(this.nativeMesh.clone())}addToWorld(e){var t;null===(t=e.visualScene.nativeScene)||void 0===t||t.add(this.nativeMesh)}removeFromWorld(e){var t;null===(t=e.visualScene.nativeScene)||void 0===t||t.remove(this.nativeMesh)}dispose(){this.nativeMesh.traverse(e=>{e instanceof Yn&&this.disposeMesh(e)}),this.nativeMesh instanceof Yn&&this.disposeMesh(this.nativeMesh)}disposeMesh(e){e.geometry.dispose();const t=e.material instanceof Array?e.material:[e.material];for(const i of t)i.dispose()}}class Xde extends cl{constructor(e){super(e),this.nativeCamera=e}get supportsFov(){return this.nativeCamera instanceof _r||"PerspectiveCamera"==this.nativeCamera.type}get fov(){return this.nativeCamera.fov||NaN}set fov(e){this.supportsFov&&(this.nativeCamera.fov=e,this.nativeCamera.updateProjectionMatrix())}}class qde extends One{createMaterial(e){let t=e.color||super.randomColor(),i=e.shading||"unlit";switch(i){case"unlit":return new as({color:t,map:e.diffuse||null});case"standart":return new pb({color:t,map:e.diffuse||null});case"phong":return new pC({color:t,map:e.diffuse||null});default:throw new Error(`"${i}" shading not implemented for three.js`)}}transformPrimitiveZUp(e){e.rotateX(Math.PI/2);const t=new jo;return t.add(e),t}createPrimitive(e,t={}){let i=null,r=this.createMaterial(t);switch(e.shape){case"PLANE":i=new Yn(new tg(1e4,1e4),r);break;case"BOX":i=new Yn(new Wh(e.dimensions.x,e.dimensions.y,e.dimensions.z),r);break;case"CAPSULE":i=this.transformPrimitiveZUp(new Yn(new sC(e.radius,e.centersDistance),r));break;case"CYLINDER":i=this.transformPrimitiveZUp(new Yn(new mg(e.radius,e.radius,e.height),r));break;case"CONE":i=this.transformPrimitiveZUp(new Yn(new oC(e.radius,e.height),r));break;case"SPHERE":i=new Yn(new fb(e.radius),r)}if(!i)throw new Error(`Primitive with shape "${e.shape}" not implemented`);return void 0!==t.castShadow&&(i.castShadow=t.castShadow),void 0!==t.receiveShadow&&(i.receiveShadow=t.receiveShadow),new cl(i)}createPerspectiveCamera(e={}){return new Xde(new _r(e.fov||75,e.aspectRatio||1,e.frustrum?e.frustrum.near:1,e.frustrum?e.frustrum.far:1e4))}}class Kde{constructor(){this.gltfLoader=new fde}loadFromGgGlb(e,t){return function(n,e,t,i){return new(t||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})}(this,void 0,void 0,function*(){const i=yield this.gltfLoader.parseAsync(e,"");return i.scene.traverse(r=>{r.type.endsWith("Light")&&(console.warn("WORKAROUND: light intensity from GLB divided by 200."),r.intensity*=.005)}),new cl(i.scene)})}}class Zde extends cl{constructor(){super(new pg(new cn,new $r({color:16711680,linewidth:.5}))),this.entity=null,this.debugBufferSize=3e6,this.index=0,this.lastMaxIndex=0,this.debugVertices=new Float32Array(this.debugBufferSize),this.debugColors=new Float32Array(this.debugBufferSize),this.nativeMesh.geometry.setAttribute("position",new _i(this.debugVertices,3)),this.nativeMesh.geometry.setAttribute("color",new _i(this.debugColors,3)),this.nativeMesh.frustumCulled=!1}drawContactPoint(e,t,i){this.setXYZ(this.debugVertices,this.index,e.x,e.y,e.z),this.setXYZ(this.debugColors,this.index++,i?.x||0,i?.y||0,i?.z||0),this.setXYZ(this.debugVertices,this.index,e.x+t.x,e.y+t.y,e.z+t.z),this.setXYZ(this.debugColors,this.index++,i?.x||0,i?.y||0,i?.z||0)}drawLine(e,t,i){this.setXYZ(this.debugVertices,this.index,e.x,e.y,e.z),this.setXYZ(this.debugColors,this.index++,i?.x||0,i?.y||0,i?.z||0),this.setXYZ(this.debugVertices,this.index,t.x,t.y,t.z),this.setXYZ(this.debugColors,this.index++,i?.x||0,i?.y||0,i?.z||0)}update(){this.index.01&&(this.camera.nativeCamera.aspect=e.x/e.y,this.camera.nativeCamera.updateProjectionMatrix())}render(){this.nativeRenderer.render(this.scene.nativeScene,this.camera.nativeCamera)}dispose(){this.camera.dispose(),this.nativeRenderer.clear(),this.nativeRenderer.dispose(),this.nativeRenderer.domElement=null}}class M5{constructor(){this._nativeScene=null,this.factory=new qde,this.loader=new Kde,this.debugPhysicsDrawerClass=Zde}get nativeScene(){return this._nativeScene}init(){return n=this,e=void 0,i=function*(){this._nativeScene=new HS},new((t=void 0)||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())});var n,e,t,i}createRenderer(e,t,i){return new Qde(this,e,t,i)}dispose(){this._nativeScene=new HS}}const eue=/^[og]\s*(.+)?/,tue=/^mtllib /,nue=/^usemtl /,iue=/^usemap /,S5=/\s+/,C5=new N,tk=new N,E5=new N,A5=new N,Ea=new N,CC=new We;function rue(){const n={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,t){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=!1!==t);const i=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:e||"",fromDeclaration:!1!==t,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(r,s){const o=this._finalize(!1);o&&(o.inherited||o.groupCount<=0)&&this.materials.splice(o.index,1);const a={index:this.materials.length,name:r||"",mtllib:Array.isArray(s)&&s.length>0?s[s.length-1]:"",smooth:void 0!==o?o.smooth:this.smooth,groupStart:void 0!==o?o.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(l){const c={index:"number"==typeof l?l:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return c.clone=this.clone.bind(c),c}};return this.materials.push(a),a},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(r){const s=this.currentMaterial();if(s&&-1===s.groupEnd&&(s.groupEnd=this.geometry.vertices.length/3,s.groupCount=s.groupEnd-s.groupStart,s.inherited=!1),r&&this.materials.length>1)for(let o=this.materials.length-1;o>=0;o--)this.materials[o].groupCount<=0&&this.materials.splice(o,1);return r&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),s}},i&&i.name&&"function"==typeof i.clone){const r=i.clone(0);r.inherited=!0,this.object.materials.push(r)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(e,t){const i=parseInt(e,10);return 3*(i>=0?i-1:i+t/3)},parseNormalIndex:function(e,t){const i=parseInt(e,10);return 3*(i>=0?i-1:i+t/3)},parseUVIndex:function(e,t){const i=parseInt(e,10);return 2*(i>=0?i-1:i+t/2)},addVertex:function(e,t,i){const r=this.vertices,s=this.object.geometry.vertices;s.push(r[e+0],r[e+1],r[e+2]),s.push(r[t+0],r[t+1],r[t+2]),s.push(r[i+0],r[i+1],r[i+2])},addVertexPoint:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,i){const r=this.normals,s=this.object.geometry.normals;s.push(r[e+0],r[e+1],r[e+2]),s.push(r[t+0],r[t+1],r[t+2]),s.push(r[i+0],r[i+1],r[i+2])},addFaceNormal:function(e,t,i){const r=this.vertices,s=this.object.geometry.normals;C5.fromArray(r,e),tk.fromArray(r,t),E5.fromArray(r,i),Ea.subVectors(E5,tk),A5.subVectors(C5,tk),Ea.cross(A5),Ea.normalize(),s.push(Ea.x,Ea.y,Ea.z),s.push(Ea.x,Ea.y,Ea.z),s.push(Ea.x,Ea.y,Ea.z)},addColor:function(e,t,i){const r=this.colors,s=this.object.geometry.colors;void 0!==r[e]&&s.push(r[e+0],r[e+1],r[e+2]),void 0!==r[t]&&s.push(r[t+0],r[t+1],r[t+2]),void 0!==r[i]&&s.push(r[i+0],r[i+1],r[i+2])},addUV:function(e,t,i){const r=this.uvs,s=this.object.geometry.uvs;s.push(r[e+0],r[e+1]),s.push(r[t+0],r[t+1]),s.push(r[i+0],r[i+1])},addDefaultUV:function(){const e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){const t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])},addFace:function(e,t,i,r,s,o,a,l,c){const u=this.vertices.length;let h=this.parseVertexIndex(e,u),p=this.parseVertexIndex(t,u),m=this.parseVertexIndex(i,u);if(this.addVertex(h,p,m),this.addColor(h,p,m),void 0!==a&&""!==a){const g=this.normals.length;h=this.parseNormalIndex(a,g),p=this.parseNormalIndex(l,g),m=this.parseNormalIndex(c,g),this.addNormal(h,p,m)}else this.addFaceNormal(h,p,m);if(void 0!==r&&""!==r){const g=this.uvs.length;h=this.parseUVIndex(r,g),p=this.parseUVIndex(s,g),m=this.parseUVIndex(o,g),this.addUV(h,p,m),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";const t=this.vertices.length;for(let i=0,r=e.length;i=7?(CC.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),t.colors.push(CC.r,CC.g,CC.b)):t.colors.push(void 0,void 0,void 0);break;case"vn":t.normals.push(parseFloat(h[1]),parseFloat(h[2]),parseFloat(h[3]));break;case"vt":t.uvs.push(parseFloat(h[1]),parseFloat(h[2]))}}else if("f"===u){const p=c.slice(1).trim().split(S5),m=[];for(let b=0,y=p.length;b0){const M=v.split("/");m.push(M)}}const g=m[0];for(let b=1,y=m.length-1;b1){const p=r[1].trim().toLowerCase();t.object.smooth="0"!==p&&"off"!==p}else t.object.smooth=!0;const h=t.object.currentMaterial();h&&(h.smooth=t.object.smooth)}else{if("\0"===c)continue;console.warn('THREE.OBJLoader: Unexpected line: "'+c+'"')}}t.finalize();const s=new jo;if(s.materialLibraries=[].concat(t.materialLibraries),1==!(1===t.objects.length&&0===t.objects[0].geometry.vertices.length))for(let a=0,l=t.objects.length;a0&&b.setAttribute("normal",new ot(u.normals,3)),u.colors.length>0&&(g=!0,b.setAttribute("color",new ot(u.colors,3))),!0===u.hasUVIndices&&b.setAttribute("uv",new ot(u.uvs,2));const y=[];for(let M=0,x=h.length;M1){for(let M=0,x=h.length;M0){const a=new Qh({size:1,sizeAttenuation:!1}),l=new cn;l.setAttribute("position",new ot(t.vertices,3)),t.colors.length>0&&void 0!==t.colors[0]&&(l.setAttribute("color",new ot(t.colors,3)),a.vertexColors=!0);const c=new ab(l,a);s.add(c)}return s}}class T5 extends rf{constructor(e){super(e)}load(e,t,i,r){const s=this,o=""===this.path?vu.extractUrlBase(e):this.path,a=new Sa(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(l){try{t(s.parse(l,o))}catch(c){r?r(c):console.error(c),s.manager.itemError(e)}},i,r)}setMaterialOptions(e){return this.materialOptions=e,this}parse(e,t){const i=e.split("\n");let r={};const s=/\s+/,o={};for(let l=0;l=0?c.substring(0,u):c;h=h.toLowerCase();let p=u>=0?c.substring(u+1):"";if(p=p.trim(),"newmtl"===h)r={name:p},o[p]=r;else if("ka"===h||"kd"===h||"ks"===h||"ke"===h){const m=p.split(s,3);r[h]=[parseFloat(m[0]),parseFloat(m[1]),parseFloat(m[2])]}else r[h]=p}const a=new sue(this.resourcePath||t,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class sue{constructor(e="",t={}){this.baseUrl=e,this.options=t,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin="anonymous",this.side=void 0!==this.options.side?this.options.side:Xl,this.wrap=void 0!==this.options.wrap?this.options.wrap:ql}setCrossOrigin(e){return this.crossOrigin=e,this}setManager(e){this.manager=e}setMaterials(e){this.materialsInfo=this.convert(e),this.materials={},this.materialsArray=[],this.nameLookup={}}convert(e){if(!this.options)return e;const t={};for(const i in e){const r=e[i],s={};t[i]=s;for(const o in r){let a=!0,l=r[o];const c=o.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(l=[l[0]/255,l[1]/255,l[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===l[0]&&0===l[1]&&0===l[2]&&(a=!1)}a&&(s[c]=l)}}return t}preload(){for(const e in this.materialsInfo)this.create(e)}getIndex(e){return this.nameLookup[e]}getAsArray(){let e=0;for(const t in this.materialsInfo)this.materialsArray[e]=this.create(t),this.nameLookup[t]=e,e++;return this.materialsArray}create(e){return void 0===this.materials[e]&&this.createMaterial_(e),this.materials[e]}createMaterial_(e){const t=this,i=this.materialsInfo[e],r={name:e,side:this.side};function o(a,l){if(r[a])return;const c=t.getTextureParams(l,r),u=t.loadTexture(function s(a,l){return"string"!=typeof l||""===l?"":/^https?:\/\//i.test(l)?l:a+l}(t.baseUrl,c.url));u.repeat.copy(c.scale),u.offset.copy(c.offset),u.wrapS=t.wrap,u.wrapT=t.wrap,("map"===a||"emissiveMap"===a)&&(u.colorSpace=Ei),r[a]=u}for(const a in i){const l=i[a];let c;if(""!==l)switch(a.toLowerCase()){case"kd":r.color=(new We).fromArray(l).convertSRGBToLinear();break;case"ks":r.specular=(new We).fromArray(l).convertSRGBToLinear();break;case"ke":r.emissive=(new We).fromArray(l).convertSRGBToLinear();break;case"map_kd":o("map",l);break;case"map_ks":o("specularMap",l);break;case"map_ke":o("emissiveMap",l);break;case"norm":o("normalMap",l);break;case"map_bump":case"bump":o("bumpMap",l);break;case"map_d":o("alphaMap",l),r.transparent=!0;break;case"ns":r.shininess=parseFloat(l);break;case"d":c=parseFloat(l),c<1&&(r.opacity=c,r.transparent=!0);break;case"tr":c=parseFloat(l),this.options&&this.options.invertTrProperty&&(c=1-c),c>0&&(r.opacity=1-c,r.transparent=!0)}}return this.materials[e]=new pC(r),this.materials[e]}getTextureParams(e,t){const i={scale:new Ce(1,1),offset:new Ce(0,0)},r=e.split(/\s+/);let s;return s=r.indexOf("-bm"),s>=0&&(t.bumpScale=parseFloat(r[s+1]),r.splice(s,2)),s=r.indexOf("-s"),s>=0&&(i.scale.set(parseFloat(r[s+1]),parseFloat(r[s+2])),r.splice(s,4)),s=r.indexOf("-o"),s>=0&&(i.offset.set(parseFloat(r[s+1]),parseFloat(r[s+2])),r.splice(s,4)),i.url=r.join(" ").trim(),i}loadTexture(e,t,i,r,s){const o=void 0!==this.manager?this.manager:W4;let a=o.getHandler(e);null===a&&(a=new gC(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(e,i,r,s);return void 0!==t&&(l.mapping=t),l}}const oue=["determinateSpinner"];function aue(n,e){if(1&n&&(Lr(),K(0,"svg",11),Fe(1,"circle",12),J()),2&n){const t=be();Vt("viewBox",t._viewBox()),j(1),Pc("stroke-dasharray",t._strokeCircumference(),"px")("stroke-dashoffset",t._strokeCircumference()/2,"px")("stroke-width",t._circleStrokeWidth(),"%"),Vt("r",t._circleRadius())}}const lue=DM(class{constructor(n){this._elementRef=n}},"primary"),cue=new ge("mat-progress-spinner-default-options",{providedIn:"root",factory:function due(){return{diameter:D5}}}),D5=100;let EC=(()=>{class n extends lue{constructor(t,i,r){super(t),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=D5,this._noopAnimations="NoopAnimations"===i&&!!r&&!r._forceAnimations,r&&(r.color&&(this.color=this.defaultColor=r.color),r.diameter&&(this.diameter=r.diameter),r.strokeWidth&&(this.strokeWidth=r.strokeWidth))}get value(){return"determinate"===this.mode?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,Ys(t)))}get diameter(){return this._diameter}set diameter(t){this._diameter=Ys(t)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(t){this._strokeWidth=Ys(t)}_circleRadius(){return(this.diameter-10)/2}_viewBox(){const t=2*this._circleRadius()+this.strokeWidth;return`0 0 ${t} ${t}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return"determinate"===this.mode?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(rs,8),D(cue))},n.\u0275cmp=ht({type:n,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(t,i){if(1&t&&oi(oue,5),2&t){let r;Lt(r=Ft())&&(i._determinateCircle=r.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:12,hostBindings:function(t,i){2&t&&(Vt("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===i.mode?i.value:null)("mode",i.mode),Pc("width",i.diameter,"px")("height",i.diameter,"px"),Pn("_mat-animation-noopable",i._noopAnimations)("mdc-circular-progress--indeterminate","indeterminate"===i.mode))},inputs:{color:"color",mode:"mode",value:"value",diameter:"diameter",strokeWidth:"strokeWidth"},exportAs:["matProgressSpinner"],features:[ft],decls:14,vars:11,consts:[["circle",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["determinateSpinner",""],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(t,i){if(1&t&&(_e(0,aue,2,8,"ng-template",null,0,kc),K(2,"div",1,2),Lr(),K(4,"svg",3),Fe(5,"circle",4),J()(),es(),K(6,"div",5)(7,"div",6)(8,"div",7),Mv(9,8),J(),K(10,"div",9),Mv(11,8),J(),K(12,"div",10),Mv(13,8),J()()()),2&t){const r=Vr(1);j(4),Vt("viewBox",i._viewBox()),j(1),Pc("stroke-dasharray",i._strokeCircumference(),"px")("stroke-dashoffset",i._strokeDashOffset(),"px")("stroke-width",i._circleStrokeWidth(),"%"),Vt("r",i._circleRadius()),j(4),z("ngTemplateOutlet",r),j(2),z("ngTemplateOutlet",r),j(2),z("ngTemplateOutlet",r)}},dependencies:[Vv],styles:["@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-color-1-fade-in-out{from{opacity:.99}25%{opacity:.99}26%{opacity:0}89%{opacity:0}90%{opacity:.99}to{opacity:.99}}@keyframes mdc-circular-progress-color-2-fade-in-out{from{opacity:0}15%{opacity:0}25%{opacity:.99}50%{opacity:.99}51%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-3-fade-in-out{from{opacity:0}40%{opacity:0}50%{opacity:.99}75%{opacity:.99}76%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-4-fade-in-out{from{opacity:0}65%{opacity:0}75%{opacity:.99}90%{opacity:.99}to{opacity:0}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}.mdc-circular-progress{display:inline-flex;position:relative;direction:ltr;line-height:0;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{animation:mdc-circular-progress-container-rotate 1568.2352941176ms linear infinite}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-1{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-1-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-2{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-2-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-3{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-3-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-4{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-4-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--closed{opacity:0}.mat-mdc-progress-spinner{display:block;overflow:hidden;line-height:0}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mdc-circular-progress-active-indicator-color, transparent)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-1 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-2 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-3 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-4 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}"],encapsulation:2,changeDetection:0}),n})(),hue=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[va,qn]}),n})();const fue=["previewCanvasContainer"],pue=["previewCanvas"];function mue(n,e){if(1&n){const t=Wi();K(0,"div")(1,"label",8),Je(2),J(),K(3,"input",9),ct("change",function(r){return In(Dn(t).$implicit.visible=r.currentTarget.checked)}),J()()}if(2&n){const t=e.$implicit;j(1),z("for","visibility_"+t.name),j(1),$i(t.name),j(1),z("id","visibility_"+t.name)("checked",t.visible)}}function gue(n,e){if(1&n&&(uo(0),K(1,"h4"),Je(2,"Objects visibility"),J(),_e(3,mue,4,4,"div",7),ho()),2&n){const t=be();j(3),z("ngForOf",t.meshes)}}function _ue(n,e){1&n&&Fe(0,"mat-spinner",10)}const yb=n=>{n.colorSpace="srgb",n.anisotropy=8,n.magFilter=Ni,n.minFilter=Ni};let I5=(()=>{class n{constructor(t){this.cdr=t,this.visibilityControls=!0,this.groupFunction=null,this._paths$=new Ct(null),this.destroyed$=new Ue,this.entity=null,this.meshes=[]}get paths(){return this._paths$.getValue()}set paths(t){this._paths$.next(t)}ngAfterViewInit(){var t=this;return xt(function*(){var s;t.world=new rz(new M5,{init:(s=xt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{}}),yield t.world.init(),t.world.visualScene.nativeScene.add(new zP(16777215,2));let i=new Ct({x:1,y:1});t.renderer=t.world.addRenderer(t.world.visualScene.factory.createPerspectiveCamera(),t.previewCanvas.nativeElement,{size:i.asObservable(),background:11184810}),t.controller=new Pne(t.renderer,{mouseOptions:{canvas:t.previewCanvas.nativeElement}}),t.world.addEntity(t.controller);const r=()=>{i.next({x:t.previewCanvasContainer.nativeElement.clientWidth,y:t.previewCanvasContainer.nativeElement.clientHeight})};new ResizeObserver(r).observe(t.previewCanvasContainer.nativeElement),r(),t.world.start(),t._paths$.pipe(et(t.destroyed$)).subscribe(function(){var s=xt(function*(o){if(t.entity&&(t.world.removeEntity(t.entity),t.entity.dispose(),t.entity=null,t.meshes=[],t.cdr.markForCheck()),o){const[a,l]=o,c=new nk,h=yield(new T5).loadAsync(l);h.preload(),c.setMaterials(h);const p=yield c.loadAsync(a);if(t.groupFunction){const b={};for(const y of p.children){const v=t.groupFunction(y.name);b[v]||(b[v]=[]),b[v].push(y)}for(const y of Object.keys(b)){const v=new jo;v.add(...b[y]),v.name=y,p.remove(...b[y]),p.add(v)}}t.meshes=p.children,p.traverse(b=>{if(b instanceof Yn){const y=b.material instanceof Array?b.material:[b.material];for(const v of y)v.transparent=!0,v.alphaTest=.5,v instanceof as&&v.map&&(v.map.wrapS=qi,v.map.wrapT=qi,yb(v.map),v.map.needsUpdate=!0)}}),t.entity=new iu(new cl(p),null),t.world.addEntity(t.entity);let m={min:{x:-5,y:-5,z:-5},max:{x:5,y:5,z:5}};const g=t.entity.object3D.getBoundings();!isNaN(g.min.x)&&!isNaN(g.max.x)&&(m=g),t.controller.target=_t.scalarMult(_t.add(m.min,m.max),.5),t.controller.radius=_t.dist(m.min,m.max),t.controller.theta=-1.32,t.controller.phi=1.22,t.cdr.markForCheck()}});return function(o){return s.apply(this,arguments)}}())})()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return n.\u0275fac=function(t){return new(t||n)(D(ci))},n.\u0275cmp=ht({type:n,selectors:[["app-obj-viewer"]],viewQuery:function(t,i){if(1&t&&(oi(fue,5),oi(pue,5)),2&t){let r;Lt(r=Ft())&&(i.previewCanvasContainer=r.first),Lt(r=Ft())&&(i.previewCanvas=r.first)}},inputs:{paths:"paths",visibilityControls:"visibilityControls",groupFunction:"groupFunction"},decls:7,vars:2,consts:[[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["id","controls"],[4,"ngIf"],["mode","indeterminate",4,"ngIf"],[4,"ngFor","ngForOf"],[3,"for"],["type","checkbox",3,"id","checked","change"],["mode","indeterminate"]],template:function(t,i){1&t&&(K(0,"div",0,1),Fe(2,"canvas",2,3),K(4,"div",4),_e(5,gue,4,1,"ng-container",5),J(),_e(6,_ue,1,0,"mat-spinner",6),J()),2&t&&(j(5),z("ngIf",i.visibilityControls),j(1),z("ngIf",!i.entity))},dependencies:[Fo,gi,EC],styles:[".previewCanvasContainer[_ngcontent-%COMP%]{width:100%;height:calc(100vh - 14rem);position:relative;overflow:hidden;margin:0 0 16px;display:flex;align-items:center;justify-content:space-around}.previewCanvasContainer[_ngcontent-%COMP%] canvas[_ngcontent-%COMP%]{position:absolute}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%]{position:absolute;right:0;top:0;padding:5px;display:flex;flex-direction:column;row-gap:10px;background-color:#333;color:#fff;max-height:calc(100% - 8px);overflow-y:auto}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%]:empty{display:none}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%;display:flex}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{flex-grow:1}.previewCanvasContainer[_ngcontent-%COMP%] #controls[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0}),n})();function vue(n,e){if(1&n&&(Lr(),Fe(0,"circle",3),zt(1,"async"),zt(2,"async")),2&n){const t=be();let i,r;Vt("cx",(null==(i=Xt(1,3,t.mapPointer$))?null:i.x)||0)("cy",(null==(r=Xt(2,5,t.mapPointer$))?null:r.y)||0)("r",10)}}const yue=function(){return{"stroke-width":3}};let bue=(()=>{class n{constructor(t){this.ref=t,this._roadSpline$=new Ct([]),this._pointer$=new Ct(null),this.splineClosed=!1,this.svgSize$=new Ct({x:100,y:100}),this.scalingSquare$=new Ct({x:0,y:0,width:100,height:100}),this.mapPolyline$=new Ct(""),this.mapPointer$=new Ct(null),this.destroyed$=new Ue}set roadSpline(t){this._roadSpline$.next(t)}set pointer(t){this._pointer$.next(t)}ngAfterViewInit(){this._roadSpline$.pipe(et(this.destroyed$),Ye(i=>{let r={x:Number.MAX_SAFE_INTEGER,y:Number.MAX_SAFE_INTEGER},s={x:Number.MIN_SAFE_INTEGER,y:Number.MIN_SAFE_INTEGER};i.forEach(a=>{r={x:Math.min(r.x,a.x),y:Math.min(r.y,a.z)},s={x:Math.max(s.x,a.x),y:Math.max(s.y,a.z)}});const o_x=s.x-r.x,o_y=s.y-r.y;return{x:r.x-.1*o_x,y:r.y-.1*o_y,width:1.2*o_x,height:1.2*o_y}})).subscribe(this.scalingSquare$),Vd([this._roadSpline$,this.scalingSquare$,this.svgSize$]).pipe(et(this.destroyed$),Ye(([i,r,s])=>{const o=i.map(a=>({x:(a.x-r.x)*s.x/r.width,y:(r.y-a.z)*s.y/r.height+s.y}));return this.splineClosed&&o.length&&o.push(o[0]),o.map(a=>Math.round(a.x)+","+Math.round(a.y)).join(" ")})).subscribe(this.mapPolyline$),Vd([this._pointer$,this.scalingSquare$.asObservable(),this.svgSize$]).pipe(et(this.destroyed$),Ye(([i,r,s])=>i?{x:(i.x-r.x)*s.x/r.width,y:(r.y-i.y)*s.y/r.height+s.y}:null)).subscribe(this.mapPointer$);const t=()=>{this.svgSize$.next({x:this.ref.nativeElement.clientWidth,y:this.ref.nativeElement.clientHeight})};new ResizeObserver(t).observe(this.ref.nativeElement),t()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return n.\u0275fac=function(t){return new(t||n)(D(yt))},n.\u0275cmp=ht({type:n,selectors:[["app-tri-minimap"]],inputs:{roadSpline:"roadSpline",pointer:"pointer",splineClosed:"splineClosed"},decls:8,vars:13,consts:[["shape-rendering","geometricPrecision"],[2,"fill","none","stroke","#333333",3,"ngStyle"],["fill","#e30","stroke","black","stroke-width","3",4,"ngIf"],["fill","#e30","stroke","black","stroke-width","3"]],template:function(t,i){if(1&t&&(Lr(),K(0,"svg",0),zt(1,"async"),zt(2,"async"),Fe(3,"polyline",1),zt(4,"async"),Je(5," cars "),_e(6,vue,3,7,"circle",2),zt(7,"async"),J()),2&t){let r;Vt("viewBox","0 0 "+(null==(r=Xt(1,4,i.svgSize$))?null:r.x)+" "+(null==(r=Xt(2,6,i.svgSize$))?null:r.y)),j(3),z("ngStyle",Xs(12,yue)),Vt("points",Xt(4,8,i.mapPolyline$)),j(3),z("ngIf",Xt(7,10,i.mapPointer$))}},dependencies:[gi,Ow,Vl],styles:["[_nghost-%COMP%]{overflow:auto}svg[_ngcontent-%COMP%]{width:100%;height:100%}"],changeDetection:0}),n})();const xue=["previewCanvasContainer"],wue=["previewCanvas"];function Mue(n,e){if(1&n&&(K(0,"mat-option",19),Je(1),J()),2&n){const t=e.$implicit;z("value",t),j(1),nr(" ",t," ")}}function Sue(n,e){if(1&n){const t=Wi();uo(0),K(1,"mat-form-field",1)(2,"mat-label"),Je(3,"Custom FAM path"),J(),Fe(4,"input",20,21),zt(6,"async"),J(),K(7,"button",22),ct("click",function(){Dn(t);const r=Vr(5);return In(be().onFamSelected(r.value))}),Je(8,"LOAD"),J(),ho()}if(2&n){const t=be();j(4),z("value",Xt(6,1,t.previewFamLocation$))}}function Cue(n,e){1&n&&Fe(0,"mat-spinner",23),2&n&&z("diameter",40)}function Eue(n,e){1&n&&Fe(0,"mat-spinner",24)}const Aue=function(){return["loop_chunk","num_chunks","unk0","unk1","position","unknowns0","chunks_size","rail_tex_id","num_prop_descr","num_props","unk2","unk3","prop_descr","props"]};var hf=(()=>{return(n=hf||(hf={})).ThreeModel="model",n.Bitmap="bitmap",n.TwoSidedBitmap="two_sided_bitmap",hf;var n})();class Tue extends Ane{constructor(e,t,i){super(e,{loadDepth:40,inertia:2}),this.mapGraph=e,this.famPath=t,this.hideUnknownEntities$=i,this.textureLoader=new gC,this.terrainMaterials={},this.objLoader=new nk,this.resource=null,this.isOpenedTrack=!1,this._placeholder=null,this._placeholderPromise=null,this.unknownEntities=new Set,this._placeholderTerrain=null,this._placeholderTerrainPromise=null}onSpawned(e){super.onSpawned(e),this.hideUnknownEntities$.pipe(qd(),et(this._onRemoved$)).subscribe(t=>{for(const i of this.unknownEntities)i.visible=!t})}getPlaceholderTexture(){var e=this;return xt(function*(){return e._placeholder?e._placeholder:(e._placeholderPromise||(e._placeholderPromise=e.textureLoader.loadAsync("assets/placeholder_texture.png")),e._placeholderPromise)})()}getPlaceholderTerrainTexture(){var e=this;return xt(function*(){return e._placeholderTerrain?e._placeholderTerrain:(e._placeholderTerrainPromise||(e._placeholderTerrainPromise=e.textureLoader.loadAsync("assets/placeholder_texture.png").then(t=>(t.wrapS=ql,t.wrapT=qi,yb(t),t.flipY=!0,t))),e._placeholderTerrainPromise)})()}loadChunk(e){var t=this;return xt(function*(){const i=yield t.objLoader.loadAsync(e.path+".obj");i.position.set(e.position.x,e.position.y,e.position.z),i.traverse(l=>{l instanceof Yn&&(l.material=t.getTerrainMaterial((l.userData.name||l.name).substr((l.userData.name||l.name).lastIndexOf("_")+1).split(".")[0]))});let r=+e.path.split("_")[e.path.split("_").length-1],s=(t.resource.data.props||[]).filter(l=>l.road_point_idx>=4*r&&l.road_point_idx<4*(r+1)).map(l=>({...l,...t.resource.data.prop_descr[l.prop_descr_idx],position:_t.add({x:l.position.x,y:l.position.z,z:l.position.y},{x:t.resource.data.road_spline[l.road_point_idx].position.x,y:t.resource.data.road_spline[l.road_point_idx].position.z,z:t.resource.data.road_spline[l.road_point_idx].position.y}),rotation:zr.fromAngle(_t.nZ,l.rotation+t.resource.data.road_spline[l.road_point_idx].orientation)}));const o=(yield Promise.all(s.map(l=>t.loadPropInternal(l)))).filter(l=>!!l),a=new iu(new cl(i));return t.addChildren(a,...o),t.loaded.set(e,[a,...o]),[[a,...o],null]})()}disposeChunk(e){for(const t of this.loaded.get(e)||[])this.unknownEntities.delete(t);super.disposeChunk(e)}getTerrainMaterial(e){return this.terrainMaterials[e]||(this.terrainMaterials[e]=new as({side:Vo,transparent:!0,visible:!1}),this.famPath?this.textureLoader.loadAsync(`${this.famPath}/background/${e}.png`).then(t=>{t.wrapS=ql,t.wrapT=qi,yb(t),t.flipY=!0,this.terrainMaterials[e].map=t,this.terrainMaterials[e].needsUpdate=!0,this.terrainMaterials[e].visible=!0}).catch(t=>{console.warn(`Problem with loading terrain material ${e}`),this.getPlaceholderTerrainTexture().then(i=>{this.terrainMaterials[e].map=i,this.terrainMaterials[e].needsUpdate=!0,this.terrainMaterials[e].visible=!0})}):this.getPlaceholderTerrainTexture().then(t=>{this.terrainMaterials[e].map=t,this.terrainMaterials[e].needsUpdate=!0,this.terrainMaterials[e].visible=!0})),this.terrainMaterials[e]}loadPropInternal(e){var t=this;return xt(function*(){let i=!1;if(e.type==hf.ThreeModel){let r;try{if(!t.famPath)throw new Error;const o=new T5,a=new nk,l=yield o.loadAsync(`${t.famPath}/props/${e.data.data.resource_id}/0/material.mtl`);l.preload(),a.setMaterials(l),r=new cl(yield a.loadAsync(`${t.famPath}/props/${e.data.data.resource_id}/0/geometry.obj`))}catch{i=!0,r=t.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:5},{diffuse:yield t.getPlaceholderTexture()})}r.nativeMesh.traverse(o=>{if(o instanceof Yn){const a=o.material instanceof Array?o.material:[o.material];for(const l of a)l.transparent=!0,l.alphaTest=.5,l instanceof as&&l.map&&(l.map.wrapS=qi,l.map.wrapT=qi,yb(l.map),l.map.needsUpdate=!0)}});const s=new iu(r);return s.position=e.position,s.rotation=e.rotation,i&&(t.unknownEntities.add(s),s.visible=!t.hideUnknownEntities$.getValue()),t.world.addEntity(s),s}if(e.type==hf.Bitmap||e.type==hf.TwoSidedBitmap){const r=(c,u)=>new Array(u).fill(null).map((h,p)=>t.isOpenedTrack?`${Math.floor(c/4)+p}/0000`:`0/${(Math.floor(c/4)+p).toString().padStart(2,"0")}00`).join(";"),s=new jo,[o,a]=yield t.loadTexturePlaneProp(r(e.data.data.resource_id,e.flags.is_animated?e.data.data.frame_count:1),{x:e.data.data.width,y:e.data.data.height},e.data.data.animation_interval);if(s.add(o),e.type==hf.TwoSidedBitmap){const[c,u]=yield t.loadTexturePlaneProp(r(e.data.data.resource_id_2,1),{x:e.data.data.width_2,y:e.data.data.height},e.data.data.animation_interval);c.rotateY(Math.PI/2),c.position.x=e.data.data.width/2,c.position.y=e.data.data.width_2/2,s.add(c)}const l=new iu(new cl(s),null);return l.position=e.position,l.rotation=e.rotation,a&&(t.unknownEntities.add(l),l.visible=!t.hideUnknownEntities$.getValue()),l}return null})()}loadTexturePlaneProp(e,t,i){var r=this;return xt(function*(){const s=e.split(";"),o=yield r.getPlaceholderTexture();let a=!1,l=[];r.famPath?l=yield Promise.all(s.map(h=>r.textureLoader.loadAsync(`${r.famPath}/foreground/${h}.png`).catch(()=>(a=!0,o)))):(a=!0,l=s.map(()=>o));const c=l.map(h=>(yb(h),new as({map:h,alphaTest:.5,transparent:!0,side:Vo}))),u=new Yn(new tg(t.x,t.y),c[0]);if(u.rotateX(Math.PI/2),u.position.set(0,0,t.y/2),c.length>1){let h=-1;eS(r.world).pipe(ZV(i&&!isNaN(+i)?1e3*+i:250)).subscribe(()=>{h=(h+1)%c.length,u.material=c[h]})}return[u,a]})()}}let Due=(()=>{class n{constructor(t,i,r){this.eelDelegate=t,this.cdr=i,this.mainService=r,this._resource$=new Ct(null),this.changed=new it,this.previewLoading$=new Ct(!0),this.previewFamLocation$=new Ct(null),this.previewFamLoading$=new Ct(!1),this.pointer$=new Ct(null),this.selectedSplineIndex$=new Ct(0),this.selectedSplineItem$=new Ct(null),this.selectedAiInfoItem$=new Ct(null),this.selectedTerrainItem$=new Ct(null),this.famPath=null,this.name="",this.renderer=null,this.map=null,this.isOpenedTrack=!0,this.roadPath=null,this.destroyed$=new Ue}get resource(){return this._resource$.getValue()}set resource(t){this._resource$.next(t)}get previewFamPossibleLocations(){const t=this.resource?.id;return t?[t.substring(0,t.indexOf("MISC"))+"ETRACKFM"+t.substr(t.indexOf("MISC")+4,4)+"_001.FAM",t.substring(0,t.indexOf("MISC"))+"GTRACKFM"+t.substr(t.indexOf("MISC")+4,4)+"_001.FAM",t.substring(0,t.indexOf("MISC"))+"NTRACKFM"+t.substr(t.indexOf("MISC")+4,4)+"_M01.FAM",t.substring(0,t.indexOf("MISC"))+"NTRACKFM"+t.substr(t.indexOf("MISC")+4,4)+"_R01.FAM",t.substring(0,t.indexOf("MISC"))+"NTRACKFM"+t.substr(t.indexOf("MISC")+4,4)+"_T01.FAM"]:[]}get roadSpline(){return(this.resource?.data.road_spline||[]).filter((t,i)=>i<(4*this.resource?.data.num_chunks||0)).map(t=>t.position)||[]}ngAfterViewInit(){var t=this;return xt(function*(){var s;t.world=new rz(new M5,{init:(s=xt(function*(){}),function(){return s.apply(this,arguments)}),simulate:()=>{},loader:{loadFromGgGlb:function(){var s=xt(function*(...o){return[]});return function(){return s.apply(this,arguments)}}()}}),yield t.world.init(),t.skySphere=new iu(t.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:1e3},{color:16777215})),t.skySphere.object3D.nativeMesh.material.side=Vo,t.skySphere.rotation=zr.fromEuler({x:Math.PI/2,y:0,z:0}),t.world.addEntity(t.skySphere),t.selectionSphere=new iu(t.world.visualScene.factory.createPrimitive({shape:"SPHERE",radius:.5},{color:16711680,shading:"unlit"})),t.selectionSphere.object3D.nativeMesh.material.opacity=.4,t.selectionSphere.object3D.nativeMesh.material.transparent=!0,t.world.addEntity(t.selectionSphere),t.world.visualScene.nativeScene.add(new zP(16777215,2));let i=new Ct({x:1,y:1});t.renderer=t.world.addRenderer(t.world.visualScene.factory.createPerspectiveCamera(),t.previewCanvas.nativeElement,{size:i.asObservable(),background:11184810}),t.renderer.camera.position={x:0,y:0,z:2.5},t.renderer.camera.rotation=zr.lookAt(t.renderer.camera.position,_t.add(t.renderer.camera.position,_t.Y),_t.Z),eS(t.world).pipe(et(t.destroyed$)).subscribe(()=>{t.renderer&&(t.skySphere.position=t.renderer.camera.position,t.pointer$.next(t.renderer.camera.position))}),t.controller=new Ine(t.world.keyboardInput,t.renderer,{mouseOptions:{canvas:t.previewCanvas.nativeElement,pointerLock:!0},keymap:"wasd+arrows",movementOptions:{speed:1},ignoreMouseUnlessPointerLocked:!0,ignoreKeyboardUnlessPointerLocked:!0}),t.world.addEntity(t.controller);const r=()=>{i.next({x:t.previewCanvasContainer.nativeElement.clientWidth,y:t.previewCanvasContainer.nativeElement.clientHeight})};new ResizeObserver(r).observe(t.previewCanvasContainer.nativeElement),r(),t.world.start(),t._resource$.pipe(et(t.destroyed$)).subscribe(function(){var s=xt(function*(o){t.previewLoading$.next(!0),yield t.loadTerrainChunks(o?.id),yield t.loadPreview(),t.previewFamPossibleLocations[0]&&(t.previewFamLocation$.next(t.previewFamPossibleLocations[0]),yield t.onFamSelected(t.previewFamPossibleLocations[0])),t.previewLoading$.next(!1)});return function(o){return s.apply(this,arguments)}}()),t.mainService.dataBlockChange$.pipe(et(t.destroyed$),On(([s,o])=>!!t.resource&&s.startsWith(t.resource.id)),Ah(3e3)).subscribe(xt(function*(){t.previewLoading$.next(!0),yield t.postTmpUpdates(t.resource?.id),yield t.loadPreview(),t.previewLoading$.next(!1)})),t.selectedSplineIndex$.pipe(et(t.destroyed$),Ah(250)).subscribe(s=>{if(t.resource){const o=t.resource.data.road_spline[s];if(!o)return;const a={x:o.position.x,y:o.position.z,z:o.position.y};t.selectionSphere.position=a,t.renderer&&(t.renderer.position=_t.add(a,_t.rotAround({x:10,y:-12,z:5},{x:0,y:0,z:1},-t.resource.data.road_spline[s].orientation)),t.renderer.rotation=zr.lookAt(t.renderer.position,a,{x:0,y:0,z:1}))}t.selectedSplineItem$.next({id:$l(t.resource.id,`road_spline/${s}`),data:t.resource.data.road_spline[s],schema:(t.resource.schema.fields||[]).find(o=>"road_spline"===o.name)?.schema.child_schema,name:""}),t.selectedAiInfoItem$.next({id:$l(t.resource.id,`ai_info/${Math.floor(s/4)}`),data:t.resource.data.ai_info[Math.floor(s/4)],schema:(t.resource.schema.fields||[]).find(o=>"ai_info"===o.name)?.schema.child_schema,name:""}),t.selectedTerrainItem$.next({id:$l(t.resource.id,`terrain/${Math.floor(s/4)}`),data:t.resource.data.terrain[Math.floor(s/4)],schema:(t.resource.schema.fields||[]).find(o=>"terrain"===o.name)?.schema.child_schema,name:""})})})()}onFamSelected(t){var i=this;return xt(function*(){if("custom"!=t&&i.famPath!=t){i.previewFamLoading$.next(!0);try{const r=yield i.eelDelegate.serializeResource(t,{geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1}),s=new gC,o=r.find(a=>a.endsWith("spherical.png"));if(o){const a=yield s.loadAsync(o);a.encoding=cu,a.mapping=jc,i.skySphere.object3D.nativeMesh.material.map=a}else i.skySphere.object3D.nativeMesh.material.map=null;i.skySphere.object3D.nativeMesh.material.needsUpdate=!0,i.famPath=t}catch{i.skySphere.object3D.nativeMesh.material.map=null,i.skySphere.object3D.nativeMesh.material.needsUpdate=!0,i.famPath=null}finally{i.previewFamLoading$.next(!1)}yield i.loadPreview()}})()}loadTerrainChunks(t){var i=this;return xt(function*(){if(t){const r=yield i.eelDelegate.serializeResource(t,{geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1,maps__save_as_chunked:!0,maps__save_invisible_wall_collisions:!1,maps__save_terrain_collisions:!1,maps__save_spherical_skybox_texture:!0,maps__add_props_to_obj:!1});i.terrainChunksObjLocation=r[0].substring(0,r[0].indexOf("terrain_chunk_"))}else i.terrainChunksObjLocation=void 0})()}loadPreview(){var t=this;return xt(function*(){if(t.roadPath=t.resource?.data.road_spline.map(r=>({x:r.position.x,y:r.position.z,z:r.position.y})).filter((r,s)=>s%4==0).slice(0,t.resource.data.num_chunks)||null,t.isOpenedTrack=0===t.resource?.data.loop_chunk,!t.terrainChunksObjLocation||!t.roadPath)return;const i=By.fromMapArray(t.roadPath.map((r,s)=>({path:`${t.terrainChunksObjLocation}terrain_chunk_${s}`,position:r,loadOptions:{}}))||[],!t.isOpenedTrack);t.unloadPreview(),t.map=new Tue(i,t.famPath&&"resources/"+t.famPath,t.mainService.hideHiddenFields$),t.map.resource=t.resource,t.map.isOpenedTrack=t.isOpenedTrack,t.map.loaderCursorEntity$.next(t.renderer),t.world.addEntity(t.map),t.cdr.markForCheck()})()}unloadPreview(){this.map&&(this.world.removeEntity(this.map),this.map.dispose(),this.map=null,this.cdr.markForCheck())}postTmpUpdates(t){var i=this;return xt(function*(){if(t){const r=yield i.eelDelegate.serializeResourceTmp(t,Object.entries(i.mainService.changedDataBlocks).filter(([s,o])=>"__has_external_changes__"!=s&&s.startsWith(t)).map(([s,o])=>({id:s,value:o})),{geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1,maps__save_as_chunked:!0,maps__save_invisible_wall_collisions:!1,maps__save_terrain_collisions:!1,maps__save_spherical_skybox_texture:!0,maps__add_props_to_obj:!1});i.terrainChunksObjLocation=r[0].substring(0,r[0].indexOf("terrain_chunk_"))}else i.terrainChunksObjLocation=void 0})()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return n.\u0275fac=function(t){return new(t||n)(D(Hc),D(ci),D(il))},n.\u0275cmp=ht({type:n,selectors:[["app-tri-map-block-ui"]],viewQuery:function(t,i){if(1&t&&(oi(xue,5),oi(wue,5)),2&t){let r;Lt(r=Ft())&&(i.previewCanvasContainer=r.first),Lt(r=Ft())&&(i.previewCanvas=r.first)}},inputs:{resource:"resource"},outputs:{changed:"changed"},decls:49,vars:43,consts:[[1,"famSelector"],["appearance","fill"],[3,"value","valueChange"],["famSelect",""],[3,"value",4,"ngFor","ngForOf"],["value","custom"],[4,"ngIf"],["mode","indeterminate",3,"diameter",4,"ngIf"],[1,"preview"],[1,"previewCanvasContainer"],["previewCanvasContainer",""],["width","640","height","480"],["previewCanvas",""],["mode","indeterminate",4,"ngIf"],[1,"previewNavigationContainer"],["matInput","","type","number",3,"min","max","ngModel","ngModelChange"],[3,"roadSpline","pointer","splineClosed"],[3,"resource","hideBlockActions"],[3,"resource","hideBlockActions","fieldWhitelist"],[3,"value"],["matInput","","type","text",3,"value"],["customFamInput",""],["mat-button","",3,"click"],["mode","indeterminate",3,"diameter"],["mode","indeterminate"]],template:function(t,i){if(1&t&&(K(0,"div",0)(1,"h4"),Je(2,"Preview *.FAM file"),J(),K(3,"mat-form-field",1)(4,"mat-label"),Je(5,"Current preview FAM"),J(),K(6,"mat-select",2,3),ct("valueChange",function(s){return i.onFamSelected(s)}),zt(8,"async"),zt(9,"async"),_e(10,Mue,2,2,"mat-option",4),K(11,"mat-option",5),Je(12,"custom"),J()()(),_e(13,Sue,9,3,"ng-container",6),_e(14,Cue,1,1,"mat-spinner",7),zt(15,"async"),J(),K(16,"div",8)(17,"div",9,10),Fe(19,"canvas",11,12),_e(21,Eue,1,0,"mat-spinner",13),zt(22,"async"),J(),K(23,"div",14,10)(25,"mat-form-field",1)(26,"mat-label"),Je(27,"Spline item"),J(),K(28,"input",15),ct("ngModelChange",function(s){return i.selectedSplineIndex$.next(s)}),zt(29,"async"),zt(30,"async"),J()(),Fe(31,"app-tri-minimap",16),zt(32,"async"),J()(),K(33,"h4"),Je(34,"Road spline item"),J(),Fe(35,"app-compound-block-ui",17),zt(36,"async"),K(37,"h4"),Je(38,"AI info (block for 4 spline items)"),J(),Fe(39,"app-compound-block-ui",17),zt(40,"async"),K(41,"h4"),Je(42,"Terrain (block for 4 spline items)"),J(),Fe(43,"app-compound-block-ui",17),zt(44,"async"),K(45,"h4"),Je(46,"Common"),J(),Fe(47,"app-compound-block-ui",18),zt(48,"async")),2&t){const r=Vr(7);let s;j(6),z("value",i.previewFamPossibleLocations.includes(Xt(8,20,i.previewFamLocation$))?Xt(9,22,i.previewFamLocation$):"custom"),j(4),z("ngForOf",i.previewFamPossibleLocations),j(3),z("ngIf","custom"==r.value),j(1),z("ngIf",Xt(15,24,i.previewFamLoading$)),j(7),z("ngIf",Xt(22,26,i.previewLoading$)),j(7),z("min",0)("max",4*(null==(s=Xt(29,28,i._resource$))?null:s.data.num_chunks)-1)("ngModel",Xt(30,30,i.selectedSplineIndex$)),j(3),z("roadSpline",i.roadSpline)("pointer",Xt(32,32,i.pointer$))("splineClosed",!i.isOpenedTrack),j(4),z("resource",Xt(36,34,i.selectedSplineItem$))("hideBlockActions",!0),j(4),z("resource",Xt(40,36,i.selectedAiInfoItem$))("hideBlockActions",!0),j(4),z("resource",Xt(44,38,i.selectedTerrainItem$))("hideBlockActions",!0),j(4),z("resource",Xt(48,40,i._resource$))("hideBlockActions",!0)("fieldWhitelist",Xs(42,Aue))}},dependencies:[Fo,gi,Wc,wm,eu,Cm,Sm,tu,nu,xa,Em,PM,Oy,vm,EC,Gc,bue,Vl],styles:[".preview[_ngcontent-%COMP%]{width:100%;height:calc(100vh - 14rem);display:flex;column-gap:1rem}.preview[_ngcontent-%COMP%] .previewCanvasContainer[_ngcontent-%COMP%]{flex-grow:1;position:relative;overflow:hidden;margin:0 0 16px;display:flex;align-items:center;justify-content:space-around}.preview[_ngcontent-%COMP%] .previewCanvasContainer[_ngcontent-%COMP%] canvas[_ngcontent-%COMP%]{position:absolute}.preview[_ngcontent-%COMP%] .previewNavigationContainer[_ngcontent-%COMP%]{width:20rem;flex-shrink:0;display:flex;flex-direction:column}.preview[_ngcontent-%COMP%] .previewNavigationContainer[_ngcontent-%COMP%] app-tri-minimap[_ngcontent-%COMP%]{flex-grow:1;display:flex}.famSelector[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;column-gap:1rem}.famSelector[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{min-width:-moz-fit-content;min-width:fit-content}.famSelector[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex-grow:1}.famSelector[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%], .famSelector[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-bottom:1.34375em}"],changeDetection:0}),n})(),Iue=(()=>{class n{constructor(t,i){this.eelDelegate=t,this.mainService=i,this._resource$=new Ct(null),this.changed=new it,this.previewPaths$=new Ct(null),this.destroyed$=new Ue,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1,geometry__replace_car_wheel_with_dummies:!1}}get resource(){return this._resource$.getValue()}set resource(t){this._resource$.next(t)}ngAfterViewInit(){var t=this;return xt(function*(){t._resource$.pipe(et(t.destroyed$)).subscribe(function(){var i=xt(function*(r){t.previewPaths$.next(yield t.loadPreviewFilePaths(r?.id))});return function(r){return i.apply(this,arguments)}}()),t.mainService.dataBlockChange$.pipe(et(t.destroyed$),On(([i,r])=>!!t.resource&&i.startsWith(t.resource.id)),Ah(1500)).subscribe(xt(function*(){t.previewPaths$.next(null),t.previewPaths$.next(yield t.postTmpUpdates(t.resource?.id))}))})()}postTmpUpdates(t){var i=this;return xt(function*(){if(t){const r=yield i.eelDelegate.serializeResourceTmp(t,Object.entries(i.mainService.changedDataBlocks).filter(([s,o])=>"__has_external_changes__"!=s&&s.startsWith(t)).map(([s,o])=>({id:s,value:o})),i.serializerSettings);return[r.find(s=>s.endsWith(".obj")),r.find(s=>s.endsWith(".mtl"))]}return null})()}loadPreviewFilePaths(t){var i=this;return xt(function*(){if(t){const r=yield i.eelDelegate.serializeResource(t,i.serializerSettings);return[r.find(s=>s.endsWith(".obj")),r.find(s=>s.endsWith(".mtl"))]}return null})()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return n.\u0275fac=function(t){return new(t||n)(D(Hc),D(il))},n.\u0275cmp=ht({type:n,selectors:[["app-orip-geometry-block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},decls:4,vars:6,consts:[[3,"paths"],[3,"resource"]],template:function(t,i){1&t&&(Fe(0,"app-obj-viewer",0),zt(1,"async"),Fe(2,"app-compound-block-ui",1),zt(3,"async")),2&t&&(z("paths",Xt(1,2,i.previewPaths$)),j(2),z("resource",Xt(3,4,i._resource$)))},dependencies:[Gc,I5,Vl],changeDetection:0}),n})();const Rue=["class","block-ui"];function Pue(n,e){if(1&n&&(K(0,"mat-label",7),Je(1),J()),2&n){const t=be(2);z("matTooltip",t.resourceDescription),j(1),nr("",null==t.resource?null:t.resource.name," ")}}function kue(n,e){if(1&n&&(K(0,"mat-option",8),Je(1),J()),2&n){const t=e.$implicit,i=e.index,r=be(2);z("value",i)("disabled",r.disabled),j(1),nr(" ",t.block_class_mro.split("__")[0]," ")}}function Oue(n,e){1&n&&Fe(0,"app-block-actions",9),2&n&&z("resource",be(2).childResource)}function Lue(n,e){if(1&n){const t=Wi();uo(0),_e(1,Pue,2,2,"mat-label",1),zt(2,"async"),K(3,"div",2)(4,"mat-label"),Je(5,"Resource type:"),J(),K(6,"mat-select",3),ct("selectionChange",function(r){return Dn(t),In(be().setChoiceIndex(r.value))}),_e(7,kue,2,3,"mat-option",4),J(),_e(8,Oue,1,1,"app-block-actions",5),J(),Fe(9,"app-editor",6),ho()}if(2&n){const t=be();let i;j(1),z("ngIf",(null==t.resource?null:t.resource.name)&&(null==t.resource?null:t.resource.name)!=(null==(i=Xt(2,8,t.main.resource$))?null:i.name)),j(5),z("value",t.resourceData.choice_index)("disabled",t.disabled),j(1),z("ngForOf",t.resource.schema.possible_resource_schemas),j(1),z("ngIf",!t.hideBlockActions),j(1),z("resource",t.childResource)("hideBlockActions",!0)("disabled",t.disabled)}}let R5=(()=>{class n{constructor(t){this.main=t,this._resource=null,this.resourceDescription="",this.hideBlockActions=!1,this.disabled=!1,this.childResource=null,this.choiceDataCaches=[],this.changed=new it}get resource(){return this._resource}set resource(t){const i=!this._resource||!t||this._resource.id!==t.id;this._resource=t,i&&(this.choiceDataCaches=new Array(this._resource?.schema.possible_resource_schemas||0).fill(null),this._resource&&(this.choiceDataCaches[this._resource.data.choice_index]=this._resource.data.data)),this.updateChild()}get resourceData(){return this._resource?.data||null}setChoiceIndex(t){this._resource&&(this.choiceDataCaches[this._resource.data.choice_index]=this.childResource.data,this._resource.data.choice_index=t,this._resource.data.data=this.choiceDataCaches[t],this.updateChild(),this.changed.emit())}updateChild(){this.childResource=this._resource?{...this._resource,id:$l(this._resource.id,"data"),data:this.choiceDataCaches[this._resource.data.choice_index],name:"",schema:this._resource.schema.possible_resource_schemas[this._resource.data.choice_index]}:null}}return n.\u0275fac=function(t){return new(t||n)(D(il))},n.\u0275cmp=ht({type:n,selectors:[["app-delegate",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions",disabled:"disabled"},outputs:{changed:"changed"},attrs:Rue,decls:1,vars:1,consts:[[4,"ngIf"],["matTooltipPosition","above",3,"matTooltip",4,"ngIf"],["id","resource-type-container"],[3,"value","disabled","selectionChange"],[3,"value","disabled",4,"ngFor","ngForOf"],[3,"resource",4,"ngIf"],[3,"resource","hideBlockActions","disabled"],["matTooltipPosition","above",3,"matTooltip"],[3,"value","disabled"],[3,"resource"]],template:function(t,i){1&t&&_e(0,Lue,10,10,"ng-container",0),2&t&&z("ngIf",i.resourceData)},styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;row-gap:1rem}#resource-type-container[_ngcontent-%COMP%]{display:flex;column-gap:.5rem;align-items:center}#resource-type-container[_ngcontent-%COMP%] mat-label[_ngcontent-%COMP%]{flex-shrink:0}"],changeDetection:0}),n})();const Fue=["class","block-ui"];function Nue(n,e){if(1&n&&(K(0,"mat-label",7),Je(1),J()),2&n){const t=be(2);z("matTooltip",t.resourceDescription),j(1),nr(" ",t.resource.name," ")}}function Bue(n,e){if(1&n){const t=Wi();uo(0),_e(1,Nue,2,2,"mat-label",1),K(2,"mat-selection-list",2),ct("selectionChange",function(r){return Dn(t),In(be().onSelection(r))}),K(3,"mat-list-option",3),Je(4," Left "),J(),K(5,"mat-list-option",4),Je(6," Right "),J()(),K(7,"mat-form-field",5)(8,"mat-label"),Je(9,"Texture ID"),J(),K(10,"input",6),ct("ngModelChange",function(r){return Dn(t),In(be().resource.data.texture_id=r)})("change",function(){return Dn(t),In(be().changed.emit())}),J()(),ho()}if(2&n){const t=be();j(1),z("ngIf",t.resource.name),j(2),z("selected",t.resource.data.has_left_fence),j(2),z("selected",t.resource.data.has_right_fence),j(5),z("max",63)("min",0)("step",1)("ngModel",t.resource.data.texture_id)}}let Uue=(()=>{class n{constructor(){this.resource=null,this.resourceDescription="",this.changed=new it}onSelection(t){for(const i of t.options)this.resource.data[i.value]=i.selected;this.changed.emit()}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=ht({type:n,selectors:[["app-fence-type",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription"},outputs:{changed:"changed"},attrs:Fue,decls:1,vars:1,consts:[[4,"ngIf"],["matTooltipPosition","above",3,"matTooltip",4,"ngIf"],[3,"selectionChange"],["value","has_left_fence",3,"selected"],["value","has_right_fence",3,"selected"],["appearance","fill"],["matInput","","type","number",3,"max","min","step","ngModel","ngModelChange","change"],["matTooltipPosition","above",3,"matTooltip"]],template:function(t,i){1&t&&_e(0,Bue,11,7,"ng-container",0),2&t&&z("ngIf",i.resource)},dependencies:[gi,Wc,wm,eu,Cm,Sm,tu,nu,xa,Em,_s,JM,QM],changeDetection:0}),n})(),Vue=(()=>{class n{constructor(){this._resource=null,this.resourceMap={},this.changed=new it}get resource(){return this._resource}set resource(t){this._resource=t,this.resourceMap={};const i=(this._resource?.schema.fields||[]).find(s=>"children"===s.name)?.schema.child_schema;if(!i)return;let r=this.resourceData.items_descr.map((s,o)=>[s,o]).filter(([s,o])=>s>0).map(([s,o])=>o);for(let s=0;s{class n{constructor(t,i,r){this.dialogRef=t,this.fb=i,this.data=r;const s={};for(const o of r.args)s[o.id]=["",FI.required];this.argsForm=this.fb.group(s)}submit(){const t=this.argsForm.value;for(const i of this.data.args)"number"==i.type&&(t[i.id]=+t[i.id]);this.dialogRef.close(t)}}return n.\u0275fac=function(t){return new(t||n)(D(wy),D(OJ),D(CI))},n.\u0275cmp=ht({type:n,selectors:[["app-run-custom-action",8,"dialog"]],attrs:zue,decls:12,vars:5,consts:[["mat-dialog-title",""],["mat-dialog-content",""],[3,"formGroup"],["appearance","fill",4,"ngFor","ngForOf"],["mat-dialog-actions",""],["mat-button","",3,"click"],["mat-button","",3,"disabled","click"],["appearance","fill"],["matInput","",3,"id","type","formControlName"]],template:function(t,i){1&t&&(K(0,"h1",0),Je(1),J(),K(2,"div",1)(3,"p"),Je(4),J()(),K(5,"form",2),_e(6,Hue,4,4,"mat-form-field",3),J(),K(7,"div",4)(8,"button",5),ct("click",function(){return i.dialogRef.close()}),Je(9,"Cancel"),J(),K(10,"button",6),ct("click",function(){return i.submit()}),Je(11,"Run"),J()()),2&t&&(j(1),nr('Run action "',i.data.title,'"'),j(3),$i(i.data.description),j(1),z("formGroup",i.argsForm),j(1),z("ngForOf",i.data.args),j(4),z("disabled",i.argsForm.invalid))},dependencies:[Fo,hV,Wc,eu,J3,nu,xa,Em,PM,GU,WU,$U,Mm,QI],styles:["form[_ngcontent-%COMP%]{padding:0 24px}"]}),n})();function P5(n,e){return e?t=>$v(e.pipe(Li(1),function Wue(){return Gn((n,e)=>{n.subscribe(Un(e,ls))})}()),t.pipe(P5(n))):er((t,i)=>lr(n(t,i)).pipe(Li(1),CN(t)))}function k5(n,e=dy){const t=hM(n,e);return P5(()=>t)}const $ue=["mat-menu-item",""];function jue(n,e){1&n&&(Lr(),K(0,"svg",3),Fe(1,"polygon",4),J())}const Xue=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],que=["mat-icon, [matMenuItemIcon]","*"];function Yue(n,e){if(1&n){const t=Wi();K(0,"div",0),ct("keydown",function(r){return Dn(t),In(be()._handleKeydown(r))})("click",function(){return Dn(t),In(be().closed.emit("click"))})("@transformMenu.start",function(r){return Dn(t),In(be()._onAnimationStart(r))})("@transformMenu.done",function(r){return Dn(t),In(be()._onAnimationDone(r))}),K(1,"div",1),Kt(2),J()()}if(2&n){const t=be();z("id",t.panelId)("ngClass",t._classList)("@transformMenu",t._panelAnimationState),Vt("aria-label",t.ariaLabel||null)("aria-labelledby",t.ariaLabelledby||null)("aria-describedby",t.ariaDescribedby||null)}}const Kue=["*"],ik=new ge("MAT_MENU_PANEL"),Zue=vI(TM(class{}));let AC=(()=>{class n extends Zue{constructor(t,i,r,s,o){super(),this._elementRef=t,this._document=i,this._focusMonitor=r,this._parentMenu=s,this._changeDetectorRef=o,this.role="menuitem",this._hovered=new Ue,this._focused=new Ue,this._highlighted=!1,this._triggersSubmenu=!1,s?.addItem?.(this)}focus(t,i){this._focusMonitor&&t?this._focusMonitor.focusVia(this._getHostElement(),t,i):this._getHostElement().focus(i),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){const t=this._elementRef.nativeElement.cloneNode(!0),i=t.querySelectorAll("mat-icon, .material-icons");for(let r=0;r enter",go("120ms cubic-bezier(0, 0, 0.2, 1)",Ci({opacity:1,transform:"scale(1)"}))),Ks("* => void",go("100ms 25ms linear",Ci({opacity:0})))]),fadeInItems:Gl("fadeInItems",[_o("showing",Ci({opacity:1})),Ks("void => *",[Ci({opacity:0}),go("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let Jue=0;const O5=new ge("mat-menu-default-options",{providedIn:"root",factory:function ehe(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let bb=(()=>{class n{get xPosition(){return this._xPosition}set xPosition(t){this._xPosition=t,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(t){this._yPosition=t,this.setPositionClasses()}get overlapTrigger(){return this._overlapTrigger}set overlapTrigger(t){this._overlapTrigger=Cn(t)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(t){this._hasBackdrop=Cn(t)}set panelClass(t){const i=this._previousPanelClass;i&&i.length&&i.split(" ").forEach(r=>{this._classList[r]=!1}),this._previousPanelClass=t,t&&t.length&&(t.split(" ").forEach(r=>{this._classList[r]=!0}),this._elementRef.nativeElement.className="")}get classList(){return this.panelClass}set classList(t){this.panelClass=t}constructor(t,i,r,s){this._elementRef=t,this._ngZone=i,this._defaultOptions=r,this._changeDetectorRef=s,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._directDescendantItems=new Wp,this._classList={},this._panelAnimationState="void",this._animationDone=new Ue,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new it,this.close=this.closed,this.panelId="mat-menu-panel-"+Jue++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new lU(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(No(this._directDescendantItems),gs(t=>cs(...t.map(i=>i._focused)))).subscribe(t=>this._keyManager.updateActiveItem(t)),this._directDescendantItems.changes.subscribe(t=>{const i=this._keyManager;if("enter"===this._panelAnimationState&&i.activeItem?._hasFocus()){const r=t.toArray(),s=Math.max(0,Math.min(r.length-1,i.activeItemIndex||0));r[s]&&!r[s].disabled?i.setActiveItem(s):i.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusSubscription?.unsubscribe()}_hovered(){return this._directDescendantItems.changes.pipe(No(this._directDescendantItems),gs(i=>cs(...i.map(r=>r._hovered))))}addItem(t){}removeItem(t){}_handleKeydown(t){const i=t.keyCode,r=this._keyManager;switch(i){case 27:nl(t)||(t.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case 39:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:return(38===i||40===i)&&r.setFocusOrigin("keyboard"),void r.onKeydown(t)}t.stopPropagation()}focusFirstItem(t="program"){this._firstItemFocusSubscription?.unsubscribe(),this._firstItemFocusSubscription=this._ngZone.onStable.pipe(Li(1)).subscribe(()=>{let i=null;if(this._directDescendantItems.length&&(i=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),!i||!i.contains(document.activeElement)){const r=this._keyManager;r.setFocusOrigin(t).setFirstItemActive(),!r.activeItem&&i&&i.focus()}})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(t){const i=Math.min(this._baseElevation+t,24),r=`${this._elevationPrefix}${i}`,s=Object.keys(this._classList).find(o=>o.startsWith(this._elevationPrefix));(!s||s===this._previousElevation)&&(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[r]=!0,this._previousElevation=r)}setPositionClasses(t=this.xPosition,i=this.yPosition){const r=this._classList;r["mat-menu-before"]="before"===t,r["mat-menu-after"]="after"===t,r["mat-menu-above"]="above"===i,r["mat-menu-below"]="below"===i,this._changeDetectorRef?.markForCheck()}_startAnimation(){this._panelAnimationState="enter"}_resetAnimation(){this._panelAnimationState="void"}_onAnimationDone(t){this._animationDone.next(t),this._isAnimating=!1}_onAnimationStart(t){this._isAnimating=!0,"enter"===t.toState&&0===this._keyManager.activeItemIndex&&(t.element.scrollTop=0)}_updateDirectDescendants(){this._allItems.changes.pipe(No(this._allItems)).subscribe(t=>{this._directDescendantItems.reset(t.filter(i=>i._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(pt),D(O5),D(ci))},n.\u0275dir=Ae({type:n,contentQueries:function(t,i,r){if(1&t&&(Xi(r,Que,5),Xi(r,AC,5),Xi(r,AC,4)),2&t){let s;Lt(s=Ft())&&(i.lazyContent=s.first),Lt(s=Ft())&&(i._allItems=s),Lt(s=Ft())&&(i.items=s)}},viewQuery:function(t,i){if(1&t&&oi(fo,5),2&t){let r;Lt(r=Ft())&&(i.templateRef=r.first)}},inputs:{backdropClass:"backdropClass",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:"overlapTrigger",hasBackdrop:"hasBackdrop",panelClass:["class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"}}),n})(),the=(()=>{class n extends bb{constructor(t,i,r,s){super(t,i,r,s),this._elevationPrefix="mat-elevation-z",this._baseElevation=8}}return n.\u0275fac=function(t){return new(t||n)(D(yt),D(pt),D(O5),D(ci))},n.\u0275cmp=ht({type:n,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(t,i){2&t&&Vt("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[Hn([{provide:ik,useExisting:n}]),ft],ngContentSelectors:Kue,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel","mdc-menu-surface","mdc-menu-surface--open","mat-mdc-elevation-specific",3,"id","ngClass","keydown","click"],[1,"mat-mdc-menu-content","mdc-list"]],template:function(t,i){1&t&&(Cr(),_e(0,Yue,3,6,"ng-template"))},dependencies:[Bv],styles:['.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;list-style-type:none}.mat-mdc-menu-content:focus{outline:none}.mat-mdc-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-mdc-menu-panel{outline:solid 1px}.mat-mdc-menu-panel.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;position:relative}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:16px;padding-right:16px;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px}.mat-mdc-menu-item:focus{outline:none}[dir=rtl] .mat-mdc-menu-item,.mat-mdc-menu-item[dir=rtl]{padding-left:16px;padding-right:16px}.mat-mdc-menu-item::-moz-focus-inner{border:0}.mat-mdc-menu-item.mdc-list-item{align-items:center}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item .mat-icon{margin-right:16px}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:16px}.mat-mdc-menu-item .mdc-list-item__primary-text{white-space:normal}.mat-mdc-menu-item.mat-mdc-menu-item-submenu-trigger{padding-right:32px}[dir=rtl] .mat-mdc-menu-item.mat-mdc-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}.cdk-high-contrast-active .mat-mdc-menu-item{margin-top:1px}.mat-mdc-menu-submenu-icon{position:absolute;top:50%;right:16px;transform:translateY(-50%);width:5px;height:10px;fill:currentColor}[dir=rtl] .mat-mdc-menu-submenu-icon{right:auto;left:16px;transform:translateY(-50%) scaleX(-1)}.cdk-high-contrast-active .mat-mdc-menu-submenu-icon{fill:CanvasText}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}'],encapsulation:2,data:{animation:[TC.transformMenu,TC.fadeInItems]},changeDetection:0}),n})();const L5=new ge("mat-menu-scroll-strategy"),ihe={provide:L5,deps:[mo],useFactory:function nhe(n){return()=>n.scrollStrategies.reposition()}},F5=Sh({passive:!0});let rhe=(()=>{class n{get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(t){this.menu=t}get menu(){return this._menu}set menu(t){t!==this._menu&&(this._menu=t,this._menuCloseSubscription.unsubscribe(),t&&(this._menuCloseSubscription=t.close.subscribe(i=>{this._destroyMenu(i),("click"===i||"tab"===i)&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(i)})),this._menuItemInstance?._setTriggersSubmenu(this.triggersSubmenu()))}constructor(t,i,r,s,o,a,l,c,u){this._overlay=t,this._element=i,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=u,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=un.EMPTY,this._hoverSubscription=un.EMPTY,this._menuCloseSubscription=un.EMPTY,this._changeDetectorRef=Ot(ci),this._handleTouchStart=h=>{fI(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new it,this.onMenuOpen=this.menuOpened,this.menuClosed=new it,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof bb?o:void 0,i.nativeElement.addEventListener("touchstart",this._handleTouchStart,F5)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,F5),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this.menu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){const t=this.menu;if(this._menuOpen||!t)return;const i=this._createOverlay(t),r=i.getConfig(),s=r.positionStrategy;this._setPosition(t,s),r.hasBackdrop=null==t.hasBackdrop?!this.triggersSubmenu():t.hasBackdrop,i.attach(this._getPortal(t)),t.lazyContent&&t.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(t),t instanceof bb&&(t._startAnimation(),t._directDescendantItems.changes.pipe(et(t.close)).subscribe(()=>{s.withLockedPosition(!1).reapplyLastPosition(),s.withLockedPosition(!0)}))}closeMenu(){this.menu?.close.emit()}focus(t,i){this._focusMonitor&&t?this._focusMonitor.focusVia(this._element,t,i):this._element.nativeElement.focus(i)}updatePosition(){this._overlayRef?.updatePosition()}_destroyMenu(t){if(!this._overlayRef||!this.menuOpen)return;const i=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this.restoreFocus&&("keydown"===t||!this._openedBy||!this.triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,i instanceof bb?(i._resetAnimation(),i.lazyContent?i._animationDone.pipe(On(r=>"void"===r.toState),Li(1),et(i.lazyContent._attached)).subscribe({next:()=>i.lazyContent.detach(),complete:()=>this._setIsMenuOpen(!1)}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),i?.lazyContent?.detach())}_initMenu(t){t.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,t.direction=this.dir,this._setMenuElevation(t),t.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0)}_setMenuElevation(t){if(t.setElevation){let i=0,r=t.parentMenu;for(;r;)i++,r=r.parentMenu;t.setElevation(i)}}_setIsMenuOpen(t){t!==this._menuOpen&&(this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&this._menuItemInstance._setHighlighted(t),this._changeDetectorRef.markForCheck())}_createOverlay(t){if(!this._overlayRef){const i=this._getOverlayConfig(t);this._subscribeToPositions(t,i.positionStrategy),this._overlayRef=this._overlay.create(i),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}_getOverlayConfig(t){return new _y({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:t.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:t.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}_subscribeToPositions(t,i){t.setPositionClasses&&i.positionChanges.subscribe(r=>{const s="start"===r.connectionPair.overlayX?"after":"before",o="top"===r.connectionPair.overlayY?"below":"above";this._ngZone?this._ngZone.run(()=>t.setPositionClasses(s,o)):t.setPositionClasses(s,o)})}_setPosition(t,i){let[r,s]="before"===t.xPosition?["end","start"]:["start","end"],[o,a]="above"===t.yPosition?["bottom","top"]:["top","bottom"],[l,c]=[o,a],[u,h]=[r,s],p=0;if(this.triggersSubmenu()){if(h=r="before"===t.xPosition?"start":"end",s=u="end"===r?"start":"end",this._parentMaterialMenu){if(null==this._parentInnerPadding){const m=this._parentMaterialMenu.items.first;this._parentInnerPadding=m?m._getHostElement().offsetTop:0}p="bottom"===o?this._parentInnerPadding:-this._parentInnerPadding}}else t.overlapTrigger||(l="top"===o?"bottom":"top",c="top"===a?"bottom":"top");i.withPositions([{originX:r,originY:l,overlayX:u,overlayY:o,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:o,offsetY:p},{originX:r,originY:c,overlayX:u,overlayY:a,offsetY:-p},{originX:s,originY:c,overlayX:h,overlayY:a,offsetY:-p}])}_menuClosingActions(){const t=this._overlayRef.backdropClick(),i=this._overlayRef.detachments();return cs(t,this._parentMaterialMenu?this._parentMaterialMenu.closed:dt(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(On(o=>o!==this._menuItemInstance),On(()=>this._menuOpen)):dt(),i)}_handleMousedown(t){hI(t)||(this._openedBy=0===t.button?"mouse":void 0,this.triggersSubmenu()&&t.preventDefault())}_handleKeydown(t){const i=t.keyCode;(13===i||32===i)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(39===i&&"ltr"===this.dir||37===i&&"rtl"===this.dir)&&(this._openedBy="keyboard",this.openMenu())}_handleClick(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){!this.triggersSubmenu()||!this._parentMaterialMenu||(this._hoverSubscription=this._parentMaterialMenu._hovered().pipe(On(t=>t===this._menuItemInstance&&!t.disabled),k5(0,JD)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof bb&&this.menu._isAnimating?this.menu._animationDone.pipe(Li(1),k5(0,JD),et(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(t){return(!this._portal||this._portal.templateRef!==t.templateRef)&&(this._portal=new cm(t.templateRef,this._viewContainerRef)),this._portal}}return n.\u0275fac=function(t){return new(t||n)(D(mo),D(yt),D(is),D(L5),D(ik,8),D(AC,10),D(tl,8),D(Yd),D(pt))},n.\u0275dir=Ae({type:n,hostVars:3,hostBindings:function(t,i){1&t&&ct("click",function(s){return i._handleClick(s)})("mousedown",function(s){return i._handleMousedown(s)})("keydown",function(s){return i._handleKeydown(s)}),2&t&&Vt("aria-haspopup",i.menu?"menu":null)("aria-expanded",i.menuOpen)("aria-controls",i.menuOpen?i.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:["mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:["matMenuTriggerFor","menu"],menuData:["matMenuTriggerData","menuData"],restoreFocus:["matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"}}),n})(),she=(()=>{class n extends rhe{}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Si(n)))(i||n)}}(),n.\u0275dir=Ae({type:n,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[ft]}),n})(),ohe=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({providers:[ihe],imports:[va,IM,qn,pm,my,qn]}),n})();function ahe(n,e){if(1&n){const t=Wi();K(0,"button",7),ct("click",function(){return Dn(t),In(be(2).deserialize())}),Fe(1,"mat-icon",8),J()}}function lhe(n,e){if(1&n){const t=Wi();uo(0),_e(1,ahe,2,0,"button",4),K(2,"button",5),ct("click",function(){return Dn(t),In(be().serializeBlockReversible())}),Fe(3,"mat-icon",6),J(),ho()}if(2&n){const t=be();j(1),z("ngIf",t.isInReversibleSerializationState),j(1),z("disabled",t.isInReversibleSerializationState)}}function che(n,e){1&n&&(K(0,"button",9),Fe(1,"mat-icon",10),J()),2&n&&(be(),z("matMenuTriggerFor",Vr(3)))}function dhe(n,e){if(1&n){const t=Wi();K(0,"button",11),ct("click",function(){const s=Dn(t).$implicit;return In(be().runCustomAction(s))}),K(1,"span"),Je(2),J()()}if(2&n){const t=e.$implicit;j(2),$i(t.title)}}const uhe=function(){return[]};let DC=(()=>{class n{constructor(t,i,r,s,o){this.mainService=t,this.eelDelegate=i,this.cdr=r,this.dialog=s,this.snackBar=o,this.resource=null,this.isInReversibleSerializationState=!1}serializeBlockReversible(){var t=this;return xt(function*(){if(!t.resource)return;const[i,r]=yield t.eelDelegate.serializeReversible(t.resource.id,[]),s=i.reduce((o,a)=>{let l=0;for(;li.cdr.markForCheck()),i.snackBar.open("Error while performing action! Reverting file state.. "+o.errorText||0,"OK :(",{duration:5e3})}})()}}return n.\u0275fac=function(t){return new(t||n)(D(il),D(Hc),D(ci),D(My),D(t3))},n.\u0275cmp=ht({type:n,selectors:[["app-block-actions"]],inputs:{resource:"resource"},decls:5,vars:4,consts:[[4,"ngIf"],["mat-icon-button","","matTooltip","Run custom action",3,"matMenuTriggerFor",4,"ngIf"],["customActionsMenu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-icon-button","","matTooltip","Deserialize back from common format",3,"click",4,"ngIf"],["mat-icon-button","","matTooltip","Serialize to common format",3,"disabled","click"],["fontIcon","download"],["mat-icon-button","","matTooltip","Deserialize back from common format",3,"click"],["fontIcon","upload"],["mat-icon-button","","matTooltip","Run custom action",3,"matMenuTriggerFor"],["fontIcon","bolt"],["mat-menu-item","",3,"click"]],template:function(t,i){1&t&&(_e(0,lhe,4,2,"ng-container",0),_e(1,che,2,1,"button",1),K(2,"mat-menu",null,2),_e(4,dhe,3,1,"button",3),J()),2&t&&(z("ngIf",null==i.resource||null==i.resource.schema?null:i.resource.schema.serializable_to_disc),j(1),z("ngIf",(null==i.resource||null==i.resource.schema.custom_actions?null:i.resource.schema.custom_actions.length)>0),j(3),z("ngForOf",(null==i.resource?null:i.resource.schema.custom_actions)||Xs(3,uhe)))},dependencies:[Fo,gi,_s,EI,E3,the,AC,she],styles:["[_nghost-%COMP%]{display:flex}"]}),n})();const hhe=["class","block-ui"];function fhe(n,e){if(1&n&&(K(0,"mat-label",7),Je(1),J()),2&n){const t=be();z("matTooltip",t.resourceDescription),j(1),nr("",null==t.resource?null:t.resource.name," ")}}function phe(n,e){if(1&n&&(K(0,"audio",8),Fe(1,"source",9),zt(2,"async"),Je(3," Your browser does not support the audio element. "),J()),2&n){const t=be();j(1),z("src",Xt(2,1,t.audioUrl$),_p)}}function mhe(n,e){1&n&&Fe(0,"mat-spinner",10)}function ghe(n,e){1&n&&Fe(0,"app-block-actions",11),2&n&&z("resource",be().resource)}const _he=function(){return["wave_data"]};let vhe=(()=>{class n{constructor(t,i){this.eelDelegate=t,this.main=i,this._resource$=new Ct(null),this.audioUrl$=new Ct(null),this.resourceDescription="",this.hideBlockActions=!1,this.destroyed$=new Ue,this.changed=new it}set resource(t){this._resource$.next(t)}get resource(){return this._resource$.getValue()}ngAfterViewInit(){var t=this;return xt(function*(){t._resource$.pipe(et(t.destroyed$)).subscribe(function(){var i=xt(function*(r){if(t.audioUrl$.next(null),r){const s=yield t.eelDelegate.serializeResource(r.id,{audio__save_car_sfx_loops:!1});t.audioUrl$.next(s.find(o=>o.endsWith(".mp3"))||null)}});return function(r){return i.apply(this,arguments)}}())})()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return n.\u0275fac=function(t){return new(t||n)(D(Hc),D(il))},n.\u0275cmp=ht({type:n,selectors:[["app-eacs-audio",8,"block-ui"]],inputs:{resource:"resource",resourceDescription:"resourceDescription",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},attrs:hhe,decls:11,vars:16,consts:[["id","header"],["matTooltipPosition","above",3,"matTooltip",4,"ngIf"],["controls","",4,"ngIf"],["mode","indeterminate",4,"ngIf"],[1,"flex-spacer"],[3,"resource",4,"ngIf"],[3,"resource","hideBlockActions","fieldBlacklist"],["matTooltipPosition","above",3,"matTooltip"],["controls",""],[3,"src"],["mode","indeterminate"],[3,"resource"]],template:function(t,i){if(1&t&&(K(0,"div",0),_e(1,fhe,2,2,"mat-label",1),zt(2,"async"),_e(3,phe,4,3,"audio",2),zt(4,"async"),_e(5,mhe,1,0,"mat-spinner",3),zt(6,"async"),Fe(7,"div",4),_e(8,ghe,1,1,"app-block-actions",5),J(),Fe(9,"app-compound-block-ui",6),zt(10,"async")),2&t){let r;j(1),z("ngIf",(null==i.resource?null:i.resource.name)&&(null==i.resource?null:i.resource.name)!=(null==(r=Xt(2,7,i.main.resource$))?null:r.name)),j(2),z("ngIf",Xt(4,9,i.audioUrl$)),j(2),z("ngIf",i.resource&&!Xt(6,11,i.audioUrl$)),j(3),z("ngIf",!i.hideBlockActions),j(1),z("resource",Xt(10,13,i._resource$))("hideBlockActions",!0)("fieldBlacklist",Xs(15,_he))}},dependencies:[gi,xa,_s,EC,Gc,DC,Vl],styles:["#header[_ngcontent-%COMP%]{display:flex}"]}),n})();const yhe=["class","block-ui"];let bhe=(()=>{class n{constructor(t,i){this.eelDelegate=t,this.mainService=i,this._resource$=new Ct(null),this.changed=new it,this.previewPaths$=new Ct(null),this.destroyed$=new Ue,this.serializerSettings={geometry__save_obj:!0,geometry__save_blend:!1,geometry__export_to_gg_web_engine:!1,geometry__replace_car_wheel_with_dummies:!1}}get resource(){return this._resource$.getValue()}set resource(t){this._resource$.next(t)}ngAfterViewInit(){var t=this;return xt(function*(){t._resource$.pipe(et(t.destroyed$)).subscribe(function(){var i=xt(function*(r){t.previewPaths$.next(yield t.loadPreviewFilePaths(r?.id))});return function(r){return i.apply(this,arguments)}}()),t.mainService.dataBlockChange$.pipe(et(t.destroyed$),On(([i,r])=>!!t.resource&&i.startsWith(t.resource.id)),Ah(1500)).subscribe(xt(function*(){t.previewPaths$.next(null),t.previewPaths$.next(yield t.postTmpUpdates(t.resource?.id))}))})()}postTmpUpdates(t){var i=this;return xt(function*(){if(t){const r=yield i.eelDelegate.serializeResourceTmp(t,Object.entries(i.mainService.changedDataBlocks).filter(([s,o])=>"__has_external_changes__"!=s&&s.startsWith(t)).map(([s,o])=>({id:s,value:o})),i.serializerSettings);return[r.find(s=>s.endsWith(".obj")),r.find(s=>s.endsWith(".mtl"))]}return null})()}loadPreviewFilePaths(t){var i=this;return xt(function*(){if(t){const r=yield i.eelDelegate.serializeResource(t,i.serializerSettings);return[r.find(s=>s.endsWith(".obj")),r.find(s=>s.endsWith(".mtl"))]}return null})()}previewObjectGroupFunc(t){return t.startsWith("part_hp")?"High-poly":t.startsWith("part_mp")?"Medium-poly":t.startsWith("part_lp")?"Low-poly":t.startsWith("part_res")?"Reserved":t}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}}return n.\u0275fac=function(t){return new(t||n)(D(Hc),D(il))},n.\u0275cmp=ht({type:n,selectors:[["app-geo-geometry",8,"block-ui"]],inputs:{resource:"resource"},outputs:{changed:"changed"},attrs:yhe,decls:4,vars:7,consts:[[3,"paths","groupFunction"],[3,"resource"]],template:function(t,i){1&t&&(Fe(0,"app-obj-viewer",0),zt(1,"async"),Fe(2,"app-compound-block-ui",1),zt(3,"async")),2&t&&(z("paths",Xt(1,3,i.previewPaths$))("groupFunction",i.previewObjectGroupFunc),j(2),z("resource",Xt(3,5,i._resource$)))},dependencies:[Gc,I5,Vl],changeDetection:0}),n})();const xhe=function(){return["children","items_descr"]};let whe=(()=>{class n{constructor(){this._resource=null,this.hideBlockActions=!1,this.resourceMap={},this.changed=new it}get resource(){return this._resource}set resource(t){this._resource=t,this.resourceMap={};const i=(this._resource?.schema.fields||[]).find(s=>"children"===s.name)?.schema.child_schema;if(!i)return;let r=0;for(const[s,o]of this.resourceData.children_aliases.entries()){let a=o||"__"+r++;this.resourceMap[a]={id:$l(this._resource?.id||"",`children/${s}`),data:this.resourceData?.children[s],schema:i,name:""}}}get resourceData(){return this._resource?.data}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=ht({type:n,selectors:[["app-base-archive-block-ui"]],inputs:{resource:"resource",hideBlockActions:"hideBlockActions"},outputs:{changed:"changed"},decls:2,vars:5,consts:[[3,"resource","hideBlockActions","fieldBlacklist"],[3,"resources"]],template:function(t,i){1&t&&Fe(0,"app-compound-block-ui",0)(1,"app-sidenav-res-list",1),2&t&&(z("resource",i.resource)("hideBlockActions",i.hideBlockActions)("fieldBlacklist",Xs(4,xhe)),j(1),z("resources",i.resourceMap))},dependencies:[Gc,ZM],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}[_nghost-%COMP%] #top-bar[_ngcontent-%COMP%]{flex-grow:0;display:flex;flex-direction:row;align-items:center;column-gap:2rem}[_nghost-%COMP%] #top-bar[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:0 0 16px}"],changeDetection:0}),n})();function Mhe(n,e){if(1&n&&(K(0,"mat-error"),Je(1),J()),2&n){const t=be(2);j(1),Vp(" ",t.resourceError.data.error_class,": ",t.resourceError.data.error_text," ")}}function She(n,e){1&n&&Fe(0,"mat-spinner",5)}function Che(n,e){if(1&n&&(K(0,"div",2),_e(1,Mhe,2,2,"mat-error",3),_e(2,She,1,0,"mat-spinner",4),J()),2&n){const t=be();j(1),z("ngIf",t.resourceError),j(1),z("ngIf",!t.resourceError)}}function Ehe(n,e){}let xb=(()=>{class n{constructor(t){this.mainService=t,this._component=null,this._componentChangedSub=null,this.destroyed$=new Ue,this.resourceSet$=new Ue,this._resource=null,this._resourceError=null,this._resourceDescription="",this._hideBlockActions=!1,this._disabled=!1}get resource(){return this._resource}get resourceError(){return this._resourceError}set resourceDescription(t){this._resourceDescription=t,this._component&&(this._component.instance.resourceDescription=t)}set hideBlockActions(t){this._hideBlockActions=t,this._component&&(this._component.instance.hideBlockActions=t)}set disabled(t){this._disabled=t,this._component&&(this._component.instance.disabled=t)}set resource(t){if(this.resourceSet$.next(),t?t.data?.error_class?(this._resourceError=t,this._resource=null):(this._resource=t,this._resourceError=null):(this._resource=null,this._resourceError=null),this.dataBlockUiHost.viewContainerRef.clear(),this._resource&&this._resource.schema.block_class_mro){{let r;for(const s of this._resource.schema.block_class_mro.split("__"))if(r=n.DATA_BLOCK_COMPONENTS_MAP[s],r)break;if(!r)throw new Error("Cannot find GUI component for block MRO "+this._resource.schema.block_class_mro);this._component&&this._componentChangedSub&&this._componentChangedSub.unsubscribe(),this._component=this.dataBlockUiHost.viewContainerRef.createComponent(r),this._componentChangedSub=this._component.instance.changed.pipe(et(this.destroyed$),et(this.resourceSet$)).subscribe(()=>{const s=this._resource.id,o=this._resource.data;if(o instanceof Array)for(let a=0;a*{flex-grow:1;max-width:100%}[_nghost-%COMP%] #error-spinner-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;align-items:center;justify-content:space-around}"],changeDetection:0}),n})();function Ahe(n,e){1&n&&Fe(0,"mat-icon",17)}function The(n,e){1&n&&Fe(0,"mat-icon",18)}let Dhe=(()=>{class n{constructor(t,i,r,s,o){this.eelDelegate=t,this.mainService=i,this.dialog=r,this.snackBar=s,this.cdr=o}saveResource(){var t=this;return xt(function*(){try{yield t.mainService.saveResource(),t.snackBar.open("File Saved!","OK",{duration:1500})}catch(i){t.snackBar.open("Error while saving file! "+i.errorText,"OK :(",{duration:5e3})}})()}toggleUnknownsVisibility(){this.mainService.hideHiddenFields$.next(!this.mainService.hideHiddenFields$.getValue())}reloadResource(){var t=this;return xt(function*(){if(t.mainService.hasUnsavedChanges){let i=t.dialog.open(YU,{data:{text:"There are unsaved changes, which will be lost. Are you sure you want to reload file?"}});if(!(yield TI(i.afterClosed())))return}yield t.mainService.reloadResource(),t.cdr.markForCheck()})()}}return n.\u0275fac=function(t){return new(t||n)(D(Hc),D(il),D(My),D(t3),D(ci))},n.\u0275cmp=ht({type:n,selectors:[["app-root"]],decls:32,vars:31,consts:[["color","primary"],[1,"flex-spacer"],["mat-icon-button","","matTooltip","Show/hide hidden fields",3,"click"],["fontIcon","visibility_off",4,"ngIf"],["fontIcon","visibility_on",4,"ngIf"],["vertical",""],[3,"resource"],["mat-icon-button","","matTooltip","Reload file from disk",3,"disabled","click"],["fontIcon","refresh"],["mat-icon-button","","matTooltip","Save changes to file",3,"disabled","click"],["fontIcon","save"],["id","content-wrapper"],[1,"scroll-bounds-snapper"],[3,"resource","hideBlockActions"],["id","bmac"],["href","https://www.buymeacoffee.com/andygura","target","_blank"],["src","https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png","alt","Buy Me A Coffee",2,"height","60px !important","width","217px !important"],["fontIcon","visibility_off"],["fontIcon","visibility_on"]],template:function(t,i){if(1&t&&(K(0,"mat-toolbar",0)(1,"span"),Je(2),zt(3,"async"),zt(4,"async"),J(),Fe(5,"span",1),K(6,"button",2),ct("click",function(){return i.toggleUnknownsVisibility()}),_e(7,Ahe,1,0,"mat-icon",3),zt(8,"async"),_e(9,The,1,0,"mat-icon",4),zt(10,"async"),J(),Fe(11,"mat-divider",5)(12,"app-block-actions",6),zt(13,"async"),K(14,"button",7),ct("click",function(){return i.reloadResource()}),zt(15,"async"),Fe(16,"mat-icon",8),J(),Fe(17,"mat-divider",5),K(18,"button",9),ct("click",function(){return i.saveResource()}),zt(19,"async"),zt(20,"async"),Fe(21,"mat-icon",10),J()(),K(22,"div",11),Fe(23,"div",12)(24,"app-editor",13),zt(25,"async"),zt(26,"async"),zt(27,"async"),K(28,"div",14)(29,"a",15),Fe(30,"img",16),J()(),Fe(31,"div",12),J()),2&t){let r;j(2),Vp("",(null==(r=Xt(3,9,i.mainService.resource$))?null:r.name)||"...","",Xt(4,11,i.mainService.hasUnsavedChanges$)?"*":"",""),j(5),z("ngIf",Xt(8,13,i.mainService.hideHiddenFields$)),j(2),z("ngIf",!Xt(10,15,i.mainService.hideHiddenFields$)),j(3),z("resource",Xt(13,17,i.mainService.resource$)),j(2),z("disabled",!Xt(15,19,i.mainService.eelDelegate.openedResourcePath$)),j(4),z("disabled",!Xt(19,21,i.mainService.resource$)||!Xt(20,23,i.mainService.hasUnsavedChanges$)),j(6),z("resource",Xt(25,25,i.mainService.customActionRunning$)?null:Xt(26,27,i.mainService.resource$)||Xt(27,29,i.mainService.error$))("hideBlockActions",!0)}},dependencies:[gi,NZ,UZ,_s,EI,E3,xb,DC,Vl],styles:["[_nghost-%COMP%]{height:100%;display:flex;flex-direction:column}#content-wrapper[_ngcontent-%COMP%]{flex-grow:1;overflow-y:auto;padding:1rem;height:100%;scroll-snap-type:y proximity}#content-wrapper[_ngcontent-%COMP%] .scroll-bounds-snapper[_ngcontent-%COMP%]{height:0;width:100%;scroll-snap-align:start;scroll-margin:1rem}#bmac[_ngcontent-%COMP%]{text-align:end;margin-top:1rem}mat-divider[_ngcontent-%COMP%]{height:100%;margin:0 16px}"],changeDetection:0}),n})();function N5(n){return new fe(3e3,!1)}function dfe(){return typeof window<"u"&&typeof window.document<"u"}function rk(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function wu(n){switch(n.length){case 0:return new xy;case 1:return n[0];default:return new FU(n)}}function B5(n,e,t,i,r=new Map,s=new Map){const o=[],a=[];let l=-1,c=null;if(i.forEach(u=>{const h=u.get("offset"),p=h==l,m=p&&c||new Map;u.forEach((g,b)=>{let y=b,v=g;if("offset"!==b)switch(y=e.normalizePropertyName(y,o),v){case MI:v=r.get(b);break;case zc:v=s.get(b);break;default:v=e.normalizeStyleValue(b,y,v,o)}m.set(y,v)}),p||a.push(m),c=m,l=h}),o.length)throw function Qhe(n){return new fe(3502,!1)}();return a}function sk(n,e,t,i){switch(e){case"start":n.onStart(()=>i(t&&ok(t,"start",n)));break;case"done":n.onDone(()=>i(t&&ok(t,"done",n)));break;case"destroy":n.onDestroy(()=>i(t&&ok(t,"destroy",n)))}}function ok(n,e,t){const s=ak(n.element,n.triggerName,n.fromState,n.toState,e||n.phaseName,t.totalTime??n.totalTime,!!t.disabled),o=n._data;return null!=o&&(s._data=o),s}function ak(n,e,t,i,r="",s=0,o){return{element:n,triggerName:e,fromState:t,toState:i,phaseName:r,totalTime:s,disabled:!!o}}function Xo(n,e,t){let i=n.get(e);return i||n.set(e,i=t),i}function U5(n){const e=n.indexOf(":");return[n.substring(1,e),n.slice(e+1)]}let lk=(n,e)=>!1,V5=(n,e,t)=>[],z5=null;function ck(n){const e=n.parentNode||n.host;return e===z5?null:e}(rk()||typeof Element<"u")&&(dfe()?(z5=(()=>document.documentElement)(),lk=(n,e)=>{for(;e;){if(e===n)return!0;e=ck(e)}return!1}):lk=(n,e)=>n.contains(e),V5=(n,e,t)=>{if(t)return Array.from(n.querySelectorAll(e));const i=n.querySelector(e);return i?[i]:[]});let ff=null,H5=!1;const G5=lk,W5=V5;let $5=(()=>{class n{validateStyleProperty(t){return function hfe(n){ff||(ff=function ffe(){return typeof document<"u"?document.body:null}()||{},H5=!!ff.style&&"WebkitAppearance"in ff.style);let e=!0;return ff.style&&!function ufe(n){return"ebkit"==n.substring(1,6)}(n)&&(e=n in ff.style,!e&&H5&&(e="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in ff.style)),e}(t)}matchesElement(t,i){return!1}containsElement(t,i){return G5(t,i)}getParentElement(t){return ck(t)}query(t,i,r){return W5(t,i,r)}computeStyle(t,i,r){return r||""}animate(t,i,r,s,o,a=[],l){return new xy(r,s)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})(),dk=(()=>{class n{}return n.NOOP=new $5,n})();const pfe=1e3,uk="ng-enter",IC="ng-leave",RC="ng-trigger",PC=".ng-trigger",X5="ng-animating",hk=".ng-animating";function nd(n){if("number"==typeof n)return n;const e=n.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:fk(parseFloat(e[1]),e[2])}function fk(n,e){return"s"===e?n*pfe:n}function kC(n,e,t){return n.hasOwnProperty("duration")?n:function gfe(n,e,t){let r,s=0,o="";if("string"==typeof n){const a=n.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return e.push(N5()),{duration:0,delay:0,easing:""};r=fk(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=fk(parseFloat(l),a[4]));const c=a[5];c&&(o=c)}else r=n;if(!t){let a=!1,l=e.length;r<0&&(e.push(function Ihe(){return new fe(3100,!1)}()),a=!0),s<0&&(e.push(function Rhe(){return new fe(3101,!1)}()),a=!0),a&&e.splice(l,0,N5())}return{duration:r,delay:s,easing:o}}(n,e,t)}function wb(n,e={}){return Object.keys(n).forEach(t=>{e[t]=n[t]}),e}function q5(n){const e=new Map;return Object.keys(n).forEach(t=>{e.set(t,n[t])}),e}function Mu(n,e=new Map,t){if(t)for(let[i,r]of t)e.set(i,r);for(let[i,r]of n)e.set(i,r);return e}function K5(n,e,t){return t?e+":"+t+";":""}function Z5(n){let e="";for(let t=0;t{const s=mk(r);t&&!t.has(r)&&t.set(r,n.style[s]),n.style[s]=i}),rk()&&Z5(n))}function pf(n,e){n.style&&(e.forEach((t,i)=>{const r=mk(i);n.style[r]=""}),rk()&&Z5(n))}function Mb(n){return Array.isArray(n)?1==n.length?n[0]:OU(n):n}const pk=new RegExp("{{\\s*(.+?)\\s*}}","g");function Q5(n){let e=[];if("string"==typeof n){let t;for(;t=pk.exec(n);)e.push(t[1]);pk.lastIndex=0}return e}function Sb(n,e,t){const i=n.toString(),r=i.replace(pk,(s,o)=>{let a=e[o];return null==a&&(t.push(function khe(n){return new fe(3003,!1)}()),a=""),a.toString()});return r==i?n:r}function OC(n){const e=[];let t=n.next();for(;!t.done;)e.push(t.value),t=n.next();return e}const yfe=/-+([a-z0-9])/g;function mk(n){return n.replace(yfe,(...e)=>e[1].toUpperCase())}function bfe(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function qo(n,e,t){switch(e.type){case 7:return n.visitTrigger(e,t);case 0:return n.visitState(e,t);case 1:return n.visitTransition(e,t);case 2:return n.visitSequence(e,t);case 3:return n.visitGroup(e,t);case 4:return n.visitAnimate(e,t);case 5:return n.visitKeyframes(e,t);case 6:return n.visitStyle(e,t);case 8:return n.visitReference(e,t);case 9:return n.visitAnimateChild(e,t);case 10:return n.visitAnimateRef(e,t);case 11:return n.visitQuery(e,t);case 12:return n.visitStagger(e,t);default:throw function Ohe(n){return new fe(3004,!1)}()}}function J5(n,e){return window.getComputedStyle(n)[e]}const NC="*";function Efe(n,e){const t=[];return"string"==typeof n?n.split(/\s*,\s*/).forEach(i=>function Afe(n,e,t){if(":"==n[0]){const l=function Tfe(n,e){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,i)=>parseFloat(i)>parseFloat(t);case":decrement":return(t,i)=>parseFloat(i) *"}}(n,t);if("function"==typeof l)return void e.push(l);n=l}const i=n.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return t.push(function Xhe(n){return new fe(3015,!1)}()),e;const r=i[1],s=i[2],o=i[3];e.push(eG(r,o));"<"==s[0]&&!(r==NC&&o==NC)&&e.push(eG(o,r))}(i,t,e)):t.push(n),t}const BC=new Set(["true","1"]),UC=new Set(["false","0"]);function eG(n,e){const t=BC.has(n)||UC.has(n),i=BC.has(e)||UC.has(e);return(r,s)=>{let o=n==NC||n==r,a=e==NC||e==s;return!o&&t&&"boolean"==typeof r&&(o=r?BC.has(n):UC.has(n)),!a&&i&&"boolean"==typeof s&&(a=s?BC.has(e):UC.has(e)),o&&a}}const Dfe=new RegExp("s*:selfs*,?","g");function gk(n,e,t,i){return new Ife(n).build(e,t,i)}class Ife{constructor(e){this._driver=e}build(e,t,i){const r=new kfe(t);return this._resetContextStyleTimingState(r),qo(this,Mb(e),r)}_resetContextStyleTimingState(e){e.currentQuerySelector="",e.collectedStyles=new Map,e.collectedStyles.set("",new Map),e.currentTime=0}visitTrigger(e,t){let i=t.queryCount=0,r=t.depCount=0;const s=[],o=[];return"@"==e.name.charAt(0)&&t.errors.push(function Fhe(){return new fe(3006,!1)}()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(t),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,s.push(this.visitState(l,t))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,t);i+=l.queryCount,r+=l.depCount,o.push(l)}else t.errors.push(function Nhe(){return new fe(3007,!1)}())}),{type:7,name:e.name,states:s,transitions:o,queryCount:i,depCount:r,options:null}}visitState(e,t){const i=this.visitStyle(e.styles,t),r=e.options&&e.options.params||null;if(i.containsDynamicStyles){const s=new Set,o=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{Q5(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&(OC(s.values()),t.errors.push(function Bhe(n,e){return new fe(3008,!1)}()))}return{type:0,name:e.name,style:i,options:r?{params:r}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;const i=qo(this,Mb(e.animation),t);return{type:1,matchers:Efe(e.expr,t.errors),animation:i,queryCount:t.queryCount,depCount:t.depCount,options:mf(e.options)}}visitSequence(e,t){return{type:2,steps:e.steps.map(i=>qo(this,i,t)),options:mf(e.options)}}visitGroup(e,t){const i=t.currentTime;let r=0;const s=e.steps.map(o=>{t.currentTime=i;const a=qo(this,o,t);return r=Math.max(r,t.currentTime),a});return t.currentTime=r,{type:3,steps:s,options:mf(e.options)}}visitAnimate(e,t){const i=function Lfe(n,e){if(n.hasOwnProperty("duration"))return n;if("number"==typeof n)return _k(kC(n,e).duration,0,"");const t=n;if(t.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=_k(0,0,"");return s.dynamic=!0,s.strValue=t,s}const r=kC(t,e);return _k(r.duration,r.delay,r.easing)}(e.timings,t.errors);t.currentAnimateTimings=i;let r,s=e.styles?e.styles:Ci({});if(5==s.type)r=this.visitKeyframes(s,t);else{let o=e.styles,a=!1;if(!o){a=!0;const c={};i.easing&&(c.easing=i.easing),o=Ci(c)}t.currentTime+=i.duration+i.delay;const l=this.visitStyle(o,t);l.isEmptyStep=a,r=l}return t.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(e,t){const i=this._makeStyleAst(e,t);return this._validateStyleAst(i,t),i}_makeStyleAst(e,t){const i=[],r=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of r)"string"==typeof a?a===zc?i.push(a):t.errors.push(new fe(3002,!1)):i.push(q5(a));let s=!1,o=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(o=a.get("easing"),a.delete("easing")),!s))for(let l of a.values())if(l.toString().indexOf("{{")>=0){s=!0;break}}),{type:6,styles:i,easing:o,offset:e.offset,containsDynamicStyles:s,options:null}}_validateStyleAst(e,t){const i=t.currentAnimateTimings;let r=t.currentTime,s=t.currentTime;i&&s>0&&(s-=i.duration+i.delay),e.styles.forEach(o=>{"string"!=typeof o&&o.forEach((a,l)=>{const c=t.collectedStyles.get(t.currentQuerySelector),u=c.get(l);let h=!0;u&&(s!=r&&s>=u.startTime&&r<=u.endTime&&(t.errors.push(function Vhe(n,e,t,i,r){return new fe(3010,!1)}()),h=!1),s=u.startTime),h&&c.set(l,{startTime:s,endTime:r}),t.options&&function vfe(n,e,t){const i=e.params||{},r=Q5(n);r.length&&r.forEach(s=>{i.hasOwnProperty(s)||t.push(function Phe(n){return new fe(3001,!1)}())})}(a,t.options,t.errors)})})}visitKeyframes(e,t){const i={type:5,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(function zhe(){return new fe(3011,!1)}()),i;let s=0;const o=[];let a=!1,l=!1,c=0;const u=e.steps.map(v=>{const M=this._makeStyleAst(v,t);let x=null!=M.offset?M.offset:function Ofe(n){if("string"==typeof n)return null;let e=null;if(Array.isArray(n))n.forEach(t=>{if(t instanceof Map&&t.has("offset")){const i=t;e=parseFloat(i.get("offset")),i.delete("offset")}});else if(n instanceof Map&&n.has("offset")){const t=n;e=parseFloat(t.get("offset")),t.delete("offset")}return e}(M.styles),S=0;return null!=x&&(s++,S=M.offset=x),l=l||S<0||S>1,a=a||S0&&s{const x=p>0?M==m?1:p*M:o[M],S=x*y;t.currentTime=g+b.delay+S,b.duration=S,this._validateStyleAst(v,t),v.offset=x,i.styles.push(v)}),i}visitReference(e,t){return{type:8,animation:qo(this,Mb(e.animation),t),options:mf(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:9,options:mf(e.options)}}visitAnimateRef(e,t){return{type:10,animation:this.visitReference(e.animation,t),options:mf(e.options)}}visitQuery(e,t){const i=t.currentQuerySelector,r=e.options||{};t.queryCount++,t.currentQuery=e;const[s,o]=function Rfe(n){const e=!!n.split(/\s*,\s*/).find(t=>":self"==t);return e&&(n=n.replace(Dfe,"")),n=n.replace(/@\*/g,PC).replace(/@\w+/g,t=>PC+"-"+t.slice(1)).replace(/:animating/g,hk),[n,e]}(e.selector);t.currentQuerySelector=i.length?i+" "+s:s,Xo(t.collectedStyles,t.currentQuerySelector,new Map);const a=qo(this,Mb(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=i,{type:11,selector:s,limit:r.limit||0,optional:!!r.optional,includeSelf:o,animation:a,originalSelector:e.selector,options:mf(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(function $he(){return new fe(3013,!1)}());const i="full"===e.timings?{duration:0,delay:0,easing:"full"}:kC(e.timings,t.errors,!0);return{type:12,animation:qo(this,Mb(e.animation),t),timings:i,options:null}}}class kfe{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function mf(n){return n?(n=wb(n)).params&&(n.params=function Pfe(n){return n?wb(n):null}(n.params)):n={},n}function _k(n,e,t){return{duration:n,delay:e,easing:t}}function vk(n,e,t,i,r,s,o=null,a=!1){return{type:1,element:n,keyframes:e,preStyleProps:t,postStyleProps:i,duration:r,delay:s,totalTime:r+s,easing:o,subTimeline:a}}class VC{constructor(){this._map=new Map}get(e){return this._map.get(e)||[]}append(e,t){let i=this._map.get(e);i||this._map.set(e,i=[]),i.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}}const Bfe=new RegExp(":enter","g"),Vfe=new RegExp(":leave","g");function yk(n,e,t,i,r,s=new Map,o=new Map,a,l,c=[]){return(new zfe).buildKeyframes(n,e,t,i,r,s,o,a,l,c)}class zfe{buildKeyframes(e,t,i,r,s,o,a,l,c,u=[]){c=c||new VC;const h=new bk(e,t,c,r,s,u,[]);h.options=l;const p=l.delay?nd(l.delay):0;h.currentTimeline.delayNextStep(p),h.currentTimeline.setStyles([o],null,h.errors,l),qo(this,i,h);const m=h.timelines.filter(g=>g.containsAnimation());if(m.length&&a.size){let g;for(let b=m.length-1;b>=0;b--){const y=m[b];if(y.element===t){g=y;break}}g&&!g.allowOnlyTimelineStyles()&&g.setStyles([a],null,h.errors,l)}return m.length?m.map(g=>g.buildKeyframes()):[vk(t,[],[],[],0,p,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){const i=t.subInstructions.get(t.element);if(i){const r=t.createSubContext(e.options),s=t.currentTimeline.currentTime,o=this._visitSubInstructions(i,r,r.options);s!=o&&t.transformIntoNewTimeline(o)}t.previousNode=e}visitAnimateRef(e,t){const i=t.createSubContext(e.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,i),this.visitReference(e.animation,i),t.transformIntoNewTimeline(i.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,i){for(const r of e){const s=r?.delay;if(s){const o="number"==typeof s?s:nd(Sb(s,r?.params??{},t.errors));i.delayNextStep(o)}}}_visitSubInstructions(e,t,i){let s=t.currentTimeline.currentTime;const o=null!=i.duration?nd(i.duration):null,a=null!=i.delay?nd(i.delay):null;return 0!==o&&e.forEach(l=>{const c=t.appendInstructionToTimeline(l,o,a);s=Math.max(s,c.duration+c.delay)}),s}visitReference(e,t){t.updateOptions(e.options,!0),qo(this,e.animation,t),t.previousNode=e}visitSequence(e,t){const i=t.subContextCount;let r=t;const s=e.options;if(s&&(s.params||s.delay)&&(r=t.createSubContext(s),r.transformIntoNewTimeline(),null!=s.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=zC);const o=nd(s.delay);r.delayNextStep(o)}e.steps.length&&(e.steps.forEach(o=>qo(this,o,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){const i=[];let r=t.currentTimeline.currentTime;const s=e.options&&e.options.delay?nd(e.options.delay):0;e.steps.forEach(o=>{const a=t.createSubContext(e.options);s&&a.delayNextStep(s),qo(this,o,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(o=>t.currentTimeline.mergeTimelineCollectedStyles(o)),t.transformIntoNewTimeline(r),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){const i=e.strValue;return kC(t.params?Sb(i,t.params,t.errors):i,t.errors)}return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){const i=t.currentAnimateTimings=this._visitTiming(e.timings,t),r=t.currentTimeline;i.delay&&(t.incrementTime(i.delay),r.snapshotCurrentStyles());const s=e.style;5==s.type?this.visitKeyframes(s,t):(t.incrementTime(i.duration),this.visitStyle(s,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){const i=t.currentTimeline,r=t.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const s=r&&r.easing||e.easing;e.isEmptyStep?i.applyEmptyStep(s):i.setStyles(e.styles,s,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){const i=t.currentAnimateTimings,r=t.currentTimeline.duration,s=i.duration,a=t.createSubContext().currentTimeline;a.easing=i.easing,e.styles.forEach(l=>{a.forwardTime((l.offset||0)*s),a.setStyles(l.styles,l.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(r+s),t.previousNode=e}visitQuery(e,t){const i=t.currentTimeline.currentTime,r=e.options||{},s=r.delay?nd(r.delay):0;s&&(6===t.previousNode.type||0==i&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=zC);let o=i;const a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!r.optional,t.errors);t.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{t.currentQueryIndex=u;const h=t.createSubContext(e.options,c);s&&h.delayNextStep(s),c===t.element&&(l=h.currentTimeline),qo(this,e.animation,h),h.currentTimeline.applyStylesToKeyframe(),o=Math.max(o,h.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(o),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){const i=t.parentContext,r=t.currentTimeline,s=e.timings,o=Math.abs(s.duration),a=o*(t.currentQueryTotal-1);let l=o*t.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const u=t.currentTimeline;l&&u.delayNextStep(l);const h=u.currentTime;qo(this,e.animation,t),t.previousNode=e,i.currentStaggerTime=r.currentTime-h+(r.startTime-i.currentTimeline.startTime)}}const zC={};class bk{constructor(e,t,i,r,s,o,a,l){this._driver=e,this.element=t,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=s,this.errors=o,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=zC,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new HC(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;const i=e;let r=this.options;null!=i.duration&&(r.duration=nd(i.duration)),null!=i.delay&&(r.delay=nd(i.delay));const s=i.params;if(s){let o=r.params;o||(o=this.options.params={}),Object.keys(s).forEach(a=>{(!t||!o.hasOwnProperty(a))&&(o[a]=Sb(s[a],o,this.errors))})}}_copyOptions(){const e={};if(this.options){const t=this.options.params;if(t){const i=e.params={};Object.keys(t).forEach(r=>{i[r]=t[r]})}}return e}createSubContext(e=null,t,i){const r=t||this.element,s=new bk(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(e),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(e){return this.previousNode=zC,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,i){const r={duration:t??e.duration,delay:this.currentTimeline.currentTime+(i??0)+e.delay,easing:""},s=new Hfe(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,r,e.stretchStartingKeyframe);return this.timelines.push(s),r}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,i,r,s,o){let a=[];if(r&&a.push(this.element),e.length>0){e=(e=e.replace(Bfe,"."+this._enterClassName)).replace(Vfe,"."+this._leaveClassName);let c=this._driver.query(this.element,e,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!s&&0==a.length&&o.push(function jhe(n){return new fe(3014,!1)}()),a}}class HC{constructor(e,t,i,r){this._driver=e,this.element=t,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){const t=1===this._keyframes.size&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new HC(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,i]of this._globalTimelineStyles)this._backFill.set(t,i||zc),this._currentKeyframe.set(t,zc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,i,r){t&&this._previousKeyframe.set("easing",t);const s=r&&r.params||{},o=function Gfe(n,e){const t=new Map;let i;return n.forEach(r=>{if("*"===r){i=i||e.keys();for(let s of i)t.set(s,zc)}else Mu(r,t)}),t}(e,this._globalTimelineStyles);for(let[a,l]of o){const c=Sb(l,s,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??zc),this._updateStyle(a,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,i)=>{const r=this._styleSummary.get(i);(!r||t.time>r.time)&&this._updateStyle(i,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();const e=new Set,t=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=Mu(a,new Map,this._backFill);c.forEach((u,h)=>{u===MI?e.add(h):u===zc&&t.add(h)}),i||c.set("offset",l/this.duration),r.push(c)});const s=e.size?OC(e.values()):[],o=t.size?OC(t.values()):[];if(i){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return vk(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class Hfe extends HC{constructor(e,t,i,r,s,o,a=!1){super(e,t,o.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=s,this._stretchStartingKeyframe=a,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&t){const s=[],o=i+t,a=t/o,l=Mu(e[0]);l.set("offset",0),s.push(l);const c=Mu(e[0]);c.set("offset",iG(a)),s.push(c);const u=e.length-1;for(let h=1;h<=u;h++){let p=Mu(e[h]);const m=p.get("offset");p.set("offset",iG((t+m*i)/o)),s.push(p)}i=o,t=0,r="",e=s}return vk(this.element,e,this.preStyleProps,this.postStyleProps,i,t,r,!0)}}function iG(n,e=3){const t=Math.pow(10,e-1);return Math.round(n*t)/t}class xk{}const Wfe=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class $fe extends xk{normalizePropertyName(e,t){return mk(e)}normalizeStyleValue(e,t,i,r){let s="";const o=i.toString().trim();if(Wfe.has(t)&&0!==i&&"0"!==i)if("number"==typeof i)s="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(function Lhe(n,e){return new fe(3005,!1)}())}return o+s}}function rG(n,e,t,i,r,s,o,a,l,c,u,h,p){return{type:0,element:n,triggerName:e,isRemovalTransition:r,fromState:t,fromStyles:s,toState:i,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:h,errors:p}}const wk={};class sG{constructor(e,t,i){this._triggerName=e,this.ast=t,this._stateStyles=i}match(e,t,i,r){return function jfe(n,e,t,i,r){return n.some(s=>s(e,t,i,r))}(this.ast.matchers,e,t,i,r)}buildStyles(e,t,i){let r=this._stateStyles.get("*");return void 0!==e&&(r=this._stateStyles.get(e?.toString())||r),r?r.buildStyles(t,i):new Map}build(e,t,i,r,s,o,a,l,c,u){const h=[],p=this.ast.options&&this.ast.options.params||wk,g=this.buildStyles(i,a&&a.params||wk,h),b=l&&l.params||wk,y=this.buildStyles(r,b,h),v=new Set,M=new Map,x=new Map,S="void"===r,P={params:Xfe(b,p),delay:this.ast.options?.delay},A=u?[]:yk(e,t,this.ast.animation,s,o,g,y,P,c,h);let R=0;if(A.forEach(E=>{R=Math.max(E.duration+E.delay,R)}),h.length)return rG(t,this._triggerName,i,r,S,g,y,[],[],M,x,R,h);A.forEach(E=>{const k=E.element,Z=Xo(M,k,new Set);E.preStyleProps.forEach(Me=>Z.add(Me));const ue=Xo(x,k,new Set);E.postStyleProps.forEach(Me=>ue.add(Me)),k!==t&&v.add(k)});const V=OC(v.values());return rG(t,this._triggerName,i,r,S,g,y,A,V,M,x,R)}}function Xfe(n,e){const t=wb(e);for(const i in n)n.hasOwnProperty(i)&&null!=n[i]&&(t[i]=n[i]);return t}class qfe{constructor(e,t,i){this.styles=e,this.defaultParams=t,this.normalizer=i}buildStyles(e,t){const i=new Map,r=wb(this.defaultParams);return Object.keys(e).forEach(s=>{const o=e[s];null!==o&&(r[s]=o)}),this.styles.styles.forEach(s=>{"string"!=typeof s&&s.forEach((o,a)=>{o&&(o=Sb(o,r,t));const l=this.normalizer.normalizePropertyName(a,t);o=this.normalizer.normalizeStyleValue(a,l,o,t),i.set(a,o)})}),i}}class Kfe{constructor(e,t,i){this.name=e,this.ast=t,this._normalizer=i,this.transitionFactories=[],this.states=new Map,t.states.forEach(r=>{this.states.set(r.name,new qfe(r.style,r.options&&r.options.params||{},i))}),oG(this.states,"true","1"),oG(this.states,"false","0"),t.transitions.forEach(r=>{this.transitionFactories.push(new sG(e,r,this.states))}),this.fallbackTransition=function Zfe(n,e,t){return new sG(n,{type:1,animation:{type:2,steps:[],options:null},matchers:[(o,a)=>!0],options:null,queryCount:0,depCount:0},e)}(e,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,i,r){return this.transitionFactories.find(o=>o.match(e,t,i,r))||null}matchStyles(e,t,i){return this.fallbackTransition.buildStyles(e,t,i)}}function oG(n,e,t){n.has(e)?n.has(t)||n.set(t,n.get(e)):n.has(t)&&n.set(e,n.get(t))}const Qfe=new VC;class Jfe{constructor(e,t,i){this.bodyNode=e,this._driver=t,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(e,t){const i=[],r=[],s=gk(this._driver,t,i,r);if(i.length)throw function Jhe(n){return new fe(3503,!1)}();this._animations.set(e,s)}_buildPlayer(e,t,i){const r=e.element,s=B5(0,this._normalizer,0,e.keyframes,t,i);return this._driver.animate(r,s,e.duration,e.delay,e.easing,[],!0)}create(e,t,i={}){const r=[],s=this._animations.get(e);let o;const a=new Map;if(s?(o=yk(this._driver,t,s,uk,IC,new Map,new Map,i,Qfe,r),o.forEach(u=>{const h=Xo(a,u.element,new Map);u.postStyleProps.forEach(p=>h.set(p,null))})):(r.push(function efe(){return new fe(3300,!1)}()),o=[]),r.length)throw function tfe(n){return new fe(3504,!1)}();a.forEach((u,h)=>{u.forEach((p,m)=>{u.set(m,this._driver.computeStyle(h,m,zc))})});const c=wu(o.map(u=>{const h=a.get(u.element);return this._buildPlayer(u,new Map,h)}));return this._playersById.set(e,c),c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){const t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);const i=this.players.indexOf(t);i>=0&&this.players.splice(i,1)}_getPlayer(e){const t=this._playersById.get(e);if(!t)throw function nfe(n){return new fe(3301,!1)}();return t}listen(e,t,i,r){const s=ak(t,"","","");return sk(this._getPlayer(e),i,s,r),()=>{}}command(e,t,i,r){if("register"==i)return void this.register(e,r[0]);if("create"==i)return void this.create(e,t,r[0]||{});const s=this._getPlayer(e);switch(i){case"play":s.play();break;case"pause":s.pause();break;case"reset":s.reset();break;case"restart":s.restart();break;case"finish":s.finish();break;case"init":s.init();break;case"setPosition":s.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(e)}}}const aG="ng-animate-queued",Mk="ng-animate-disabled",rpe=[],lG={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},spe={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Aa="__ng_removed";class Sk{get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;const i=e&&e.hasOwnProperty("value");if(this.value=function cpe(n){return n??null}(i?e.value:e),i){const s=wb(e);delete s.value,this.options=s}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){const t=e.params;if(t){const i=this.options.params;Object.keys(t).forEach(r=>{null==i[r]&&(i[r]=t[r])})}}}const Cb="void",Ck=new Sk(Cb);class ope{constructor(e,t,i){this.id=e,this.hostElement=t,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,Ta(t,this._hostClassName)}listen(e,t,i,r){if(!this._triggers.has(t))throw function ife(n,e){return new fe(3302,!1)}();if(null==i||0==i.length)throw function rfe(n){return new fe(3303,!1)}();if(!function dpe(n){return"start"==n||"done"==n}(i))throw function sfe(n,e){return new fe(3400,!1)}();const s=Xo(this._elementListeners,e,[]),o={name:t,phase:i,callback:r};s.push(o);const a=Xo(this._engine.statesByElement,e,new Map);return a.has(t)||(Ta(e,RC),Ta(e,RC+"-"+t),a.set(t,Ck)),()=>{this._engine.afterFlush(()=>{const l=s.indexOf(o);l>=0&&s.splice(l,1),this._triggers.has(t)||a.delete(t)})}}register(e,t){return!this._triggers.has(e)&&(this._triggers.set(e,t),!0)}_getTrigger(e){const t=this._triggers.get(e);if(!t)throw function ofe(n){return new fe(3401,!1)}();return t}trigger(e,t,i,r=!0){const s=this._getTrigger(t),o=new Ek(this.id,t,e);let a=this._engine.statesByElement.get(e);a||(Ta(e,RC),Ta(e,RC+"-"+t),this._engine.statesByElement.set(e,a=new Map));let l=a.get(t);const c=new Sk(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(t,c),l||(l=Ck),c.value!==Cb&&l.value===c.value){if(!function fpe(n,e){const t=Object.keys(n),i=Object.keys(e);if(t.length!=i.length)return!1;for(let r=0;r{pf(e,y),tc(e,v)})}return}const p=Xo(this._engine.playersByElement,e,[]);p.forEach(b=>{b.namespaceId==this.id&&b.triggerName==t&&b.queued&&b.destroy()});let m=s.matchTransition(l.value,c.value,e,c.params),g=!1;if(!m){if(!r)return;m=s.fallbackTransition,g=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:m,fromState:l,toState:c,player:o,isFallbackTransition:g}),g||(Ta(e,aG),o.onStart(()=>{Mg(e,aG)})),o.onDone(()=>{let b=this.players.indexOf(o);b>=0&&this.players.splice(b,1);const y=this._engine.playersByElement.get(e);if(y){let v=y.indexOf(o);v>=0&&y.splice(v,1)}}),this.players.push(o),p.push(o),o}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,i)=>{this._elementListeners.set(i,t.filter(r=>r.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);const t=this._engine.playersByElement.get(e);t&&(t.forEach(i=>i.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){const i=this._engine.driver.query(e,PC,!0);i.forEach(r=>{if(r[Aa])return;const s=this._engine.fetchNamespacesByElement(r);s.size?s.forEach(o=>o.triggerLeaveAnimation(r,t,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(e,t,i,r){const s=this._engine.statesByElement.get(e),o=new Map;if(s){const a=[];if(s.forEach((l,c)=>{if(o.set(c,l.value),this._triggers.has(c)){const u=this.trigger(e,c,Cb,r);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,o),i&&wu(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){const t=this._elementListeners.get(e),i=this._engine.statesByElement.get(e);if(t&&i){const r=new Set;t.forEach(s=>{const o=s.name;if(r.has(o))return;r.add(o);const l=this._triggers.get(o).fallbackTransition,c=i.get(o)||Ck,u=new Sk(Cb),h=new Ek(this.id,o,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:o,transition:l,fromState:c,toState:u,player:h,isFallbackTransition:!0})})}}removeNode(e,t){const i=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let r=!1;if(i.totalAnimations){const s=i.players.length?i.playersByQueriedElement.get(e):[];if(s&&s.length)r=!0;else{let o=e;for(;o=o.parentNode;)if(i.statesByElement.get(o)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(e),r)i.markElementAsRemoved(this.id,e,!1,t);else{const s=e[Aa];(!s||s===lG)&&(i.afterFlush(()=>this.clearElementCache(e)),i.destroyInnerAnimations(e),i._onRemovalComplete(e,t))}}insertNode(e,t){Ta(e,this._hostClassName)}drainQueuedTransitions(e){const t=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const s=i.element,o=this._elementListeners.get(s);o&&o.forEach(a=>{if(a.name==i.triggerName){const l=ak(s,i.triggerName,i.fromState.value,i.toState.value);l._data=e,sk(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):t.push(i)}),this._queue=[],t.sort((i,r)=>{const s=i.transition.ast.depCount,o=r.transition.ast.depCount;return 0==s||0==o?s-o:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}elementContainsData(e){let t=!1;return this._elementListeners.has(e)&&(t=!0),t=!!this._queue.find(i=>i.element===e)||t,t}}class ape{_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,i){this.bodyNode=e,this.driver=t,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,s)=>{}}get queuedPlayers(){const e=[];return this._namespaceList.forEach(t=>{t.players.forEach(i=>{i.queued&&e.push(i)})}),e}createNamespace(e,t){const i=new ope(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(i,t):(this.newHostElements.set(t,i),this.collectEnterElement(t)),this._namespaceLookup[e]=i}_balanceNamespaceList(e,t){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let o=!1,a=this.driver.getParentElement(t);for(;a;){const l=r.get(a);if(l){const c=i.indexOf(l);i.splice(c+1,0,e),o=!0;break}a=this.driver.getParentElement(a)}o||i.unshift(e)}else i.push(e);return r.set(t,e),e}register(e,t){let i=this._namespaceLookup[e];return i||(i=this.createNamespace(e,t)),i}registerTrigger(e,t,i){let r=this._namespaceLookup[e];r&&r.register(t,i)&&this.totalAnimations++}destroy(e,t){if(!e)return;const i=this._fetchNamespace(e);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[e];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(t))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){const t=new Set,i=this.statesByElement.get(e);if(i)for(let r of i.values())if(r.namespaceId){const s=this._fetchNamespace(r.namespaceId);s&&t.add(s)}return t}trigger(e,t,i,r){if(GC(t)){const s=this._fetchNamespace(e);if(s)return s.trigger(t,i,r),!0}return!1}insertNode(e,t,i,r){if(!GC(t))return;const s=t[Aa];if(s&&s.setForRemoval){s.setForRemoval=!1,s.setForMove=!0;const o=this.collectedLeaveElements.indexOf(t);o>=0&&this.collectedLeaveElements.splice(o,1)}if(e){const o=this._fetchNamespace(e);o&&o.insertNode(t,i)}r&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),Ta(e,Mk)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),Mg(e,Mk))}removeNode(e,t,i,r){if(GC(t)){const s=e?this._fetchNamespace(e):null;if(s?s.removeNode(t,r):this.markElementAsRemoved(e,t,!1,r),i){const o=this.namespacesByHostElement.get(t);o&&o.id!==e&&o.removeNode(t,r)}}else this._onRemovalComplete(t,r)}markElementAsRemoved(e,t,i,r,s){this.collectedLeaveElements.push(t),t[Aa]={namespaceId:e,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:s}}listen(e,t,i,r,s){return GC(t)?this._fetchNamespace(e).listen(t,i,r,s):()=>{}}_buildInstruction(e,t,i,r,s){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,i,r,e.fromState.options,e.toState.options,t,s)}destroyInnerAnimations(e){let t=this.driver.query(e,PC,!0);t.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(t=this.driver.query(e,hk,!0),t.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(e){const t=this.playersByElement.get(e);t&&t.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(e){const t=this.playersByQueriedElement.get(e);t&&t.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return wu(this.players).onDone(()=>e());e()})}processLeaveNode(e){const t=e[Aa];if(t&&t.setForRemoval){if(e[Aa]=lG,t.namespaceId){this.destroyInnerAnimations(e);const i=this._fetchNamespace(t.namespaceId);i&&i.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(Mk)&&this.markElementAsDisabled(e,!1),this.driver.query(e,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],t.length?wu(t).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(e){throw function afe(n){return new fe(3402,!1)}()}_flushAnimations(e,t){const i=new VC,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach($=>{u.add($);const ee=this.driver.query($,".ng-animate-queued",!0);for(let ie=0;ie{const ie=uk+b++;g.set(ee,ie),$.forEach(se=>Ta(se,ie))});const y=[],v=new Set,M=new Set;for(let $=0;$v.add(se)):M.add(ee))}const x=new Map,S=uG(p,Array.from(v));S.forEach(($,ee)=>{const ie=IC+b++;x.set(ee,ie),$.forEach(se=>Ta(se,ie))}),e.push(()=>{m.forEach(($,ee)=>{const ie=g.get(ee);$.forEach(se=>Mg(se,ie))}),S.forEach(($,ee)=>{const ie=x.get(ee);$.forEach(se=>Mg(se,ie))}),y.forEach($=>{this.processLeaveNode($)})});const P=[],A=[];for(let $=this._namespaceList.length-1;$>=0;$--)this._namespaceList[$].drainQueuedTransitions(t).forEach(ie=>{const se=ie.player,ve=ie.element;if(P.push(se),this.collectedEnterElements.length){const Be=ve[Aa];if(Be&&Be.setForMove){if(Be.previousTriggersValues&&Be.previousTriggersValues.has(ie.triggerName)){const mt=Be.previousTriggersValues.get(ie.triggerName),gt=this.statesByElement.get(ie.element);if(gt&>.has(ie.triggerName)){const tt=gt.get(ie.triggerName);tt.value=mt,gt.set(ie.triggerName,tt)}}return void se.destroy()}}const Se=!h||!this.driver.containsElement(h,ve),Oe=x.get(ve),le=g.get(ve),me=this._buildInstruction(ie,i,le,Oe,Se);if(me.errors&&me.errors.length)return void A.push(me);if(Se)return se.onStart(()=>pf(ve,me.fromStyles)),se.onDestroy(()=>tc(ve,me.toStyles)),void r.push(se);if(ie.isFallbackTransition)return se.onStart(()=>pf(ve,me.fromStyles)),se.onDestroy(()=>tc(ve,me.toStyles)),void r.push(se);const Ve=[];me.timelines.forEach(Be=>{Be.stretchStartingKeyframe=!0,this.disabledNodes.has(Be.element)||Ve.push(Be)}),me.timelines=Ve,i.append(ve,me.timelines),o.push({instruction:me,player:se,element:ve}),me.queriedElements.forEach(Be=>Xo(a,Be,[]).push(se)),me.preStyleProps.forEach((Be,mt)=>{if(Be.size){let gt=l.get(mt);gt||l.set(mt,gt=new Set),Be.forEach((tt,Rt)=>gt.add(Rt))}}),me.postStyleProps.forEach((Be,mt)=>{let gt=c.get(mt);gt||c.set(mt,gt=new Set),Be.forEach((tt,Rt)=>gt.add(Rt))})});if(A.length){const $=[];A.forEach(ee=>{$.push(function lfe(n,e){return new fe(3505,!1)}())}),P.forEach(ee=>ee.destroy()),this.reportError($)}const R=new Map,V=new Map;o.forEach($=>{const ee=$.element;i.has(ee)&&(V.set(ee,ee),this._beforeAnimationBuild($.player.namespaceId,$.instruction,R))}),r.forEach($=>{const ee=$.element;this._getPreviousPlayers(ee,!1,$.namespaceId,$.triggerName,null).forEach(se=>{Xo(R,ee,[]).push(se),se.destroy()})});const E=y.filter($=>fG($,l,c)),k=new Map;dG(k,this.driver,M,c,zc).forEach($=>{fG($,l,c)&&E.push($)});const ue=new Map;m.forEach(($,ee)=>{dG(ue,this.driver,new Set($),l,MI)}),E.forEach($=>{const ee=k.get($),ie=ue.get($);k.set($,new Map([...Array.from(ee?.entries()??[]),...Array.from(ie?.entries()??[])]))});const Me=[],W=[],ne={};o.forEach($=>{const{element:ee,player:ie,instruction:se}=$;if(i.has(ee)){if(u.has(ee))return ie.onDestroy(()=>tc(ee,se.toStyles)),ie.disabled=!0,ie.overrideTotalTime(se.totalTime),void r.push(ie);let ve=ne;if(V.size>1){let Oe=ee;const le=[];for(;Oe=Oe.parentNode;){const me=V.get(Oe);if(me){ve=me;break}le.push(Oe)}le.forEach(me=>V.set(me,ve))}const Se=this._buildAnimation(ie.namespaceId,se,R,s,ue,k);if(ie.setRealPlayer(Se),ve===ne)Me.push(ie);else{const Oe=this.playersByElement.get(ve);Oe&&Oe.length&&(ie.parentPlayer=wu(Oe)),r.push(ie)}}else pf(ee,se.fromStyles),ie.onDestroy(()=>tc(ee,se.toStyles)),W.push(ie),u.has(ee)&&r.push(ie)}),W.forEach($=>{const ee=s.get($.element);if(ee&&ee.length){const ie=wu(ee);$.setRealPlayer(ie)}}),r.forEach($=>{$.parentPlayer?$.syncPlayerEvents($.parentPlayer):$.destroy()});for(let $=0;$!Se.destroyed);ve.length?upe(this,ee,ve):this.processLeaveNode(ee)}return y.length=0,Me.forEach($=>{this.players.push($),$.onDone(()=>{$.destroy();const ee=this.players.indexOf($);this.players.splice(ee,1)}),$.play()}),Me}elementContainsData(e,t){let i=!1;const r=t[Aa];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(t)&&(i=!0),this.playersByQueriedElement.has(t)&&(i=!0),this.statesByElement.has(t)&&(i=!0),this._fetchNamespace(e).elementContainsData(t)||i}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,i,r,s){let o=[];if(t){const a=this.playersByQueriedElement.get(e);a&&(o=a)}else{const a=this.playersByElement.get(e);if(a){const l=!s||s==Cb;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||o.push(c)})}}return(i||r)&&(o=o.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),o}_beforeAnimationBuild(e,t,i){const s=t.element,o=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:t.triggerName;for(const l of t.timelines){const c=l.element,u=c!==s,h=Xo(i,c,[]);this._getPreviousPlayers(c,u,o,a,t.toState).forEach(m=>{const g=m.getRealPlayer();g.beforeDestroy&&g.beforeDestroy(),m.destroy(),h.push(m)})}pf(s,t.fromStyles)}_buildAnimation(e,t,i,r,s,o){const a=t.triggerName,l=t.element,c=[],u=new Set,h=new Set,p=t.timelines.map(g=>{const b=g.element;u.add(b);const y=b[Aa];if(y&&y.removedBeforeQueried)return new xy(g.duration,g.delay);const v=b!==l,M=function hpe(n){const e=[];return hG(n,e),e}((i.get(b)||rpe).map(R=>R.getRealPlayer())).filter(R=>!!R.element&&R.element===b),x=s.get(b),S=o.get(b),P=B5(0,this._normalizer,0,g.keyframes,x,S),A=this._buildPlayer(g,P,M);if(g.subTimeline&&r&&h.add(b),v){const R=new Ek(e,a,b);R.setRealPlayer(A),c.push(R)}return A});c.forEach(g=>{Xo(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>function lpe(n,e,t){let i=n.get(e);if(i){if(i.length){const r=i.indexOf(t);i.splice(r,1)}0==i.length&&n.delete(e)}return i}(this.playersByQueriedElement,g.element,g))}),u.forEach(g=>Ta(g,X5));const m=wu(p);return m.onDestroy(()=>{u.forEach(g=>Mg(g,X5)),tc(l,t.toStyles)}),h.forEach(g=>{Xo(r,g,[]).push(m)}),m}_buildPlayer(e,t,i){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,i):new xy(e.duration,e.delay)}}class Ek{constructor(e,t,i){this.namespaceId=e,this.triggerName=t,this.element=i,this._player=new xy,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,i)=>{t.forEach(r=>sk(e,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){const t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){Xo(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){const t=this._player;t.triggerCallback&&t.triggerCallback(e)}}function GC(n){return n&&1===n.nodeType}function cG(n,e){const t=n.style.display;return n.style.display=e??"none",t}function dG(n,e,t,i,r){const s=[];t.forEach(l=>s.push(cG(l)));const o=[];i.forEach((l,c)=>{const u=new Map;l.forEach(h=>{const p=e.computeStyle(c,h,r);u.set(h,p),(!p||0==p.length)&&(c[Aa]=spe,o.push(c))}),n.set(c,u)});let a=0;return t.forEach(l=>cG(l,s[a++])),o}function uG(n,e){const t=new Map;if(n.forEach(a=>t.set(a,[])),0==e.length)return t;const i=1,r=new Set(e),s=new Map;function o(a){if(!a)return i;let l=s.get(a);if(l)return l;const c=a.parentNode;return l=t.has(c)?c:r.has(c)?i:o(c),s.set(a,l),l}return e.forEach(a=>{const l=o(a);l!==i&&t.get(l).push(a)}),t}function Ta(n,e){n.classList?.add(e)}function Mg(n,e){n.classList?.remove(e)}function upe(n,e,t){wu(t).onDone(()=>n.processLeaveNode(e))}function hG(n,e){for(let t=0;tr.add(s)):e.set(n,i),t.delete(n),!0}class WC{constructor(e,t,i){this.bodyNode=e,this._driver=t,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new ape(e,t,i),this._timelineEngine=new Jfe(e,t,i),this._transitionEngine.onRemovalComplete=(r,s)=>this.onRemovalComplete(r,s)}registerTrigger(e,t,i,r,s){const o=e+"-"+r;let a=this._triggerCache[o];if(!a){const l=[],c=[],u=gk(this._driver,s,l,c);if(l.length)throw function Zhe(n,e){return new fe(3404,!1)}();a=function Yfe(n,e,t){return new Kfe(n,e,t)}(r,u,this._normalizer),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(t,r,a)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,i,r){this._transitionEngine.insertNode(e,t,i,r)}onRemove(e,t,i,r){this._transitionEngine.removeNode(e,t,r||!1,i)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,i,r){if("@"==i.charAt(0)){const[s,o]=U5(i);this._timelineEngine.command(s,t,o,r)}else this._transitionEngine.trigger(e,t,i,r)}listen(e,t,i,r,s){if("@"==i.charAt(0)){const[o,a]=U5(i);return this._timelineEngine.listen(o,t,a,s)}return this._transitionEngine.listen(e,t,i,r,s)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let mpe=(()=>{class n{constructor(t,i,r){this._element=t,this._startStyles=i,this._endStyles=r,this._state=0;let s=n.initialStylesByElement.get(t);s||n.initialStylesByElement.set(t,s=new Map),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&tc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(tc(this._element,this._initialStyles),this._endStyles&&(tc(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(pf(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(pf(this._element,this._endStyles),this._endStyles=null),tc(this._element,this._initialStyles),this._state=3)}}return n.initialStylesByElement=new WeakMap,n})();function Ak(n){let e=null;return n.forEach((t,i)=>{(function gpe(n){return"display"===n||"position"===n})(i)&&(e=e||new Map,e.set(i,t))}),e}class pG{constructor(e,t,i,r){this.element=e,this.keyframes=t,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(e){const t=[];return e.forEach(i=>{t.push(Object.fromEntries(i))}),t}_triggerWebAnimation(e,t,i){return e.animate(this._convertKeyframesToObject(t),i)}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&e.set(r,this._finished?i:J5(this.element,r))}),this.currentSnapshot=e}triggerCallback(e){const t="start"===e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}class _pe{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}matchesElement(e,t){return!1}containsElement(e,t){return G5(e,t)}getParentElement(e){return ck(e)}query(e,t,i){return W5(e,t,i)}computeStyle(e,t,i){return window.getComputedStyle(e)[t]}animate(e,t,i,r,s,o=[]){const l={duration:i,delay:r,fill:0==r?"both":"forwards"};s&&(l.easing=s);const c=new Map,u=o.filter(m=>m instanceof pG);(function xfe(n,e){return 0===n||0===e})(i,r)&&u.forEach(m=>{m.currentSnapshot.forEach((g,b)=>c.set(b,g))});let h=function _fe(n){return n.length?n[0]instanceof Map?n:n.map(e=>q5(e)):[]}(t).map(m=>Mu(m));h=function wfe(n,e,t){if(t.size&&e.length){let i=e[0],r=[];if(t.forEach((s,o)=>{i.has(o)||r.push(o),i.set(o,s)}),r.length)for(let s=1;so.set(a,J5(n,a)))}}return e}(e,h,c);const p=function ppe(n,e){let t=null,i=null;return Array.isArray(e)&&e.length?(t=Ak(e[0]),e.length>1&&(i=Ak(e[e.length-1]))):e instanceof Map&&(t=Ak(e)),t||i?new mpe(n,t,i):null}(e,h);return new pG(e,h,l,p)}}let vpe=(()=>{class n extends PU{constructor(t,i){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(i.body,{id:"0",encapsulation:Do.None,styles:[],data:{animation:[]}})}build(t){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(t)?OU(t):t;return mG(this._renderer,null,i,"register",[r]),new ype(i,this._renderer)}}return n.\u0275fac=function(t){return new(t||n)(Q(fh),Q(Ht))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();class ype extends qK{constructor(e,t){super(),this._id=e,this._renderer=t}create(e,t){return new bpe(this._id,e,t||{},this._renderer)}}class bpe{constructor(e,t,i,r){this.id=e,this.element=t,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(e,t){return this._renderer.listen(this.element,`@@${this.id}:${e}`,t)}_command(e,...t){return mG(this._renderer,this.element,this.id,e,t)}onDone(e){this._listen("done",e)}onStart(e){this._listen("start",e)}onDestroy(e){this._listen("destroy",e)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(e){this._command("setPosition",e)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function mG(n,e,t,i,r){return n.setProperty(e,`@@${t}:${i}`,r)}const gG="@.disabled";let xpe=(()=>{class n{constructor(t,i,r){this.delegate=t,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(s,o)=>{const a=o?.parentNode(s);a&&o.removeChild(a,s)}}createRenderer(t,i){const s=this.delegate.createRenderer(t,i);if(!(t&&i&&i.data&&i.data.animation)){let u=this._rendererCache.get(s);return u||(u=new _G("",s,this.engine,()=>this._rendererCache.delete(s)),this._rendererCache.set(s,u)),u}const o=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,t);const l=u=>{Array.isArray(u)?u.forEach(l):this.engine.registerTrigger(o,a,t,u.name,u)};return i.data.animation.forEach(l),new wpe(this,a,s,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,i,r){t>=0&&ti(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(s=>{const[o,a]=s;o(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return n.\u0275fac=function(t){return new(t||n)(Q(fh),Q(WC),Q(pt))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})();class _G{constructor(e,t,i,r){this.namespaceId=e,this.delegate=t,this.engine=i,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?s=>t.destroyNode(s):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,i,r=!0){this.delegate.insertBefore(e,t,i),this.engine.onInsert(this.namespaceId,t,e,r)}removeChild(e,t,i){this.engine.onRemove(this.namespaceId,t,this.delegate,i)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,i,r){this.delegate.setAttribute(e,t,i,r)}removeAttribute(e,t,i){this.delegate.removeAttribute(e,t,i)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,i,r){this.delegate.setStyle(e,t,i,r)}removeStyle(e,t,i){this.delegate.removeStyle(e,t,i)}setProperty(e,t,i){"@"==t.charAt(0)&&t==gG?this.disableAnimations(e,!!i):this.delegate.setProperty(e,t,i)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,i){return this.delegate.listen(e,t,i)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}}class wpe extends _G{constructor(e,t,i,r,s){super(t,i,r,s),this.factory=e,this.namespaceId=t}setProperty(e,t,i){"@"==t.charAt(0)?"."==t.charAt(1)&&t==gG?this.disableAnimations(e,i=void 0===i||!!i):this.engine.process(this.namespaceId,e,t.slice(1),i):this.delegate.setProperty(e,t,i)}listen(e,t,i){if("@"==t.charAt(0)){const r=function Mpe(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}(e);let s=t.slice(1),o="";return"@"!=s.charAt(0)&&([s,o]=function Spe(n){const e=n.indexOf(".");return[n.substring(0,e),n.slice(e+1)]}(s)),this.engine.listen(this.namespaceId,r,s,o,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(e,t,i)}}const vG=[{provide:PU,useClass:vpe},{provide:xk,useFactory:function Epe(){return new $fe}},{provide:WC,useClass:(()=>{class n extends WC{constructor(t,i,r,s){super(t.body,i,r)}ngOnDestroy(){this.flush()}}return n.\u0275fac=function(t){return new(t||n)(Q(Ht),Q(dk),Q(xk),Q(qp))},n.\u0275prov=ke({token:n,factory:n.\u0275fac}),n})()},{provide:fh,useFactory:function Ape(n,e,t){return new xpe(n,e,t)},deps:[Vw,WC,pt]}],Tk=[{provide:dk,useFactory:()=>new _pe},{provide:rs,useValue:"BrowserAnimations"},...vG],yG=[{provide:dk,useClass:$5},{provide:rs,useValue:"NoopAnimations"},...vG];let Tpe=(()=>{class n{static withConfig(t){return{ngModule:n,providers:t.disableAnimations?yG:Tk}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({providers:Tk,imports:[hN]}),n})();const bG=new ge("CdkAccordion");let Dpe=0,Ipe=(()=>{class n{get expanded(){return this._expanded}set expanded(t){t=Cn(t),this._expanded!==t&&(this._expanded=t,this.expandedChange.emit(t),t?(this.opened.emit(),this._expansionDispatcher.notify(this.id,this.accordion?this.accordion.id:this.id)):this.closed.emit(),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(t){this._disabled=Cn(t)}constructor(t,i,r){this.accordion=t,this._changeDetectorRef=i,this._expansionDispatcher=r,this._openCloseAllSubscription=un.EMPTY,this.closed=new it,this.opened=new it,this.destroyed=new it,this.expandedChange=new it,this.id="cdk-accordion-child-"+Dpe++,this._expanded=!1,this._disabled=!1,this._removeUniqueSelectionListener=()=>{},this._removeUniqueSelectionListener=r.listen((s,o)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===o&&this.id!==s&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(t=>{this.disabled||(this.expanded=t)})}}return n.\u0275fac=function(t){return new(t||n)(D(bG,12),D(ci),D(UV))},n.\u0275dir=Ae({type:n,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Hn([{provide:bG,useValue:void 0}])]}),n})(),Rpe=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({}),n})();const Ppe=["body"];function kpe(n,e){}const Ope=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],Lpe=["mat-expansion-panel-header","*","mat-action-row"];function Fpe(n,e){1&n&&Fe(0,"span",2),2&n&&z("@indicatorRotate",be()._getExpandedState())}const Npe=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],Bpe=["mat-panel-title","mat-panel-description","*"],xG=new ge("MAT_ACCORDION"),wG="225ms cubic-bezier(0.4,0.0,0.2,1)",MG={indicatorRotate:Gl("indicatorRotate",[_o("collapsed, void",Ci({transform:"rotate(0deg)"})),_o("expanded",Ci({transform:"rotate(180deg)"})),Ks("expanded <=> collapsed, void => collapsed",go(wG))]),bodyExpansion:Gl("bodyExpansion",[_o("collapsed, void",Ci({height:"0px",visibility:"hidden"})),_o("expanded",Ci({height:"*",visibility:"visible"})),Ks("expanded <=> collapsed, void => collapsed",go(wG))])},SG=new ge("MAT_EXPANSION_PANEL");let Upe=(()=>{class n{constructor(t,i){this._template=t,this._expansionPanel=i}}return n.\u0275fac=function(t){return new(t||n)(D(fo),D(SG,8))},n.\u0275dir=Ae({type:n,selectors:[["ng-template","matExpansionPanelContent",""]]}),n})(),Vpe=0;const CG=new ge("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let EG=(()=>{class n extends Ipe{get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(t){this._hideToggle=Cn(t)}get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(t){this._togglePosition=t}constructor(t,i,r,s,o,a,l){super(t,i,r),this._viewContainerRef=s,this._animationMode=a,this._hideToggle=!1,this.afterExpand=new it,this.afterCollapse=new it,this._inputChanges=new Ue,this._headerId="mat-expansion-panel-header-"+Vpe++,this._bodyAnimationDone=new Ue,this.accordion=t,this._document=o,this._bodyAnimationDone.pipe(qd((c,u)=>c.fromState===u.fromState&&c.toState===u.toState)).subscribe(c=>{"void"!==c.fromState&&("expanded"===c.toState?this.afterExpand.emit():"collapsed"===c.toState&&this.afterCollapse.emit())}),l&&(this.hideToggle=l.hideToggle)}_hasSpacing(){return!!this.accordion&&this.expanded&&"default"===this.accordion.displayMode}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(No(null),On(()=>this.expanded&&!this._portal),Li(1)).subscribe(()=>{this._portal=new cm(this._lazyContent._template,this._viewContainerRef)})}ngOnChanges(t){this._inputChanges.next(t)}ngOnDestroy(){super.ngOnDestroy(),this._bodyAnimationDone.complete(),this._inputChanges.complete()}_containsFocus(){if(this._body){const t=this._document.activeElement,i=this._body.nativeElement;return t===i||i.contains(t)}return!1}}return n.\u0275fac=function(t){return new(t||n)(D(xG,12),D(ci),D(UV),D(is),D(Ht),D(rs,8),D(CG,8))},n.\u0275cmp=ht({type:n,selectors:[["mat-expansion-panel"]],contentQueries:function(t,i,r){if(1&t&&Xi(r,Upe,5),2&t){let s;Lt(s=Ft())&&(i._lazyContent=s.first)}},viewQuery:function(t,i){if(1&t&&oi(Ppe,5),2&t){let r;Lt(r=Ft())&&(i._body=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(t,i){2&t&&Pn("mat-expanded",i.expanded)("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-expansion-panel-spacing",i._hasSpacing())},inputs:{disabled:"disabled",expanded:"expanded",hideToggle:"hideToggle",togglePosition:"togglePosition"},outputs:{opened:"opened",closed:"closed",expandedChange:"expandedChange",afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[Hn([{provide:xG,useValue:void 0},{provide:SG,useExisting:n}]),ft,zi],ngContentSelectors:Lpe,decls:7,vars:4,consts:[["role","region",1,"mat-expansion-panel-content",3,"id"],["body",""],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(t,i){1&t&&(Cr(Ope),Kt(0),K(1,"div",0,1),ct("@bodyExpansion.done",function(s){return i._bodyAnimationDone.next(s)}),K(3,"div",2),Kt(4,1),_e(5,kpe,0,0,"ng-template",3),J(),Kt(6,2),J()),2&t&&(j(1),z("@bodyExpansion",i._getExpandedState())("id",i.id),Vt("aria-labelledby",i._headerId),j(4),z("cdkPortalOutlet",i._portal))},dependencies:[dm],styles:['.mat-expansion-panel{box-sizing:content-box;display:block;margin:0;border-radius:4px;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:4px;border-top-left-radius:4px}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible}.mat-expansion-panel-content[style*="visibility: hidden"] *{visibility:hidden !important}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2,data:{animation:[MG.bodyExpansion]},changeDetection:0}),n})();class zpe{}const Hpe=xU(zpe);let Gpe=(()=>{class n extends Hpe{constructor(t,i,r,s,o,a,l){super(),this.panel=t,this._element=i,this._focusMonitor=r,this._changeDetectorRef=s,this._animationMode=a,this._parentChangeSubscription=un.EMPTY;const c=t.accordion?t.accordion._stateChanges.pipe(On(u=>!(!u.hideToggle&&!u.togglePosition))):Is;this.tabIndex=parseInt(l||"")||0,this._parentChangeSubscription=cs(t.opened,t.closed,c,t._inputChanges.pipe(On(u=>!!(u.hideToggle||u.disabled||u.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),t.closed.pipe(On(()=>t._containsFocus())).subscribe(()=>r.focusVia(i,"program")),o&&(this.expandedHeight=o.expandedHeight,this.collapsedHeight=o.collapsedHeight)}get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){const t=this._isExpanded();return t&&this.expandedHeight?this.expandedHeight:!t&&this.collapsedHeight?this.collapsedHeight:null}_keydown(t){switch(t.keyCode){case 32:case 13:nl(t)||(t.preventDefault(),this._toggle());break;default:return void(this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(t))}}focus(t,i){t?this._focusMonitor.focusVia(this._element,t,i):this._element.nativeElement.focus(i)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(t=>{t&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}}return n.\u0275fac=function(t){return new(t||n)(D(EG,1),D(yt),D(Yd),D(ci),D(CG,8),D(rs,8),Ua("tabindex"))},n.\u0275cmp=ht({type:n,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:15,hostBindings:function(t,i){1&t&&ct("click",function(){return i._toggle()})("keydown",function(s){return i._keydown(s)}),2&t&&(Vt("id",i.panel._headerId)("tabindex",i.tabIndex)("aria-controls",i._getPanelId())("aria-expanded",i._isExpanded())("aria-disabled",i.panel.disabled),Pc("height",i._getHeaderHeight()),Pn("mat-expanded",i._isExpanded())("mat-expansion-toggle-indicator-after","after"===i._getTogglePosition())("mat-expansion-toggle-indicator-before","before"===i._getTogglePosition())("_mat-animation-noopable","NoopAnimations"===i._animationMode))},inputs:{tabIndex:"tabIndex",expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight"},features:[ft],ngContentSelectors:Bpe,decls:5,vars:3,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(t,i){1&t&&(Cr(Npe),K(0,"span",0),Kt(1),Kt(2,1),Kt(3,2),J(),_e(4,Fpe,1,1,"span",1)),2&t&&(Pn("mat-content-hide-toggle",!i._showToggle()),j(4),z("ngIf",i._showToggle()))},dependencies:[gi],styles:['.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-content.mat-content-hide-toggle{margin-right:8px}[dir=rtl] .mat-content.mat-content-hide-toggle{margin-right:0;margin-left:8px}.mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-left:24px;margin-right:0}[dir=rtl] .mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-right:24px;margin-left:0}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;flex-basis:0;margin-right:16px;align-items:center}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header-description{flex-grow:2}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle}.cdk-high-contrast-active .mat-expansion-panel-content{border-top:1px solid;border-top-left-radius:0;border-top-right-radius:0}'],encapsulation:2,data:{animation:[MG.indicatorRotate]},changeDetection:0}),n})(),Wpe=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),n})(),$pe=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ae({type:n,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),n})(),jpe=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[va,qn,Rpe,um]}),n})();function Xpe(n,e){if(1&n&&(K(0,"mat-option",19),Je(1),J()),2&n){const t=e.$implicit;z("value",t),j(1),nr(" ",t," ")}}function qpe(n,e){if(1&n){const t=Wi();K(0,"mat-form-field",16)(1,"mat-select",17),ct("selectionChange",function(r){return Dn(t),In(be(2)._changePageSize(r.value))}),_e(2,Xpe,2,2,"mat-option",18),J()()}if(2&n){const t=be(2);z("appearance",t._formFieldAppearance)("color",t.color),j(1),z("value",t.pageSize)("disabled",t.disabled)("aria-labelledby",t._pageSizeLabelId)("panelClass",t.selectConfig.panelClass||"")("disableOptionCentering",t.selectConfig.disableOptionCentering),j(1),z("ngForOf",t._displayedPageSizeOptions)}}function Ype(n,e){if(1&n&&(K(0,"div",20),Je(1),J()),2&n){const t=be(2);j(1),$i(t.pageSize)}}function Kpe(n,e){if(1&n&&(K(0,"div",12)(1,"div",13),Je(2),J(),_e(3,qpe,3,8,"mat-form-field",14),_e(4,Ype,2,1,"div",15),J()),2&n){const t=be();j(1),r1("id",t._pageSizeLabelId),j(1),nr(" ",t._intl.itemsPerPageLabel," "),j(1),z("ngIf",t._displayedPageSizeOptions.length>1),j(1),z("ngIf",t._displayedPageSizeOptions.length<=1)}}function Zpe(n,e){if(1&n){const t=Wi();K(0,"button",21),ct("click",function(){return Dn(t),In(be().firstPage())}),Lr(),K(1,"svg",7),Fe(2,"path",22),J()()}if(2&n){const t=be();z("matTooltip",t._intl.firstPageLabel)("matTooltipDisabled",t._previousButtonsDisabled())("matTooltipPosition","above")("disabled",t._previousButtonsDisabled()),Vt("aria-label",t._intl.firstPageLabel)}}function Qpe(n,e){if(1&n){const t=Wi();Lr(),es(),K(0,"button",23),ct("click",function(){return Dn(t),In(be().lastPage())}),Lr(),K(1,"svg",7),Fe(2,"path",24),J()()}if(2&n){const t=be();z("matTooltip",t._intl.lastPageLabel)("matTooltipDisabled",t._nextButtonsDisabled())("matTooltipPosition","above")("disabled",t._nextButtonsDisabled()),Vt("aria-label",t._intl.lastPageLabel)}}let jC=(()=>{class n{constructor(){this.changes=new Ue,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(t,i,r)=>{if(0==r||0==i)return`0 of ${r}`;const s=t*i;return`${s+1} \u2013 ${s<(r=Math.max(r,0))?Math.min(s+i,r):s+i} of ${r}`}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const eme={provide:jC,deps:[[new Po,new Il,jC]],useFactory:function Jpe(n){return n||new jC}},nme=new ge("MAT_PAGINATOR_DEFAULT_OPTIONS"),ime=TM(FK(class{}));let rme=(()=>{class n extends ime{get pageIndex(){return this._pageIndex}set pageIndex(t){this._pageIndex=Math.max(Ys(t),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(t){this._length=Ys(t),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(t){this._pageSize=Math.max(Ys(t),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(t){this._pageSizeOptions=(t||[]).map(i=>Ys(i)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(t){this._hidePageSize=Cn(t)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(t){this._showFirstLastButtons=Cn(t)}constructor(t,i,r){if(super(),this._intl=t,this._changeDetectorRef=i,this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this._hidePageSize=!1,this._showFirstLastButtons=!1,this.selectConfig={},this.page=new it,this._intlChanges=t.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),r){const{pageSize:s,pageSizeOptions:o,hidePageSize:a,showFirstLastButtons:l}=r;null!=s&&(this._pageSize=s),null!=o&&(this._pageSizeOptions=o),null!=a&&(this._hidePageSize=a),null!=l&&(this._showFirstLastButtons=l)}}ngOnInit(){this._initialized=!0,this._updateDisplayedPageSizeOptions(),this._markInitialized()}ngOnDestroy(){this._intlChanges.unsubscribe()}nextPage(){if(!this.hasNextPage())return;const t=this.pageIndex;this.pageIndex=this.pageIndex+1,this._emitPageEvent(t)}previousPage(){if(!this.hasPreviousPage())return;const t=this.pageIndex;this.pageIndex=this.pageIndex-1,this._emitPageEvent(t)}firstPage(){if(!this.hasPreviousPage())return;const t=this.pageIndex;this.pageIndex=0,this._emitPageEvent(t)}lastPage(){if(!this.hasNextPage())return;const t=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(t)}hasPreviousPage(){return this.pageIndex>=1&&0!=this.pageSize}hasNextPage(){const t=this.getNumberOfPages()-1;return this.pageIndext-i),this._changeDetectorRef.markForCheck())}_emitPageEvent(t){this.page.emit({previousPageIndex:t,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}}return n.\u0275fac=function(t){Ya()},n.\u0275dir=Ae({type:n,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[ft]}),n})(),sme=0,ome=(()=>{class n extends rme{constructor(t,i,r){super(t,i,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+sme++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return n.\u0275fac=function(t){return new(t||n)(D(jC),D(ci),D(nme,8))},n.\u0275cmp=ht({type:n,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[ft],decls:14,vars:14,consts:[[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],["class","mat-mdc-paginator-page-size",4,"ngIf"],[1,"mat-mdc-paginator-range-actions"],["aria-live","polite",1,"mat-mdc-paginator-range-label"],["mat-icon-button","","type","button","class","mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-previous",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["viewBox","0 0 24 24","focusable","false",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-next",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button","class","mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-page-size-label",3,"id"],["class","mat-mdc-paginator-page-size-select",3,"appearance","color",4,"ngIf"],["class","mat-mdc-paginator-page-size-value",4,"ngIf"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],["hideSingleSelectionIndicator","",3,"value","disabled","aria-labelledby","panelClass","disableOptionCentering","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"mat-mdc-paginator-page-size-value"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(t,i){1&t&&(K(0,"div",0)(1,"div",1),_e(2,Kpe,5,4,"div",2),K(3,"div",3)(4,"div",4),Je(5),J(),_e(6,Zpe,3,5,"button",5),K(7,"button",6),ct("click",function(){return i.previousPage()}),Lr(),K(8,"svg",7),Fe(9,"path",8),J()(),es(),K(10,"button",9),ct("click",function(){return i.nextPage()}),Lr(),K(11,"svg",7),Fe(12,"path",10),J()(),_e(13,Qpe,3,5,"button",11),J()()()),2&t&&(j(2),z("ngIf",!i.hidePageSize),j(3),nr(" ",i._intl.getRangeLabel(i.pageIndex,i.pageSize,i.length)," "),j(1),z("ngIf",i.showFirstLastButtons),j(1),z("matTooltip",i._intl.previousPageLabel)("matTooltipDisabled",i._previousButtonsDisabled())("matTooltipPosition","above")("disabled",i._previousButtonsDisabled()),Vt("aria-label",i._intl.previousPageLabel),j(3),z("matTooltip",i._intl.nextPageLabel)("matTooltipDisabled",i._nextButtonsDisabled())("matTooltipPosition","above")("disabled",i._nextButtonsDisabled()),Vt("aria-label",i._intl.nextPageLabel),j(3),z("ngIf",i.showFirstLastButtons))},dependencies:[Fo,gi,EI,nu,Oy,vm,_s],styles:[".mat-mdc-paginator{display:block}.mat-mdc-paginator .mat-mdc-form-field-subscript-wrapper{display:none}.mat-mdc-paginator .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap-reverse;width:100%}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px}[dir=rtl] .mat-mdc-paginator-icon{transform:rotate(180deg)}.cdk-high-contrast-active .mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon,.cdk-high-contrast-active .mat-mdc-paginator-icon{fill:currentColor;fill:CanvasText}.cdk-high-contrast-active .mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0}),n})(),ame=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({providers:[eme],imports:[va,AI,HV,a3]}),n})();const lme=["*"],fme=new ge("MAT_CARD_CONFIG");let AG=(()=>{class n{constructor(t){this.appearance=t?.appearance||"raised"}}return n.\u0275fac=function(t){return new(t||n)(D(fme,8))},n.\u0275cmp=ht({type:n,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(t,i){2&t&&Pn("mat-mdc-card-outlined","outlined"===i.appearance)("mdc-card--outlined","outlined"===i.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:lme,decls:1,vars:0,template:function(t,i){1&t&&(Cr(),Kt(0))},styles:['.mdc-card{display:flex;flex-direction:column;box-sizing:border-box}.mdc-card::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none;pointer-events:none}@media screen and (forced-colors: active){.mdc-card::after{border-color:CanvasText}}.mdc-card--outlined::after{border:none}.mdc-card__content{border-radius:inherit;height:100%}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mdc-card__media--square::before{margin-top:100%}.mdc-card__media--16-9::before{margin-top:56.25%}.mdc-card__media-content{position:absolute;top:0;right:0;bottom:0;left:0;box-sizing:border-box}.mdc-card__primary-action{display:flex;flex-direction:column;box-sizing:border-box;position:relative;outline:none;color:inherit;text-decoration:none;cursor:pointer;overflow:hidden}.mdc-card__primary-action:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__primary-action:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mdc-card__actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mdc-card__actions--full-bleed{padding:0}.mdc-card__action-buttons,.mdc-card__action-icons{display:flex;flex-direction:row;align-items:center;box-sizing:border-box}.mdc-card__action-icons{flex-grow:1;justify-content:flex-end}.mdc-card__action-buttons+.mdc-card__action-icons{margin-left:16px;margin-right:0}[dir=rtl] .mdc-card__action-buttons+.mdc-card__action-icons,.mdc-card__action-buttons+.mdc-card__action-icons[dir=rtl]{margin-left:0;margin-right:16px}.mdc-card__action{display:inline-flex;flex-direction:row;align-items:center;box-sizing:border-box;justify-content:center;cursor:pointer;user-select:none}.mdc-card__action:focus{outline:none}.mdc-card__action--button{margin-left:0;margin-right:8px;padding:0 8px}[dir=rtl] .mdc-card__action--button,.mdc-card__action--button[dir=rtl]{margin-left:8px;margin-right:0}.mdc-card__action--button:last-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-card__action--button:last-child,.mdc-card__action--button:last-child[dir=rtl]{margin-left:0;margin-right:0}.mdc-card__actions--full-bleed .mdc-card__action--button{justify-content:space-between;width:100%;height:auto;max-height:none;margin:0;padding:8px 16px;text-align:left}[dir=rtl] .mdc-card__actions--full-bleed .mdc-card__action--button,.mdc-card__actions--full-bleed .mdc-card__action--button[dir=rtl]{text-align:right}.mdc-card__action--icon{margin:-6px 0;padding:12px}.mat-mdc-card{position:relative;border-radius:var(--mdc-elevated-card-container-shape, var(--mdc-shape-medium, 4px));background-color:var(--mdc-elevated-card-container-color, transparent);border-width:0;border-style:solid;border-color:var(--mdc-elevated-card-container-color, transparent)}.mat-mdc-card .mdc-card::after{border-radius:var(--mdc-elevated-card-container-shape, var(--mdc-shape-medium, 4px))}.mat-mdc-card-outlined{border-width:var(--mdc-outlined-card-outline-width, 1px);border-style:solid;border-color:var(--mdc-outlined-card-outline-color, transparent)}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end}'],encapsulation:2,changeDetection:0}),n})(),Ame=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n}),n.\u0275inj=Yt({imports:[qn,va,qn]}),n})(),Tme=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Jt({type:n,bootstrap:[Dhe]}),n.\u0275inj=Yt({providers:[Hc,BV],imports:[hN,Oq,Tpe,LJ,BZ,KM,Mee,jpe,JU,n3,a3,AI,RQ,ame,one,Ame,HV,aZ,hue,ohe,FJ,bI]}),n})();ku(Gc,[Fo,gi,_s,xb,DC],[Vl]),ku(oR,[Bv,Fo,gi,Vv,eu,tu,nu,EG,Gpe,$pe,Wpe,_s,ome,Oy,vm,xb],[]),ku(ZM,[Fo,gi,JM,QM,AG,xb],[]),ku(R5,[Fo,gi,xa,_s,Oy,vm,xb,DC],[Vl]),q9().bootstrapModule(Tme).catch(n=>console.error(n))},489:function(wo,Es,qr){var Qt;wo=qr.nmd(wo),function(){var B,Yr=200,Fn="Expected a function",Ia="__lodash_hash_undefined__",di="__lodash_placeholder__",ui=1,ls=2,Ts=4,Ds=1,Mo=2,Tn=1,ar=2,ic=4,Ko=8,ul=16,Zo=32,hl=64,Ra=128,Qo=256,rd=512,KC=800,Cg=16,Sn=1/0,ka=9007199254740991,QC=17976931348623157e292,vf=NaN,Jo=4294967295,Ue=Jo-1,Tb=Jo>>>1,Db=[["ary",Ra],["bind",Tn],["bindKey",ar],["curry",Ko],["curryRight",ul],["flip",rd],["partial",Zo],["partialRight",hl],["rearg",Qo]],Gn="[object Arguments]",Un="[object Array]",JC="[object AsyncFunction]",Ye="[object Boolean]",rc="[object Date]",eE="[object DOMException]",sd="[object Error]",yf="[object Function]",Ib="[object GeneratorFunction]",So="[object Map]",bf="[object Number]",kk="[object Null]",fl="[object Object]",tE="[object Promise]",nE="[object Proxy]",od="[object RegExp]",Co="[object Set]",sc="[object String]",xf="[object Symbol]",Eg="[object Undefined]",ad="[object WeakMap]",Su="[object ArrayBuffer]",ld="[object DataView]",ea="[object Float32Array]",wf="[object Float64Array]",Ag="[object Int8Array]",Mf="[object Int16Array]",Tg="[object Int32Array]",Dg="[object Uint8Array]",Ig="[object Uint8ClampedArray]",Rg="[object Uint16Array]",Pg="[object Uint32Array]",rE=/\b__p \+= '';/g,sE=/\b(__p \+=) '' \+/g,oE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Rb=/&(?:amp|lt|gt|quot|#39);/g,Pb=/[&<>"']/g,Ok=RegExp(Rb.source),kg=RegExp(Pb.source),kb=/<%-([\s\S]+?)%>/g,Ob=/<%([\s\S]+?)%>/g,Og=/<%=([\s\S]+?)%>/g,Lb=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,aE=/^\w*$/,Fb=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Sf=/[\\^$.*+?()[\]{}|]/g,Nb=RegExp(Sf.source),Cf=/^\s+/,lr=/\s/,lE=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,cE=/\{\n\/\* \[wrapped with (.+)\] \*/,dE=/,? & /,uE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Bb=/[()=,{}\[\]\/\s]/,hE=/\\(\\)?/g,fE=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ta=/\w*$/,pE=/^[-+]0x[0-9a-f]+$/i,er=/^0b[01]+$/i,cd=/^\[object .+?Constructor\]$/,Is=/^0o[0-7]+$/i,Lk=/^(?:0|[1-9]\d*)$/,mE=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Cu=/($^)/,Lg=/['\n\r\u2028\u2029\\]/g,Eu="\\ud800-\\udfff",Fg="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Vb="\\u2700-\\u27bf",zb="a-z\\xdf-\\xf6\\xf8-\\xff",Gb="A-Z\\xc0-\\xd6\\xd8-\\xde",Ri="\\ufe0e\\ufe0f",cs="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ng="["+Eu+"]",Zn="["+cs+"]",dd="["+Fg+"]",ri="\\d+",Bg="["+Vb+"]",Wb="["+zb+"]",Qn="[^"+Eu+cs+ri+Vb+zb+Gb+"]",Mt="\\ud83c[\\udffb-\\udfff]",Ef="[^"+Eu+"]",$b="(?:\\ud83c[\\udde6-\\uddff]){2}",ud="[\\ud800-\\udbff][\\udc00-\\udfff]",fe="["+Gb+"]",Wt="(?:"+Wb+"|"+Qn+")",jn="(?:"+fe+"|"+Qn+")",jb="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",bE="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Xb="(?:"+dd+"|"+Mt+")?",Iu="["+Ri+"]?",wE=Iu+Xb+"(?:\\u200d(?:"+[Ef,$b,ud].join("|")+")"+Iu+Xb+")*",pl="(?:"+[Bg,$b,ud].join("|")+")"+wE,Nk="(?:"+[Ef+dd+"?",dd,$b,ud,Ng].join("|")+")",Bk=RegExp("['\u2019]","g"),Uk=RegExp(dd,"g"),qb=RegExp(Mt+"(?="+Mt+")|"+Nk+wE,"g"),ME=RegExp([fe+"?"+Wb+"+"+jb+"(?="+[Zn,fe,"$"].join("|")+")",jn+"+"+bE+"(?="+[Zn,fe+Wt,"$"].join("|")+")",fe+"?"+Wt+"+"+jb,fe+"+"+bE,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ri,pl].join("|"),"g"),Vk=RegExp("[\\u200d"+Eu+Fg+Ri+"]"),SE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zk=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],io=-1,bt={};bt[ea]=bt[wf]=bt[Ag]=bt[Mf]=bt[Tg]=bt[Dg]=bt[Ig]=bt[Rg]=bt[Pg]=!0,bt[Gn]=bt[Un]=bt[Su]=bt[Ye]=bt[ld]=bt[rc]=bt[sd]=bt[yf]=bt[So]=bt[bf]=bt[fl]=bt[od]=bt[Co]=bt[sc]=bt[ad]=!1;var li={};li[Gn]=li[Un]=li[Su]=li[ld]=li[Ye]=li[rc]=li[ea]=li[wf]=li[Ag]=li[Mf]=li[Tg]=li[So]=li[bf]=li[fl]=li[od]=li[Co]=li[sc]=li[xf]=li[Dg]=li[Ig]=li[Rg]=li[Pg]=!0,li[sd]=li[yf]=li[ad]=!1;var Wk={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Yt=parseFloat,Af=parseInt,Yb="object"==typeof global&&global&&global.Object===Object&&global,Kb="object"==typeof self&&self&&self.Object===Object&&self,vr=Yb||Kb||Function("return this")(),Vg=Es&&!Es.nodeType&&Es,ml=Vg&&wo&&!wo.nodeType&&wo,Tf=ml&&ml.exports===Vg,Df=Tf&&Yb.process,ro=function(){try{return ml&&ml.require&&ml.require("util").types||Df&&Df.binding&&Df.binding("util")}catch{}}(),At=ro&&ro.isArrayBuffer,If=ro&&ro.isDate,Zb=ro&&ro.isMap,Ps=ro&&ro.isRegExp,zg=ro&&ro.isSet,CE=ro&&ro.isTypedArray;function bn(q,oe,ae){switch(ae.length){case 0:return q.call(oe);case 1:return q.call(oe,ae[0]);case 2:return q.call(oe,ae[0],ae[1]);case 3:return q.call(oe,ae[0],ae[1],ae[2])}return q.apply(oe,ae)}function $k(q,oe,ae,Ke){for(var Ne=-1,zn=null==q?0:q.length;++Ne-1}function Hg(q,oe,ae){for(var Ke=-1,Ne=null==q?0:q.length;++Ke-1;);return ae}function t0(q,oe){for(var ae=q.length;ae--&&vl(oe,q[ae],0)>-1;);return ae}var ku=Ao({\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"Ae",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u010e:"D",\u0110:"D",\u010f:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011a:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011b:"e",\u011c:"G",\u011e:"G",\u0120:"G",\u0122:"G",\u011d:"g",\u011f:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012a:"I",\u012c:"I",\u012e:"I",\u0130:"I",\u0129:"i",\u012b:"i",\u012d:"i",\u012f:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013b:"L",\u013d:"L",\u013f:"L",\u0141:"L",\u013a:"l",\u013c:"l",\u013e:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014a:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014b:"n",\u014c:"O",\u014e:"O",\u0150:"O",\u014d:"o",\u014f:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015a:"S",\u015c:"S",\u015e:"S",\u0160:"S",\u015b:"s",\u015d:"s",\u015f:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016a:"U",\u016c:"U",\u016e:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016b:"u",\u016d:"u",\u016f:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017b:"Z",\u017d:"Z",\u017a:"z",\u017c:"z",\u017e:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017f:"s"}),AE=Ao({"&":"&","<":"<",">":">",'"':""","'":"'"});function TE(q){return"\\"+Wk[q]}function pd(q){return Vk.test(q)}function Pr(q){var oe=-1,ae=Array(q.size);return q.forEach(function(Ke,Ne){ae[++oe]=[Ne,Ke]}),ae}function Wn(q,oe){return function(ae){return q(oe(ae))}}function wi(q,oe){for(var ae=-1,Ke=q.length,Ne=0,zn=[];++ae",""":'"',"'":"'"}),tr=function q(oe){var d,ae=(oe=null==oe?vr:tr.defaults(vr.Object(),oe,tr.pick(vr,zk))).Array,Ke=oe.Date,Ne=oe.Error,zn=oe.Function,Mi=oe.Math,Jn=oe.Object,yl=oe.RegExp,kr=oe.String,Or=oe.TypeError,Oa=ae.prototype,sa=Jn.prototype,Ou=oe["__core-js_shared__"],ei=zn.prototype.toString,ti=sa.hasOwnProperty,Wg=0,$g=(d=/[^.]+$/.exec(Ou&&Ou.keys&&Ou.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"",dc=sa.toString,Lf=ei.call(Jn),gd=vr._,Zr=yl("^"+ei.call(ti).replace(Sf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),jg=Tf?oe.Buffer:B,Vi=oe.Symbol,us=oe.Uint8Array,Ff=jg?jg.allocUnsafe:B,bl=Wn(Jn.getPrototypeOf,Jn),Lu=Jn.create,so=sa.propertyIsEnumerable,Nf=Oa.splice,DE=Vi?Vi.isConcatSpreadable:B,Fu=Vi?Vi.iterator:B,uc=Vi?Vi.toStringTag:B,Xg=function(){try{var d=Mc(Jn,"defineProperty");return d({},"",{}),d}catch{}}(),Xk=oe.clearTimeout!==vr.clearTimeout&&oe.clearTimeout,qk=Ke&&Ke.now!==vr.Date.now&&Ke.now,Yk=oe.setTimeout!==vr.setTimeout&&oe.setTimeout,qg=Mi.ceil,Yg=Mi.floor,s0=Jn.getOwnPropertySymbols,Kk=jg?jg.isBuffer:B,IE=oe.isFinite,Zk=Oa.join,Qk=Wn(Jn.keys,Jn),cr=Mi.max,br=Mi.min,o0=Ke.now,Jk=oe.parseInt,RE=Mi.random,eO=Oa.reverse,La=Mc(oe,"DataView"),Nu=Mc(oe,"Map"),zi=Mc(oe,"Promise"),hc=Mc(oe,"Set"),Bu=Mc(oe,"WeakMap"),Uu=Mc(Jn,"create"),Vu=Bu&&new Bu,fc={},PE=Gi(La),Kg=Gi(Nu),kE=Gi(zi),oo=Gi(hc),a0=Gi(Bu),zu=Vi?Vi.prototype:B,Pi=zu?zu.valueOf:B,l0=zu?zu.toString:B;function T(d){if(ni(d)&&!en(d)&&!(d instanceof nn)){if(d instanceof Ls)return d;if(ti.call(d,"__wrapped__"))return T_(d)}return new Ls(d)}var dr=function(){function d(){}return function(f){if(!fi(f))return{};if(Lu)return Lu(f);d.prototype=f;var _=new d;return d.prototype=B,_}}();function Bf(){}function Ls(d,f){this.__wrapped__=d,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=B}function nn(d){this.__wrapped__=d,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Jo,this.__views__=[]}function pc(d){var f=-1,_=null==d?0:d.length;for(this.clear();++f<_;){var w=d[f];this.set(w[0],w[1])}}function wl(d){var f=-1,_=null==d?0:d.length;for(this.clear();++f<_;){var w=d[f];this.set(w[0],w[1])}}function Fa(d){var f=-1,_=null==d?0:d.length;for(this.clear();++f<_;){var w=d[f];this.set(w[0],w[1])}}function Ml(d){var f=-1,_=null==d?0:d.length;for(this.__data__=new Fa;++f<_;)this.add(d[f])}function Fs(d){var f=this.__data__=new wl(d);this.size=f.size}function aa(d,f){var _=en(d),w=!_&&Rd(d),C=!_&&!w&&Ga(d),O=!_&&!w&&!C&&Pd(d),U=_||w||C||O,G=U?Vn(d.length,kr):[],Y=G.length;for(var pe in d)(f||ti.call(d,pe))&&(!U||!("length"==pe||C&&("offset"==pe||"parent"==pe)||O&&("buffer"==pe||"byteLength"==pe||"byteOffset"==pe)||Pl(pe,Y)))&&G.push(pe);return G}function Jg(d){var f=d.length;return f?d[Qu(0,f-1)]:B}function _d(d,f){return sh(Fr(d),mc(f,0,d.length))}function Na(d){return sh(Fr(d))}function e_(d,f,_){(_!==B&&!ko(d[f],_)||_===B&&!(f in d))&&la(d,f,_)}function vd(d,f,_){var w=d[f];(!ti.call(d,f)||!ko(w,_)||_===B&&!(f in d))&&la(d,f,_)}function Vf(d,f){for(var _=d.length;_--;)if(ko(d[_][0],f))return _;return-1}function VE(d,f,_,w){return Ba(d,function(C,O,U){f(w,C,_(C),U)}),w}function zf(d,f){return d&&fs(f,Sr(f),d)}function la(d,f,_){"__proto__"==f&&Xg?Xg(d,f,{configurable:!0,enumerable:!0,value:_,writable:!0}):d[f]=_}function Gu(d,f){for(var _=-1,w=f.length,C=ae(w),O=null==d;++_=f?d:f)),d}function Ns(d,f,_,w,C,O){var U,G=f&ui,Y=f&ls,pe=f&Ts;if(_&&(U=C?_(d,w,C,O):_(d)),U!==B)return U;if(!fi(d))return d;var ye=en(d);if(ye){if(U=function k0(d){var f=d.length,_=new d.constructor(f);return f&&"string"==typeof d[0]&&ti.call(d,"index")&&(_.index=d.index,_.input=d.input),_}(d),!G)return Fr(d,U)}else{var Te=wr(d),$e=Te==yf||Te==Ib;if(Ga(d))return XE(d,G);if(Te==fl||Te==Gn||$e&&!C){if(U=Y||$e?{}:iA(d),!G)return Y?function lo(d,f){return fs(d,ih(d),f)}(d,function t_(d,f){return d&&fs(f,Gs(f),d)}(U,d)):function KE(d,f){return fs(d,b_(d),f)}(d,zf(U,d))}else{if(!li[Te])return C?d:{};U=function rA(d,f,_){var w=d.constructor;switch(f){case Su:return E0(d);case Ye:case rc:return new w(+d);case ld:return function rO(d,f){var _=f?E0(d.buffer):d.buffer;return new d.constructor(_,d.byteOffset,d.byteLength)}(d,_);case ea:case wf:case Ag:case Mf:case Tg:case Dg:case Ig:case Rg:case Pg:return qE(d,_);case So:return new w;case bf:case sc:return new w(d);case od:return function sO(d){var f=new d.constructor(d.source,ta.exec(d));return f.lastIndex=d.lastIndex,f}(d);case Co:return new w;case xf:return function oO(d){return Pi?Jn(Pi.call(d)):{}}(d)}}(d,Te,G)}}O||(O=new Fs);var lt=O.get(d);if(lt)return lt;O.set(d,U),rv(d)?d.forEach(function(Dt){U.add(Ns(Dt,f,_,Dt,d,O))}):Ax(d)&&d.forEach(function(Dt,fn){U.set(fn,Ns(Dt,f,_,fn,d,O))});var ln=ye?B:(pe?Y?Rl:y_:Y?Gs:Sr)(d);return Eo(ln||d,function(Dt,fn){ln&&(Dt=d[fn=Dt]),vd(U,fn,Ns(Dt,f,_,fn,d,O))}),U}function i_(d,f,_){var w=_.length;if(null==d)return!w;for(d=Jn(d);w--;){var C=_[w],U=d[C];if(U===B&&!(C in d)||!(0,f[C])(U))return!1}return!0}function r_(d,f,_){if("function"!=typeof d)throw new Or(Fn);return Sc(function(){d.apply(B,_)},f)}function yd(d,f,_,w){var C=-1,O=oc,U=!0,G=d.length,Y=[],pe=f.length;if(!G)return Y;_&&(f=hi(f,Kr(_))),w?(O=Hg,U=!1):f.length>=Yr&&(O=ks,U=!1,f=new Ml(f));e:for(;++C-1},wl.prototype.set=function BE(d,f){var _=this.__data__,w=Vf(_,d);return w<0?(++this.size,_.push([d,f])):_[w][1]=f,this},Fa.prototype.clear=function Ee(){this.size=0,this.__data__={hash:new pc,map:new(Nu||wl),string:new pc}},Fa.prototype.delete=function Nn(d){var f=ap(this,d).delete(d);return this.size-=f?1:0,f},Fa.prototype.get=function Dn(d){return ap(this,d).get(d)},Fa.prototype.has=function In(d){return ap(this,d).has(d)},Fa.prototype.set=function xr(d,f){var _=ap(this,d),w=_.size;return _.set(d,f),this.size+=_.size==w?0:1,this},Ml.prototype.add=Ml.prototype.push=function Hu(d){return this.__data__.set(d,Ia),this},Ml.prototype.has=function oa(d){return this.__data__.has(d)},Fs.prototype.clear=function Qg(){this.__data__=new wl,this.size=0},Fs.prototype.delete=function UE(d){var f=this.__data__,_=f.delete(d);return this.size=f.size,_},Fs.prototype.get=function tO(d){return this.__data__.get(d)},Fs.prototype.has=function h0(d){return this.__data__.has(d)},Fs.prototype.set=function Qr(d,f){var _=this.__data__;if(_ instanceof wl){var w=_.__data__;if(!Nu||w.length0&&_(G)?f>1?hn(G,f-1,_,w,C):gl(C,G):w||(C[C.length]=G)}return C}var Lr=Md(),f0=Md(!0);function es(d,f){return d&&Lr(d,f,Sr)}function s_(d,f){return d&&f0(d,f,Sr)}function Wf(d,f){return na(f,function(_){return Wa(d[_])})}function gc(d,f){for(var _=0,w=(f=yc(f,d)).length;null!=d&&_f}function o_(d,f){return null!=d&&ti.call(d,f)}function p0(d,f){return null!=d&&f in Jn(d)}function Cl(d,f,_){for(var w=_?Hg:oc,C=d[0].length,O=d.length,U=O,G=ae(O),Y=1/0,pe=[];U--;){var ye=d[U];U&&f&&(ye=hi(ye,Kr(f))),Y=br(ye.length,Y),G[U]=!_&&(f||C>=120&&ye.length>=120)?new Ml(U&&ye):B}ye=d[0];var Te=-1,$e=G[0];e:for(;++Te=G?Y:Y*("desc"==_[w]?-1:1)}return d.index-f.index}(O,U,_)})}function b0(d,f,_){for(var w=-1,C=f.length,O={};++w-1;)G!==d&&Nf.call(G,Y,1),Nf.call(d,Y,1);return d}function h_(d,f){for(var _=d?f.length:0,w=_-1;_--;){var C=f[_];if(_==w||C!==O){var O=C;Pl(C)?Nf.call(d,C,1):Zf(d,C)}}return d}function Qu(d,f){return d+Yg(RE()*(f-d+1))}function p_(d,f){var _="";if(!d||f<1||f>ka)return _;do{f%2&&(_+=d),(f=Yg(f/2))&&(d+=d)}while(f);return _}function an(d,f){return E_(ns(d,f,Br),d+"")}function x0(d){return Jg(kd(d))}function w0(d,f){var _=kd(d);return sh(_,mc(f,0,_.length))}function xd(d,f,_,w){if(!fi(d))return d;for(var C=-1,O=(f=yc(f,d)).length,U=O-1,G=d;null!=G&&++CC?0:C+f),(_=_>C?C:_)<0&&(_+=C),C=f>_?0:_-f>>>0,f>>>=0;for(var O=ae(C);++w>>1,U=d[O];null!==U&&!Hs(U)&&(_?U<=f:U=Yr){var pe=f?null:rp(d);if(pe)return yr(pe);U=!1,C=ks,Y=new Ml}else Y=f?[]:G;e:for(;++w=w?d:ao(d,f,_)}var jE=Xk||function(d){return vr.clearTimeout(d)};function XE(d,f){if(f)return d.slice();var _=d.length,w=Ff?Ff(_):new d.constructor(_);return d.copy(w),w}function E0(d){var f=new d.constructor(d.byteLength);return new us(f).set(new us(d)),f}function qE(d,f){var _=f?E0(d.buffer):d.buffer;return new d.constructor(_,d.byteOffset,d.length)}function wd(d,f){if(d!==f){var _=d!==B,w=null===d,C=d==d,O=Hs(d),U=f!==B,G=null===f,Y=f==f,pe=Hs(f);if(!G&&!pe&&!O&&d>f||O&&U&&Y&&!G&&!pe||w&&U&&Y||!_&&Y||!C)return 1;if(!w&&!O&&!pe&&d1?_[C-1]:B,U=C>2?_[2]:B;for(O=d.length>3&&"function"==typeof O?(C--,O):B,U&&ps(_[0],_[1],U)&&(O=C<3?B:O,C=1),f=Jn(f);++w-1?C[O?f[U]:U]:B}}function xc(d){return za(function(f){var _=f.length,w=_,C=Ls.prototype.thru;for(d&&f.reverse();w--;){var O=f[w];if("function"!=typeof O)throw new Or(Fn);if(C&&!U&&"wrapper"==op(O))var U=new Ls([],!0)}for(w=U?w:_;++w<_;){var G=op(O=f[w]),Y="wrapper"==G?wc(O):B;U=Y&&O0(Y[0])&&Y[1]==(Ra|Ko|Zo|Qo)&&!Y[4].length&&1==Y[9]?U[op(Y[0])].apply(U,Y[3]):1==O.length&&O0(O)?U[G]():U.thru(O)}return function(){var pe=arguments,ye=pe[0];if(U&&1==pe.length&&en(ye))return U.plant(ye).value();for(var Te=0,$e=_?f[Te].apply(this,pe):ye;++Te<_;)$e=f[Te].call(this,$e);return $e}})}function g_(d,f,_,w,C,O,U,G,Y,pe){var ye=f&Ra,Te=f&Tn,$e=f&ar,lt=f&(Ko|ul),Tt=f&rd,ln=$e?B:Qf(d);return function Dt(){for(var fn=arguments.length,Rn=ae(fn),$s=fn;$s--;)Rn[$s]=arguments[$s];if(lt)var hr=nh(Dt),Ur=function ht(q,oe){for(var ae=q.length,Ke=0;ae--;)q[ae]===oe&&++Ke;return Ke}(Rn,hr);if(w&&(Rn=YE(Rn,w,C,lt)),O&&(Rn=Hi(Rn,O,U,lt)),fn-=Ur,lt&&fn1&&Rn.reverse(),ye&&YG))return!1;var pe=O.get(d),ye=O.get(f);if(pe&&ye)return pe==f&&ye==d;var Te=-1,$e=!0,lt=_&Mo?new Ml:B;for(O.set(d,f),O.set(f,d);++Te-1&&d%1==0&&d1?"& ":"")+f[w],f=f.join(_>2?", ":" "),d.replace(lE,"{\n/* [wrapped with "+f+"] */\n")}(w,function A_(d,f){return Eo(Db,function(_){var w="_."+_[0];f&_[1]&&!oc(d,w)&&d.push(w)}),d.sort()}(function P0(d){var f=d.match(cE);return f?f[1].split(dE):[]}(w),_)))}function z0(d){var f=0,_=0;return function(){var w=o0(),C=Cg-(w-_);if(_=w,C>0){if(++f>=KC)return arguments[0]}else f=0;return d.apply(B,arguments)}}function sh(d,f){var _=-1,w=d.length,C=w-1;for(f=f===B?w:f;++_1?d[f-1]:B;return _="function"==typeof _?(d.pop(),_):B,B_(d,_)});function cx(d){var f=T(d);return f.__chain__=!0,f}function ch(d,f){return f(d)}var fp=za(function(d){var f=d.length,_=f?d[0]:0,w=this.__wrapped__,C=function(O){return Gu(O,d)};return!(f>1||this.__actions__.length)&&w instanceof nn&&Pl(_)?((w=w.slice(_,+_+(f?1:0))).__actions__.push({func:ch,args:[C],thisArg:B}),new Ls(w,this.__chain__).thru(function(O){return f&&!O.length&&O.push(B),O})):this.thru(C)}),TA=da(function(d,f,_){ti.call(d,_)?++d[_]:la(d,_,1)}),W_=Jf(q0),hx=Jf(Y0);function mx(d,f){return(en(d)?Eo:Ba)(d,St(f,3))}function gx(d,f){return(en(d)?jk:Hf)(d,St(f,3))}var DA=da(function(d,f,_){ti.call(d,_)?d[_].push(f):la(d,_,[f])}),RA=an(function(d,f,_){var w=-1,C="function"==typeof f,O=Mr(d)?ae(d.length):[];return Ba(d,function(U){O[++w]=C?bn(f,U,_):ju(U,f,_)}),O}),Vs=da(function(d,f,_){la(d,_,f)});function zs(d,f){return(en(d)?hi:Yu)(d,St(f,3))}var kA=da(function(d,f,_){d[_?0:1].push(f)},function(){return[[],[]]}),zA=an(function(d,f){if(null==d)return[];var _=f.length;return _>1&&ps(d,f[0],f[1])?f=[]:_>2&&ps(f[0],f[1],f[2])&&(f=[f[0]]),y0(d,hn(f,1),[])}),Ac=qk||function(){return vr.Date.now()};function Id(d,f,_){return f=_?B:f,ua(d,Ra,B,B,B,B,f=d&&null==f?d.length:f)}function $_(d,f){var _;if("function"!=typeof f)throw new Or(Fn);return d=rn(d),function(){return--d>0&&(_=f.apply(this,arguments)),d<=1&&(f=B),_}}var mp=an(function(d,f,_){var w=Tn;if(_.length){var C=wi(_,nh(mp));w|=Zo}return ua(d,w,f,_,C)}),j_=an(function(d,f,_){var w=Tn|ar;if(_.length){var C=wi(_,nh(j_));w|=Zo}return ua(f,w,d,_,C)});function WA(d,f,_){var w,C,O,U,G,Y,pe=0,ye=!1,Te=!1,$e=!0;if("function"!=typeof d)throw new Or(Fn);function lt(pi){var pa=w,Lo=C;return w=C=B,pe=pi,U=d.apply(Lo,pa)}function Dt(pi){var pa=pi-Y;return Y===B||pa>=f||pa<0||Te&&pi-pe>=O}function fn(){var pi=Ac();if(Dt(pi))return Rn(pi);G=Sc(fn,function ln(pi){var KT=f-(pi-Y);return Te?br(KT,O-(pi-pe)):KT}(pi))}function Rn(pi){return G=B,$e&&w?lt(pi):(w=C=B,U)}function Ur(){var pi=Ac(),pa=Dt(pi);if(w=arguments,C=this,Y=pi,pa){if(G===B)return function Tt(pi){return pe=pi,G=Sc(fn,f),ye?lt(pi):U}(Y);if(Te)return jE(G),G=Sc(fn,f),lt(Y)}return G===B&&(G=Sc(fn,f)),U}return f=co(f)||0,fi(_)&&(ye=!!_.leading,O=(Te="maxWait"in _)?cr(co(_.maxWait)||0,f):O,$e="trailing"in _?!!_.trailing:$e),Ur.cancel=function $s(){G!==B&&jE(G),pe=0,w=Y=C=G=B},Ur.flush=function hr(){return G===B?U:Rn(Ac())},Ur}var X_=an(function(d,f){return r_(d,1,f)}),q_=an(function(d,f,_){return r_(d,co(f)||0,_)});function Y_(d,f){if("function"!=typeof d||null!=f&&"function"!=typeof f)throw new Or(Fn);var _=function(){var w=arguments,C=f?f.apply(this,w):w[0],O=_.cache;if(O.has(C))return O.get(C);var U=d.apply(this,w);return _.cache=O.set(C,U)||O,U};return _.cache=new(Y_.Cache||Fa),_}function dh(d){if("function"!=typeof d)throw new Or(Fn);return function(){var f=arguments;switch(f.length){case 0:return!d.call(this);case 1:return!d.call(this,f[0]);case 2:return!d.call(this,f[0],f[1]);case 3:return!d.call(this,f[0],f[1],f[2])}return!d.apply(this,f)}}Y_.Cache=Fa;var jA=$E(function(d,f){var _=(f=1==f.length&&en(f[0])?hi(f[0],Kr(St())):hi(hn(f,1),Kr(St()))).length;return an(function(w){for(var C=-1,O=br(w.length,_);++C=f}),Rd=GE(function(){return arguments}())?GE:function(d){return ni(d)&&ti.call(d,"callee")&&!so.call(d,"callee")},en=ae.isArray,uh=At?Kr(At):function a_(d){return ni(d)&&ur(d)==Su};function Mr(d){return null!=d&&hh(d.length)&&!Wa(d)}function Di(d){return ni(d)&&Mr(d)}var Ga=Kk||mh,pO=If?Kr(If):function nO(d){return ni(d)&&ur(d)==rc};function Ex(d){if(!ni(d))return!1;var f=ur(d);return f==sd||f==eE||"string"==typeof d.message&&"string"==typeof d.name&&!Tc(d)}function Wa(d){if(!fi(d))return!1;var f=ur(d);return f==yf||f==Ib||f==JC||f==nE}function vp(d){return"number"==typeof d&&d==rn(d)}function hh(d){return"number"==typeof d&&d>-1&&d%1==0&&d<=ka}function fi(d){var f=typeof d;return null!=d&&("object"==f||"function"==f)}function ni(d){return null!=d&&"object"==typeof d}var Ax=Zb?Kr(Zb):function iO(d){return ni(d)&&wr(d)==So};function nv(d){return"number"==typeof d||ni(d)&&ur(d)==bf}function Tc(d){if(!ni(d)||ur(d)!=fl)return!1;var f=bl(d);if(null===f)return!0;var _=ti.call(f,"constructor")&&f.constructor;return"function"==typeof _&&_ instanceof _&&ei.call(_)==Lf}var iv=Ps?Kr(Ps):function g0(d){return ni(d)&&ur(d)==od},rv=zg?Kr(zg):function _0(d){return ni(d)&&wr(d)==Co};function ja(d){return"string"==typeof d||!en(d)&&ni(d)&&ur(d)==sc}function Hs(d){return"symbol"==typeof d||ni(d)&&ur(d)==xf}var Pd=CE?Kr(CE):function qu(d){return ni(d)&&hh(d.length)&&!!bt[ur(d)]},Tx=np(c_),rT=np(function(d,f){return d<=f});function ov(d){if(!d)return[];if(Mr(d))return ja(d)?ds(d):Fr(d);if(Fu&&d[Fu])return function Ae(q){for(var oe,ae=[];!(oe=q.next()).done;)ae.push(oe.value);return ae}(d[Fu]());var f=wr(d);return(f==So?Pr:f==Co?yr:kd)(d)}function kl(d){return d?(d=co(d))===Sn||d===-Sn?(d<0?-1:1)*QC:d==d?d:0:0===d?d:0}function rn(d){var f=kl(d),_=f%1;return f==f?_?f-_:f:0}function Ol(d){return d?mc(rn(d),0,Jo):0}function co(d){if("number"==typeof d)return d;if(Hs(d))return vf;if(fi(d)){var f="function"==typeof d.valueOf?d.valueOf():d;d=fi(f)?f+"":f}if("string"!=typeof d)return 0===d?d:+d;d=kf(d);var _=er.test(d);return _||Is.test(d)?Af(d.slice(2),_?2:8):pE.test(d)?vf:+d}function Dc(d){return fs(d,Gs(d))}function Xn(d){return null==d?"":ts(d)}var fh=bc(function(d,f){if(lp(f)||Mr(f))fs(f,Sr(f),d);else for(var _ in f)ti.call(f,_)&&vd(d,_,f[_])}),fa=bc(function(d,f){fs(f,Gs(f),d)}),xp=bc(function(d,f,_,w){fs(f,Gs(f),d,w)}),sT=bc(function(d,f,_,w){fs(f,Sr(f),d,w)}),Ic=za(Gu),av=an(function(d,f){d=Jn(d);var _=-1,w=f.length,C=w>2?f[2]:B;for(C&&ps(f[0],f[1],C)&&(w=1);++_1),O}),fs(d,Rl(d),_),w&&(_=Ns(_,ui|ls|Ts,D0));for(var C=f.length;C--;)Zf(_,f[C]);return _}),_T=za(function(d,f){return null==d?{}:function ca(d,f){return b0(d,f,function(_,w){return Ll(d,w)})}(d,f)});function Px(d,f){if(null==d)return{};var _=hi(Rl(d),function(w){return[w]});return f=St(f),b0(d,_,function(w,C){return f(w,C[0])})}var Ox=Po(Sr),Lx=Po(Gs);function kd(d){return null==d?[]:Of(d,Sr(d))}var Bx=Sd(function(d,f,_){return f=f.toLowerCase(),d+(_?Ux(f):f)});function Ux(d){return Mp(Xn(d).toLowerCase())}function Vx(d){return(d=Xn(d))&&d.replace(mE,ku).replace(Uk,"")}var ST=Sd(function(d,f,_){return d+(_?"-":"")+f.toLowerCase()}),CT=Sd(function(d,f,_){return d+(_?" ":"")+f.toLowerCase()}),gO=QE("toLowerCase"),AT=Sd(function(d,f,_){return d+(_?"_":"")+f.toLowerCase()}),vO=Sd(function(d,f,_){return d+(_?" ":"")+Mp(f)}),RT=Sd(function(d,f,_){return d+(_?" ":"")+f.toUpperCase()}),Mp=QE("toUpperCase");function Xx(d,f,_){return d=Xn(d),(f=_?B:f)===B?function n0(q){return SE.test(q)}(d)?function Ro(q){return q.match(ME)||[]}(d):function Qb(q){return q.match(uE)||[]}(d):d.match(f)||[]}var qx=an(function(d,f){try{return bn(d,B,f)}catch(_){return Ex(_)?_:new Ne(_)}}),PT=za(function(d,f){return Eo(f,function(_){_=ha(_),la(d,_,mp(d[_],d))}),d});function Sp(d){return function(){return d}}var Yx=xc(),Kx=xc(!0);function Br(d){return d}function Zx(d){return l_("function"==typeof d?d:Ns(d,ui))}var xO=an(function(d,f){return function(_){return ju(_,d,f)}}),D=an(function(d,f){return function(_){return ju(d,_,f)}});function Ya(d,f,_){var w=Sr(f),C=Wf(f,w);null==_&&(!fi(f)||!C.length&&w.length)&&(_=f,f=d,d=this,C=Wf(f,Sr(f)));var O=!(fi(_)&&"chain"in _&&!_.chain),U=Wa(d);return Eo(C,function(G){var Y=f[G];d[G]=Y,U&&(d.prototype[G]=function(){var pe=this.__chain__;if(O||pe){var ye=d(this.__wrapped__);return(ye.__actions__=Fr(this.__actions__)).push({func:Y,args:arguments,thisArg:d}),ye.__chain__=pe,ye}return Y.apply(d,gl([this.value()],arguments))})}),d}function Cp(){}var UT=v_(hi),Ep=v_(hd),Ld=v_(_l);function Ap(d){return rh(d)?Gg(ha(d)):function Yf(d){return function(f){return gc(f,d)}}(d)}var mv=A0(),Tp=A0(!0);function Dp(){return[]}function mh(){return!1}var Jx=ep(function(d,f){return d+f},0),HT=Cd("ceil"),ew=ep(function(d,f){return d/f},1),tw=Cd("floor"),yv=ep(function(d,f){return d*f},1),nw=Cd("round"),XT=ep(function(d,f){return d-f},0);return T.after=function Ha(d,f){if("function"!=typeof f)throw new Or(Fn);return d=rn(d),function(){if(--d<1)return f.apply(this,arguments)}},T.ary=Id,T.assign=fh,T.assignIn=fa,T.assignInWith=xp,T.assignWith=sT,T.at=Ic,T.before=$_,T.bind=mp,T.bindAll=PT,T.bindKey=j_,T.castArray=function qA(){if(!arguments.length)return[];var d=arguments[0];return en(d)?d:[d]},T.chain=cx,T.chunk=function D_(d,f,_){f=(_?ps(d,f,_):f===B)?1:cr(rn(f),0);var w=null==d?0:d.length;if(!w||f<1)return[];for(var C=0,O=0,U=ae(qg(w/f));CC?0:C+_),(w=w===B||w>C?C:rn(w))<0&&(w+=C),w=_>w?0:Ol(w);_>>0)?(d=Xn(d))&&("string"==typeof f||null!=f&&!iv(f))&&!(f=ts(f))&&pd(d)?ge(ds(d),0,_):d.split(f,_):[]},T.spread=function bx(d,f){if("function"!=typeof d)throw new Or(Fn);return f=null==f?0:cr(rn(f),0),an(function(_){var w=_[f],C=ge(_,0,f);return w&&gl(C,w),bn(d,this,C)})},T.tail=function ix(d){var f=null==d?0:d.length;return f?ao(d,1,f):[]},T.take=function bA(d,f,_){return d&&d.length?ao(d,0,(f=_||f===B?1:rn(f))<0?0:f):[]},T.takeRight=function uO(d,f,_){var w=null==d?0:d.length;return w?ao(d,(f=w-(f=_||f===B?1:rn(f)))<0?0:f,w):[]},T.takeRightWhile=function up(d,f){return d&&d.length?Va(d,St(f,3),!1,!0):[]},T.takeWhile=function xA(d,f){return d&&d.length?Va(d,St(f,3)):[]},T.tap=function dx(d,f){return f(d),d},T.throttle=function Z_(d,f,_){var w=!0,C=!0;if("function"!=typeof d)throw new Or(Fn);return fi(_)&&(w="leading"in _?!!_.leading:w,C="trailing"in _?!!_.trailing:C),WA(d,f,{leading:w,maxWait:f,trailing:C})},T.thru=ch,T.toArray=ov,T.toPairs=Ox,T.toPairsIn=Lx,T.toPath=function VT(d){return en(d)?hi(d,ha):Hs(d)?[d]:Fr(H0(Xn(d)))},T.toPlainObject=Dc,T.transform=function yT(d,f,_){var w=en(d),C=w||Ga(d)||Pd(d);if(f=St(f,4),null==_){var O=d&&d.constructor;_=C?w?new O:[]:fi(d)&&Wa(O)?dr(bl(d)):{}}return(C?Eo:es)(d,function(U,G,Y){return f(_,U,G,Y)}),_},T.unary=function XA(d){return Id(d,1)},T.union=rx,T.unionBy=sx,T.unionWith=ox,T.uniq=function N_(d){return d&&d.length?Al(d):[]},T.uniqBy=function ax(d,f){return d&&d.length?Al(d,St(f,2)):[]},T.uniqWith=function hp(d,f){return f="function"==typeof f?f:B,d&&d.length?Al(d,B,f):[]},T.unset=function bT(d,f){return null==d||Zf(d,f)},T.unzip=Td,T.unzipWith=B_,T.update=function Fx(d,f,_){return null==d?d:Ua(d,f,Dl(_))},T.updateWith=function xT(d,f,_,w){return w="function"==typeof w?w:B,null==d?d:Ua(d,f,Dl(_),w)},T.values=kd,T.valuesIn=function wT(d){return null==d?[]:Of(d,Gs(d))},T.without=U_,T.words=Xx,T.wrap=function $n(d,f){return K_(Dl(f),d)},T.xor=V_,T.xorBy=z_,T.xorWith=lh,T.zip=wA,T.zipObject=function lx(d,f){return m_(d||[],f||[],vd)},T.zipObjectDeep=function MA(d,f){return m_(d||[],f||[],xd)},T.zipWith=SA,T.entries=Ox,T.entriesIn=Lx,T.extend=fa,T.extendWith=xp,Ya(T,T),T.add=Jx,T.attempt=qx,T.camelCase=Bx,T.capitalize=Ux,T.ceil=HT,T.clamp=function jt(d,f,_){return _===B&&(_=f,f=B),_!==B&&(_=(_=co(_))==_?_:0),f!==B&&(f=(f=co(f))==f?f:0),mc(co(d),f,_)},T.clone=function YA(d){return Ns(d,Ts)},T.cloneDeep=function xx(d){return Ns(d,ui|Ts)},T.cloneDeepWith=function KA(d,f){return Ns(d,ui|Ts,f="function"==typeof f?f:B)},T.cloneWith=function _p(d,f){return Ns(d,Ts,f="function"==typeof f?f:B)},T.conformsTo=function ZA(d,f){return null==f||i_(d,f,Sr(f))},T.deburr=Vx,T.defaultTo=function LT(d,f){return null==d||d!=d?f:d},T.divide=ew,T.endsWith=function zx(d,f,_){d=Xn(d),f=ts(f);var w=d.length,C=_=_===B?w:mc(rn(_),0,w);return(_-=f.length)>=0&&d.slice(_,C)==f},T.eq=ko,T.escape=function MT(d){return(d=Xn(d))&&kg.test(d)?d.replace(Pb,AE):d},T.escapeRegExp=function Hx(d){return(d=Xn(d))&&Nb.test(d)?d.replace(Sf,"\\$&"):d},T.every=function ux(d,f,_){var w=en(d)?hd:zE;return _&&ps(d,f,_)&&(f=B),w(d,St(f,3))},T.find=W_,T.findIndex=q0,T.findKey=function aT(d,f){return Ot(d,St(f,3),es)},T.findLast=hx,T.findLastIndex=Y0,T.findLastKey=function cv(d,f){return Ot(d,St(f,3),s_)},T.floor=tw,T.forEach=mx,T.forEachRight=gx,T.forIn=function Xa(d,f){return null==d?d:Lr(d,St(f,3),Gs)},T.forInRight=function lT(d,f){return null==d?d:f0(d,St(f,3),Gs)},T.forOwn=function cT(d,f){return d&&es(d,St(f,3))},T.forOwnRight=function dT(d,f){return d&&s_(d,St(f,3))},T.get=dv,T.gt=QA,T.gte=wx,T.has=function fT(d,f){return null!=d&&nA(d,f,o_)},T.hasIn=Ll,T.head=K0,T.identity=Br,T.includes=function IA(d,f,_,w){d=Mr(d)?d:kd(d),_=_&&!w?rn(_):0;var C=d.length;return _<0&&(_=cr(C+_,0)),ja(d)?_<=C&&d.indexOf(f,_)>-1:!!C&&vl(d,f,_)>-1},T.indexOf=function uA(d,f,_){var w=null==d?0:d.length;if(!w)return-1;var C=null==_?0:rn(_);return C<0&&(C=cr(w+C,0)),vl(d,f,C)},T.inRange=function j(d,f,_){return f=kl(f),_===B?(_=f,f=0):_=kl(_),function HE(d,f,_){return d>=br(f,_)&&d=-ka&&d<=ka},T.isSet=rv,T.isString=ja,T.isSymbol=Hs,T.isTypedArray=Pd,T.isUndefined=function nT(d){return d===B},T.isWeakMap=function sv(d){return ni(d)&&wr(d)==ad},T.isWeakSet=function iT(d){return ni(d)&&"[object WeakSet]"==ur(d)},T.join=function k_(d,f){return null==d?"":Zk.call(d,f)},T.kebabCase=ST,T.last=Us,T.lastIndexOf=function hA(d,f,_){var w=null==d?0:d.length;if(!w)return-1;var C=w;return _!==B&&(C=(C=rn(_))<0?cr(w+C,0):br(C,w-1)),f==f?function r0(q,oe,ae){for(var Ke=ae+1;Ke--;)if(q[Ke]===oe)return Ke;return Ke}(d,f,C):ac(d,Jb,C,!0)},T.lowerCase=CT,T.lowerFirst=gO,T.lt=Tx,T.lte=rT,T.max=function GT(d){return d&&d.length?Gf(d,Br,bd):B},T.maxBy=function WT(d,f){return d&&d.length?Gf(d,St(f,2),bd):B},T.mean=function Ws(d){return e0(d,Br)},T.meanBy=function $T(d,f){return e0(d,St(f,2))},T.min=function jT(d){return d&&d.length?Gf(d,Br,c_):B},T.minBy=function wO(d,f){return d&&d.length?Gf(d,St(f,2),c_):B},T.stubArray=Dp,T.stubFalse=mh,T.stubObject=function gv(){return{}},T.stubString=function _v(){return""},T.stubTrue=function Qx(){return!0},T.multiply=yv,T.nth=function O_(d,f){return d&&d.length?u_(d,rn(f)):B},T.noConflict=function NT(){return vr._===this&&(vr._=gd),this},T.noop=Cp,T.now=Ac,T.pad=function Gx(d,f,_){d=Xn(d);var w=(f=rn(f))?lc(d):0;if(!f||w>=f)return d;var C=(f-w)/2;return tp(Yg(C),_)+d+tp(qg(C),_)},T.padEnd=function Wx(d,f,_){d=Xn(d);var w=(f=rn(f))?lc(d):0;return f&&wf){var w=d;d=f,f=w}if(_||d%1||f%1){var C=RE();return br(d+C*(f-d+Yt("1e-"+((C+"").length-1))),f)}return Qu(d,f)},T.reduce=function OA(d,f,_){var w=en(d)?Rf:To,C=arguments.length<3;return w(d,St(f,4),_,C,Ba)},T.reduceRight=function LA(d,f,_){var w=en(d)?Ru:To,C=arguments.length<3;return w(d,St(f,4),_,C,Hf)},T.repeat=function hv(d,f,_){return f=(_?ps(d,f,_):f===B)?1:rn(f),p_(Xn(d),f)},T.replace=function fv(){var d=arguments,f=Xn(d[0]);return d.length<3?f:f.replace(d[1],d[2])},T.result=function Oo(d,f,_){var w=-1,C=(f=yc(f,d)).length;for(C||(C=1,d=B);++wka)return[];var _=Jo,w=br(d,Jo);f=St(f),d-=Jo;for(var C=Vn(w,f);++_=O)return d;var G=_-lc(w);if(G<1)return w;var Y=U?ge(U,0,G).join(""):d.slice(0,G);if(C===B)return Y+w;if(U&&(G+=Y.length-G),iv(C)){if(d.slice(G).search(C)){var pe,ye=Y;for(C.global||(C=yl(C.source,Xn(ta.exec(C))+"g")),C.lastIndex=0;pe=C.exec(ye);)var Te=pe.index;Y=Y.slice(0,Te===B?G:Te)}}else if(d.indexOf(ts(C),G)!=G){var $e=Y.lastIndexOf(C);$e>-1&&(Y=Y.slice(0,$e))}return Y+w},T.unescape=function wp(d){return(d=Xn(d))&&Ok.test(d)?d.replace(Rb,Qe):d},T.uniqueId=function zT(d){var f=++Wg;return Xn(d)+f},T.upperCase=RT,T.upperFirst=Mp,T.each=mx,T.eachRight=gx,T.first=K0,Ya(T,function(){var d={};return es(T,function(f,_){ti.call(T.prototype,_)||(d[_]=f)}),d}(),{chain:!1}),T.VERSION="4.17.21",Eo(["bind","bindKey","curry","curryRight","partial","partialRight"],function(d){T[d].placeholder=T}),Eo(["drop","take"],function(d,f){nn.prototype[d]=function(_){_=_===B?1:cr(rn(_),0);var w=this.__filtered__&&!f?new nn(this):this.clone();return w.__filtered__?w.__takeCount__=br(_,w.__takeCount__):w.__views__.push({size:br(_,Jo),type:d+(w.__dir__<0?"Right":"")}),w},nn.prototype[d+"Right"]=function(_){return this.reverse()[d](_).reverse()}}),Eo(["filter","map","takeWhile"],function(d,f){var _=f+1,w=1==_||3==_;nn.prototype[d]=function(C){var O=this.clone();return O.__iteratees__.push({iteratee:St(C,3),type:_}),O.__filtered__=O.__filtered__||w,O}}),Eo(["head","last"],function(d,f){var _="take"+(f?"Right":"");nn.prototype[d]=function(){return this[_](1).value()[0]}}),Eo(["initial","tail"],function(d,f){var _="drop"+(f?"":"Right");nn.prototype[d]=function(){return this.__filtered__?new nn(this):this[_](1)}}),nn.prototype.compact=function(){return this.filter(Br)},nn.prototype.find=function(d){return this.filter(d).head()},nn.prototype.findLast=function(d){return this.reverse().find(d)},nn.prototype.invokeMap=an(function(d,f){return"function"==typeof d?new nn(this):this.map(function(_){return ju(_,d,f)})}),nn.prototype.reject=function(d){return this.filter(dh(St(d)))},nn.prototype.slice=function(d,f){d=rn(d);var _=this;return _.__filtered__&&(d>0||f<0)?new nn(_):(d<0?_=_.takeRight(-d):d&&(_=_.drop(d)),f!==B&&(_=(f=rn(f))<0?_.dropRight(-f):_.take(f-d)),_)},nn.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},nn.prototype.toArray=function(){return this.take(Jo)},es(nn.prototype,function(d,f){var _=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),C=T[w?"take"+("last"==f?"Right":""):f],O=w||/^find/.test(f);C&&(T.prototype[f]=function(){var U=this.__wrapped__,G=w?[1]:arguments,Y=U instanceof nn,pe=G[0],ye=Y||en(U),Te=function(fn){var Rn=C.apply(T,gl([fn],G));return w&&$e?Rn[0]:Rn};ye&&_&&"function"==typeof pe&&1!=pe.length&&(Y=ye=!1);var $e=this.__chain__,Tt=O&&!$e,ln=Y&&!this.__actions__.length;if(!O&&ye){U=ln?U:new nn(this);var Dt=d.apply(U,G);return Dt.__actions__.push({func:ch,args:[Te],thisArg:B}),new Ls(Dt,$e)}return Tt&&ln?d.apply(this,G):(Dt=this.thru(Te),Tt?w?Dt.value()[0]:Dt.value():Dt)})}),Eo(["pop","push","shift","sort","splice","unshift"],function(d){var f=Oa[d],_=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",w=/^(?:pop|shift)$/.test(d);T.prototype[d]=function(){var C=arguments;if(w&&!this.__chain__){var O=this.value();return f.apply(en(O)?O:[],C)}return this[_](function(U){return f.apply(en(U)?U:[],C)})}}),es(nn.prototype,function(d,f){var _=T[f];if(_){var w=_.name+"";ti.call(fc,w)||(fc[w]=[]),fc[w].push({name:f,func:_})}}),fc[g_(B,ar).name]=[{name:"wrapper",func:B}],nn.prototype.clone=function hs(){var d=new nn(this.__wrapped__);return d.__actions__=Fr(this.__actions__),d.__dir__=this.__dir__,d.__filtered__=this.__filtered__,d.__iteratees__=Fr(this.__iteratees__),d.__takeCount__=this.__takeCount__,d.__views__=Fr(this.__views__),d},nn.prototype.reverse=function OE(){if(this.__filtered__){var d=new nn(this);d.__dir__=-1,d.__filtered__=!0}else(d=this.clone()).__dir__*=-1;return d},nn.prototype.value=function Uf(){var d=this.__wrapped__.value(),f=this.__dir__,_=en(d),w=f<0,C=_?d.length:0,O=function tA(d,f,_){for(var w=-1,C=_.length;++w=this.__values__.length;return{done:d,value:d?B:this.__values__[this.__index__++]}},T.prototype.plant=function hO(d){for(var f,_=this;_ instanceof Bf;){var w=T_(_);w.__index__=0,w.__values__=B,f?C.__wrapped__=w:f=w;var C=w;_=_.__wrapped__}return C.__wrapped__=d,f},T.prototype.reverse=function AA(){var d=this.__wrapped__;if(d instanceof nn){var f=d;return this.__actions__.length&&(f=new nn(this)),(f=f.reverse()).__actions__.push({func:ch,args:[dp],thisArg:B}),new Ls(f,this.__chain__)}return this.thru(dp)},T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=function G_(){return vc(this.__wrapped__,this.__actions__)},T.prototype.first=T.prototype.head,Fu&&(T.prototype[Fu]=function EA(){return this}),T}();vr._=tr,(Qt=function(){return tr}.call(Es,qr,Es,wo))!==B&&(wo.exports=Qt)}.call(this)},738:function(wo){var Es;wo.exports=((Es=function(){function qr(di){return Rr.appendChild(di.dom),di}function Qt(di){for(var ui=0;uiun+1e3&&(dl.update(1e3*Fn/(di-un),100),un=di,Fn=0,As)){var ui=performance.memory;As.update(ui.usedJSHeapSize/1048576,ui.jsHeapSizeLimit/1048576)}return di},update:function(){Yr=this.end()},domElement:Rr,setMode:Qt}}).Panel=function(qr,Qt,B){var Rr=1/0,Yr=0,un=Math.round,Fn=un(window.devicePixelRatio||1),dl=80*Fn,Ia=48*Fn,As=3*Fn,di=2*Fn,ui=3*Fn,ls=15*Fn,Ts=74*Fn,Ds=30*Fn,Mo=document.createElement("canvas");Mo.width=dl,Mo.height=Ia,Mo.style.cssText="width:80px;height:48px";var Tn=Mo.getContext("2d");return Tn.font="bold "+9*Fn+"px Helvetica,Arial,sans-serif",Tn.textBaseline="top",Tn.fillStyle=B,Tn.fillRect(0,0,dl,Ia),Tn.fillStyle=Qt,Tn.fillText(qr,As,di),Tn.fillRect(ui,ls,Ts,Ds),Tn.fillStyle=B,Tn.globalAlpha=.9,Tn.fillRect(ui,ls,Ts,Ds),{dom:Mo,update:function(ar,ic){Rr=Math.min(Rr,ar),Yr=Math.max(Yr,ar),Tn.fillStyle=B,Tn.globalAlpha=1,Tn.fillRect(0,0,dl,ls),Tn.fillStyle=Qt,Tn.fillText(un(ar)+" "+qr+" ("+un(Rr)+"-"+un(Yr)+")",As,di),Tn.drawImage(Mo,ui+Fn,ls,Ts-Fn,Ds,ui,ls,Ts-Fn,Ds),Tn.fillRect(ui+Ts-Fn,ls,Fn,Ds),Tn.fillStyle=B,Tn.globalAlpha=.9,Tn.fillRect(ui+Ts-Fn,ls,Fn,un((1-ar/ic)*Ds))}}},Es)}},wo=>{wo(wo.s=980)}]); \ No newline at end of file diff --git a/frontend/src/app/components/editor/eac/tri-map.block-ui/tri-map.block-ui.component.ts b/frontend/src/app/components/editor/eac/tri-map.block-ui/tri-map.block-ui.component.ts index 4bcebfb..c112051 100644 --- a/frontend/src/app/components/editor/eac/tri-map.block-ui/tri-map.block-ui.component.ts +++ b/frontend/src/app/components/editor/eac/tri-map.block-ui/tri-map.block-ui.component.ts @@ -608,6 +608,7 @@ export class TriMapBlockUiComponent implements GuiComponentInterface, AfterViewI maps__save_invisible_wall_collisions: false, maps__save_terrain_collisions: false, maps__save_spherical_skybox_texture: true, + maps__add_props_to_obj: false, }); this.terrainChunksObjLocation = paths[0].substring(0, paths[0].indexOf('terrain_chunk_')); } else { @@ -676,6 +677,7 @@ export class TriMapBlockUiComponent implements GuiComponentInterface, AfterViewI maps__save_invisible_wall_collisions: false, maps__save_terrain_collisions: false, maps__save_spherical_skybox_texture: true, + maps__add_props_to_obj: false, }, ); this.terrainChunksObjLocation = paths[0].substring(0, paths[0].indexOf('terrain_chunk_')); diff --git a/library/utils/meshes.py b/library/utils/meshes.py index 7741cfa..45f9829 100644 --- a/library/utils/meshes.py +++ b/library/utils/meshes.py @@ -1,3 +1,4 @@ +import math from abc import ABC, abstractmethod from typing import Tuple, List @@ -10,6 +11,11 @@ def __init__(self): self.vertex_uvs = [] self.pivot_offset = (0, 0, 0) + def rotate_z(self, angle): + c, s = math.cos(angle), math.sin(angle) + self.vertices = [[p[0] * c - p[1] * s, p[0] * s + p[1] * c, p[2]] + for p in self.vertices] + @abstractmethod def to_obj(self, face_index_increment, mtllib=None, pivot_offset=None) -> Tuple[str, int]: raise NotImplementedError diff --git a/resources/NFS2.md b/resources/NFS2.md index 05f9420..32ac4db 100644 --- a/resources/NFS2.md +++ b/resources/NFS2.md @@ -1,6 +1,6 @@ # **NFS2 file specs** # -*Last time updated: 2024-03-17 22:29:34.162166+00:00* +*Last time updated: 2024-04-15 15:49:28.381279+00:00* # **Info by file extensions** # diff --git a/resources/NFS2_SE.md b/resources/NFS2_SE.md index 8b470c8..a279396 100644 --- a/resources/NFS2_SE.md +++ b/resources/NFS2_SE.md @@ -1,6 +1,6 @@ # **NFS2SE file specs** # -*Last time updated: 2024-03-17 22:29:34.220347+00:00* +*Last time updated: 2024-04-15 15:49:28.554690+00:00* # **Info by file extensions** # diff --git a/resources/NFS3.md b/resources/NFS3.md index 5362407..64b20bb 100644 --- a/resources/NFS3.md +++ b/resources/NFS3.md @@ -1,6 +1,6 @@ # **NFS 3 Hot Pursuit file specs** # -*Last time updated: 2024-03-18 09:11:00.727030+00:00* +*Last time updated: 2024-04-15 15:49:28.736816+00:00* # **Info by file extensions** # diff --git a/resources/NFS4.md b/resources/NFS4.md index a1f1808..6f636b5 100644 --- a/resources/NFS4.md +++ b/resources/NFS4.md @@ -1,6 +1,6 @@ # **NFS 4 High Stakes file specs** # -*Last time updated: 2024-03-18 09:11:00.782611+00:00* +*Last time updated: 2024-04-15 15:49:28.868295+00:00* # **Info by file extensions** # diff --git a/resources/NFS5.md b/resources/NFS5.md index 1882098..0ac5f85 100644 --- a/resources/NFS5.md +++ b/resources/NFS5.md @@ -1,6 +1,6 @@ # **NFS 5 Porsche Unleashed file specs** # -*Last time updated: 2024-03-19 08:14:22.143386+00:00* +*Last time updated: 2024-04-15 15:49:28.994847+00:00* # **Info by file extensions** # diff --git a/resources/NFS6.md b/resources/NFS6.md index a1898f7..fd7b20e 100644 --- a/resources/NFS6.md +++ b/resources/NFS6.md @@ -1,6 +1,6 @@ # **NFS 6 Hot Pursuit 2 file specs** # -*Last time updated: 2024-03-19 08:44:55.111615+00:00* +*Last time updated: 2024-04-15 15:49:29.111774+00:00* # **Info by file extensions** # diff --git a/resources/TNFS_SE.md b/resources/TNFS_SE.md index cd56db8..19bca88 100644 --- a/resources/TNFS_SE.md +++ b/resources/TNFS_SE.md @@ -1,6 +1,6 @@ # **TNFSSE (PC) file specs** # -*Last time updated: 2024-03-17 22:29:34.105080+00:00* +*Last time updated: 2024-04-15 15:49:28.237976+00:00* # **Info by file extensions** # diff --git a/serializers/maps.py b/serializers/maps.py index 1e03f17..189def0 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -458,12 +458,25 @@ def _prop_json(self, data: dict, instance, is_opened_track, } return res - def _save_mtl(self, terrain_data, path: str, name): + def _save_mtl(self, full_data, terrain_data, path: str, name): with open(os.path.join(path, 'terrain.mtl'), 'w') as f: texture_names = list(set( sum([x['texture_names'] for x in terrain_data], []) + [x['chunk'].fence_texture_name for x in terrain_data if x['chunk'].fence_texture_name] )) + if self.settings.maps__add_props_to_obj: + texture_names += list(set( + ['foreground/' + self._texture_ids(x['data']['data']['resource_id'], + 1, + full_data['loop_chunk'] == 0)[0] + for x in full_data['prop_descr'] + if x['type'] in ['bitmap', 'two_sided_bitmap']] + + ['foreground/' + self._texture_ids(x['data']['data']['resource_id_2'], + 1, + full_data['loop_chunk'] == 0)[0] + for x in full_data['prop_descr'] + if x['type'] == 'two_sided_bitmap'] + )) texture_names.sort() for texture_name in texture_names: f.write(f"""\n\nnewmtl {texture_name} @@ -472,7 +485,7 @@ def _save_mtl(self, terrain_data, path: str, name): Ks 0.000000 0.000000 0.000000 illum 1 Ns 0.000000 - map_Kd ../../ETRACKFM/{name[:3]}_001.FAM/background/{texture_name}.png""") + map_Kd ../../ETRACKFM/{name[:3]}_001.FAM/{texture_name if texture_name.startswith('foreground') else 'background/' + texture_name}.png""") def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): super().serialize(data, path) @@ -549,7 +562,7 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): if left_barrier_points: left_barrier_points.points = [[p[0], p[2], p[1]] for p in left_barrier_points.points] left_barrier_points.z_up = True - self._save_mtl(terrain_data, path, id.split('/')[-1]) + self._save_mtl(data, terrain_data, path, id.split('/')[-1]) blender_script = "bpy.ops.wm.read_factory_settings(use_empty=True)" if self.settings.maps__save_as_chunked: for i, terrain_chunk in enumerate(terrain_data): @@ -589,6 +602,61 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): obj, fii = sub_model.to_obj(face_index_increment, mtllib='terrain.mtl') f.write(obj) face_index_increment += fii + if self.settings.maps__add_props_to_obj: + for i, p in enumerate(data['props']): + if p['road_point_idx'] > len(data['terrain']) * 4 or p['road_point_idx'] < 0: + continue + descr = data['prop_descr'][p['prop_descr_idx']] + spline_point = data['road_spline'][p['road_point_idx']] + if descr['type'] in ['bitmap', 'two_sided_bitmap']: + width = descr['data']['data']['width'] + height = descr['data']['data']['height'] + mesh = SubMesh() + mesh.name = f'prop_{i}' + mesh.vertices = [ + [-width / 2, 0, height], + [width / 2, 0, height], + [width / 2, 0, 0], + [-width / 2, 0, 0], + ] + mesh.rotate_z(p['rotation'] + spline_point['orientation']) + mesh.vertex_uvs = [[0, 0], [1, 0], [1, 1], [0, 1]] + mesh.polygons = [[0, 2, 3], [0, 1, 2]] + mesh.pivot_offset = ( + -(p['position']['x'] + spline_point['position']['x']), + -(p['position']['y'] + spline_point['position']['y']), + -(p['position']['z'] + spline_point['position']['z']), + ) + mesh.texture_id = 'foreground/' + self._texture_ids(descr['data']['data']['resource_id'], 1, + is_opened_track)[0] + obj, fii = mesh.to_obj(face_index_increment, mtllib='terrain.mtl') + f.write(obj) + face_index_increment += fii + if descr['type'] == 'two_sided_bitmap': + width_2 = descr['data']['data']['width_2'] + mesh = SubMesh() + mesh.name = f'prop_{i}_2' + mesh.vertices = [ + [width / 2, 0, height], + [width / 2, width_2, height], + [width / 2, width_2, 0], + [width / 2, 0, 0], + ] + mesh.rotate_z(p['rotation'] + spline_point['orientation']) + mesh.vertex_uvs = [[0, 0], [1, 0], [1, 1], [0, 1]] + mesh.polygons = [[0, 2, 3], [0, 1, 2]] + mesh.pivot_offset = ( + -(p['position']['x'] + spline_point['position']['x']), + -(p['position']['y'] + spline_point['position']['y']), + -(p['position']['z'] + spline_point['position']['z']), + ) + mesh.texture_id = 'foreground/' + self._texture_ids(descr['data']['data']['resource_id_2'], 1, + is_opened_track)[0] + obj, fii = mesh.to_obj(face_index_increment, mtllib='terrain.mtl') + f.write(obj) + face_index_increment += fii + else: + print() blender_script += '\n\n\n' + self.blender_chunk_script.substitute({ 'new_file': False, diff --git a/settings.py b/settings.py index ec0f432..b8f48f4 100644 --- a/settings.py +++ b/settings.py @@ -57,9 +57,11 @@ maps__save_terrain_collisions = False # alongside with horz.png, save spherical.png, suitable to be used as sky spherical texture maps__save_spherical_skybox_texture = True +# NFS1: put props to exported map obj file. Props will be retrieved from ../ETRACKFM/_001.FAM file +maps__add_props_to_obj = True # saves obj file for each 3D scene. obj-s are used under the hood, so if true it is even faster, we do not delete them -geometry__save_obj = False +geometry__save_obj = True # saves blender scene for each 3D scene geometry__save_blend = True # export to gg-web-engine https://github.com/AndyGura/gg-web-engine From cb2944b23af4a4636f9aeb5daa2f312f0bbccfbe Mon Sep 17 00:00:00 2001 From: Andy Date: Mon, 15 Apr 2024 22:59:11 +0300 Subject: [PATCH 2/7] 3D props into TRI map obj without textures --- serializers/geometries.py | 11 +++++++++-- serializers/maps.py | 38 +++++++++++++++++++++++++------------- 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/serializers/geometries.py b/serializers/geometries.py index d736757..32fb742 100644 --- a/serializers/geometries.py +++ b/serializers/geometries.py @@ -96,7 +96,7 @@ def _setup_vertex(self, block_data['vertex_uvs'][block_data['vmap'][index_2D]]['v'] * v_multiplier]) return vertices_file_indices_map[model][index_3D] - def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): + def require_shpi(self, id): # shpi is always next block from library import require_resource shpi_id = id.split('/') @@ -104,8 +104,10 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): (shpi_id, textures_shpi_block, textures_shpi_data), _ = require_resource('/'.join(shpi_id)) if not textures_shpi_data or not isinstance(textures_shpi_block, ShpiBlock): raise DataIntegrityException('Cannot find SHPI archive for ORIP geometry') + return (shpi_id, textures_shpi_block, textures_shpi_data) - super().serialize(data, path) + def build_mesh(self, data: dict, id=None): + (shpi_id, textures_shpi_block, textures_shpi_data) = self.require_shpi(id) try: is_car = '.CFM__' in id except: @@ -219,6 +221,11 @@ def get_wheel_polygon_key(polygon) -> Literal['fl', 'fr', 'rl', 'rr', None]: sub_model.change_axes(new_z='y', new_y='z') for dummy in dummies: dummy['position'] = [dummy['position'][0], dummy['position'][2], dummy['position'][1]] + return shpi_id, textures_shpi_block, textures_shpi_data, sub_models, dummies, is_car + + def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): + super().serialize(data, path) + shpi_id, textures_shpi_block, textures_shpi_data, sub_models, dummies, is_car = self.build_mesh(data, id) with open(os.path.join(path, 'geometry.obj'), 'w') as f: f.write('mtllib material.mtl') face_index_increment = 1 diff --git a/serializers/maps.py b/serializers/maps.py index 189def0..1e2d042 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -608,6 +608,15 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): continue descr = data['prop_descr'][p['prop_descr_idx']] spline_point = data['road_spline'][p['road_point_idx']] + + def position_mesh(mesh): + mesh.rotate_z(p['rotation'] + spline_point['orientation']) + mesh.pivot_offset = ( + -(p['position']['x'] + spline_point['position']['x']), + -(p['position']['y'] + spline_point['position']['y']), + -(p['position']['z'] + spline_point['position']['z']), + ) + if descr['type'] in ['bitmap', 'two_sided_bitmap']: width = descr['data']['data']['width'] height = descr['data']['data']['height'] @@ -619,14 +628,9 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): [width / 2, 0, 0], [-width / 2, 0, 0], ] - mesh.rotate_z(p['rotation'] + spline_point['orientation']) mesh.vertex_uvs = [[0, 0], [1, 0], [1, 1], [0, 1]] mesh.polygons = [[0, 2, 3], [0, 1, 2]] - mesh.pivot_offset = ( - -(p['position']['x'] + spline_point['position']['x']), - -(p['position']['y'] + spline_point['position']['y']), - -(p['position']['z'] + spline_point['position']['z']), - ) + position_mesh(mesh) mesh.texture_id = 'foreground/' + self._texture_ids(descr['data']['data']['resource_id'], 1, is_opened_track)[0] obj, fii = mesh.to_obj(face_index_increment, mtllib='terrain.mtl') @@ -642,21 +646,29 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): [width / 2, width_2, 0], [width / 2, 0, 0], ] - mesh.rotate_z(p['rotation'] + spline_point['orientation']) mesh.vertex_uvs = [[0, 0], [1, 0], [1, 1], [0, 1]] mesh.polygons = [[0, 2, 3], [0, 1, 2]] - mesh.pivot_offset = ( - -(p['position']['x'] + spline_point['position']['x']), - -(p['position']['y'] + spline_point['position']['y']), - -(p['position']['z'] + spline_point['position']['z']), - ) + position_mesh(mesh) mesh.texture_id = 'foreground/' + self._texture_ids(descr['data']['data']['resource_id_2'], 1, is_opened_track)[0] obj, fii = mesh.to_obj(face_index_increment, mtllib='terrain.mtl') f.write(obj) face_index_increment += fii else: - print() + from library import require_resource + (prop_id, prop_block, prop_data), _ = require_resource( + os.path.join('/'.join(id.split('/')[:-2]), + f'ETRACKFM/{id.split("/")[-1][:3]}_001.FAM__children/3/data/children' + f'/{descr["data"]["data"]["resource_id"]}/data/children/0/data') + ) + from serializers import OripGeometrySerializer + _, _, shpi_data, sub_models, _, _ = OripGeometrySerializer().build_mesh(prop_data, prop_id) + for mesh in sub_models.values(): + mesh.name = f'prop_{i}_' + mesh.name + position_mesh(mesh) + obj, fii = mesh.to_obj(face_index_increment, mtllib='terrain.mtl') + f.write(obj) + face_index_increment += fii blender_script += '\n\n\n' + self.blender_chunk_script.substitute({ 'new_file': False, From c6e7e059b7eb3e1aba47b28740d1c553497c9ac8 Mon Sep 17 00:00:00 2001 From: Andy Date: Tue, 16 Apr 2024 07:35:53 +0300 Subject: [PATCH 3/7] 3D props textures --- serializers/maps.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/serializers/maps.py b/serializers/maps.py index 1e2d042..a5dc117 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -662,13 +662,28 @@ def position_mesh(mesh): f'/{descr["data"]["data"]["resource_id"]}/data/children/0/data') ) from serializers import OripGeometrySerializer - _, _, shpi_data, sub_models, _, _ = OripGeometrySerializer().build_mesh(prop_data, prop_id) + _, shpi_block, shpi_data, sub_models, _, _ = OripGeometrySerializer().build_mesh(prop_data, prop_id) for mesh in sub_models.values(): mesh.name = f'prop_{i}_' + mesh.name + mesh.texture_id = f"prop/{descr['data']['data']['resource_id']}/assets/" + mesh.texture_id position_mesh(mesh) obj, fii = mesh.to_obj(face_index_increment, mtllib='terrain.mtl') f.write(obj) face_index_increment += fii + with open(os.path.join(path, 'terrain.mtl'), 'a') as mtl: + for ti, texture_name in enumerate(shpi_data['children_aliases']): + texture_block = shpi_block.field_blocks_map['children'].child.possible_blocks[ + shpi_data['children'][ti]['choice_index']] + from resources.eac.bitmaps import AnyBitmapBlock + if not isinstance(texture_block, AnyBitmapBlock): + continue + mtl.write(f"""\n\nnewmtl prop/{descr['data']['data']['resource_id']}/assets/{texture_name} + Ka 1.000000 1.000000 1.000000 + Kd 1.000000 1.000000 1.000000 + Ks 0.000000 0.000000 0.000000 + illum 1 + Ns 0.000000 + map_Kd ../../ETRACKFM/{id.split('/')[-1][:3]}_001.FAM/props/{descr['data']['data']['resource_id']}/0/assets/{texture_name}.png""") blender_script += '\n\n\n' + self.blender_chunk_script.substitute({ 'new_file': False, From 1bd736cd1680ecaa89edbae2bbf38712d09c20ce Mon Sep 17 00:00:00 2001 From: Andy Date: Tue, 16 Apr 2024 07:47:44 +0300 Subject: [PATCH 4/7] code adjustments --- serializers/maps.py | 207 +++++++++++++++++++++++--------------------- 1 file changed, 110 insertions(+), 97 deletions(-) diff --git a/serializers/maps.py b/serializers/maps.py index a5dc117..d72f564 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -458,25 +458,12 @@ def _prop_json(self, data: dict, instance, is_opened_track, } return res - def _save_mtl(self, full_data, terrain_data, path: str, name): + def _save_mtl(self, terrain_data, path: str, name): with open(os.path.join(path, 'terrain.mtl'), 'w') as f: texture_names = list(set( sum([x['texture_names'] for x in terrain_data], []) + [x['chunk'].fence_texture_name for x in terrain_data if x['chunk'].fence_texture_name] )) - if self.settings.maps__add_props_to_obj: - texture_names += list(set( - ['foreground/' + self._texture_ids(x['data']['data']['resource_id'], - 1, - full_data['loop_chunk'] == 0)[0] - for x in full_data['prop_descr'] - if x['type'] in ['bitmap', 'two_sided_bitmap']] - + ['foreground/' + self._texture_ids(x['data']['data']['resource_id_2'], - 1, - full_data['loop_chunk'] == 0)[0] - for x in full_data['prop_descr'] - if x['type'] == 'two_sided_bitmap'] - )) texture_names.sort() for texture_name in texture_names: f.write(f"""\n\nnewmtl {texture_name} @@ -485,7 +472,113 @@ def _save_mtl(self, full_data, terrain_data, path: str, name): Ks 0.000000 0.000000 0.000000 illum 1 Ns 0.000000 - map_Kd ../../ETRACKFM/{name[:3]}_001.FAM/{texture_name if texture_name.startswith('foreground') else 'background/' + texture_name}.png""") + map_Kd ../../ETRACKFM/{name[:3]}_001.FAM/background/{texture_name}.png""") + + def render_props_to_obj(self, id, f, path, data, face_index_increment, is_opened_track): + foreground_texture_names = list(set( + ['foreground/' + self._texture_ids(x['data']['data']['resource_id'], + 1, + data['loop_chunk'] == 0)[0] + for x in data['prop_descr'] + if x['type'] in ['bitmap', 'two_sided_bitmap']] + + ['foreground/' + self._texture_ids(x['data']['data']['resource_id_2'], + 1, + data['loop_chunk'] == 0)[0] + for x in data['prop_descr'] + if x['type'] == 'two_sided_bitmap'] + )) + foreground_texture_names.sort() + for texture_name in foreground_texture_names: + with open(os.path.join(path, 'terrain.mtl'), 'a') as mtl: + mtl.write(f"""\n\nnewmtl {texture_name} + Ka 1.000000 1.000000 1.000000 + Kd 1.000000 1.000000 1.000000 + Ks 0.000000 0.000000 0.000000 + illum 1 + Ns 0.000000 + map_Kd ../../ETRACKFM/{id.split("/")[-1][:3]}_001.FAM/{texture_name}.png""") + for i, p in enumerate(data['props']): + if p['road_point_idx'] > len(data['terrain']) * 4 or p['road_point_idx'] < 0: + continue + descr = data['prop_descr'][p['prop_descr_idx']] + spline_point = data['road_spline'][p['road_point_idx']] + + def position_mesh(mesh): + mesh.rotate_z(p['rotation'] + spline_point['orientation']) + mesh.pivot_offset = ( + -(p['position']['x'] + spline_point['position']['x']), + -(p['position']['y'] + spline_point['position']['y']), + -(p['position']['z'] + spline_point['position']['z']), + ) + + if descr['type'] in ['bitmap', 'two_sided_bitmap']: + width = descr['data']['data']['width'] + height = descr['data']['data']['height'] + mesh = SubMesh() + mesh.name = f'prop_{i}' + mesh.vertices = [ + [-width / 2, 0, height], + [width / 2, 0, height], + [width / 2, 0, 0], + [-width / 2, 0, 0], + ] + mesh.vertex_uvs = [[0, 0], [1, 0], [1, 1], [0, 1]] + mesh.polygons = [[0, 2, 3], [0, 1, 2]] + position_mesh(mesh) + mesh.texture_id = 'foreground/' + self._texture_ids(descr['data']['data']['resource_id'], 1, + is_opened_track)[0] + obj, fii = mesh.to_obj(face_index_increment, mtllib='terrain.mtl') + f.write(obj) + face_index_increment += fii + if descr['type'] == 'two_sided_bitmap': + width_2 = descr['data']['data']['width_2'] + mesh = SubMesh() + mesh.name = f'prop_{i}_2' + mesh.vertices = [ + [width / 2, 0, height], + [width / 2, width_2, height], + [width / 2, width_2, 0], + [width / 2, 0, 0], + ] + mesh.vertex_uvs = [[0, 0], [1, 0], [1, 1], [0, 1]] + mesh.polygons = [[0, 2, 3], [0, 1, 2]] + position_mesh(mesh) + mesh.texture_id = 'foreground/' + self._texture_ids(descr['data']['data']['resource_id_2'], 1, + is_opened_track)[0] + obj, fii = mesh.to_obj(face_index_increment, mtllib='terrain.mtl') + f.write(obj) + face_index_increment += fii + else: + from library import require_resource + (prop_id, prop_block, prop_data), _ = require_resource( + os.path.join('/'.join(id.split('/')[:-2]), + f'ETRACKFM/{id.split("/")[-1][:3]}_001.FAM__children/3/data/children' + f'/{descr["data"]["data"]["resource_id"]}/data/children/0/data') + ) + from serializers import OripGeometrySerializer + _, shpi_block, shpi_data, sub_models, _, _ = OripGeometrySerializer().build_mesh(prop_data, prop_id) + for mesh in sub_models.values(): + mesh.name = f'prop_{i}_' + mesh.name + mesh.texture_id = f"prop/{descr['data']['data']['resource_id']}/assets/" + mesh.texture_id + position_mesh(mesh) + obj, fii = mesh.to_obj(face_index_increment, mtllib='terrain.mtl') + f.write(obj) + face_index_increment += fii + with open(os.path.join(path, 'terrain.mtl'), 'a') as mtl: + for ti, texture_name in enumerate(shpi_data['children_aliases']): + texture_block = shpi_block.field_blocks_map['children'].child.possible_blocks[ + shpi_data['children'][ti]['choice_index']] + from resources.eac.bitmaps import AnyBitmapBlock + if not isinstance(texture_block, AnyBitmapBlock): + continue + mtl.write(f"""\n\nnewmtl prop/{descr['data']['data']['resource_id']}/assets/{texture_name} + Ka 1.000000 1.000000 1.000000 + Kd 1.000000 1.000000 1.000000 + Ks 0.000000 0.000000 0.000000 + illum 1 + Ns 0.000000 + map_Kd ../../ETRACKFM/{id.split('/')[-1][:3]}_001.FAM/props/{descr['data']['data']['resource_id']}/0/assets/{texture_name}.png""") + return face_index_increment def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): super().serialize(data, path) @@ -562,7 +655,7 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): if left_barrier_points: left_barrier_points.points = [[p[0], p[2], p[1]] for p in left_barrier_points.points] left_barrier_points.z_up = True - self._save_mtl(data, terrain_data, path, id.split('/')[-1]) + self._save_mtl(terrain_data, path, id.split('/')[-1]) blender_script = "bpy.ops.wm.read_factory_settings(use_empty=True)" if self.settings.maps__save_as_chunked: for i, terrain_chunk in enumerate(terrain_data): @@ -603,87 +696,7 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): f.write(obj) face_index_increment += fii if self.settings.maps__add_props_to_obj: - for i, p in enumerate(data['props']): - if p['road_point_idx'] > len(data['terrain']) * 4 or p['road_point_idx'] < 0: - continue - descr = data['prop_descr'][p['prop_descr_idx']] - spline_point = data['road_spline'][p['road_point_idx']] - - def position_mesh(mesh): - mesh.rotate_z(p['rotation'] + spline_point['orientation']) - mesh.pivot_offset = ( - -(p['position']['x'] + spline_point['position']['x']), - -(p['position']['y'] + spline_point['position']['y']), - -(p['position']['z'] + spline_point['position']['z']), - ) - - if descr['type'] in ['bitmap', 'two_sided_bitmap']: - width = descr['data']['data']['width'] - height = descr['data']['data']['height'] - mesh = SubMesh() - mesh.name = f'prop_{i}' - mesh.vertices = [ - [-width / 2, 0, height], - [width / 2, 0, height], - [width / 2, 0, 0], - [-width / 2, 0, 0], - ] - mesh.vertex_uvs = [[0, 0], [1, 0], [1, 1], [0, 1]] - mesh.polygons = [[0, 2, 3], [0, 1, 2]] - position_mesh(mesh) - mesh.texture_id = 'foreground/' + self._texture_ids(descr['data']['data']['resource_id'], 1, - is_opened_track)[0] - obj, fii = mesh.to_obj(face_index_increment, mtllib='terrain.mtl') - f.write(obj) - face_index_increment += fii - if descr['type'] == 'two_sided_bitmap': - width_2 = descr['data']['data']['width_2'] - mesh = SubMesh() - mesh.name = f'prop_{i}_2' - mesh.vertices = [ - [width / 2, 0, height], - [width / 2, width_2, height], - [width / 2, width_2, 0], - [width / 2, 0, 0], - ] - mesh.vertex_uvs = [[0, 0], [1, 0], [1, 1], [0, 1]] - mesh.polygons = [[0, 2, 3], [0, 1, 2]] - position_mesh(mesh) - mesh.texture_id = 'foreground/' + self._texture_ids(descr['data']['data']['resource_id_2'], 1, - is_opened_track)[0] - obj, fii = mesh.to_obj(face_index_increment, mtllib='terrain.mtl') - f.write(obj) - face_index_increment += fii - else: - from library import require_resource - (prop_id, prop_block, prop_data), _ = require_resource( - os.path.join('/'.join(id.split('/')[:-2]), - f'ETRACKFM/{id.split("/")[-1][:3]}_001.FAM__children/3/data/children' - f'/{descr["data"]["data"]["resource_id"]}/data/children/0/data') - ) - from serializers import OripGeometrySerializer - _, shpi_block, shpi_data, sub_models, _, _ = OripGeometrySerializer().build_mesh(prop_data, prop_id) - for mesh in sub_models.values(): - mesh.name = f'prop_{i}_' + mesh.name - mesh.texture_id = f"prop/{descr['data']['data']['resource_id']}/assets/" + mesh.texture_id - position_mesh(mesh) - obj, fii = mesh.to_obj(face_index_increment, mtllib='terrain.mtl') - f.write(obj) - face_index_increment += fii - with open(os.path.join(path, 'terrain.mtl'), 'a') as mtl: - for ti, texture_name in enumerate(shpi_data['children_aliases']): - texture_block = shpi_block.field_blocks_map['children'].child.possible_blocks[ - shpi_data['children'][ti]['choice_index']] - from resources.eac.bitmaps import AnyBitmapBlock - if not isinstance(texture_block, AnyBitmapBlock): - continue - mtl.write(f"""\n\nnewmtl prop/{descr['data']['data']['resource_id']}/assets/{texture_name} - Ka 1.000000 1.000000 1.000000 - Kd 1.000000 1.000000 1.000000 - Ks 0.000000 0.000000 0.000000 - illum 1 - Ns 0.000000 - map_Kd ../../ETRACKFM/{id.split('/')[-1][:3]}_001.FAM/props/{descr['data']['data']['resource_id']}/0/assets/{texture_name}.png""") + self.render_props_to_obj(id, f, path, data, face_index_increment, is_opened_track) blender_script += '\n\n\n' + self.blender_chunk_script.substitute({ 'new_file': False, From 233d2ca477769dae99e7d87aa83b19aa635bb537 Mon Sep 17 00:00:00 2001 From: Andy Date: Tue, 16 Apr 2024 08:10:22 +0300 Subject: [PATCH 5/7] props to chunked map obj-s --- serializers/maps.py | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/serializers/maps.py b/serializers/maps.py index d72f564..d98e4d4 100644 --- a/serializers/maps.py +++ b/serializers/maps.py @@ -474,7 +474,7 @@ def _save_mtl(self, terrain_data, path: str, name): Ns 0.000000 map_Kd ../../ETRACKFM/{name[:3]}_001.FAM/background/{texture_name}.png""") - def render_props_to_obj(self, id, f, path, data, face_index_increment, is_opened_track): + def mtl_append_foreground_textures(self, data, path, name): foreground_texture_names = list(set( ['foreground/' + self._texture_ids(x['data']['data']['resource_id'], 1, @@ -488,17 +488,19 @@ def render_props_to_obj(self, id, f, path, data, face_index_increment, is_opened if x['type'] == 'two_sided_bitmap'] )) foreground_texture_names.sort() - for texture_name in foreground_texture_names: - with open(os.path.join(path, 'terrain.mtl'), 'a') as mtl: + with open(os.path.join(path, 'terrain.mtl'), 'a') as mtl: + for texture_name in foreground_texture_names: mtl.write(f"""\n\nnewmtl {texture_name} - Ka 1.000000 1.000000 1.000000 - Kd 1.000000 1.000000 1.000000 - Ks 0.000000 0.000000 0.000000 - illum 1 - Ns 0.000000 - map_Kd ../../ETRACKFM/{id.split("/")[-1][:3]}_001.FAM/{texture_name}.png""") + Ka 1.000000 1.000000 1.000000 + Kd 1.000000 1.000000 1.000000 + Ks 0.000000 0.000000 0.000000 + illum 1 + Ns 0.000000 + map_Kd ../../ETRACKFM/{name[:3]}_001.FAM/{texture_name}.png""") + + def render_props_to_obj(self, id, f, path, data, face_index_increment, is_opened_track, min_id, max_id, pivot=(0, 0, 0)): for i, p in enumerate(data['props']): - if p['road_point_idx'] > len(data['terrain']) * 4 or p['road_point_idx'] < 0: + if p['road_point_idx'] > max_id or p['road_point_idx'] < min_id: continue descr = data['prop_descr'][p['prop_descr_idx']] spline_point = data['road_spline'][p['road_point_idx']] @@ -506,9 +508,9 @@ def render_props_to_obj(self, id, f, path, data, face_index_increment, is_opened def position_mesh(mesh): mesh.rotate_z(p['rotation'] + spline_point['orientation']) mesh.pivot_offset = ( - -(p['position']['x'] + spline_point['position']['x']), - -(p['position']['y'] + spline_point['position']['y']), - -(p['position']['z'] + spline_point['position']['z']), + pivot[0] - (p['position']['x'] + spline_point['position']['x']), + pivot[1] - (p['position']['y'] + spline_point['position']['y']), + pivot[2] - (p['position']['z'] + spline_point['position']['z']), ) if descr['type'] in ['bitmap', 'two_sided_bitmap']: @@ -656,19 +658,24 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): left_barrier_points.points = [[p[0], p[2], p[1]] for p in left_barrier_points.points] left_barrier_points.z_up = True self._save_mtl(terrain_data, path, id.split('/')[-1]) + if self.settings.maps__add_props_to_obj: + self.mtl_append_foreground_textures(data, path, id.split('/')[-1]) blender_script = "bpy.ops.wm.read_factory_settings(use_empty=True)" if self.settings.maps__save_as_chunked: for i, terrain_chunk in enumerate(terrain_data): with open(os.path.join(path, f'terrain_chunk_{i}.obj'), 'w') as f: face_index_increment = 1 + pivot = ( + data['road_spline'][i * 4]['position']['x'], + data['road_spline'][i * 4]['position']['y'], + data['road_spline'][i * 4]['position']['z'], + ) for sub_model in terrain_chunk['meshes']: - obj, fii = sub_model.to_obj(face_index_increment, mtllib='terrain.mtl', pivot_offset=( - data['road_spline'][i * 4]['position']['x'], - data['road_spline'][i * 4]['position']['y'], - data['road_spline'][i * 4]['position']['z'], - )) + obj, fii = sub_model.to_obj(face_index_increment, mtllib='terrain.mtl', pivot_offset=pivot) f.write(obj) face_index_increment += fii + if self.settings.maps__add_props_to_obj: + self.render_props_to_obj(id, f, path, data, face_index_increment, is_opened_track, i * 4, i * 4 + 3, pivot) blender_script += '\n\n\n' + self.blender_chunk_script.substitute({ 'new_file': True, 'save_invisible_wall_collisions': self.settings.maps__save_invisible_wall_collisions, @@ -696,7 +703,7 @@ def serialize(self, data: dict, path: str, id=None, block=None, **kwargs): f.write(obj) face_index_increment += fii if self.settings.maps__add_props_to_obj: - self.render_props_to_obj(id, f, path, data, face_index_increment, is_opened_track) + self.render_props_to_obj(id, f, path, data, face_index_increment, is_opened_track, 0, len(data['terrain']) * 4 - 1) blender_script += '\n\n\n' + self.blender_chunk_script.substitute({ 'new_file': False, From 105498b896a1c2ec13df85d5537199a31310075e Mon Sep 17 00:00:00 2001 From: Andy Date: Tue, 16 Apr 2024 08:17:22 +0300 Subject: [PATCH 6/7] revert excess changes --- resources/NFS2.md | 2 +- resources/NFS2_SE.md | 2 +- resources/NFS3.md | 2 +- resources/NFS4.md | 2 +- resources/NFS5.md | 2 +- resources/NFS6.md | 2 +- resources/TNFS_SE.md | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/resources/NFS2.md b/resources/NFS2.md index 32ac4db..05f9420 100644 --- a/resources/NFS2.md +++ b/resources/NFS2.md @@ -1,6 +1,6 @@ # **NFS2 file specs** # -*Last time updated: 2024-04-15 15:49:28.381279+00:00* +*Last time updated: 2024-03-17 22:29:34.162166+00:00* # **Info by file extensions** # diff --git a/resources/NFS2_SE.md b/resources/NFS2_SE.md index a279396..8b470c8 100644 --- a/resources/NFS2_SE.md +++ b/resources/NFS2_SE.md @@ -1,6 +1,6 @@ # **NFS2SE file specs** # -*Last time updated: 2024-04-15 15:49:28.554690+00:00* +*Last time updated: 2024-03-17 22:29:34.220347+00:00* # **Info by file extensions** # diff --git a/resources/NFS3.md b/resources/NFS3.md index 64b20bb..5362407 100644 --- a/resources/NFS3.md +++ b/resources/NFS3.md @@ -1,6 +1,6 @@ # **NFS 3 Hot Pursuit file specs** # -*Last time updated: 2024-04-15 15:49:28.736816+00:00* +*Last time updated: 2024-03-18 09:11:00.727030+00:00* # **Info by file extensions** # diff --git a/resources/NFS4.md b/resources/NFS4.md index 6f636b5..a1f1808 100644 --- a/resources/NFS4.md +++ b/resources/NFS4.md @@ -1,6 +1,6 @@ # **NFS 4 High Stakes file specs** # -*Last time updated: 2024-04-15 15:49:28.868295+00:00* +*Last time updated: 2024-03-18 09:11:00.782611+00:00* # **Info by file extensions** # diff --git a/resources/NFS5.md b/resources/NFS5.md index 0ac5f85..1882098 100644 --- a/resources/NFS5.md +++ b/resources/NFS5.md @@ -1,6 +1,6 @@ # **NFS 5 Porsche Unleashed file specs** # -*Last time updated: 2024-04-15 15:49:28.994847+00:00* +*Last time updated: 2024-03-19 08:14:22.143386+00:00* # **Info by file extensions** # diff --git a/resources/NFS6.md b/resources/NFS6.md index fd7b20e..a1898f7 100644 --- a/resources/NFS6.md +++ b/resources/NFS6.md @@ -1,6 +1,6 @@ # **NFS 6 Hot Pursuit 2 file specs** # -*Last time updated: 2024-04-15 15:49:29.111774+00:00* +*Last time updated: 2024-03-19 08:44:55.111615+00:00* # **Info by file extensions** # diff --git a/resources/TNFS_SE.md b/resources/TNFS_SE.md index 19bca88..cd56db8 100644 --- a/resources/TNFS_SE.md +++ b/resources/TNFS_SE.md @@ -1,6 +1,6 @@ # **TNFSSE (PC) file specs** # -*Last time updated: 2024-04-15 15:49:28.237976+00:00* +*Last time updated: 2024-03-17 22:29:34.105080+00:00* # **Info by file extensions** # From d381965dd3cbef575e7e93dec7b6b1f862fd7a0d Mon Sep 17 00:00:00 2001 From: Andy Date: Tue, 16 Apr 2024 08:19:03 +0300 Subject: [PATCH 7/7] turned off props in obj by default --- settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.py b/settings.py index b8f48f4..5e6ab93 100644 --- a/settings.py +++ b/settings.py @@ -58,7 +58,7 @@ # alongside with horz.png, save spherical.png, suitable to be used as sky spherical texture maps__save_spherical_skybox_texture = True # NFS1: put props to exported map obj file. Props will be retrieved from ../ETRACKFM/_001.FAM file -maps__add_props_to_obj = True +maps__add_props_to_obj = False # saves obj file for each 3D scene. obj-s are used under the hood, so if true it is even faster, we do not delete them geometry__save_obj = True