@pixeasy/customizer-stage 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,7 @@ var CV=Object.defineProperty,SV=Object.defineProperties;var wV=Object.getOwnProp
|
|
|
2
2
|
${t.map((n,r)=>`${r+1}) ${n.toString()}`).join(`
|
|
3
3
|
`)}`:"",this.name="UnsubscriptionError",this.errors=t});function zp(i,e){if(i){let t=i.indexOf(e);0<=t&&i.splice(t,1)}}var Dr=class i{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;let{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(let o of t)o.remove(this);else t.remove(this);let{initialTeardown:n}=this;if(Kt(n))try{n()}catch(o){e=o instanceof A0?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{mP(o)}catch(a){e=e??[],a instanceof A0?e=[...e,...a.errors]:e.push(a)}}if(e)throw new A0(e)}}add(e){var t;if(e&&e!==this)if(this.closed)mP(e);else{if(e instanceof i){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}}_hasParent(e){let{_parentage:t}=this;return t===e||Array.isArray(t)&&t.includes(e)}_addParent(e){let{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e}_removeParent(e){let{_parentage:t}=this;t===e?this._parentage=null:Array.isArray(t)&&zp(t,e)}remove(e){let{_finalizers:t}=this;t&&zp(t,e),e instanceof i&&e._removeParent(this)}};Dr.EMPTY=(()=>{let i=new Dr;return i.closed=!0,i})();var f1=Dr.EMPTY;function O0(i){return i instanceof Dr||i&&"closed"in i&&Kt(i.remove)&&Kt(i.add)&&Kt(i.unsubscribe)}function mP(i){Kt(i)?i():i.unsubscribe()}var Ta={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var mf={setTimeout(i,e,...t){let{delegate:n}=mf;return n?.setTimeout?n.setTimeout(i,e,...t):setTimeout(i,e,...t)},clearTimeout(i){let{delegate:e}=mf;return(e?.clearTimeout||clearTimeout)(i)},delegate:void 0};function P0(i){mf.setTimeout(()=>{let{onUnhandledError:e}=Ta;if(e)e(i);else throw i})}function Up(){}var gP=h1("C",void 0,void 0);function bP(i){return h1("E",void 0,i)}function vP(i){return h1("N",i,void 0)}function h1(i,e,t){return{kind:i,value:e,error:t}}var Ed=null;function gf(i){if(Ta.useDeprecatedSynchronousErrorHandling){let e=!Ed;if(e&&(Ed={errorThrown:!1,error:null}),i(),e){let{errorThrown:t,error:n}=Ed;if(Ed=null,t)throw n}}else i()}function yP(i){Ta.useDeprecatedSynchronousErrorHandling&&Ed&&(Ed.errorThrown=!0,Ed.error=i)}var Td=class extends Dr{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,O0(e)&&e.add(this)):this.destination=NV}static create(e,t,n){return new jl(e,t,n)}next(e){this.isStopped?m1(vP(e),this):this._next(e)}error(e){this.isStopped?m1(bP(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?m1(gP,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()}}},kV=Function.prototype.bind;function p1(i,e){return kV.call(i,e)}var g1=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(n){I0(n)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(n){I0(n)}else I0(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){I0(t)}}},jl=class extends Td{constructor(e,t,n){super();let r;if(Kt(e)||!e)r={next:e??void 0,error:t??void 0,complete:n??void 0};else{let o;this&&Ta.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&p1(e.next,o),error:e.error&&p1(e.error,o),complete:e.complete&&p1(e.complete,o)}):r=e}this.destination=new g1(r)}};function I0(i){Ta.useDeprecatedSynchronousErrorHandling?yP(i):P0(i)}function RV(i){throw i}function m1(i,e){let{onStoppedNotification:t}=Ta;t&&mf.setTimeout(()=>t(i,e))}var NV={closed:!0,next:Up,error:RV,complete:Up};var bf=typeof Symbol=="function"&&Symbol.observable||"@@observable";function k0(i){return i}function _P(i){return i.length===0?k0:i.length===1?i[0]:function(t){return i.reduce((n,r)=>r(n),t)}}var Pn=(()=>{class i{constructor(t){t&&(this._subscribe=t)}lift(t){let n=new i;return n.source=this,n.operator=t,n}subscribe(t,n,r){let o=LV(t)?t:new jl(t,n,r);return gf(()=>{let{operator:a,source:s}=this;o.add(a?a.call(o,s):s?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(t){try{return this._subscribe(t)}catch(n){t.error(n)}}forEach(t,n){return n=xP(n),new n((r,o)=>{let a=new jl({next:s=>{try{t(s)}catch(l){o(l),a.unsubscribe()}},error:o,complete:r});this.subscribe(a)})}_subscribe(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)}[bf](){return this}pipe(...t){return _P(t)(this)}toPromise(t){return t=xP(t),new t((n,r)=>{let o;this.subscribe(a=>o=a,a=>r(a),()=>n(o))})}}return i.create=e=>new i(e),i})();function xP(i){var e;return(e=i??Ta.Promise)!==null&&e!==void 0?e:Promise}function FV(i){return i&&Kt(i.next)&&Kt(i.error)&&Kt(i.complete)}function LV(i){return i&&i instanceof Td||FV(i)&&O0(i)}function BV(i){return Kt(i?.lift)}function Ti(i){return e=>{if(BV(e))return e.lift(function(t){try{return i(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Mi(i,e,t,n,r){return new b1(i,e,t,n,r)}var b1=class extends Td{constructor(e,t,n,r,o,a){super(e),this.onFinalize=o,this.shouldUnsubscribe=a,this._next=t?function(s){try{t(s)}catch(l){e.error(l)}}:super._next,this._error=r?function(s){try{r(s)}catch(l){e.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(s){e.error(s)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:t}=this;super.unsubscribe(),!t&&((e=this.onFinalize)===null||e===void 0||e.call(this))}}};var CP=pf(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var Ma=(()=>{class i extends Pn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){let n=new R0(this,this);return n.operator=t,n}_throwIfClosed(){if(this.closed)throw new CP}next(t){gf(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(t)}})}error(t){gf(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;let{observers:n}=this;for(;n.length;)n.shift().error(t)}})}complete(){gf(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:t}=this;for(;t.length;)t.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){let{hasError:n,isStopped:r,observers:o}=this;return n||r?f1:(this.currentObservers=null,o.push(t),new Dr(()=>{this.currentObservers=null,zp(o,t)}))}_checkFinalizedStatuses(t){let{hasError:n,thrownError:r,isStopped:o}=this;n?t.error(r):o&&t.complete()}asObservable(){let t=new Pn;return t.source=this,t}}return i.create=(e,t)=>new R0(e,t),i})(),R0=class extends Ma{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.next)===null||n===void 0||n.call(t,e)}error(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.error)===null||n===void 0||n.call(t,e)}complete(){var e,t;(t=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||t===void 0||t.call(e)}_subscribe(e){var t,n;return(n=(t=this.source)===null||t===void 0?void 0:t.subscribe(e))!==null&&n!==void 0?n:f1}};var Vp=class extends Ma{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let t=super._subscribe(e);return!t.closed&&e.next(this._value),t}getValue(){let{hasError:e,thrownError:t,_value:n}=this;if(e)throw t;return this._throwIfClosed(),n}next(e){super.next(this._value=e)}};function SP(i){return i&&Kt(i.schedule)}function wP(i){return i[i.length-1]}function EP(i){return Kt(wP(i))?i.pop():void 0}function TP(i){return SP(wP(i))?i.pop():void 0}function DP(i,e,t,n){function r(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function s(d){try{c(n.next(d))}catch(u){a(u)}}function l(d){try{c(n.throw(d))}catch(u){a(u)}}function c(d){d.done?o(d.value):r(d.value).then(s,l)}c((n=n.apply(i,e||[])).next())})}function MP(i){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&i[e],n=0;if(t)return t.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&n>=i.length&&(i=void 0),{value:i&&i[n++],done:!i}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Md(i){return this instanceof Md?(this.v=i,this):new Md(i)}function AP(i,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t.apply(i,e||[]),r,o=[];return r=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),r[Symbol.asyncIterator]=function(){return this},r;function a(h){return function(p){return Promise.resolve(p).then(h,u)}}function s(h,p){n[h]&&(r[h]=function(m){return new Promise(function(g,b){o.push([h,m,g,b])>1||l(h,m)})},p&&(r[h]=p(r[h])))}function l(h,p){try{c(n[h](p))}catch(m){f(o[0][3],m)}}function c(h){h.value instanceof Md?Promise.resolve(h.value.v).then(d,u):f(o[0][2],h)}function d(h){l("next",h)}function u(h){l("throw",h)}function f(h,p){h(p),o.shift(),o.length&&l(o[0][0],o[0][1])}}function OP(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=i[Symbol.asyncIterator],t;return e?e.call(i):(i=typeof MP=="function"?MP(i):i[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=i[o]&&function(a){return new Promise(function(s,l){a=i[o](a),r(s,l,a.done,a.value)})}}function r(o,a,s,l){Promise.resolve(l).then(function(c){o({value:c,done:s})},a)}}var N0=i=>i&&typeof i.length=="number"&&typeof i!="function";function F0(i){return Kt(i?.then)}function L0(i){return Kt(i[bf])}function B0(i){return Symbol.asyncIterator&&Kt(i?.[Symbol.asyncIterator])}function z0(i){return new TypeError(`You provided ${i!==null&&typeof i=="object"?"an invalid object":`'${i}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function zV(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var U0=zV();function V0(i){return Kt(i?.[U0])}function H0(i){return AP(this,arguments,function*(){let t=i.getReader();try{for(;;){let{value:n,done:r}=yield Md(t.read());if(r)return yield Md(void 0);yield yield Md(n)}}finally{t.releaseLock()}})}function G0(i){return Kt(i?.getReader)}function Wi(i){if(i instanceof Pn)return i;if(i!=null){if(L0(i))return UV(i);if(N0(i))return VV(i);if(F0(i))return HV(i);if(B0(i))return PP(i);if(V0(i))return GV(i);if(G0(i))return jV(i)}throw z0(i)}function UV(i){return new Pn(e=>{let t=i[bf]();if(Kt(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function VV(i){return new Pn(e=>{for(let t=0;t<i.length&&!e.closed;t++)e.next(i[t]);e.complete()})}function HV(i){return new Pn(e=>{i.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,P0)})}function GV(i){return new Pn(e=>{for(let t of i)if(e.next(t),e.closed)return;e.complete()})}function PP(i){return new Pn(e=>{WV(i,e).catch(t=>e.error(t))})}function jV(i){return PP(H0(i))}function WV(i,e){var t,n,r,o;return DP(this,void 0,void 0,function*(){try{for(t=OP(i);n=yield t.next(),!n.done;){let a=n.value;if(e.next(a),e.closed)return}}catch(a){r={error:a}}finally{try{n&&!n.done&&(o=t.return)&&(yield o.call(t))}finally{if(r)throw r.error}}e.complete()})}function Yo(i,e,t,n=0,r=!1){let o=e.schedule(function(){t(),r?i.add(this.schedule(null,n)):this.unsubscribe()},n);if(i.add(o),!r)return o}function j0(i,e=0){return Ti((t,n)=>{t.subscribe(Mi(n,r=>Yo(n,i,()=>n.next(r),e),()=>Yo(n,i,()=>n.complete(),e),r=>Yo(n,i,()=>n.error(r),e)))})}function W0(i,e=0){return Ti((t,n)=>{n.add(i.schedule(()=>t.subscribe(n),e))})}function IP(i,e){return Wi(i).pipe(W0(e),j0(e))}function kP(i,e){return Wi(i).pipe(W0(e),j0(e))}function RP(i,e){return new Pn(t=>{let n=0;return e.schedule(function(){n===i.length?t.complete():(t.next(i[n++]),t.closed||this.schedule())})})}function NP(i,e){return new Pn(t=>{let n;return Yo(t,e,()=>{n=i[U0](),Yo(t,e,()=>{let r,o;try{({value:r,done:o}=n.next())}catch(a){t.error(a);return}o?t.complete():t.next(r)},0,!0)}),()=>Kt(n?.return)&&n.return()})}function Y0(i,e){if(!i)throw new Error("Iterable cannot be null");return new Pn(t=>{Yo(t,e,()=>{let n=i[Symbol.asyncIterator]();Yo(t,e,()=>{n.next().then(r=>{r.done?t.complete():t.next(r.value)})},0,!0)})})}function FP(i,e){return Y0(H0(i),e)}function LP(i,e){if(i!=null){if(L0(i))return IP(i,e);if(N0(i))return RP(i,e);if(F0(i))return kP(i,e);if(B0(i))return Y0(i,e);if(V0(i))return NP(i,e);if(G0(i))return FP(i,e)}throw z0(i)}function Hp(i,e){return e?LP(i,e):Wi(i)}function $o(...i){let e=TP(i);return Hp(i,e)}function Wl(i,e){let t=Kt(i)?i:()=>i,n=r=>r.error(t());return new Pn(e?r=>e.schedule(n,0,r):n)}var BP=pf(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"});function Di(i,e){let t=typeof e=="object";return new Promise((n,r)=>{let o=new jl({next:a=>{n(a),o.unsubscribe()},error:r,complete:()=>{t?n(e.defaultValue):r(new BP)}});i.subscribe(o)})}function Yi(i,e){return Ti((t,n)=>{let r=0;t.subscribe(Mi(n,o=>{n.next(i.call(e,o,r++))}))})}var{isArray:YV}=Array;function $V(i,e){return YV(e)?i(...e):i(e)}function zP(i){return Yi(e=>$V(i,e))}var{isArray:XV}=Array,{getPrototypeOf:qV,prototype:KV,keys:ZV}=Object;function UP(i){if(i.length===1){let e=i[0];if(XV(e))return{args:e,keys:null};if(JV(e)){let t=ZV(e);return{args:t.map(n=>e[n]),keys:t}}}return{args:i,keys:null}}function JV(i){return i&&typeof i=="object"&&qV(i)===KV}function VP(i,e){return i.reduce((t,n,r)=>(t[n]=e[r],t),{})}function HP(i,e,t,n,r,o,a,s){let l=[],c=0,d=0,u=!1,f=()=>{u&&!l.length&&!c&&e.complete()},h=m=>c<n?p(m):l.push(m),p=m=>{o&&e.next(m),c++;let g=!1;Wi(t(m,d++)).subscribe(Mi(e,b=>{r?.(b),o?h(b):e.next(b)},()=>{g=!0},void 0,()=>{if(g)try{for(c--;l.length&&c<n;){let b=l.shift();a?Yo(e,a,()=>p(b)):p(b)}f()}catch(b){e.error(b)}}))};return i.subscribe(Mi(e,h,()=>{u=!0,f()})),()=>{s?.()}}function $0(i,e,t=1/0){return Kt(e)?$0((n,r)=>Yi((o,a)=>e(n,o,r,a))(Wi(i(n,r))),t):(typeof e=="number"&&(t=e),Ti((n,r)=>HP(n,r,i,t)))}function v1(...i){let e=EP(i),{args:t,keys:n}=UP(i),r=new Pn(o=>{let{length:a}=t;if(!a){o.complete();return}let s=new Array(a),l=a,c=a;for(let d=0;d<a;d++){let u=!1;Wi(t[d]).subscribe(Mi(o,f=>{u||(u=!0,c--),s[d]=f},()=>l--,void 0,()=>{(!l||!u)&&(c||o.next(n?VP(n,s):s),o.complete())}))}});return e?r.pipe(zP(e)):r}function y1(i,e){return Ti((t,n)=>{let r=0;t.subscribe(Mi(n,o=>i.call(e,o,r++)&&n.next(o)))})}function us(i){return Ti((e,t)=>{let n=null,r=!1,o;n=e.subscribe(Mi(t,void 0,void 0,a=>{o=Wi(i(a,us(i)(e))),n?(n.unsubscribe(),n=null,o.subscribe(t)):r=!0})),r&&(n.unsubscribe(),n=null,o.subscribe(t))})}function _1(i,e){return Kt(e)?$0(i,e,1):$0(i,1)}function Gp(i){return Ti((e,t)=>{try{e.subscribe(t)}finally{t.add(i)}})}function x1(i,e){return Ti((t,n)=>{let r=null,o=0,a=!1,s=()=>a&&!r&&n.complete();t.subscribe(Mi(n,l=>{r?.unsubscribe();let c=0,d=o++;Wi(i(l,d)).subscribe(r=Mi(n,u=>n.next(e?e(l,u,d,c++):u),()=>{r=null,s()}))},()=>{a=!0,s()}))})}function C1(i){return Ti((e,t)=>{Wi(i).subscribe(Mi(t,()=>t.complete(),Up)),!t.closed&&e.subscribe(t)})}function S1(i,e,t){let n=Kt(i)||e||t?{next:i,error:e,complete:t}:i;return n?Ti((r,o)=>{var a;(a=n.subscribe)===null||a===void 0||a.call(n);let s=!0;r.subscribe(Mi(o,l=>{var c;(c=n.next)===null||c===void 0||c.call(n,l),o.next(l)},()=>{var l;s=!1,(l=n.complete)===null||l===void 0||l.call(n),o.complete()},l=>{var c;s=!1,(c=n.error)===null||c===void 0||c.call(n,l),o.error(l)},()=>{var l,c;s&&((l=n.unsubscribe)===null||l===void 0||l.call(n)),(c=n.finalize)===null||c===void 0||c.call(n)}))}):k0}var w1;function X0(){return w1}function fs(i){let e=w1;return w1=i,e}var GP=Symbol("NotFound");function vf(i){return i===GP||i?.name==="\u0275NotFound"}function jP(i){let e=Tt(null);try{return i()}finally{Tt(e)}}var tb="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",nt=class extends Error{code;constructor(e,t){super(Ks(e,t)),this.code=e}};function QV(i){return`NG0${Math.abs(i)}`}function Ks(i,e){return`${QV(i)}${e?": "+e:""}`}var qo=globalThis;function wn(i){for(let e in i)if(i[e]===wn)return e;throw Error("")}function qP(i,e){for(let t in e)e.hasOwnProperty(t)&&!i.hasOwnProperty(t)&&(i[t]=e[t])}function nb(i){if(typeof i=="string")return i;if(Array.isArray(i))return`[${i.map(nb).join(", ")}]`;if(i==null)return""+i;let e=i.overriddenName||i.name;if(e)return`${e}`;let t=i.toString();if(t==null)return""+t;let n=t.indexOf(`
|
|
4
4
|
`);return n>=0?t.slice(0,n):t}function ib(i,e){return i?e?`${i} ${e}`:i:e||""}var e6=wn({__forward_ref__:wn});function Or(i){return i.__forward_ref__=Or,i}function nr(i){return L1(i)?i():i}function L1(i){return typeof i=="function"&&i.hasOwnProperty(e6)&&i.__forward_ref__===Or}function pe(i){return{token:i.token,providedIn:i.providedIn||null,factory:i.factory,value:void 0}}function ps(i){return{providers:i.providers||[],imports:i.imports||[]}}function rb(i){return t6(i,ob)}function t6(i,e){return i.hasOwnProperty(e)&&i[e]||null}function n6(i){let e=i?.[ob]??null;return e||null}function T1(i){return i&&i.hasOwnProperty(K0)?i[K0]:null}var ob=wn({\u0275prov:wn}),K0=wn({\u0275inj:wn}),lt=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(e,t){this._desc=e,this.\u0275prov=void 0,typeof t=="number"?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.\u0275prov=pe({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function B1(i){return i&&!!i.\u0275providers}var z1=wn({\u0275cmp:wn}),U1=wn({\u0275dir:wn}),V1=wn({\u0275pipe:wn});var Wp=wn({\u0275fac:wn}),Id=wn({__NG_ELEMENT_ID__:wn}),WP=wn({__NG_ENV_ID__:wn});function Zs(i){return G1(i,"@Component"),i[z1]||null}function ab(i){return G1(i,"@Directive"),i[U1]||null}function H1(i){return G1(i,"@Pipe"),i[V1]||null}function G1(i,e){if(i==null)throw new nt(-919,!1)}function Jr(i){return typeof i=="string"?i:i==null?"":String(i)}var KP=wn({ngErrorCode:wn}),i6=wn({ngErrorMessage:wn}),r6=wn({ngTokenPath:wn});function j1(i,e){return ZP("",-200,e)}function sb(i,e){throw new nt(-201,!1)}function ZP(i,e,t){let n=new nt(e,i);return n[KP]=e,n[i6]=i,t&&(n[r6]=t),n}function o6(i){return i[KP]}var M1;function JP(){return M1}function Ar(i){let e=M1;return M1=i,e}function W1(i,e,t){let n=rb(i);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(t&8)return null;if(e!==void 0)return e;sb(i,"")}var a6={},Dd=a6,s6="__NG_DI_FLAG__",D1=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=Ad(t)||0;try{return this.injector.get(e,n&8?null:Dd,n)}catch(r){if(vf(r))return r;throw r}}};function l6(i,e=0){let t=X0();if(t===void 0)throw new nt(-203,!1);if(t===null)return W1(i,void 0,e);{let n=c6(e),r=t.retrieve(i,n);if(vf(r)){if(n.optional)return null;throw r}return r}}function rt(i,e=0){return(JP()||l6)(nr(i),e)}function U(i,e){return rt(i,Ad(e))}function Ad(i){return typeof i>"u"||typeof i=="number"?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function c6(i){return{optional:!!(i&8),host:!!(i&1),self:!!(i&2),skipSelf:!!(i&4)}}function A1(i){let e=[];for(let t=0;t<i.length;t++){let n=nr(i[t]);if(Array.isArray(n)){if(n.length===0)throw new nt(900,!1);let r,o=0;for(let a=0;a<n.length;a++){let s=n[a],l=d6(s);typeof l=="number"?l===-1?r=s.token:o|=l:r=s}e.push(rt(r,o))}else e.push(rt(n))}return e}function d6(i){return i[s6]}function Yl(i,e){let t=i.hasOwnProperty(Wp);return t?i[Wp]:null}function QP(i,e,t){if(i.length!==e.length)return!1;for(let n=0;n<i.length;n++){let r=i[n],o=e[n];if(t&&(r=t(r),o=t(o)),o!==r)return!1}return!0}function eI(i){return i.flat(Number.POSITIVE_INFINITY)}function lb(i,e){i.forEach(t=>Array.isArray(t)?lb(t,e):e(t))}function Y1(i,e,t){e>=i.length?i.push(t):i.splice(e,0,t)}function Kp(i,e){return e>=i.length-1?i.pop():i.splice(e,1)[0]}function tI(i,e){let t=[];for(let n=0;n<i;n++)t.push(e);return t}function nI(i,e,t,n){let r=i.length;if(r==e)i.push(t,n);else if(r===1)i.push(n,i[0]),i[0]=t;else{for(r--,i.push(i[r-1],i[r]);r>e;){let o=r-2;i[r]=i[o],r--}i[e]=t,i[e+1]=n}}function cb(i,e,t){let n=_f(i,e);return n>=0?i[n|1]=t:(n=~n,nI(i,n,e,t)),n}function db(i,e){let t=_f(i,e);if(t>=0)return i[t|1]}function _f(i,e){return u6(i,e,1)}function u6(i,e,t){let n=0,r=i.length>>t;for(;r!==n;){let o=n+(r-n>>1),a=i[o<<t];if(e===a)return o<<t;a>e?r=o:n=o+1}return~(r<<t)}var ql={},dr=[],Js=new lt(""),$1=new lt("",-1),X1=new lt(""),Yp=class{get(e,t=Dd){if(t===Dd){let r=ZP("",-201);throw r.name="\u0275NotFound",r}return t}};function Qs(i){return{\u0275providers:i}}function iI(i){return Qs([{provide:Js,multi:!0,useValue:i}])}function rI(...i){return{\u0275providers:ub(!0,i),\u0275fromNgModule:!0}}function ub(i,...e){let t=[],n=new Set,r,o=a=>{t.push(a)};return lb(e,a=>{let s=a;Z0(s,o,[],n)&&(r||=[],r.push(s))}),r!==void 0&&oI(r,o),t}function oI(i,e){for(let t=0;t<i.length;t++){let{ngModule:n,providers:r}=i[t];q1(r,o=>{e(o,n)})}}function Z0(i,e,t,n){if(i=nr(i),!i)return!1;let r=null,o=T1(i),a=!o&&Zs(i);if(!o&&!a){let l=i.ngModule;if(o=T1(l),o)r=l;else return!1}else{if(a&&!a.standalone)return!1;r=i}let s=n.has(r);if(a){if(s)return!1;if(n.add(r),a.dependencies){let l=typeof a.dependencies=="function"?a.dependencies():a.dependencies;for(let c of l)Z0(c,e,t,n)}}else if(o){if(o.imports!=null&&!s){n.add(r);let c;lb(o.imports,d=>{Z0(d,e,t,n)&&(c||=[],c.push(d))}),c!==void 0&&oI(c,e)}if(!s){let c=Yl(r)||(()=>new r);e({provide:r,useFactory:c,deps:dr},r),e({provide:X1,useValue:r,multi:!0},r),e({provide:Js,useValue:()=>rt(r),multi:!0},r)}let l=o.providers;if(l!=null&&!s){let c=i;q1(l,d=>{e(d,c)})}}else return!1;return r!==i&&i.providers!==void 0}function q1(i,e){for(let t of i)B1(t)&&(t=t.\u0275providers),Array.isArray(t)?q1(t,e):e(t)}var f6=wn({provide:String,useValue:wn});function aI(i){return i!==null&&typeof i=="object"&&f6 in i}function h6(i){return!!(i&&i.useExisting)}function p6(i){return!!(i&&i.useFactory)}function Od(i){return typeof i=="function"}function sI(i){return!!i.useClass}var Zp=new lt(""),q0={},YP={},E1;function xf(){return E1===void 0&&(E1=new Yp),E1}var ur=class{},Pd=class extends ur{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,P1(e,a=>this.processProvider(a)),this.records.set($1,yf(void 0,this)),r.has("environment")&&this.records.set(ur,yf(void 0,this));let o=this.records.get(Zp);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(X1,dr,{self:!0}))}retrieve(e,t){let n=Ad(t)||0;try{return this.get(e,Dd,n)}catch(r){if(vf(r))return r;throw r}}destroy(){jp(this),this._destroyed=!0;let e=Tt(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of t)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),Tt(e)}}onDestroy(e){return jp(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){jp(this);let t=fs(this),n=Ar(void 0),r;try{return e()}finally{fs(t),Ar(n)}}get(e,t=Dd,n){if(jp(this),e.hasOwnProperty(WP))return e[WP](this);let r=Ad(n),o,a=fs(this),s=Ar(void 0);try{if(!(r&4)){let c=this.records.get(e);if(c===void 0){let d=y6(e)&&rb(e);d&&this.injectableDefInScope(d)?c=yf(O1(e),q0):c=null,this.records.set(e,c)}if(c!=null)return this.hydrate(e,c,r)}let l=r&2?xf():this.parent;return t=r&8&&t===Dd?null:t,l.get(e,t)}catch(l){let c=o6(l);throw c===-200||c===-201?new nt(c,null):l}finally{Ar(s),fs(a)}}resolveInjectorInitializers(){let e=Tt(null),t=fs(this),n=Ar(void 0),r;try{let o=this.get(Js,dr,{self:!0});for(let a of o)a()}finally{fs(t),Ar(n),Tt(e)}}toString(){return"R3Injector[...]"}processProvider(e){e=nr(e);let t=Od(e)?e:nr(e&&e.provide),n=g6(e);if(!Od(e)&&e.multi===!0){let r=this.records.get(t);r||(r=yf(void 0,q0,!0),r.factory=()=>A1(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=Tt(null);try{if(t.value===YP)throw j1("");return t.value===q0&&(t.value=YP,t.value=t.factory(void 0,n)),typeof t.value=="object"&&t.value&&v6(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{Tt(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=nr(e.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function O1(i){let e=rb(i),t=e!==null?e.factory:Yl(i);if(t!==null)return t;if(i instanceof lt)throw new nt(-204,!1);if(i instanceof Function)return m6(i);throw new nt(-204,!1)}function m6(i){if(i.length>0)throw new nt(-204,!1);let t=n6(i);return t!==null?()=>t.factory(i):()=>new i}function g6(i){if(aI(i))return yf(void 0,i.useValue);{let e=K1(i);return yf(e,q0)}}function K1(i,e,t){let n;if(Od(i)){let r=nr(i);return Yl(r)||O1(r)}else if(aI(i))n=()=>nr(i.useValue);else if(p6(i))n=()=>i.useFactory(...A1(i.deps||[]));else if(h6(i))n=(r,o)=>rt(nr(i.useExisting),o!==void 0&&o&8?8:void 0);else{let r=nr(i&&(i.useClass||i.provide));if(b6(i))n=()=>new r(...A1(i.deps));else return Yl(r)||O1(r)}return n}function jp(i){if(i.destroyed)throw new nt(-205,!1)}function yf(i,e,t=!1){return{factory:i,value:e,multi:t?[]:void 0}}function b6(i){return!!i.deps}function v6(i){return i!==null&&typeof i=="object"&&typeof i.ngOnDestroy=="function"}function y6(i){return typeof i=="function"||typeof i=="object"&&i.ngMetadataName==="InjectionToken"}function P1(i,e){for(let t of i)Array.isArray(t)?P1(t,e):t&&B1(t)?P1(t.\u0275providers,e):e(t)}function Cf(i,e){let t;i instanceof Pd?(jp(i),t=i):t=new D1(i);let n,r=fs(t),o=Ar(void 0);try{return e()}finally{fs(r),Ar(o)}}function lI(){return JP()!==void 0||X0()!=null}var Pr=0,mt=1,zt=2,hi=3,Ko=4,Ir=5,kr=6,Sf=7,ii=8,_o=9,Da=10,ln=11,wf=12,Z1=13,kd=14,$i=15,Kl=16,Rd=17,ms=18,el=19,J1=20,qs=21,fb=22,$l=23,xo=24,Nd=25,Zl=26,cn=27,cI=1,Aa=6,gs=7,Jp=8,Fd=9,Xn=10;function Zo(i){return Array.isArray(i)&&typeof i[cI]=="object"}function Co(i){return Array.isArray(i)&&i[cI]===!0}function Q1(i){return(i.flags&4)!==0}function Oa(i){return i.componentOffset>-1}function Ef(i){return(i.flags&1)===1}function bs(i){return!!i.template}function Ld(i){return(i[zt]&512)!==0}function Jl(i){return(i[zt]&256)===256}var ew="svg",dI="math";function So(i){for(;Array.isArray(i);)i=i[Pr];return i}function tw(i,e){return So(e[i])}function wo(i,e){return So(e[i.index])}function Tf(i,e){return i.data[e]}function hb(i,e){return i[e]}function nw(i,e,t,n){t>=i.data.length&&(i.data[t]=null,i.blueprint[t]=null),e[t]=n}function Jo(i,e){let t=e[i];return Zo(t)?t:t[Pr]}function uI(i){return(i[zt]&4)===4}function pb(i){return(i[zt]&128)===128}function fI(i){return Co(i[hi])}function Qo(i,e){return e==null?null:i[e]}function iw(i){i[Rd]=0}function rw(i){i[zt]&1024||(i[zt]|=1024,pb(i)&&Bd(i))}function hI(i,e){for(;i>0;)e=e[kd],i--;return e}function Qp(i){return!!(i[zt]&9216||i[xo]?.dirty)}function mb(i){i[Da].changeDetectionScheduler?.notify(8),i[zt]&64&&(i[zt]|=1024),Qp(i)&&Bd(i)}function Bd(i){i[Da].changeDetectionScheduler?.notify(0);let e=Xl(i);for(;e!==null&&!(e[zt]&8192||(e[zt]|=8192,!pb(e)));)e=Xl(e)}function ow(i,e){if(Jl(i))throw new nt(911,!1);i[qs]===null&&(i[qs]=[]),i[qs].push(e)}function pI(i,e){if(i[qs]===null)return;let t=i[qs].indexOf(e);t!==-1&&i[qs].splice(t,1)}function Xl(i){let e=i[hi];return Co(e)?e[hi]:e}function aw(i){return i[Sf]??=[]}function sw(i){return i.cleanup??=[]}function mI(i,e,t,n){let r=aw(e);r.push(t),i.firstCreatePass&&sw(i).push(n,r.length-1)}var $t={lFrame:MI(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var I1=!1;function gI(){return $t.lFrame.elementDepthCount}function bI(){$t.lFrame.elementDepthCount++}function lw(){$t.lFrame.elementDepthCount--}function gb(){return $t.bindingsEnabled}function bb(){return $t.skipHydrationRootTNode!==null}function cw(i){return $t.skipHydrationRootTNode===i}function vI(i){$t.skipHydrationRootTNode=i}function dw(){$t.skipHydrationRootTNode=null}function St(){return $t.lFrame.lView}function Hn(){return $t.lFrame.tView}function P(i){return $t.lFrame.contextLView=i,i[ii]}function I(i){return $t.lFrame.contextLView=null,i}function rr(){let i=uw();for(;i!==null&&i.type===64;)i=i.parent;return i}function uw(){return $t.lFrame.currentTNode}function yI(){let i=$t.lFrame,e=i.currentTNode;return i.isParent?e:e.parent}function Mf(i,e){let t=$t.lFrame;t.currentTNode=i,t.isParent=e}function fw(){return $t.lFrame.isParent}function hw(){$t.lFrame.isParent=!1}function _I(){return $t.lFrame.contextLView}function pw(){return I1}function $p(i){let e=I1;return I1=i,e}function Df(){let i=$t.lFrame,e=i.bindingRootIndex;return e===-1&&(e=i.bindingRootIndex=i.tView.bindingStartIndex),e}function vb(){return $t.lFrame.bindingIndex}function xI(i){return $t.lFrame.bindingIndex=i}function tl(){return $t.lFrame.bindingIndex++}function Af(i){let e=$t.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+i,t}function CI(){return $t.lFrame.inI18n}function SI(i,e){let t=$t.lFrame;t.bindingIndex=t.bindingRootIndex=i,yb(e)}function wI(){return $t.lFrame.currentDirectiveIndex}function yb(i){$t.lFrame.currentDirectiveIndex=i}function EI(i){let e=$t.lFrame.currentDirectiveIndex;return e===-1?null:i[e]}function _b(){return $t.lFrame.currentQueryIndex}function em(i){$t.lFrame.currentQueryIndex=i}function _6(i){let e=i[mt];return e.type===2?e.declTNode:e.type===1?i[Ir]:null}function mw(i,e,t){if(t&4){let r=e,o=i;for(;r=r.parent,r===null&&!(t&1);)if(r=_6(o),r===null||(o=o[kd],r.type&10))break;if(r===null)return!1;e=r,i=o}let n=$t.lFrame=TI();return n.currentTNode=e,n.lView=i,!0}function xb(i){let e=TI(),t=i[mt];$t.lFrame=e,e.currentTNode=t.firstChild,e.lView=i,e.tView=t,e.contextLView=i,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function TI(){let i=$t.lFrame,e=i===null?null:i.child;return e===null?MI(i):e}function MI(i){let e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:i,child:null,inI18n:!1};return i!==null&&(i.child=e),e}function DI(){let i=$t.lFrame;return $t.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}var gw=DI;function Cb(){let i=DI();i.isParent=!0,i.tView=null,i.selectedIndex=-1,i.contextLView=null,i.elementDepthCount=0,i.currentDirectiveIndex=-1,i.currentNamespace=null,i.bindingRootIndex=-1,i.bindingIndex=-1,i.currentQueryIndex=0}function AI(i){return($t.lFrame.contextLView=hI(i,$t.lFrame.contextLView))[ii]}function ea(){return $t.lFrame.selectedIndex}function Ql(i){$t.lFrame.selectedIndex=i}function Of(){let i=$t.lFrame;return Tf(i.tView,i.selectedIndex)}function ec(){$t.lFrame.currentNamespace=ew}function Pf(){x6()}function x6(){$t.lFrame.currentNamespace=null}function bw(){return $t.lFrame.currentNamespace}var OI=!0;function Sb(){return OI}function nl(i){OI=i}function k1(i,e=null,t=null,n){let r=PI(i,e,t,n);return r.resolveInjectorInitializers(),r}function PI(i,e=null,t=null,n,r=new Set){let o=[t||dr,rI(i)],a;return new Pd(o,e||xf(),a||null,r)}var ir=class i{static THROW_IF_NOT_FOUND=Dd;static NULL=new Yp;static create(e,t){if(Array.isArray(e))return k1({name:""},t,e,"");{let n=e.name??"";return k1({name:n},e.parent,e.providers,n)}}static \u0275prov=pe({token:i,providedIn:"any",factory:()=>rt($1)});static __NG_ELEMENT_ID__=-1},Un=new lt(""),Xi=(()=>{class i{static __NG_ELEMENT_ID__=C6;static __NG_ENV_ID__=t=>t}return i})(),J0=class extends Xi{_lView;constructor(e){super(),this._lView=e}get destroyed(){return Jl(this._lView)}onDestroy(e){let t=this._lView;return ow(t,e),()=>pI(t,e)}};function C6(){return new J0(St())}var II=!1,kI=new lt(""),tc=(()=>{class i{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Vp(!1);debugTaskTracker=U(kI,{optional:!0});get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Pn(t=>{t.next(!1),t.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let t=this.taskId++;return this.pendingTasks.add(t),this.debugTaskTracker?.add(t),t}has(t){return this.pendingTasks.has(t)}remove(t){this.pendingTasks.delete(t),this.debugTaskTracker?.remove(t),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static \u0275prov=pe({token:i,providedIn:"root",factory:()=>new i})}return i})(),R1=class extends Ma{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,lI()&&(this.destroyRef=U(Xi,{optional:!0})??void 0,this.pendingTasks=U(tc,{optional:!0})??void 0)}emit(e){let t=Tt(null);try{super.next(e)}finally{Tt(t)}}subscribe(e,t,n){let r=e,o=t||(()=>null),a=n;if(e&&typeof e=="object"){let l=e;r=l.next?.bind(l),o=l.error?.bind(l),a=l.complete?.bind(l)}this.__isAsync&&(o=this.wrapInTimeout(o),r&&(r=this.wrapInTimeout(r)),a&&(a=this.wrapInTimeout(a)));let s=super.subscribe({next:r,error:o,complete:a});return e instanceof Dr&&e.add(s),s}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{try{e(t)}finally{n!==void 0&&this.pendingTasks?.remove(n)}})}}},yo=R1;function Q0(...i){}function vw(i){let e,t;function n(){i=Q0;try{t!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(t),e!==void 0&&clearTimeout(e)}catch{}}return e=setTimeout(()=>{i(),n()}),typeof requestAnimationFrame=="function"&&(t=requestAnimationFrame(()=>{i(),n()})),()=>n()}function RI(i){return queueMicrotask(()=>i()),()=>{i=Q0}}var yw="isAngularZone",Xp=yw+"_ID",S6=0,Zr=class i{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new yo(!1);onMicrotaskEmpty=new yo(!1);onStable=new yo(!1);onError=new yo(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=II}=e;if(typeof Zone>"u")throw new nt(908,!1);Zone.assertZonePatched();let a=this;a._nesting=0,a._outer=a._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(a._inner=a._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(a._inner=a._inner.fork(Zone.longStackTraceZoneSpec)),a.shouldCoalesceEventChangeDetection=!r&&n,a.shouldCoalesceRunChangeDetection=r,a.callbackScheduled=!1,a.scheduleInRootZone=o,T6(a)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(yw)===!0}static assertInAngularZone(){if(!i.isInAngularZone())throw new nt(909,!1)}static assertNotInAngularZone(){if(i.isInAngularZone())throw new nt(909,!1)}run(e,t,n){return this._inner.run(e,t,n)}runTask(e,t,n,r){let o=this._inner,a=o.scheduleEventTask("NgZoneEvent: "+r,e,w6,Q0,Q0);try{return o.runTask(a,t,n)}finally{o.cancelTask(a)}}runGuarded(e,t,n){return this._inner.runGuarded(e,t,n)}runOutsideAngular(e){return this._outer.run(e)}},w6={};function _w(i){if(i._nesting==0&&!i.hasPendingMicrotasks&&!i.isStable)try{i._nesting++,i.onMicrotaskEmpty.emit(null)}finally{if(i._nesting--,!i.hasPendingMicrotasks)try{i.runOutsideAngular(()=>i.onStable.emit(null))}finally{i.isStable=!0}}}function E6(i){if(i.isCheckStableRunning||i.callbackScheduled)return;i.callbackScheduled=!0;function e(){vw(()=>{i.callbackScheduled=!1,N1(i),i.isCheckStableRunning=!0,_w(i),i.isCheckStableRunning=!1})}i.scheduleInRootZone?Zone.root.run(()=>{e()}):i._outer.run(()=>{e()}),N1(i)}function T6(i){let e=()=>{E6(i)},t=S6++;i._inner=i._inner.fork({name:"angular",properties:{[yw]:!0,[Xp]:t,[Xp+t]:!0},onInvokeTask:(n,r,o,a,s,l)=>{if(M6(l))return n.invokeTask(o,a,s,l);try{return $P(i),n.invokeTask(o,a,s,l)}finally{(i.shouldCoalesceEventChangeDetection&&a.type==="eventTask"||i.shouldCoalesceRunChangeDetection)&&e(),XP(i)}},onInvoke:(n,r,o,a,s,l,c)=>{try{return $P(i),n.invoke(o,a,s,l,c)}finally{i.shouldCoalesceRunChangeDetection&&!i.callbackScheduled&&!D6(l)&&e(),XP(i)}},onHasTask:(n,r,o,a)=>{n.hasTask(o,a),r===o&&(a.change=="microTask"?(i._hasPendingMicrotasks=a.microTask,N1(i),_w(i)):a.change=="macroTask"&&(i.hasPendingMacrotasks=a.macroTask))},onHandleError:(n,r,o,a)=>(n.handleError(o,a),i.runOutsideAngular(()=>i.onError.emit(a)),!1)})}function N1(i){i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&i.callbackScheduled===!0?i.hasPendingMicrotasks=!0:i.hasPendingMicrotasks=!1}function $P(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function XP(i){i._nesting--,_w(i)}var qp=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new yo;onMicrotaskEmpty=new yo;onStable=new yo;onError=new yo;run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function M6(i){return NI(i,"__ignore_ng_zone__")}function D6(i){return NI(i,"__scheduler_tick__")}function NI(i,e){return!Array.isArray(i)||i.length!==1?!1:i[0]?.data?.[e]===!0}var Xo=class{_console=console;handleError(e){this._console.error("ERROR",e)}},il=new lt("",{factory:()=>{let i=U(Zr),e=U(ur),t;return n=>{i.runOutsideAngular(()=>{e.destroyed&&!t?setTimeout(()=>{throw n}):(t??=e.get(Xo),t.handleError(n))})}}}),FI={provide:Js,useValue:()=>{let i=U(Xo,{optional:!0})},multi:!0},A6=new lt("",{factory:()=>{let i=U(Un).defaultView;if(!i)return;let e=U(il),t=o=>{e(o.reason),o.preventDefault()},n=o=>{o.error?e(o.error):e(new Error(o.message,{cause:o})),o.preventDefault()},r=()=>{i.addEventListener("unhandledrejection",t),i.addEventListener("error",n)};typeof Zone<"u"?Zone.root.run(r):r(),U(Xi).onDestroy(()=>{i.removeEventListener("error",n),i.removeEventListener("unhandledrejection",t)})}});function xw(){return Qs([iI(()=>{U(A6)})])}function R(i,e){let[t,n,r]=l1(i,e?.equal),o=t,a=o[Ri];return o.set=n,o.update=r,o.asReadonly=wb.bind(o),o}function wb(){let i=this[Ri];if(i.readonlyFn===void 0){let e=()=>this();e[Ri]=i,i.readonlyFn=e}return i.readonlyFn}var tm=(()=>{class i{view;node;constructor(t,n){this.view=t,this.node=n}static __NG_ELEMENT_ID__=O6}return i})();function O6(){return new tm(St(),rr())}var hs=class{},nm=new lt("",{factory:()=>!0});var Cw=new lt(""),zd=(()=>{class i{internalPendingTasks=U(tc);scheduler=U(hs);errorHandler=U(il);add(){let t=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(t)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(t))}}run(t){let n=this.add();t().catch(this.errorHandler).finally(n)}static \u0275prov=pe({token:i,providedIn:"root",factory:()=>new i})}return i})(),Eb=(()=>{class i{static \u0275prov=pe({token:i,providedIn:"root",factory:()=>new F1})}return i})(),F1=class{dirtyEffectCount=0;queues=new Map;add(e){this.enqueue(e),this.schedule(e)}schedule(e){e.dirty&&this.dirtyEffectCount++}remove(e){let t=e.zone,n=this.queues.get(t);n.has(e)&&(n.delete(e),e.dirty&&this.dirtyEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let n=this.queues.get(t);n.has(e)||n.add(e)}flush(){for(;this.dirtyEffectCount>0;){let e=!1;for(let[t,n]of this.queues)t===null?e||=this.flushQueue(n):e||=t.run(()=>this.flushQueue(n));e||(this.dirtyEffectCount=0)}}flushQueue(e){let t=!1;for(let n of e)n.dirty&&(this.dirtyEffectCount--,t=!0,n.run());return t}},eb=class{[Ri];constructor(e){this[Ri]=e}destroy(){this[Ri].destroy()}};function ct(i,e){let t=e?.injector??U(ir),n=e?.manualCleanup!==!0?t.get(Xi):null,r,o=t.get(tm,null,{optional:!0}),a=t.get(hs);return o!==null?(r=k6(o.view,a,i),n instanceof J0&&n._lView===o.view&&(n=null)):r=R6(i,t.get(Eb),a),r.injector=t,n!==null&&(r.onDestroyFns=[n.onDestroy(()=>r.destroy())]),new eb(r)}var LI=Q(B({},d1),{cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let i=$p(!1);try{u1(this)}finally{$p(i)}},cleanup(){if(!this.cleanupFns?.length)return;let i=Tt(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],Tt(i)}}}),P6=Q(B({},LI),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(Sd(this),this.onDestroyFns!==null)for(let i of this.onDestroyFns)i();this.cleanup(),this.scheduler.remove(this)}}),I6=Q(B({},LI),{consumerMarkedDirty(){this.view[zt]|=8192,Bd(this.view),this.notifier.notify(13)},destroy(){if(Sd(this),this.onDestroyFns!==null)for(let i of this.onDestroyFns)i();this.cleanup(),this.view[$l]?.delete(this)}});function k6(i,e,t){let n=Object.create(I6);return n.view=i,n.zone=typeof Zone<"u"?Zone.current:null,n.notifier=e,n.fn=BI(n,t),i[$l]??=new Set,i[$l].add(n),n.consumerMarkedDirty(n),n}function R6(i,e,t){let n=Object.create(P6);return n.fn=BI(n,i),n.scheduler=e,n.notifier=t,n.zone=typeof Zone<"u"?Zone.current:null,n.scheduler.add(n),n.notifier.notify(12),n}function BI(i,e){return()=>{e(t=>(i.cleanupFns??=[]).push(t))}}var Tb={JSACTION:"jsaction"};function gm(i){return{toString:i}.toString()}function H6(i){return typeof i=="function"}function M2(i,e,t,n){e!==null?e.applyValueToInputSignal(e,n):i[t]=n}var Bb=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}},Vf=(()=>{let i=()=>D2;return i.ngInherit=!0,i})();function D2(i){return i.type.prototype.ngOnChanges&&(i.setInput=j6),G6}function G6(){let i=O2(this),e=i?.current;if(e){let t=i.previous;if(t===ql)i.previous=e;else for(let n in e)t[n]=e[n];i.current=null,this.ngOnChanges(e)}}function j6(i,e,t,n,r){let o=this.declaredInputs[n],a=O2(i)||W6(i,{previous:ql,current:null}),s=a.current||(a.current={}),l=a.previous,c=l[o];s[o]=new Bb(c&&c.currentValue,t,l===ql),M2(i,e,r,t)}var A2="__ngSimpleChanges__";function O2(i){return i[A2]||null}function W6(i,e){return i[A2]=e}var zI=[];var fn=function(i,e=null,t){for(let n=0;n<zI.length;n++){let r=zI[n];r(i,e,t)}},an=(function(i){return i[i.TemplateCreateStart=0]="TemplateCreateStart",i[i.TemplateCreateEnd=1]="TemplateCreateEnd",i[i.TemplateUpdateStart=2]="TemplateUpdateStart",i[i.TemplateUpdateEnd=3]="TemplateUpdateEnd",i[i.LifecycleHookStart=4]="LifecycleHookStart",i[i.LifecycleHookEnd=5]="LifecycleHookEnd",i[i.OutputStart=6]="OutputStart",i[i.OutputEnd=7]="OutputEnd",i[i.BootstrapApplicationStart=8]="BootstrapApplicationStart",i[i.BootstrapApplicationEnd=9]="BootstrapApplicationEnd",i[i.BootstrapComponentStart=10]="BootstrapComponentStart",i[i.BootstrapComponentEnd=11]="BootstrapComponentEnd",i[i.ChangeDetectionStart=12]="ChangeDetectionStart",i[i.ChangeDetectionEnd=13]="ChangeDetectionEnd",i[i.ChangeDetectionSyncStart=14]="ChangeDetectionSyncStart",i[i.ChangeDetectionSyncEnd=15]="ChangeDetectionSyncEnd",i[i.AfterRenderHooksStart=16]="AfterRenderHooksStart",i[i.AfterRenderHooksEnd=17]="AfterRenderHooksEnd",i[i.ComponentStart=18]="ComponentStart",i[i.ComponentEnd=19]="ComponentEnd",i[i.DeferBlockStateStart=20]="DeferBlockStateStart",i[i.DeferBlockStateEnd=21]="DeferBlockStateEnd",i[i.DynamicComponentStart=22]="DynamicComponentStart",i[i.DynamicComponentEnd=23]="DynamicComponentEnd",i[i.HostBindingsUpdateStart=24]="HostBindingsUpdateStart",i[i.HostBindingsUpdateEnd=25]="HostBindingsUpdateEnd",i})(an||{});function Y6(i,e,t){let{ngOnChanges:n,ngOnInit:r,ngDoCheck:o}=e.type.prototype;if(n){let a=D2(e);(t.preOrderHooks??=[]).push(i,a),(t.preOrderCheckHooks??=[]).push(i,a)}r&&(t.preOrderHooks??=[]).push(0-i,r),o&&((t.preOrderHooks??=[]).push(i,o),(t.preOrderCheckHooks??=[]).push(i,o))}function P2(i,e){for(let t=e.directiveStart,n=e.directiveEnd;t<n;t++){let o=i.data[t].type.prototype,{ngAfterContentInit:a,ngAfterContentChecked:s,ngAfterViewInit:l,ngAfterViewChecked:c,ngOnDestroy:d}=o;a&&(i.contentHooks??=[]).push(-t,a),s&&((i.contentHooks??=[]).push(t,s),(i.contentCheckHooks??=[]).push(t,s)),l&&(i.viewHooks??=[]).push(-t,l),c&&((i.viewHooks??=[]).push(t,c),(i.viewCheckHooks??=[]).push(t,c)),d!=null&&(i.destroyHooks??=[]).push(t,d)}}function Pb(i,e,t){I2(i,e,3,t)}function Ib(i,e,t,n){(i[zt]&3)===t&&I2(i,e,t,n)}function Sw(i,e){let t=i[zt];(t&3)===e&&(t&=16383,t+=1,i[zt]=t)}function I2(i,e,t,n){let r=n!==void 0?i[Rd]&65535:0,o=n??-1,a=e.length-1,s=0;for(let l=r;l<a;l++)if(typeof e[l+1]=="number"){if(s=e[l],n!=null&&s>=n)break}else e[l]<0&&(i[Rd]+=65536),(s<o||o==-1)&&($6(i,t,e,l),i[Rd]=(i[Rd]&4294901760)+l+2),l++}function UI(i,e){fn(an.LifecycleHookStart,i,e);let t=Tt(null);try{e.call(i)}finally{Tt(t),fn(an.LifecycleHookEnd,i,e)}}function $6(i,e,t,n){let r=t[n]<0,o=t[n+1],a=r?-t[n]:t[n],s=i[a];r?i[zt]>>14<i[Rd]>>16&&(i[zt]&3)===e&&(i[zt]+=16384,UI(s,o)):UI(s,o)}var kf=-1,Hd=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,n,r){this.factory=e,this.name=r,this.canSeeViewProviders=t,this.injectImpl=n}};function X6(i){return(i.flags&8)!==0}function q6(i){return(i.flags&16)!==0}function K6(i,e,t){let n=0;for(;n<t.length;){let r=t[n];if(typeof r=="number"){if(r!==0)break;n++;let o=t[n++],a=t[n++],s=t[n++];i.setAttribute(e,a,s,o)}else{let o=r,a=t[++n];J6(o)?i.setProperty(e,o,a):i.setAttribute(e,o,a),n++}}return n}function Z6(i){return i===3||i===4||i===6}function J6(i){return i.charCodeAt(0)===64}function Ff(i,e){if(!(e===null||e.length===0))if(i===null||i.length===0)i=e.slice();else{let t=-1;for(let n=0;n<e.length;n++){let r=e[n];typeof r=="number"?t=r:t===0||(t===-1||t===2?VI(i,t,r,null,e[++n]):VI(i,t,r,null,null))}}return i}function VI(i,e,t,n,r){let o=0,a=i.length;if(e===-1)a=-1;else for(;o<i.length;){let s=i[o++];if(typeof s=="number"){if(s===e){a=-1;break}else if(s>e){a=o-1;break}}}for(;o<i.length;){let s=i[o];if(typeof s=="number")break;if(s===t){r!==null&&(i[o+1]=r);return}o++,r!==null&&o++}a!==-1&&(i.splice(a,0,e),o=a+1),i.splice(o++,0,t),r!==null&&i.splice(o++,0,r)}function k2(i){return i!==kf}function zb(i){return i&32767}function Q6(i){return i>>16}function Ub(i,e){let t=Q6(i),n=e;for(;t>0;)n=n[kd],t--;return n}var Lw=!0;function Vb(i){let e=Lw;return Lw=i,e}var e8=256,R2=e8-1,N2=5,t8=0,vs={};function n8(i,e,t){let n;typeof t=="string"?n=t.charCodeAt(0)||0:t.hasOwnProperty(Id)&&(n=t[Id]),n==null&&(n=t[Id]=t8++);let r=n&R2,o=1<<r;e.data[i+(r>>N2)]|=o}function Hb(i,e){let t=F2(i,e);if(t!==-1)return t;let n=e[mt];n.firstCreatePass&&(i.injectorIndex=e.length,ww(n.data,i),ww(e,null),ww(n.blueprint,null));let r=wE(i,e),o=i.injectorIndex;if(k2(r)){let a=zb(r),s=Ub(r,e),l=s[mt].data;for(let c=0;c<8;c++)e[o+c]=s[a+c]|l[a+c]}return e[o+8]=r,o}function ww(i,e){i.push(0,0,0,0,0,0,0,0,e)}function F2(i,e){return i.injectorIndex===-1||i.parent&&i.parent.injectorIndex===i.injectorIndex||e[i.injectorIndex+8]===null?-1:i.injectorIndex}function wE(i,e){if(i.parent&&i.parent.injectorIndex!==-1)return i.parent.injectorIndex;let t=0,n=null,r=e;for(;r!==null;){if(n=V2(r),n===null)return kf;if(t++,r=r[kd],n.injectorIndex!==-1)return n.injectorIndex|t<<16}return kf}function Bw(i,e,t){n8(i,e,t)}function L2(i,e,t){if(t&8||i!==void 0)return i;sb(e,"NodeInjector")}function B2(i,e,t,n){if(t&8&&n===void 0&&(n=null),(t&3)===0){let r=i[_o],o=Ar(void 0);try{return r?r.get(e,n,t&8):W1(e,n,t&8)}finally{Ar(o)}}return L2(n,e,t)}function z2(i,e,t,n=0,r){if(i!==null){if(e[zt]&2048&&!(n&2)){let a=a8(i,e,t,n,vs);if(a!==vs)return a}let o=U2(i,e,t,n,vs);if(o!==vs)return o}return B2(e,t,n,r)}function U2(i,e,t,n,r){let o=r8(t);if(typeof o=="function"){if(!mw(e,i,n))return n&1?L2(r,t,n):B2(e,t,n,r);try{let a;if(a=o(n),a==null&&!(n&8))sb(t);else return a}finally{gw()}}else if(typeof o=="number"){let a=null,s=F2(i,e),l=kf,c=n&1?e[$i][Ir]:null;for((s===-1||n&4)&&(l=s===-1?wE(i,e):e[s+8],l===kf||!GI(n,!1)?s=-1:(a=e[mt],s=zb(l),e=Ub(l,e)));s!==-1;){let d=e[mt];if(HI(o,s,d.data)){let u=i8(s,e,t,a,n,c);if(u!==vs)return u}l=e[s+8],l!==kf&&GI(n,e[mt].data[s+8]===c)&&HI(o,s,e)?(a=d,s=zb(l),e=Ub(l,e)):s=-1}}return r}function i8(i,e,t,n,r,o){let a=e[mt],s=a.data[i+8],l=n==null?Oa(s)&&Lw:n!=a&&(s.type&3)!==0,c=r&1&&o===s,d=kb(s,a,t,l,c);return d!==null?am(e,a,d,s,r):vs}function kb(i,e,t,n,r){let o=i.providerIndexes,a=e.data,s=o&1048575,l=i.directiveStart,c=i.directiveEnd,d=o>>20,u=n?s:s+d,f=r?s+d:c;for(let h=u;h<f;h++){let p=a[h];if(h<l&&t===p||h>=l&&p.type===t)return h}if(r){let h=a[l];if(h&&bs(h)&&h.type===t)return l}return null}function am(i,e,t,n,r){let o=i[t],a=e.data;if(o instanceof Hd){let s=o;if(s.resolving)throw j1("");let l=Vb(s.canSeeViewProviders);s.resolving=!0;let c=a[t].type||a[t],d,u=s.injectImpl?Ar(s.injectImpl):null,f=mw(i,n,0);try{o=i[t]=s.factory(void 0,r,a,i,n),e.firstCreatePass&&t>=n.directiveStart&&Y6(t,a[t],e)}finally{u!==null&&Ar(u),Vb(l),s.resolving=!1,gw()}}return o}function r8(i){if(typeof i=="string")return i.charCodeAt(0)||0;let e=i.hasOwnProperty(Id)?i[Id]:void 0;return typeof e=="number"?e>=0?e&R2:o8:e}function HI(i,e,t){let n=1<<i;return!!(t[e+(i>>N2)]&n)}function GI(i,e){return!(i&2)&&!(i&1&&e)}var Vd=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return z2(this._tNode,this._lView,e,Ad(n),t)}};function o8(){return new Vd(rr(),St())}function ol(i){return gm(()=>{let e=i.prototype.constructor,t=e[Wp]||zw(e),n=Object.prototype,r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){let o=r[Wp]||zw(r);if(o&&o!==t)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function zw(i){return L1(i)?()=>{let e=zw(nr(i));return e&&e()}:Yl(i)}function a8(i,e,t,n,r){let o=i,a=e;for(;o!==null&&a!==null&&a[zt]&2048&&!Ld(a);){let s=U2(o,a,t,n|2,vs);if(s!==vs)return s;let l=o.parent;if(!l){let c=a[J1];if(c){let d=c.get(t,vs,n&-5);if(d!==vs)return d}l=V2(a),a=a[kd]}o=l}return r}function V2(i){let e=i[mt],t=e.type;return t===2?e.declTNode:t===1?i[Ir]:null}function s8(){return Hf(rr(),St())}function Hf(i,e){return new fr(wo(i,e))}var fr=(()=>{class i{nativeElement;constructor(t){this.nativeElement=t}static __NG_ELEMENT_ID__=s8}return i})();function H2(i){return i instanceof fr?i.nativeElement:i}function l8(){return this._results[Symbol.iterator]()}var Gb=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new Ma}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let n=eI(e);(this._changesDetected=!QP(this._results,n,t))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=l8},G2="ngSkipHydration",c8="ngskiphydration";function j2(i){let e=i.mergedAttrs;if(e===null)return!1;for(let t=0;t<e.length;t+=2){let n=e[t];if(typeof n=="number")return!1;if(typeof n=="string"&&n.toLowerCase()===c8)return!0}return!1}function W2(i){return i.hasAttribute(G2)}function jb(i){return(i.flags&128)===128}function Y2(i){if(jb(i))return!0;let e=i.parent;for(;e;){if(jb(i)||j2(e))return!0;e=e.parent}return!1}var EE=(function(i){return i[i.OnPush=0]="OnPush",i[i.Eager=1]="Eager",i[i.Default=1]="Default",i})(EE||{}),$2=new Map,d8=0;function u8(){return d8++}function f8(i){$2.set(i[el],i)}function Uw(i){$2.delete(i[el])}var jI="__ngContext__";function Lf(i,e){Zo(e)?(i[jI]=e[el],f8(e)):i[jI]=e}function X2(i){return K2(i[wf])}function q2(i){return K2(i[Ko])}function K2(i){for(;i!==null&&!Co(i);)i=i[Ko];return i}var Vw;function TE(i){Vw=i}function ME(){if(Vw!==void 0)return Vw;if(typeof document<"u")return document;throw new nt(210,!1)}var _s=new lt("",{factory:()=>h8}),h8="ng";var Qb=new lt(""),bm=new lt("",{providedIn:"platform",factory:()=>"unknown"});var ev=new lt("",{factory:()=>U(Un).body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var Gf=(()=>{class i{static \u0275prov=pe({token:i,providedIn:"root",factory:()=>{let t=new i;return t.store=p8(U(Un),U(_s)),t}});store={};onSerializeCallbacks={};get(t,n){return this.store[t]!==void 0?this.store[t]:n}set(t,n){this.store[t]=n}remove(t){delete this.store[t]}hasKey(t){return this.store.hasOwnProperty(t)}get isEmpty(){return Object.keys(this.store).length===0}onSerialize(t,n){this.onSerializeCallbacks[t]=n}toJson(){for(let t in this.onSerializeCallbacks)if(this.onSerializeCallbacks.hasOwnProperty(t))try{this.store[t]=this.onSerializeCallbacks[t]()}catch(n){console.warn("Exception in onSerialize callback: ",n)}return JSON.stringify(this.store).replace(/</g,"\\u003C")}}return i})();function p8(i,e){let t=i.getElementById(e+"-state");if(t?.textContent)try{return JSON.parse(t.textContent)}catch(n){console.warn("Exception while restoring TransferState for app "+e,n)}return{}}var Z2="h",J2="b",m8="f",g8="n",Q2="e",ek="t",tv="c",DE="x",sm="r",tk="i",nk="n",AE="d";var ik="di",rk="s",ok="p";var vm=new lt(""),ak=!1,OE=new lt("",{factory:()=>ak});var PE=new lt(""),sk=!1,lk=new lt("",{factory:()=>[]}),ck=new lt(""),IE=new lt("",{factory:()=>new Map});var ym="ngb";var dk=(i,e,t)=>{let n=i,r=n.__jsaction_fns??new Map,o=r.get(e)??[];o.push(t),r.set(e,o),n.__jsaction_fns=r},uk=(i,e)=>{let t=i,n=t.getAttribute(ym)??"",r=e.get(n)??new Set;r.has(t)||r.add(t),e.set(n,r)};var fk=i=>{i.removeAttribute(Tb.JSACTION),i.removeAttribute(ym),i.__jsaction_fns=void 0},hk=new lt("",{factory:()=>({})});function kE(i,e){let t=e?.__jsaction_fns?.get(i.type);if(!(!t||!e?.isConnected))for(let n of t)n(i)}var Hw=new Map;function pk(i,e){return Hw.set(i,e),()=>Hw.delete(i)}var WI=!1,mk=(i,e,t,n)=>{};function b8(i,e,t,n){mk(i,e,t,n)}function gk(){WI||(mk=(i,e,t,n)=>{let r=i[_o].get(_s);Hw.get(r)?.(e,t,n)},WI=!0)}var nv=new lt("");function _m(i){return(i.flags&32)===32}var v8="__nghData__",RE=v8,y8="__nghDeferData__",bk=y8;var Rb="ngh",vk="nghm",yk=()=>null;function _8(i,e,t=!1){let n=i.getAttribute(Rb);if(n==null)return null;let[r,o]=n.split("|");if(n=t?o:r,!n)return null;let a=o?`|${o}`:"",s=t?r:a,l={};if(n!==""){let d=e.get(Gf,null,{optional:!0});d!==null&&(l=d.get(RE,[])[Number(n)])}let c={data:l,firstChild:i.firstChild??null};return t&&(c.firstChild=i,iv(c,0,i.nextSibling)),s?i.setAttribute(Rb,s):i.removeAttribute(Rb),c}function _k(){yk=_8}function xk(i,e,t=!1){return yk(i,e,t)}function Ck(i){let e=i._lView;return e[mt].type===2?null:(Ld(e)&&(e=e[cn]),e)}function x8(i){return i.textContent?.replace(/\s/gm,"")}function C8(i){let e=ME(),t=e.createNodeIterator(i,NodeFilter.SHOW_COMMENT,{acceptNode(o){let a=x8(o);return a==="ngetn"||a==="ngtns"?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),n,r=[];for(;n=t.nextNode();)r.push(n);for(let o of r)o.textContent==="ngetn"?o.replaceWith(e.createTextNode("")):o.remove()}function iv(i,e,t){i.segmentHeads??={},i.segmentHeads[e]=t}function Gw(i,e){return i.segmentHeads?.[e]??null}function Sk(i){return i.get(ck,!1,{optional:!0})}function S8(i,e){let t=i.data,n=t[Q2]?.[e]??null;return n===null&&t[tv]?.[e]&&(n=NE(i,e)),n}function wk(i,e){return i.data[tv]?.[e]??null}function NE(i,e){let t=wk(i,e)??[],n=0;for(let r of t)n+=r[sm]*(r[DE]??1);return n}function w8(i){if(typeof i.disconnectedNodes>"u"){let e=i.data[AE];i.disconnectedNodes=e?new Set(e):null}return i.disconnectedNodes}function Ek(i,e){if(typeof i.disconnectedNodes>"u"){let t=i.data[AE];i.disconnectedNodes=t?new Set(t):null}return!!w8(i)?.has(e)}function rv(i,e){let t=i[kr];return t!==null&&!bb()&&!_m(e)&&!Ek(t,e.index-cn)}function E8(i,e){let t=e.get(nv),r=e.get(Gf).get(bk,{}),o=!1,a=i,s=null,l=[];for(;!o&&a;){o=t.has(a);let c=t.hydrating.get(a);if(s===null&&c!=null){s=c.promise;break}l.unshift(a),a=r[a][ok]}return{parentBlockPromise:s,hydrationQueue:l}}function Ew(i){return!!i&&i.nodeType===Node.COMMENT_NODE&&i.textContent?.trim()===vk}function YI(i){for(;i&&i.nodeType===Node.TEXT_NODE;)i=i.previousSibling;return i}function Tk(i){for(let n of i.body.childNodes)if(Ew(n))return;let e=YI(i.body.previousSibling);if(Ew(e))return;let t=YI(i.head.lastChild);if(!Ew(t))throw new nt(-507,!1)}function Mk(i,e){let t=i.contentQueries;if(t!==null){let n=Tt(null);try{for(let r=0;r<t.length;r+=2){let o=t[r],a=t[r+1];if(a!==-1){let s=i.data[a];em(o),s.contentQueries(2,e[a],a)}}}finally{Tt(n)}}}function jw(i,e,t){em(0);let n=Tt(null);try{e(i,t)}finally{Tt(n)}}function FE(i,e,t){if(Q1(e)){let n=Tt(null);try{let r=e.directiveStart,o=e.directiveEnd;for(let a=r;a<o;a++){let s=i.data[a];if(s.contentQueries){let l=t[a];s.contentQueries(1,l,a)}}}finally{Tt(n)}}}var ka=(function(i){return i[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",i[i.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom",i})(ka||{});var Mb;function T8(){if(Mb===void 0&&(Mb=null,qo.trustedTypes))try{Mb=qo.trustedTypes.createPolicy("angular",{createHTML:i=>i,createScript:i=>i,createScriptURL:i=>i})}catch{}return Mb}function ov(i){return T8()?.createHTML(i)||i}var Db;function M8(){if(Db===void 0&&(Db=null,qo.trustedTypes))try{Db=qo.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:i=>i,createScript:i=>i,createScriptURL:i=>i})}catch{}return Db}function $I(i){return M8()?.createHTML(i)||i}var rl=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${tb})`}},Ww=class extends rl{getTypeName(){return"HTML"}},Yw=class extends rl{getTypeName(){return"Style"}},$w=class extends rl{getTypeName(){return"Script"}},Xw=class extends rl{getTypeName(){return"URL"}},qw=class extends rl{getTypeName(){return"ResourceURL"}};function Ra(i){return i instanceof rl?i.changingThisBreaksApplicationSecurity:i}function al(i,e){let t=Dk(i);if(t!=null&&t!==e){if(t==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${t} (see ${tb})`)}return t===e}function Dk(i){return i instanceof rl&&i.getTypeName()||null}function LE(i){return new Ww(i)}function BE(i){return new Yw(i)}function zE(i){return new $w(i)}function UE(i){return new Xw(i)}function VE(i){return new qw(i)}function D8(i){let e=new Zw(i);return A8()?new Kw(e):e}var Kw=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(ov(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},Zw=class{defaultDoc;inertDocument;constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=ov(e),t}};function A8(){try{return!!new window.DOMParser().parseFromString(ov(""),"text/html")}catch{return!1}}var O8=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function xm(i){return i=String(i),i.match(O8)?i:"unsafe:"+i}function sl(i){let e={};for(let t of i.split(","))e[t]=!0;return e}function Cm(...i){let e={};for(let t of i)for(let n in t)t.hasOwnProperty(n)&&(e[n]=!0);return e}var Ak=sl("area,br,col,hr,img,wbr"),Ok=sl("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Pk=sl("rp,rt"),P8=Cm(Pk,Ok),I8=Cm(Ok,sl("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")),k8=Cm(Pk,sl("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")),XI=Cm(Ak,I8,k8,P8),Ik=sl("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),R8=sl("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"),N8=sl("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"),F8=Cm(Ik,R8,N8),L8=sl("script,style,template");var Jw=class{sanitizedSomething=!1;buf=[];sanitizeChildren(e){let t=e.firstChild,n=!0,r=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild){r.push(t),t=U8(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let o=z8(t);if(o){t=o;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=qI(e).toLowerCase();if(!XI.hasOwnProperty(t))return this.sanitizedSomething=!0,!L8.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let n=e.attributes;for(let r=0;r<n.length;r++){let o=n.item(r),a=o.name,s=a.toLowerCase();if(!F8.hasOwnProperty(s)){this.sanitizedSomething=!0;continue}let l=o.value;Ik[s]&&(l=xm(l)),this.buf.push(" ",a,'="',KI(l),'"')}return this.buf.push(">"),!0}endElement(e){let t=qI(e).toLowerCase();XI.hasOwnProperty(t)&&!Ak.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(KI(e))}};function B8(i,e){return(i.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function z8(i){let e=i.nextSibling;if(e&&i!==e.previousSibling)throw kk(e);return e}function U8(i){let e=i.firstChild;if(e&&B8(i,e))throw kk(e);return e}function qI(i){let e=i.nodeName;return typeof e=="string"?e:"FORM"}function kk(i){return new Error(`Failed to sanitize html because the element is clobbered: ${i.outerHTML}`)}var V8=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,H8=/([^\#-~ |!])/g;function KI(i){return i.replace(/&/g,"&").replace(V8,function(e){let t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+((t-55296)*1024+(n-56320)+65536)+";"}).replace(H8,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}var Ab;function av(i,e){let t=null;try{Ab=Ab||D8(i);let n=e?String(e):"";t=Ab.getInertBodyElement(n);let r=5,o=n;do{if(r===0)throw new Error("Failed to sanitize html because the input is unstable");r--,n=o,o=t.innerHTML,t=Ab.getInertBodyElement(n)}while(n!==o);let s=new Jw().sanitizeChildren(ZI(t)||t);return ov(s)}finally{if(t){let n=ZI(t)||t;for(;n.firstChild;)n.firstChild.remove()}}}function ZI(i){return"content"in i&&G8(i)?i.content:null}function G8(i){return i.nodeType===Node.ELEMENT_NODE&&i.nodeName==="TEMPLATE"}var j8=/^>|^->|<!--|-->|--!>|<!-$/g,W8=/(<|>)/g,Y8="\u200B$1\u200B";function $8(i){return i.replace(j8,e=>e.replace(W8,Y8))}function Rk(i,e){return i.createText(e)}function X8(i,e,t){i.setValue(e,t)}function Nk(i,e){return i.createComment($8(e))}function HE(i,e,t){return i.createElement(e,t)}function Wb(i,e,t,n,r){i.insertBefore(e,t,n,r)}function Fk(i,e,t){i.appendChild(e,t)}function JI(i,e,t,n,r){n!==null?Wb(i,e,t,n,r):Fk(i,e,t)}function GE(i,e,t,n){i.removeChild(null,e,t,n)}function Lk(i){i.textContent=""}function q8(i,e,t){i.setAttribute(e,"style",t)}function K8(i,e,t){t===""?i.removeAttribute(e,"class"):i.setAttribute(e,"class",t)}function Bk(i,e,t){let{mergedAttrs:n,classes:r,styles:o}=t;n!==null&&K6(i,e,n),r!==null&&K8(i,e,r),o!==null&&q8(i,e,o)}var Na=(function(i){return i[i.NONE=0]="NONE",i[i.HTML=1]="HTML",i[i.STYLE=2]="STYLE",i[i.SCRIPT=3]="SCRIPT",i[i.URL=4]="URL",i[i.RESOURCE_URL=5]="RESOURCE_URL",i})(Na||{});function sv(i){let e=zk();return e?$I(e.sanitize(Na.HTML,i)||""):al(i,"HTML")?$I(Ra(i)):av(ME(),Jr(i))}function mn(i){let e=zk();return e?e.sanitize(Na.URL,i)||"":al(i,"URL")?Ra(i):xm(Jr(i))}function zk(){let i=St();return i&&i[Da].sanitizer}function $d(i){return i.ownerDocument.defaultView}function Xd(i){return i.ownerDocument}function Uk(i){return i.ownerDocument.body}function Z8(i,e,t){let n=i.length;for(;;){let r=i.indexOf(e,t);if(r===-1)return r;if(r===0||i.charCodeAt(r-1)<=32){let o=e.length;if(r+o===n||i.charCodeAt(r+o)<=32)return r}t=r+1}}var Vk="ng-template";function J8(i,e,t,n){let r=0;if(n){for(;r<e.length&&typeof e[r]=="string";r+=2)if(e[r]==="class"&&Z8(e[r+1].toLowerCase(),t,0)!==-1)return!0}else if(jE(i))return!1;if(r=e.indexOf(1,r),r>-1){let o;for(;++r<e.length&&typeof(o=e[r])=="string";)if(o.toLowerCase()===t)return!0}return!1}function jE(i){return i.type===4&&i.value!==Vk}function Q8(i,e,t){let n=i.type===4&&!t?Vk:i.value;return e===n}function eH(i,e,t){let n=4,r=i.attrs,o=r!==null?iH(r):0,a=!1;for(let s=0;s<e.length;s++){let l=e[s];if(typeof l=="number"){if(!a&&!Pa(n)&&!Pa(l))return!1;if(a&&Pa(l))continue;a=!1,n=l|n&1;continue}if(!a)if(n&4){if(n=2|n&1,l!==""&&!Q8(i,l,t)||l===""&&e.length===1){if(Pa(n))return!1;a=!0}}else if(n&8){if(r===null||!J8(i,r,l,t)){if(Pa(n))return!1;a=!0}}else{let c=e[++s],d=tH(l,r,jE(i),t);if(d===-1){if(Pa(n))return!1;a=!0;continue}if(c!==""){let u;if(d>o?u="":u=r[d+1].toLowerCase(),n&2&&c!==u){if(Pa(n))return!1;a=!0}}}}return Pa(n)||a}function Pa(i){return(i&1)===0}function tH(i,e,t,n){if(e===null)return-1;let r=0;if(n||!t){let o=!1;for(;r<e.length;){let a=e[r];if(a===i)return r;if(a===3||a===6)o=!0;else if(a===1||a===2){let s=e[++r];for(;typeof s=="string";)s=e[++r];continue}else{if(a===4)break;if(a===0){r+=4;continue}}r+=o?1:2}return-1}else return rH(e,i)}function Hk(i,e,t=!1){for(let n=0;n<e.length;n++)if(eH(i,e[n],t))return!0;return!1}function nH(i){let e=i.attrs;if(e!=null){let t=e.indexOf(5);if((t&1)===0)return e[t+1]}return null}function iH(i){for(let e=0;e<i.length;e++){let t=i[e];if(Z6(t))return e}return i.length}function rH(i,e){let t=i.indexOf(4);if(t>-1)for(t++;t<i.length;){let n=i[t];if(typeof n=="number")return-1;if(n===e)return t;t++}return-1}function oH(i,e){e:for(let t=0;t<e.length;t++){let n=e[t];if(i.length===n.length){for(let r=0;r<i.length;r++)if(i[r]!==n[r])continue e;return!0}}return!1}function QI(i,e){return i?":not("+e.trim()+")":e}function aH(i){let e=i[0],t=1,n=2,r="",o=!1;for(;t<i.length;){let a=i[t];if(typeof a=="string")if(n&2){let s=i[++t];r+="["+a+(s.length>0?'="'+s+'"':"")+"]"}else n&8?r+="."+a:n&4&&(r+=" "+a);else r!==""&&!Pa(a)&&(e+=QI(o,r),r=""),n=a,o=o||!Pa(n);t++}return r!==""&&(e+=QI(o,r)),e}function sH(i){return i.map(aH).join(",")}function lH(i){let e=[],t=[],n=1,r=2;for(;n<i.length;){let o=i[n];if(typeof o=="string")r===2?o!==""&&e.push(o,i[++n]):r===8&&t.push(o);else{if(!Pa(r))break;r=o}n++}return t.length&&e.push(1,...t),e}var Ni={};function WE(i,e,t,n,r,o,a,s,l,c,d){let u=cn+n,f=u+r,h=cH(u,f),p=typeof c=="function"?c():c;return h[mt]={type:i,blueprint:h,template:t,queries:null,viewQuery:s,declTNode:e,data:h.slice().fill(null,u),bindingStartIndex:u,expandoStartIndex:f,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof o=="function"?o():o,pipeRegistry:typeof a=="function"?a():a,firstChild:null,schemas:l,consts:p,incompleteFirstPass:!1,ssrId:d}}function cH(i,e){let t=[];for(let n=0;n<e;n++)t.push(n<i?null:Ni);return t}function dH(i){let e=i.tView;return e===null||e.incompleteFirstPass?i.tView=WE(1,null,i.template,i.decls,i.vars,i.directiveDefs,i.pipeDefs,i.viewQuery,i.schemas,i.consts,i.id):e}function YE(i,e,t,n,r,o,a,s,l,c,d){let u=e.blueprint.slice();return u[Pr]=r,u[zt]=n|4|128|8|64|1024,(c!==null||i&&i[zt]&2048)&&(u[zt]|=2048),iw(u),u[hi]=u[kd]=i,u[ii]=t,u[Da]=a||i&&i[Da],u[ln]=s||i&&i[ln],u[_o]=l||i&&i[_o]||null,u[Ir]=o,u[el]=u8(),u[kr]=d,u[J1]=c,u[$i]=e.type==2?i[$i]:u,u}function uH(i,e,t){let n=wo(e,i),r=dH(t),o=i[Da].rendererFactory,a=$E(i,YE(i,r,null,Gk(t),n,e,null,o.createRenderer(n,t),null,null,null));return i[e.index]=a}function Gk(i){let e=16;return i.signals?e=4096:i.onPush&&(e=64),e}function jk(i,e,t,n){if(t===0)return-1;let r=e.length;for(let o=0;o<t;o++)e.push(n),i.blueprint.push(n),i.data.push(null);return r}function $E(i,e){return i[wf]?i[Z1][Ko]=e:i[wf]=e,i[Z1]=e,e}function v(i=1){Wk(Hn(),St(),ea()+i,!1)}function Wk(i,e,t,n){if(!n)if((e[zt]&3)===3){let o=i.preOrderCheckHooks;o!==null&&Pb(e,o,t)}else{let o=i.preOrderHooks;o!==null&&Ib(e,o,0,t)}Ql(t)}var lv=(function(i){return i[i.None=0]="None",i[i.SignalBased=1]="SignalBased",i[i.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",i})(lv||{});function Qw(i,e,t,n){let r=Tt(null);try{let[o,a,s]=i.inputs[t],l=null;(a&lv.SignalBased)!==0&&(l=e[o][Ri]),l!==null&&l.transformFn!==void 0?n=l.transformFn(n):s!==null&&(n=s.call(e,n)),i.setInput!==null?i.setInput(e,l,n,t,o):M2(e,l,o,n)}finally{Tt(r)}}var ys=(function(i){return i[i.Important=1]="Important",i[i.DashCase=2]="DashCase",i})(ys||{}),fH;function XE(i,e){return fH(i,e)}var nve=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";var eE=new WeakMap,tE=new WeakSet;function hH(i,e){let t=eE.get(i);if(!t||t.length===0)return;let n=e.parentNode,r=e.previousSibling;for(let o=t.length-1;o>=0;o--){let a=t[o],s=a.parentNode;a===e?(t.splice(o,1),tE.add(a),a.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}}))):(r&&a===r||s&&n&&s!==n)&&(t.splice(o,1),a.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}})),a.parentNode?.removeChild(a))}}function pH(i,e){let t=eE.get(i);t?t.includes(e)||t.push(e):eE.set(i,[e])}var Gd=new Set,cv=(function(i){return i[i.CHANGE_DETECTION=0]="CHANGE_DETECTION",i[i.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",i})(cv||{}),xs=new lt(""),e2=new Set;function Fa(i){e2.has(i)||(e2.add(i),performance?.mark?.("mark_feature_usage",{detail:{feature:i}}))}var qE=(()=>{class i{impl=null;execute(){this.impl?.execute()}static \u0275prov=pe({token:i,providedIn:"root",factory:()=>new i})}return i})(),Yk=[0,1,2,3],$k=(()=>{class i{ngZone=U(Zr);scheduler=U(hs);errorHandler=U(Xo,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){U(xs,{optional:!0})}execute(){let t=this.sequences.size>0;t&&fn(an.AfterRenderHooksStart),this.executing=!0;for(let n of Yk)for(let r of this.sequences)if(!(r.erroredOrDestroyed||!r.hooks[n]))try{r.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let o=r.hooks[n];return o(r.pipelinedValue)},r.snapshot))}catch(o){r.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}this.executing=!1;for(let n of this.sequences)n.afterRun(),n.once&&(this.sequences.delete(n),n.destroy());for(let n of this.deferredRegistrations)this.sequences.add(n);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),t&&fn(an.AfterRenderHooksEnd)}register(t){let{view:n}=t;n!==void 0?((n[Nd]??=[]).push(t),Bd(n),n[zt]|=8192):this.executing?this.deferredRegistrations.add(t):this.addSequence(t)}addSequence(t){this.sequences.add(t),this.scheduler.notify(7)}unregister(t){this.executing&&this.sequences.has(t)?(t.erroredOrDestroyed=!0,t.pipelinedValue=void 0,t.once=!0):(this.sequences.delete(t),this.deferredRegistrations.delete(t))}maybeTrace(t,n){return n?n.run(cv.AFTER_NEXT_RENDER,t):t()}static \u0275prov=pe({token:i,providedIn:"root",factory:()=>new i})}return i})(),Yb=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,n,r,o,a=null){this.impl=e,this.hooks=t,this.view=n,this.once=r,this.snapshot=a,this.unregisterOnDestroy=o?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[Nd];e&&(this.view[Nd]=e.filter(t=>t!==this))}};function dv(i,e){let t=e?.injector??U(ir);return Fa("NgAfterNextRender"),gH(i,t,e,!0)}function mH(i){return i instanceof Function?[void 0,void 0,i,void 0]:[i.earlyRead,i.write,i.mixedReadWrite,i.read]}function gH(i,e,t,n){let r=e.get(qE);r.impl??=e.get($k);let o=e.get(xs,null,{optional:!0}),a=t?.manualCleanup!==!0?e.get(Xi):null,s=e.get(tm,null,{optional:!0}),l=new Yb(r.impl,mH(i),s?.view,n,a,o?.snapshot(null));return r.impl.register(l),l}var Xk=new lt("",{factory:()=>({queue:new Set,isScheduled:!1,scheduler:null,injector:U(ur)})});function qk(i,e,t){let n=i.get(Xk);if(Array.isArray(e))for(let r of e)n.queue.add(r),t?.detachedLeaveAnimationFns?.push(r);else n.queue.add(e),t?.detachedLeaveAnimationFns?.push(e);n.scheduler&&n.scheduler(i)}function bH(i,e){let t=i.get(Xk);if(e.detachedLeaveAnimationFns){for(let n of e.detachedLeaveAnimationFns)t.queue.delete(n);e.detachedLeaveAnimationFns=void 0}}function vH(i,e){for(let[t,n]of e)qk(i,n.animateFns)}function t2(i,e,t,n){let r=i?.[Zl]?.enter;e!==null&&r&&r.has(t.index)&&vH(n,r)}function If(i,e,t,n,r,o,a,s){if(r!=null){let l,c=!1;Co(r)?l=r:Zo(r)&&(c=!0,r=r[Pr]);let d=So(r);i===0&&n!==null?(t2(s,n,o,t),a==null?Fk(e,n,d):Wb(e,n,d,a||null,!0)):i===1&&n!==null?(t2(s,n,o,t),Wb(e,n,d,a||null,!0),hH(o,d)):i===2?(s?.[Zl]?.leave?.has(o.index)&&pH(o,d),n2(s,o,t,u=>{if(tE.has(d)){tE.delete(d);return}GE(e,d,c,u)})):i===3&&n2(s,o,t,()=>{e.destroyNode(d)}),l!=null&&AH(e,i,t,l,o,n,a)}}function yH(i,e){Kk(i,e),e[Pr]=null,e[Ir]=null}function _H(i,e,t,n,r,o){n[Pr]=r,n[Ir]=e,fv(i,n,t,1,r,o)}function Kk(i,e){e[Da].changeDetectionScheduler?.notify(9),fv(i,e,e[ln],2,null,null)}function xH(i){let e=i[wf];if(!e)return Tw(i[mt],i);for(;e;){let t=null;if(Zo(e))t=e[wf];else{let n=e[Xn];n&&(t=n)}if(!t){for(;e&&!e[Ko]&&e!==i;)Zo(e)&&Tw(e[mt],e),e=e[hi];e===null&&(e=i),Zo(e)&&Tw(e[mt],e),t=e&&e[Ko]}e=t}}function KE(i,e){let t=i[Fd],n=t.indexOf(e);t.splice(n,1)}function uv(i,e){if(Jl(e))return;let t=e[ln];t.destroyNode&&fv(i,e,t,3,null,null),xH(e)}function Tw(i,e){if(Jl(e))return;let t=Tt(null);try{e[zt]&=-129,e[zt]|=256,e[xo]&&Sd(e[xo]),wH(i,e),SH(i,e),e[mt].type===1&&e[ln].destroy();let n=e[Kl];if(n!==null&&Co(e[hi])){n!==e[hi]&&KE(n,e);let r=e[ms];r!==null&&r.detachView(i)}Uw(e)}finally{Tt(t)}}function n2(i,e,t,n){let r=i?.[Zl];if(r==null||r.leave==null||!r.leave.has(e.index))return n(!1);i&&Gd.add(i[el]),qk(t,()=>{if(r.leave&&r.leave.has(e.index)){let a=r.leave.get(e.index),s=[];if(a){for(let l=0;l<a.animateFns.length;l++){let c=a.animateFns[l],{promise:d}=c();s.push(d)}r.detachedLeaveAnimationFns=void 0}r.running=Promise.allSettled(s),CH(i,n)}else i&&Gd.delete(i[el]),n(!1)},r)}function CH(i,e){let t=i[Zl]?.running;if(t){t.then(()=>{i[Zl].running=void 0,Gd.delete(i[el]),e(!0)});return}e(!1)}function SH(i,e){let t=i.cleanup,n=e[Sf];if(t!==null)for(let a=0;a<t.length-1;a+=2)if(typeof t[a]=="string"){let s=t[a+3];s>=0?n[s]():n[-s].unsubscribe(),a+=2}else{let s=n[t[a+1]];t[a].call(s)}n!==null&&(e[Sf]=null);let r=e[qs];if(r!==null){e[qs]=null;for(let a=0;a<r.length;a++){let s=r[a];s()}}let o=e[$l];if(o!==null){e[$l]=null;for(let a of o)a.destroy()}}function wH(i,e){let t;if(i!=null&&(t=i.destroyHooks)!=null)for(let n=0;n<t.length;n+=2){let r=e[t[n]];if(!(r instanceof Hd)){let o=t[n+1];if(Array.isArray(o))for(let a=0;a<o.length;a+=2){let s=r[o[a]],l=o[a+1];fn(an.LifecycleHookStart,s,l);try{l.call(s)}finally{fn(an.LifecycleHookEnd,s,l)}}else{fn(an.LifecycleHookStart,r,o);try{o.call(r)}finally{fn(an.LifecycleHookEnd,r,o)}}}}}function Zk(i,e,t){return EH(i,e.parent,t)}function EH(i,e,t){let n=e;for(;n!==null&&n.type&168;)e=n,n=e.parent;if(n===null)return t[Pr];if(Oa(n)){let{encapsulation:r}=i.data[n.directiveStart+n.componentOffset];if(r===ka.None||r===ka.Emulated)return null}return wo(n,t)}function Jk(i,e,t){return MH(i,e,t)}function TH(i,e,t){return i.type&40?wo(i,t):null}var MH=TH,i2;function ZE(i,e,t,n){let r=Zk(i,n,e),o=e[ln],a=n.parent||e[Ir],s=Jk(a,n,e);if(r!=null)if(Array.isArray(t))for(let l=0;l<t.length;l++)JI(o,r,t[l],s,!1);else JI(o,r,t,s,!1);i2!==void 0&&i2(o,n,e,t,r)}function rm(i,e){if(e!==null){let t=e.type;if(t&3)return wo(e,i);if(t&4)return nE(-1,i[e.index]);if(t&8){let n=e.child;if(n!==null)return rm(i,n);{let r=i[e.index];return Co(r)?nE(-1,r):So(r)}}else{if(t&128)return rm(i,e.next);if(t&32)return XE(e,i)()||So(i[e.index]);{let n=Qk(i,e);if(n!==null){if(Array.isArray(n))return n[0];let r=Xl(i[$i]);return rm(r,n)}else return rm(i,e.next)}}}return null}function Qk(i,e){if(e!==null){let n=i[$i][Ir],r=e.projection;return n.projection[r]}return null}function nE(i,e){let t=Xn+i+1;if(t<e.length){let n=e[t],r=n[mt].firstChild;if(r!==null)return rm(n,r)}return e[gs]}function JE(i,e,t,n,r,o,a){for(;t!=null;){let s=n[_o];if(t.type===128){t=t.next;continue}let l=n[t.index],c=t.type;if(a&&e===0&&(l&&Lf(So(l),n),t.flags|=2),!_m(t))if(c&8)JE(i,e,t.child,n,r,o,!1),If(e,i,s,r,l,t,o,n);else if(c&32){let d=XE(t,n),u;for(;u=d();)If(e,i,s,r,u,t,o,n);If(e,i,s,r,l,t,o,n)}else c&16?eR(i,e,n,t,r,o):If(e,i,s,r,l,t,o,n);t=a?t.projectionNext:t.next}}function fv(i,e,t,n,r,o){JE(t,n,i.firstChild,e,r,o,!1)}function DH(i,e,t){let n=e[ln],r=Zk(i,t,e),o=t.parent||e[Ir],a=Jk(o,t,e);eR(n,0,e,t,r,a)}function eR(i,e,t,n,r,o){let a=t[$i],l=a[Ir].projection[n.projection];if(Array.isArray(l))for(let c=0;c<l.length;c++){let d=l[c];If(e,i,t[_o],r,d,n,o,t)}else{let c=l,d=a[hi];jb(n)&&(c.flags|=128),JE(i,e,c,d,r,o,!0)}}function AH(i,e,t,n,r,o,a){let s=n[gs],l=So(n);s!==l&&If(e,i,t,o,s,r,a);for(let c=Xn;c<n.length;c++){let d=n[c];fv(d[mt],d,i,e,o,s)}}function OH(i,e,t,n,r){if(e)r?i.addClass(t,n):i.removeClass(t,n);else{let o=n.indexOf("-")===-1?void 0:ys.DashCase;r==null?i.removeStyle(t,n,o):(typeof r=="string"&&r.endsWith("!important")&&(r=r.slice(0,-10),o|=ys.Important),i.setStyle(t,n,r,o))}}function tR(i,e,t,n,r){let o=ea(),a=n&2;try{Ql(-1),a&&e.length>cn&&Wk(i,e,cn,!1);let s=a?an.TemplateUpdateStart:an.TemplateCreateStart;fn(s,r,t),t(n,r)}finally{Ql(o);let s=a?an.TemplateUpdateEnd:an.TemplateCreateEnd;fn(s,r,t)}}function hv(i,e,t){NH(i,e,t),(t.flags&64)===64&&FH(i,e,t)}function Sm(i,e,t=wo){let n=e.localNames;if(n!==null){let r=e.index+1;for(let o=0;o<n.length;o+=2){let a=n[o+1],s=a===-1?t(e,i):i[a];i[r++]=s}}}function PH(i,e,t,n){let o=n.get(OE,ak)||t===ka.ShadowDom||t===ka.ExperimentalIsolatedShadowDom,a=i.selectRootElement(e,o);return IH(a),a}function IH(i){nR(i)}var nR=()=>null;function kH(i){W2(i)?Lk(i):C8(i)}function iR(){nR=kH}function RH(i){return i==="class"?"className":i==="for"?"htmlFor":i==="formaction"?"formAction":i==="innerHtml"?"innerHTML":i==="readonly"?"readOnly":i==="tabindex"?"tabIndex":i}function rR(i,e,t,n,r,o){let a=e[mt];if(pv(i,a,e,t,n)){Oa(i)&&aR(e,i.index);return}i.type&3&&(t=RH(t)),oR(i,e,t,n,r,o)}function oR(i,e,t,n,r,o){if(i.type&3){let a=wo(i,e);n=o!=null?o(n,i.value||"",t):n,r.setProperty(a,t,n)}else i.type&12}function aR(i,e){let t=Jo(e,i);t[zt]&16||(t[zt]|=64)}function NH(i,e,t){let n=t.directiveStart,r=t.directiveEnd;Oa(t)&&uH(e,t,i.data[n+t.componentOffset]),i.firstCreatePass||Hb(t,e);let o=t.initialInputs;for(let a=n;a<r;a++){let s=i.data[a],l=am(e,i,a,t);if(Lf(l,e),o!==null&&zH(e,a-n,l,s,t,o),bs(s)){let c=Jo(t.index,e);c[ii]=am(e,i,a,t)}}}function FH(i,e,t){let n=t.directiveStart,r=t.directiveEnd,o=t.index,a=wI();try{Ql(o);for(let s=n;s<r;s++){let l=i.data[s],c=e[s];yb(s),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&LH(l,c)}}finally{Ql(-1),yb(a)}}function LH(i,e){i.hostBindings!==null&&i.hostBindings(1,e)}function QE(i,e){let t=i.directiveRegistry,n=null;if(t)for(let r=0;r<t.length;r++){let o=t[r];Hk(e,o.selectors,!1)&&(n??=[],bs(o)?n.unshift(o):n.push(o))}return n}function BH(i,e,t,n,r,o){let a=wo(i,e);sR(e[ln],a,o,i.value,t,n,r)}function sR(i,e,t,n,r,o,a){if(o==null)i.removeAttribute(e,r,t);else{let s=a==null?Jr(o):a(o,n||"",r);i.setAttribute(e,r,s,t)}}function zH(i,e,t,n,r,o){let a=o[e];if(a!==null)for(let s=0;s<a.length;s+=2){let l=a[s],c=a[s+1];Qw(n,t,l,c)}}function eT(i,e,t,n,r){let o=cn+t,a=e[mt],s=r(a,e,i,n,t);e[o]=s,Mf(i,!0);let l=i.type===2;return l?(Bk(e[ln],s,i),(gI()===0||Ef(i))&&Lf(s,e),bI()):Lf(s,e),Sb()&&(!l||!_m(i))&&ZE(a,e,s,i),i}function tT(i){let e=i;return fw()?hw():(e=e.parent,Mf(e,!1)),e}function nT(i,e){let t=i[_o];if(!t)return;let n;try{n=t.get(il,null)}catch{n=null}n?.(e)}function pv(i,e,t,n,r){let o=i.inputs?.[n],a=i.hostDirectiveInputs?.[n],s=!1;if(a)for(let l=0;l<a.length;l+=2){let c=a[l],d=a[l+1],u=e.data[c];Qw(u,t[c],d,r),s=!0}if(o)for(let l of o){let c=t[l],d=e.data[l];Qw(d,c,n,r),s=!0}return s}function UH(i,e){let t=Jo(e,i),n=t[mt];VH(n,t);let r=t[Pr];r!==null&&t[kr]===null&&(t[kr]=xk(r,t[_o])),fn(an.ComponentStart);try{iT(n,t,t[ii])}finally{fn(an.ComponentEnd,t[ii])}}function VH(i,e){for(let t=e.length;t<i.blueprint.length;t++)e.push(i.blueprint[t])}function iT(i,e,t){xb(e);try{let n=i.viewQuery;n!==null&&jw(1,n,t);let r=i.template;r!==null&&tR(i,e,r,1,t),i.firstCreatePass&&(i.firstCreatePass=!1),e[ms]?.finishViewCreation(i),i.staticContentQueries&&Mk(i,e),i.staticViewQueries&&jw(2,i.viewQuery,t);let o=i.components;o!==null&&HH(e,o)}catch(n){throw i.firstCreatePass&&(i.incompleteFirstPass=!0,i.firstCreatePass=!1),n}finally{e[zt]&=-5,Cb()}}function HH(i,e){for(let t=0;t<e.length;t++)UH(i,e[t])}function jf(i,e,t,n){let r=Tt(null);try{let o=e.tView,s=i[zt]&4096?4096:16,l=YE(i,o,t,s,null,e,null,null,n?.injector??null,n?.embeddedViewInjector??null,n?.dehydratedView??null),c=i[e.index];l[Kl]=c;let d=i[ms];return d!==null&&(l[ms]=d.createEmbeddedView(o)),iT(o,l,t),l}finally{Tt(r)}}function jd(i,e){return!e||e.firstChild===null||jb(i)}function lm(i,e,t,n,r=!1){for(;t!==null;){if(t.type===128){t=r?t.projectionNext:t.next;continue}let o=e[t.index];o!==null&&n.push(So(o)),Co(o)&&lR(o,n);let a=t.type;if(a&8)lm(i,e,t.child,n);else if(a&32){let s=XE(t,e),l;for(;l=s();)n.push(l)}else if(a&16){let s=Qk(e,t);if(Array.isArray(s))n.push(...s);else{let l=Xl(e[$i]);lm(l[mt],l,s,n,!0)}}t=r?t.projectionNext:t.next}return n}function lR(i,e){for(let t=Xn;t<i.length;t++){let n=i[t],r=n[mt].firstChild;r!==null&&lm(n[mt],n,r,e)}i[gs]!==i[Pr]&&e.push(i[gs])}function cR(i){if(i[Nd]!==null){for(let e of i[Nd])e.impl.addSequence(e);i[Nd].length=0}}var dR=[];function GH(i){return i[xo]??jH(i)}function jH(i){let e=dR.pop()??Object.create(YH);return e.lView=i,e}function WH(i){i.lView[xo]!==i&&(i.lView=null,dR.push(i))}var YH=Q(B({},_d),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:i=>{Bd(i.lView)},consumerOnSignalRead(){this.lView[xo]=this}});function $H(i){let e=i[xo]??Object.create(XH);return e.lView=i,e}var XH=Q(B({},_d),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:i=>{let e=Xl(i.lView);for(;e&&!uR(e[mt]);)e=Xl(e);e&&rw(e)},consumerOnSignalRead(){this.lView[xo]=this}});function uR(i){return i.type!==2}function fR(i){if(i[$l]===null)return;let e=!0;for(;e;){let t=!1;for(let n of i[$l])n.dirty&&(t=!0,n.zone===null||Zone.current===n.zone?n.run():n.zone.run(()=>n.run()));e=t&&!!(i[zt]&8192)}}var qH=100;function hR(i,e=0){let n=i[Da].rendererFactory,r=!1;r||n.begin?.();try{KH(i,e)}finally{r||n.end?.()}}function KH(i,e){let t=pw();try{$p(!0),iE(i,e);let n=0;for(;Qp(i);){if(n===qH)throw new nt(103,!1);n++,iE(i,1)}}finally{$p(t)}}function ZH(i,e,t,n){if(Jl(e))return;let r=e[zt],o=!1,a=!1;xb(e);let s=!0,l=null,c=null;o||(uR(i)?(c=GH(e),l=Cd(c)):w0()===null?(s=!1,c=$H(e),l=Cd(c)):e[xo]&&(Sd(e[xo]),e[xo]=null));try{iw(e),xI(i.bindingStartIndex),t!==null&&tR(i,e,t,2,n);let d=(r&3)===3;if(!o)if(d){let h=i.preOrderCheckHooks;h!==null&&Pb(e,h,null)}else{let h=i.preOrderHooks;h!==null&&Ib(e,h,0,null),Sw(e,0)}if(a||JH(e),fR(e),pR(e,0),i.contentQueries!==null&&Mk(i,e),!o)if(d){let h=i.contentCheckHooks;h!==null&&Pb(e,h)}else{let h=i.contentHooks;h!==null&&Ib(e,h,1),Sw(e,1)}eG(i,e);let u=i.components;u!==null&&gR(e,u,0);let f=i.viewQuery;if(f!==null&&jw(2,f,n),!o)if(d){let h=i.viewCheckHooks;h!==null&&Pb(e,h)}else{let h=i.viewHooks;h!==null&&Ib(e,h,2),Sw(e,2)}if(i.firstUpdatePass===!0&&(i.firstUpdatePass=!1),e[fb]){for(let h of e[fb])h();e[fb]=null}o||(cR(e),e[zt]&=-73)}catch(d){throw o||Bd(e),d}finally{c!==null&&(ff(c,l),s&&WH(c)),Cb()}}function pR(i,e){for(let t=X2(i);t!==null;t=q2(t))for(let n=Xn;n<t.length;n++){let r=t[n];mR(r,e)}}function JH(i){for(let e=X2(i);e!==null;e=q2(e)){if(!(e[zt]&2))continue;let t=e[Fd];for(let n=0;n<t.length;n++){let r=t[n];rw(r)}}}function QH(i,e,t){fn(an.ComponentStart);let n=Jo(e,i);try{mR(n,t)}finally{fn(an.ComponentEnd,n[ii])}}function mR(i,e){pb(i)&&iE(i,e)}function iE(i,e){let n=i[mt],r=i[zt],o=i[xo],a=!!(e===0&&r&16);if(a||=!!(r&64&&e===0),a||=!!(r&1024),a||=!!(o?.dirty&&Lp(o)),a||=!1,o&&(o.dirty=!1),i[zt]&=-9217,a)ZH(n,i,n.template,i[ii]);else if(r&8192){let s=Tt(null);try{fR(i),pR(i,1);let l=n.components;l!==null&&gR(i,l,1),cR(i)}finally{Tt(s)}}}function gR(i,e,t){for(let n=0;n<e.length;n++)QH(i,e[n],t)}function eG(i,e){let t=i.hostBindingOpCodes;if(t!==null)try{for(let n=0;n<t.length;n++){let r=t[n];if(r<0)Ql(~r);else{let o=r,a=t[++n],s=t[++n];SI(a,o);let l=e[o];fn(an.HostBindingsUpdateStart,l);try{s(2,l)}finally{fn(an.HostBindingsUpdateEnd,l)}}}}finally{Ql(-1)}}function mv(i,e){let t=pw()?64:1088;for(i[Da].changeDetectionScheduler?.notify(e);i;){i[zt]|=t;let n=Xl(i);if(Ld(i)&&!n)return i;i=n}return null}function bR(i,e,t,n){return[i,!0,0,e,null,n,null,t,null,null]}function vR(i,e){let t=Xn+e;if(t<i.length)return i[t]}function Wf(i,e,t,n=!0){let r=e[mt];if(tG(r,e,i,t),n){let a=nE(t,i),s=e[ln],l=s.parentNode(i[gs]);l!==null&&_H(r,i[Ir],s,e,l,a)}let o=e[kr];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function rT(i,e){let t=cm(i,e);return t!==void 0&&uv(t[mt],t),t}function cm(i,e){if(i.length<=Xn)return;let t=Xn+e,n=i[t];if(n){let r=n[Kl];r!==null&&r!==i&&KE(r,n),e>0&&(i[t-1][Ko]=n[Ko]);let o=Kp(i,Xn+e);yH(n[mt],n);let a=o[ms];a!==null&&a.detachView(o[mt]),n[hi]=null,n[Ko]=null,n[zt]&=-129}return n}function tG(i,e,t,n){let r=Xn+n,o=t.length;n>0&&(t[r-1][Ko]=e),n<o-Xn?(e[Ko]=t[r],Y1(t,Xn+n,e)):(t.push(e),e[Ko]=null),e[hi]=t;let a=e[Kl];a!==null&&t!==a&&yR(a,e);let s=e[ms];s!==null&&s.insertView(i),mb(e),e[zt]|=128}function yR(i,e){let t=i[Fd],n=e[hi];if(Zo(n))i[zt]|=2;else{let r=n[hi][$i];e[$i]!==r&&(i[zt]|=2)}t===null?i[Fd]=[e]:t.push(e)}var nc=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let e=this._lView,t=e[mt];return lm(t,e,t.firstChild,[])}constructor(e,t){this._lView=e,this._cdRefInjectingView=t}get context(){return this._lView[ii]}set context(e){this._lView[ii]=e}get destroyed(){return Jl(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[hi];if(Co(e)){let t=e[Jp],n=t?t.indexOf(this):-1;n>-1&&(cm(e,n),Kp(t,n))}this._attachedToViewContainer=!1}uv(this._lView[mt],this._lView)}onDestroy(e){ow(this._lView,e)}markForCheck(){mv(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[zt]&=-129}reattach(){mb(this._lView),this._lView[zt]|=128}detectChanges(){this._lView[zt]|=1024,hR(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new nt(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=Ld(this._lView),t=this._lView[Kl];t!==null&&!e&&KE(t,this._lView),Kk(this._lView[mt],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new nt(902,!1);this._appRef=e;let t=Ld(this._lView),n=this._lView[Kl];n!==null&&!t&&yR(n,this._lView),mb(this._lView)}};var Bf=(()=>{class i{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=nG;constructor(t,n,r){this._declarationLView=t,this._declarationTContainer=n,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,n){return this.createEmbeddedViewImpl(t,n)}createEmbeddedViewImpl(t,n,r){let o=jf(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:n,dehydratedView:r});return new nc(o)}}return i})();function nG(){return gv(rr(),St())}function gv(i,e){return i.type&4?new Bf(e,i,Hf(i,e)):null}function Yf(i,e,t,n,r){let o=i.data[e];if(o===null)o=iG(i,e,t,n,r),CI()&&(o.flags|=32);else if(o.type&64){o.type=t,o.value=n,o.attrs=r;let a=yI();o.injectorIndex=a===null?-1:a.injectorIndex}return Mf(o,!0),o}function iG(i,e,t,n,r){let o=uw(),a=fw(),s=a?o:o&&o.parent,l=i.data[e]=oG(i,s,t,e,n,r);return rG(i,l,o,a),l}function rG(i,e,t,n){i.firstChild===null&&(i.firstChild=e),t!==null&&(n?t.child==null&&e.parent!==null&&(t.child=e):t.next===null&&(t.next=e,e.prev=t))}function oG(i,e,t,n,r,o){let a=e?e.injectorIndex:-1,s=0;return bb()&&(s|=128),{type:t,index:n,insertBeforeIndex:null,injectorIndex:a,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,controlDirectiveIndex:-1,customControlIndex:-1,propertyBindings:null,flags:s,providerIndexes:0,value:r,attrs:o,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var aG=new RegExp(`^(\\d+)*(${J2}|${Z2})*(.*)`);function sG(i){let e=i.match(aG),[t,n,r,o]=e,a=n?parseInt(n,10):r,s=[];for(let[l,c,d]of o.matchAll(/(f|n)(\d*)/g)){let u=parseInt(d,10)||1;s.push(c,u)}return[a,...s]}function lG(i){return!i.prev&&i.parent?.type===8}function Mw(i){return i.index-cn}function cG(i,e){let t=i.i18nNodes;if(t)return t.get(e)}function bv(i,e,t,n){let r=Mw(n),o=cG(i,r);if(o===void 0){let a=i.data[nk];if(a?.[r])o=uG(a[r],t);else if(e.firstChild===n)o=i.firstChild;else{let s=n.prev===null,l=n.prev??n.parent;if(lG(n)){let c=Mw(n.parent);o=Gw(i,c)}else{let c=wo(l,t);if(s)o=c.firstChild;else{let d=Mw(l),u=Gw(i,d);if(l.type===2&&u){let h=NE(i,d)+1;o=vv(h,u)}else o=c.nextSibling}}}}return o}function vv(i,e){let t=e;for(let n=0;n<i;n++)t=t.nextSibling;return t}function dG(i,e){let t=i;for(let n=0;n<e.length;n+=2){let r=e[n],o=e[n+1];for(let a=0;a<o;a++)switch(r){case m8:t=t.firstChild;break;case g8:t=t.nextSibling;break}}return t}function uG(i,e){let[t,...n]=sG(i),r;if(t===Z2)r=e[$i][Pr];else if(t===J2)r=Uk(e[$i][Pr]);else{let o=Number(t);r=So(e[o+cn])}return dG(r,n)}var fG=!1;function _R(i){fG=i}function hG(i){let e=i[kr];if(e){let{i18nNodes:t,dehydratedIcuData:n}=e;if(t&&n){let r=i[ln];for(let o of n.values())pG(r,t,o)}e.i18nNodes=void 0,e.dehydratedIcuData=void 0}}function pG(i,e,t){for(let n of t.node.cases[t.case]){let r=e.get(n.index-cn);r&&GE(i,r,!1)}}function yv(i){let e=i[Aa]??[],n=i[hi][ln],r=[];for(let o of e)o.data[ik]!==void 0?r.push(o):xR(o,n);i[Aa]=r}function mG(i){let{lContainer:e}=i,t=e[Aa];if(t===null)return;let r=e[hi][ln];for(let o of t)xR(o,r)}function xR(i,e){let t=0,n=i.firstChild;if(n){let r=i.data[sm];for(;t<r;){let o=n.nextSibling;GE(e,n,!1),n=o,t++}}}function _v(i){yv(i);let e=i[Pr];Zo(e)&&$b(e);for(let t=Xn;t<i.length;t++)$b(i[t])}function $b(i){hG(i);let e=i[mt];for(let t=cn;t<e.bindingStartIndex;t++)if(Co(i[t])){let n=i[t];_v(n)}else Zo(i[t])&&$b(i[t])}function oT(i){let e=i._views;for(let t of e){let n=Ck(t);n!==null&&n[Pr]!==null&&(Zo(n)?$b(n):_v(n))}}function gG(i,e,t,n){i!==null&&(t.cleanup(e),_v(i.lContainer),oT(n))}function bG(i,e){let t=[];for(let n of e)for(let r=0;r<(n[DE]??1);r++){let o={data:n,firstChild:null};n[sm]>0&&(o.firstChild=i,i=vv(n[sm],i)),t.push(o)}return[i,t]}var CR=()=>null,SR=()=>null;function wR(){CR=vG,SR=yG}function vG(i,e){return TR(i,e)?i[Aa].shift():(yv(i),null)}function dm(i,e){return CR(i,e)}function yG(i,e,t){if(e.tView.ssrId===null)return null;let n=dm(i,e.tView.ssrId);return t[mt].firstUpdatePass&&n===null&&_G(t,e),n}function ER(i,e,t){return SR(i,e,t)}function _G(i,e){let t=e;for(;t;){if(r2(i,t))return;if((t.flags&256)===256)break;t=t.prev}for(t=e.next;t&&(t.flags&512)===512;){if(r2(i,t))return;t=t.next}}function TR(i,e){let t=i[Aa];return!e||t===null||t.length===0?!1:t[0].data[tk]===e}function r2(i,e){let t=e.tView?.ssrId;if(t==null)return!1;let n=i[e.index];return Co(n)&&TR(n,t)?(yv(n),!0):!1}var MR=class{},xv=class{},rE=class{resolveComponentFactory(e){throw new nt(917,!1)}},Cv=class{static NULL=new rE},Wd=class{},Cs=(()=>{class i{destroyNode=null;static __NG_ELEMENT_ID__=()=>xG()}return i})();function xG(){let i=St(),e=rr(),t=Jo(e.index,i);return(Zo(t)?t:i)[ln]}var DR=(()=>{class i{static \u0275prov=pe({token:i,providedIn:"root",factory:()=>null})}return i})();var Nb={},Rf=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,Nb,n);return r!==Nb||t===Nb?r:this.parentInjector.get(e,t,n)}};function Xb(i,e,t){let n=t?i.styles:null,r=t?i.classes:null,o=0;if(e!==null)for(let a=0;a<e.length;a++){let s=e[a];if(typeof s=="number")o=s;else if(o==1)r=ib(r,s);else if(o==2){let l=s,c=e[++a];n=ib(n,l+": "+c+";")}}t?i.styles=n:i.stylesWithoutHost=n,t?i.classes=r:i.classesWithoutHost=r}function Xt(i,e=0){let t=St();if(t===null)return rt(i,e);let n=rr();return z2(n,t,nr(i),e)}function AR(i,e,t,n,r){let o=n===null?null:{"":-1},a=r(i,t);if(a!==null){let s=a,l=null,c=null;for(let d of a)if(d.resolveHostDirectives!==null){[s,l,c]=d.resolveHostDirectives(a);break}wG(i,e,t,s,o,l,c)}o!==null&&n!==null&&CG(t,n,o)}function CG(i,e,t){let n=i.localNames=[];for(let r=0;r<e.length;r+=2){let o=t[e[r+1]];if(o==null)throw new nt(-301,!1);n.push(e[r],o)}}function SG(i,e,t){e.componentOffset=t,(i.components??=[]).push(e.index)}function wG(i,e,t,n,r,o,a){let s=n.length,l=null;for(let f=0;f<s;f++){let h=n[f];l===null&&bs(h)&&(l=h,SG(i,t,f)),Bw(Hb(t,e),i,h.type)}OG(t,i.data.length,s),l?.viewProvidersResolver&&l.viewProvidersResolver(l);for(let f=0;f<s;f++){let h=n[f];h.providersResolver&&h.providersResolver(h)}let c=!1,d=!1,u=jk(i,e,s,null);s>0&&(t.directiveToIndex=new Map);for(let f=0;f<s;f++){let h=n[f];if(t.mergedAttrs=Ff(t.mergedAttrs,h.hostAttrs),TG(i,t,e,u,h),AG(u,h,r),a!==null&&a.has(h)){let[m,g]=a.get(h);t.directiveToIndex.set(h.type,[u,m+t.directiveStart,g+t.directiveStart])}else(o===null||!o.has(h))&&t.directiveToIndex.set(h.type,u);h.contentQueries!==null&&(t.flags|=4),(h.hostBindings!==null||h.hostAttrs!==null||h.hostVars!==0)&&(t.flags|=64);let p=h.type.prototype;!c&&(p.ngOnChanges||p.ngOnInit||p.ngDoCheck)&&((i.preOrderHooks??=[]).push(t.index),c=!0),!d&&(p.ngOnChanges||p.ngDoCheck)&&((i.preOrderCheckHooks??=[]).push(t.index),d=!0),u++}EG(i,t,o)}function EG(i,e,t){for(let n=e.directiveStart;n<e.directiveEnd;n++){let r=i.data[n];if(t===null||!t.has(r))o2(0,e,r,n),o2(1,e,r,n),s2(e,n,!1);else{let o=t.get(r);a2(0,e,o,n),a2(1,e,o,n),s2(e,n,!0)}}}function o2(i,e,t,n){let r=i===0?t.inputs:t.outputs;for(let o in r)if(r.hasOwnProperty(o)){let a;i===0?a=e.inputs??={}:a=e.outputs??={},a[o]??=[],a[o].push(n),OR(e,o)}}function a2(i,e,t,n){let r=i===0?t.inputs:t.outputs;for(let o in r)if(r.hasOwnProperty(o)){let a=r[o],s;i===0?s=e.hostDirectiveInputs??={}:s=e.hostDirectiveOutputs??={},s[a]??=[],s[a].push(n,o),OR(e,a)}}function OR(i,e){e==="class"?i.flags|=8:e==="style"&&(i.flags|=16)}function s2(i,e,t){let{attrs:n,inputs:r,hostDirectiveInputs:o}=i;if(n===null||!t&&r===null||t&&o===null||jE(i)){i.initialInputs??=[],i.initialInputs.push(null);return}let a=null,s=0;for(;s<n.length;){let l=n[s];if(l===0){s+=4;continue}else if(l===5){s+=2;continue}else if(typeof l=="number")break;if(!t&&r.hasOwnProperty(l)){let c=r[l];for(let d of c)if(d===e){a??=[],a.push(l,n[s+1]);break}}else if(t&&o.hasOwnProperty(l)){let c=o[l];for(let d=0;d<c.length;d+=2)if(c[d]===e){a??=[],a.push(c[d+1],n[s+1]);break}}s+=2}i.initialInputs??=[],i.initialInputs.push(a)}function TG(i,e,t,n,r){i.data[n]=r;let o=r.factory||(r.factory=Yl(r.type,!0)),a=new Hd(o,bs(r),Xt,null);i.blueprint[n]=a,t[n]=a,MG(i,e,n,jk(i,t,r.hostVars,Ni),r)}function MG(i,e,t,n,r){let o=r.hostBindings;if(o){let a=i.hostBindingOpCodes;a===null&&(a=i.hostBindingOpCodes=[]);let s=~e.index;DG(a)!=s&&a.push(s),a.push(t,n,o)}}function DG(i){let e=i.length;for(;e>0;){let t=i[--e];if(typeof t=="number"&&t<0)return t}return 0}function AG(i,e,t){if(t){if(e.exportAs)for(let n=0;n<e.exportAs.length;n++)t[e.exportAs[n]]=i;bs(e)&&(t[""]=i)}}function OG(i,e,t){i.flags|=1,i.directiveStart=e,i.directiveEnd=e+t,i.providerIndexes=e}function aT(i,e,t,n,r,o,a,s){let l=e[mt],c=l.consts,d=Qo(c,a),u=Yf(l,i,t,n,d);return o&&AR(l,e,u,Qo(c,s),r),u.mergedAttrs=Ff(u.mergedAttrs,u.attrs),u.attrs!==null&&Xb(u,u.attrs,!1),u.mergedAttrs!==null&&Xb(u,u.mergedAttrs,!0),l.queries!==null&&l.queries.elementStart(l,u),u}function sT(i,e){P2(i,e),Q1(e)&&i.queries.elementEnd(e)}function PG(i,e,t,n,r,o){let a=e.consts,s=Qo(a,r),l=Yf(e,i,t,n,s);if(l.mergedAttrs=Ff(l.mergedAttrs,l.attrs),o!=null){let c=Qo(a,o);l.localNames=[];for(let d=0;d<c.length;d+=2)l.localNames.push(c[d],-1)}return l.attrs!==null&&Xb(l,l.attrs,!1),l.mergedAttrs!==null&&Xb(l,l.mergedAttrs,!0),e.queries!==null&&e.queries.elementStart(e,l),l}function Sv(i,e,t){return i[e]=t}function IG(i,e){return i[e]}function Qr(i,e,t){if(t===Ni)return!1;let n=i[e];return Object.is(n,t)?!1:(i[e]=t,!0)}function um(i,e,t,n){let r=Qr(i,e,t);return Qr(i,e+1,n)||r}function PR(i,e,t,n,r){let o=um(i,e,t,n);return Qr(i,e+2,r)||o}function kG(i,e,t,n,r,o){let a=um(i,e,t,n);return um(i,e+2,r,o)||a}function Fb(i,e,t){return function n(r){let o=Oa(i)?Jo(i.index,e):e;mv(o,5);let a=e[ii],s=l2(e,a,t,r),l=n.__ngNextListenerFn__;for(;l;)s=l2(e,a,l,r)&&s,l=l.__ngNextListenerFn__;return s}}function l2(i,e,t,n){let r=Tt(null);try{return fn(an.OutputStart,e,t),t(n)!==!1}catch(o){return nT(i,o),!1}finally{fn(an.OutputEnd,e,t),Tt(r)}}function IR(i,e,t,n,r,o,a,s){let l=Ef(i),c=!1,d=null;if(!n&&l&&(d=NG(e,t,o,i.index)),d!==null){let u=d.__ngLastListenerFn__||d;u.__ngNextListenerFn__=a,d.__ngLastListenerFn__=a,c=!0}else{let u=wo(i,t),f=n?n(u):u;b8(t,f,o,s);let h=r.listen(f,o,s);if(!RG(o)){let p=n?m=>n(So(m[i.index])):i.index;kR(p,e,t,o,s,h,!1)}}return c}function RG(i){return i.startsWith("animation")||i.startsWith("transition")}function NG(i,e,t,n){let r=i.cleanup;if(r!=null)for(let o=0;o<r.length-1;o+=2){let a=r[o];if(a===t&&r[o+1]===n){let s=e[Sf],l=r[o+2];return s&&s.length>l?s[l]:null}typeof a=="string"&&(o+=2)}return null}function kR(i,e,t,n,r,o,a){let s=e.firstCreatePass?sw(e):null,l=aw(t),c=l.length;l.push(r,o),s&&s.push(n,i,c,(c+1)*(a?-1:1))}function c2(i,e,t,n,r,o){let a=e[t],s=e[mt],c=s.data[t].outputs[n],u=a[c].subscribe(o);kR(i.index,s,e,r,o,u,!0)}var oE=Symbol("BINDING");function RR(i){return i.debugInfo?.className||i.type.name||null}var aE=class extends Cv{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=Zs(e);return new zf(t,this.ngModule)}};function FG(i){return Object.keys(i).map(e=>{let[t,n,r]=i[e],o={propName:t,templateName:e,isSignal:(n&lv.SignalBased)!==0};return r&&(o.transform=r),o})}function LG(i){return Object.keys(i).map(e=>({propName:i[e],templateName:e}))}function BG(i,e,t){let n=e instanceof ur?e:e?.injector;return n&&i.getStandaloneInjector!==null&&(n=i.getStandaloneInjector(n)||n),n?new Rf(t,n):t}function zG(i){let e=i.get(Wd,null);if(e===null)throw new nt(407,!1);let t=i.get(DR,null),n=i.get(hs,null),r=i.get(xs,null,{optional:!0});return{rendererFactory:e,sanitizer:t,changeDetectionScheduler:n,ngReflect:!1,tracingService:r}}function UG(i,e){let t=NR(i);return HE(e,t,t==="svg"?ew:t==="math"?dI:null)}function NR(i){return(i.selectors[0][0]||"div").toLowerCase()}var zf=class extends xv{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=FG(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=LG(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=sH(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,o,a){fn(an.DynamicComponentStart);let s=Tt(null);try{let l=this.componentDef,c=BG(l,r||this.ngModule,e),d=zG(c),u=d.tracingService;return u&&u.componentCreate?u.componentCreate(RR(l),()=>this.createComponentRef(d,c,t,n,o,a)):this.createComponentRef(d,c,t,n,o,a)}finally{Tt(s)}}createComponentRef(e,t,n,r,o,a){let s=this.componentDef,l=VG(r,s,a,o),c=e.rendererFactory.createRenderer(null,s),d=r?PH(c,r,s.encapsulation,t):UG(s,c),u=a?.some(d2)||o?.some(p=>typeof p!="function"&&p.bindings.some(d2)),f=YE(null,l,null,512|Gk(s),null,null,e,c,t,null,xk(d,t,!0));f[cn]=d,xb(f);let h=null;try{let p=aT(cn,f,2,"#host",()=>l.directiveRegistry,!0,0);Bk(c,d,p),Lf(d,f),hv(l,f,p),FE(l,p,f),sT(l,p),n!==void 0&&GG(p,this.ngContentSelectors,n),h=Jo(p.index,f),f[ii]=h[ii],iT(l,f,null)}catch(p){throw h!==null&&Uw(h),Uw(f),p}finally{fn(an.DynamicComponentEnd),Cb()}return new qb(this.componentType,f,!!u)}};function VG(i,e,t,n){let r=i?["ng-version","21.2.4"]:lH(e.selectors[0]),o=null,a=null,s=0;if(t)for(let d of t)s+=d[oE].requiredVars,d.create&&(d.targetIdx=0,(o??=[]).push(d)),d.update&&(d.targetIdx=0,(a??=[]).push(d));if(n)for(let d=0;d<n.length;d++){let u=n[d];if(typeof u!="function")for(let f of u.bindings){s+=f[oE].requiredVars;let h=d+1;f.create&&(f.targetIdx=h,(o??=[]).push(f)),f.update&&(f.targetIdx=h,(a??=[]).push(f))}}let l=[e];if(n)for(let d of n){let u=typeof d=="function"?d:d.type,f=ab(u);l.push(f)}return WE(0,null,HG(o,a),1,s,l,null,null,null,[r],null)}function HG(i,e){return!i&&!e?null:t=>{if(t&1&&i)for(let n of i)n.create();if(t&2&&e)for(let n of e)n.update()}}function d2(i){let e=i[oE].kind;return e==="input"||e==="twoWay"}var qb=class extends MR{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=Tf(t[mt],cn),this.location=Hf(this._tNode,t),this.instance=Jo(this._tNode.index,t)[ii],this.hostView=this.changeDetectorRef=new nc(t,void 0),this.componentType=e}setInput(e,t){this._hasInputBindings;let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView,o=pv(n,r[mt],r,e,t);this.previousInputValues.set(e,t);let a=Jo(n.index,r);mv(a,1)}get injector(){return new Vd(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function GG(i,e,t){let n=i.projection=[];for(let r=0;r<e.length;r++){let o=t[r];n.push(o!=null&&o.length?Array.from(o):null)}}var $f=(()=>{class i{static __NG_ELEMENT_ID__=jG}return i})();function jG(){let i=rr();return FR(i,St())}var sE=class i extends $f{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Hf(this._hostTNode,this._hostLView)}get injector(){return new Vd(this._hostTNode,this._hostLView)}get parentInjector(){let e=wE(this._hostTNode,this._hostLView);if(k2(e)){let t=Ub(e,this._hostLView),n=zb(e),r=t[mt].data[n+8];return new Vd(r,t)}else return new Vd(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=u2(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-Xn}createEmbeddedView(e,t,n){let r,o;typeof n=="number"?r=n:n!=null&&(r=n.index,o=n.injector);let a=dm(this._lContainer,e.ssrId),s=e.createEmbeddedViewImpl(t||{},o,a);return this.insertImpl(s,r,jd(this._hostTNode,a)),s}createComponent(e,t,n,r,o,a,s){let l=e&&!H6(e),c;if(l)c=t;else{let g=t||{};c=g.index,n=g.injector,r=g.projectableNodes,o=g.environmentInjector||g.ngModuleRef,a=g.directives,s=g.bindings}let d=l?e:new zf(Zs(e)),u=n||this.parentInjector;if(!o&&d.ngModule==null){let b=(l?u:this.parentInjector).get(ur,null);b&&(o=b)}let f=Zs(d.componentType??{}),h=dm(this._lContainer,f?.id??null),p=h?.firstChild??null,m=d.create(u,r,p,o,a,s);return this.insertImpl(m.hostView,c,jd(this._hostTNode,h)),m}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,n){let r=e._lView;if(fI(r)){let s=this.indexOf(e);if(s!==-1)this.detach(s);else{let l=r[hi],c=new i(l,l[Ir],l[hi]);c.detach(c.indexOf(e))}}let o=this._adjustIndex(t),a=this._lContainer;return Wf(a,r,o,n),e.attachToViewContainerRef(),Y1(Dw(a),o,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=u2(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),n=cm(this._lContainer,t);n&&(Kp(Dw(this._lContainer),t),uv(n[mt],n))}detach(e){let t=this._adjustIndex(e,-1),n=cm(this._lContainer,t);return n&&Kp(Dw(this._lContainer),t)!=null?new nc(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function u2(i){return i[Jp]}function Dw(i){return i[Jp]||(i[Jp]=[])}function FR(i,e){let t,n=e[i.index];return Co(n)?t=n:(t=bR(n,e,null,i),e[i.index]=t,$E(e,t)),LR(t,e,i,n),new sE(t,i,e)}function WG(i,e){let t=i[ln],n=t.createComment(""),r=wo(e,i),o=t.parentNode(r);return Wb(t,o,n,t.nextSibling(r),!1),n}var LR=BR,lT=()=>!1;function YG(i,e,t){return lT(i,e,t)}function BR(i,e,t,n){if(i[gs])return;let r;t.type&8?r=So(n):r=WG(e,t),i[gs]=r}function $G(i,e,t){if(i[gs]&&i[Aa])return!0;let n=t[kr],r=e.index-cn;if(!n||Y2(e)||Ek(n,r))return!1;let a=Gw(n,r),s=n.data[tv]?.[r],[l,c]=bG(a,s);return i[gs]=l,i[Aa]=c,!0}function XG(i,e,t,n){lT(i,t,e)||BR(i,e,t,n)}function zR(){LR=XG,lT=$G}var lE=class i{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new i(this.queryList)}setDirty(){this.queryList.setDirty()}},cE=class i{queries;constructor(e=[]){this.queries=e}createEmbeddedView(e){let t=e.queries;if(t!==null){let n=e.contentQueries!==null?e.contentQueries[0]:t.length,r=[];for(let o=0;o<n;o++){let a=t.getByIndex(o),s=this.queries[a.indexInDeclarationView];r.push(s.clone())}return new i(r)}return null}insertView(e){this.dirtyQueriesWithMatches(e)}detachView(e){this.dirtyQueriesWithMatches(e)}finishViewCreation(e){this.dirtyQueriesWithMatches(e)}dirtyQueriesWithMatches(e){for(let t=0;t<this.queries.length;t++)dT(e,t).matches!==null&&this.queries[t].setDirty()}},dE=class{flags;read;predicate;constructor(e,t,n=null){this.flags=t,this.read=n,typeof e=="string"?this.predicate=ej(e):this.predicate=e}},uE=class i{queries;constructor(e=[]){this.queries=e}elementStart(e,t){for(let n=0;n<this.queries.length;n++)this.queries[n].elementStart(e,t)}elementEnd(e){for(let t=0;t<this.queries.length;t++)this.queries[t].elementEnd(e)}embeddedTView(e){let t=null;for(let n=0;n<this.length;n++){let r=t!==null?t.length:0,o=this.getByIndex(n).embeddedTView(e,r);o&&(o.indexInDeclarationView=n,t!==null?t.push(o):t=[o])}return t!==null?new i(t):null}template(e,t){for(let n=0;n<this.queries.length;n++)this.queries[n].template(e,t)}getByIndex(e){return this.queries[e]}get length(){return this.queries.length}track(e){this.queries.push(e)}},fE=class i{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(e,t=-1){this.metadata=e,this._declarationNodeIndex=t}elementStart(e,t){this.isApplyingToNode(t)&&this.matchTNode(e,t)}elementEnd(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}template(e,t){this.elementStart(e,t)}embeddedTView(e,t){return this.isApplyingToNode(e)?(this.crossesNgTemplate=!0,this.addMatch(-e.index,t),new i(this.metadata)):null}isApplyingToNode(e){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let t=this._declarationNodeIndex,n=e.parent;for(;n!==null&&n.type&8&&n.index!==t;)n=n.parent;return t===(n!==null?n.index:-1)}return this._appliesToNextNode}matchTNode(e,t){let n=this.metadata.predicate;if(Array.isArray(n))for(let r=0;r<n.length;r++){let o=n[r];this.matchTNodeWithReadOption(e,t,qG(t,o)),this.matchTNodeWithReadOption(e,t,kb(t,e,o,!1,!1))}else n===Bf?t.type&4&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,kb(t,e,n,!1,!1))}matchTNodeWithReadOption(e,t,n){if(n!==null){let r=this.metadata.read;if(r!==null)if(r===fr||r===$f||r===Bf&&t.type&4)this.addMatch(t.index,-2);else{let o=kb(t,e,r,!1,!1);o!==null&&this.addMatch(t.index,o)}else this.addMatch(t.index,n)}}addMatch(e,t){this.matches===null?this.matches=[e,t]:this.matches.push(e,t)}};function qG(i,e){let t=i.localNames;if(t!==null){for(let n=0;n<t.length;n+=2)if(t[n]===e)return t[n+1]}return null}function KG(i,e){return i.type&11?Hf(i,e):i.type&4?gv(i,e):null}function ZG(i,e,t,n){return t===-1?KG(e,i):t===-2?JG(i,e,n):am(i,i[mt],t,e)}function JG(i,e,t){if(t===fr)return Hf(e,i);if(t===Bf)return gv(e,i);if(t===$f)return FR(e,i)}function UR(i,e,t,n){let r=e[ms].queries[n];if(r.matches===null){let o=i.data,a=t.matches,s=[];for(let l=0;a!==null&&l<a.length;l+=2){let c=a[l];if(c<0)s.push(null);else{let d=o[c];s.push(ZG(e,d,a[l+1],t.metadata.read))}}r.matches=s}return r.matches}function hE(i,e,t,n){let r=i.queries.getByIndex(t),o=r.matches;if(o!==null){let a=UR(i,e,r,t);for(let s=0;s<o.length;s+=2){let l=o[s];if(l>0)n.push(a[s/2]);else{let c=o[s+1],d=e[-l];for(let u=Xn;u<d.length;u++){let f=d[u];f[Kl]===f[hi]&&hE(f[mt],f,c,n)}if(d[Fd]!==null){let u=d[Fd];for(let f=0;f<u.length;f++){let h=u[f];hE(h[mt],h,c,n)}}}}}return n}function cT(i,e){return i[ms].queries[e].queryList}function QG(i,e,t){let n=new Gb((t&4)===4);return mI(i,e,n,n.destroy),(e[ms]??=new cE).queries.push(new lE(n))-1}function VR(i,e,t){let n=Hn();return n.firstCreatePass&&(tj(n,new dE(i,e,t),-1),(e&2)===2&&(n.staticViewQueries=!0)),QG(n,St(),e)}function ej(i){return i.split(",").map(e=>e.trim())}function tj(i,e,t){i.queries===null&&(i.queries=new uE),i.queries.track(new fE(e,t))}function dT(i,e){return i.queries.getByIndex(e)}function HR(i,e){let t=i[mt],n=dT(t,e);return n.crossesNgTemplate?hE(t,i,e,[]):UR(t,i,n,e)}function GR(i,e,t){let n,r=Bp(()=>{n._dirtyCounter();let o=ij(n,i);if(e&&o===void 0)throw new nt(-951,!1);return o});return n=r[Ri],n._dirtyCounter=R(0),n._flatValue=void 0,r}function jR(i){return GR(!0,!1,i)}function WR(i){return GR(!0,!0,i)}function nj(i,e){let t=i[Ri];t._lView=St(),t._queryIndex=e,t._queryList=cT(t._lView,e),t._queryList.onDirty(()=>t._dirtyCounter.update(n=>n+1))}function ij(i,e){let t=i._lView,n=i._queryIndex;if(t===void 0||n===void 0||t[zt]&4)return e?void 0:dr;let r=cT(t,n),o=HR(t,n);return r.reset(o,H2),e?r.first:r._changesDetected||i._flatValue===void 0?i._flatValue=r.toArray():i._flatValue}var fm=class{};var hm=class extends fm{injector;componentFactoryResolver=new aE(this);instance=null;constructor(e){super();let t=new Pd([...e.providers,{provide:fm,useValue:this},{provide:Cv,useValue:this.componentFactoryResolver}],e.parent||xf(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function uT(i,e,t=null){return new hm({providers:i,parent:e,debugName:t,runEnvironmentInitializers:!0}).injector}var rj=(()=>{class i{_injector;cachedInjectors=new Map;constructor(t){this._injector=t}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t)){let n=ub(!1,t.type),r=n.length>0?uT([n],this._injector,""):null;this.cachedInjectors.set(t,r)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(let t of this.cachedInjectors.values())t!==null&&t.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=pe({token:i,providedIn:"environment",factory:()=>new i(rt(ur))})}return i})();function Le(i){return gm(()=>{let e=YR(i),t=Q(B({},e),{decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===EE.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&i.dependencies||null,getStandaloneInjector:e.standalone?r=>r.get(rj).getOrCreateStandaloneInjector(t):null,getExternalStyles:null,signals:i.signals??!1,data:i.data||{},encapsulation:i.encapsulation||ka.Emulated,styles:i.styles||dr,_:null,schemas:i.schemas||null,tView:null,id:""});e.standalone&&Fa("NgStandalone"),$R(t);let n=i.dependencies;return t.directiveDefs=f2(n,oj),t.pipeDefs=f2(n,H1),t.id=lj(t),t})}function oj(i){return Zs(i)||ab(i)}function ll(i){return gm(()=>({type:i.type,bootstrap:i.bootstrap||dr,declarations:i.declarations||dr,imports:i.imports||dr,exports:i.exports||dr,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function aj(i,e){if(i==null)return ql;let t={};for(let n in i)if(i.hasOwnProperty(n)){let r=i[n],o,a,s,l;Array.isArray(r)?(s=r[0],o=r[1],a=r[2]??o,l=r[3]||null):(o=r,a=r,s=lv.None,l=null),t[o]=[n,s,l],e[o]=a}return t}function sj(i){if(i==null)return ql;let e={};for(let t in i)i.hasOwnProperty(t)&&(e[i[t]]=t);return e}function qn(i){return gm(()=>{let e=YR(i);return $R(e),e})}function wm(i){return{type:i.type,name:i.name,factory:null,pure:i.pure!==!1,standalone:i.standalone??!0,onDestroy:i.type.prototype.ngOnDestroy||null}}function YR(i){let e={};return{type:i.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:i.hostBindings||null,hostVars:i.hostVars||0,hostAttrs:i.hostAttrs||null,contentQueries:i.contentQueries||null,declaredInputs:e,inputConfig:i.inputs||ql,exportAs:i.exportAs||null,standalone:i.standalone??!0,signals:i.signals===!0,selectors:i.selectors||dr,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,inputs:aj(i.inputs,e),outputs:sj(i.outputs),debugInfo:null}}function $R(i){i.features?.forEach(e=>e(i))}function f2(i,e){return i?()=>{let t=typeof i=="function"?i():i,n=[];for(let r of t){let o=e(r);o!==null&&n.push(o)}return n}:null}function lj(i){let e=0,t=typeof i.consts=="function"?"":i.consts,n=[i.selectors,i.ngContentSelectors,i.hostVars,i.hostAttrs,t,i.vars,i.decls,i.encapsulation,i.standalone,i.signals,i.exportAs,JSON.stringify(i.inputs),JSON.stringify(i.outputs),Object.getOwnPropertyNames(i.type.prototype),!!i.contentQueries,!!i.viewQuery];for(let o of n.join("|"))e=Math.imul(31,e)+o.charCodeAt(0)<<0;return e+=2147483648,"c"+e}function cj(i){return Object.getPrototypeOf(i.prototype).constructor}function To(i){let e=cj(i.type),t=!0,n=[i];for(;e;){let r;if(bs(i))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new nt(903,!1);r=e.\u0275dir}if(r){if(t){n.push(r);let a=i;a.inputs=Aw(i.inputs),a.declaredInputs=Aw(i.declaredInputs),a.outputs=Aw(i.outputs);let s=r.hostBindings;s&&pj(i,s);let l=r.viewQuery,c=r.contentQueries;if(l&&fj(i,l),c&&hj(i,c),dj(i,r),qP(i.outputs,r.outputs),bs(r)&&r.data.animation){let d=i.data;d.animation=(d.animation||[]).concat(r.data.animation)}}let o=r.features;if(o)for(let a=0;a<o.length;a++){let s=o[a];s&&s.ngInherit&&s(i),s===To&&(t=!1)}}e=Object.getPrototypeOf(e)}uj(n)}function dj(i,e){for(let t in e.inputs){if(!e.inputs.hasOwnProperty(t)||i.inputs.hasOwnProperty(t))continue;let n=e.inputs[t];n!==void 0&&(i.inputs[t]=n,i.declaredInputs[t]=e.declaredInputs[t])}}function uj(i){let e=0,t=null;for(let n=i.length-1;n>=0;n--){let r=i[n];r.hostVars=e+=r.hostVars,r.hostAttrs=Ff(r.hostAttrs,t=Ff(t,r.hostAttrs))}}function Aw(i){return i===ql?{}:i===dr?[]:i}function fj(i,e){let t=i.viewQuery;t?i.viewQuery=(n,r)=>{e(n,r),t(n,r)}:i.viewQuery=e}function hj(i,e){let t=i.contentQueries;t?i.contentQueries=(n,r,o)=>{e(n,r,o),t(n,r,o)}:i.contentQueries=e}function pj(i,e){let t=i.hostBindings;t?i.hostBindings=(n,r)=>{e(n,r),t(n,r)}:i.hostBindings=e}function XR(i,e,t,n,r,o,a,s){if(t.firstCreatePass){i.mergedAttrs=Ff(i.mergedAttrs,i.attrs);let d=i.tView=WE(2,i,r,o,a,t.directiveRegistry,t.pipeRegistry,null,t.schemas,t.consts,null);t.queries!==null&&(t.queries.template(t,i),d.queries=t.queries.embeddedTView(i))}s&&(i.flags|=s),Mf(i,!1);let l=qR(t,e,i,n);Sb()&&ZE(t,e,l,i),Lf(l,e);let c=bR(l,e,l,i);e[n+cn]=c,$E(e,c),YG(c,i,e)}function mj(i,e,t,n,r,o,a,s,l,c,d){let u=t+cn,f;return e.firstCreatePass?(f=Yf(e,u,4,a||null,s||null),gb()&&AR(e,i,f,Qo(e.consts,c),QE),P2(e,f)):f=e.data[u],XR(f,i,e,t,n,r,o,l),Ef(f)&&hv(e,i,f),c!=null&&Sm(i,f,d),f}function pm(i,e,t,n,r,o,a,s,l,c,d){let u=t+cn,f;if(e.firstCreatePass){if(f=Yf(e,u,4,a||null,s||null),c!=null){let h=Qo(e.consts,c);f.localNames=[];for(let p=0;p<h.length;p+=2)f.localNames.push(h[p],-1)}}else f=e.data[u];return XR(f,i,e,t,n,r,o,l),c!=null&&Sm(i,f,d),f}function ic(i,e,t,n,r,o,a,s){let l=St(),c=Hn(),d=Qo(c.consts,o);return mj(l,c,i,e,t,n,r,d,void 0,a,s),ic}var qR=KR;function KR(i,e,t,n){return nl(!0),e[ln].createComment("")}function gj(i,e,t,n){let r=!rv(e,t);nl(r);let o=e[kr]?.data[ek]?.[n]??null;if(o!==null&&t.tView!==null&&t.tView.ssrId===null&&(t.tView.ssrId=o),r)return KR(i,e);let a=e[kr],s=bv(a,i,e,t);iv(a,n,s);let l=NE(a,n);return vv(l,s)}function ZR(){qR=gj}var Eo=(function(i){return i[i.NOT_STARTED=0]="NOT_STARTED",i[i.IN_PROGRESS=1]="IN_PROGRESS",i[i.COMPLETE=2]="COMPLETE",i[i.FAILED=3]="FAILED",i})(Eo||{}),h2=0,bj=1,Ai=(function(i){return i[i.Placeholder=0]="Placeholder",i[i.Loading=1]="Loading",i[i.Complete=2]="Complete",i[i.Error=3]="Error",i})(Ai||{});var vj=0,Em=1;var yj=4,_j=5;var xj=7,Nf=8,Cj=9,fT=(function(i){return i[i.Manual=0]="Manual",i[i.Playthrough=1]="Playthrough",i})(fT||{});function Lb(i,e){let t=wj(i),n=e[t];if(n!==null){for(let r of n)r();e[t]=null}}function Sj(i){Lb(1,i),Lb(0,i),Lb(2,i)}function wj(i){let e=yj;return i===1?e=_j:i===2&&(e=Cj),e}function JR(i){return i+1}function Xf(i,e){let t=i[mt],n=JR(e.index);return i[n]}function Tm(i,e){let t=JR(e.index);return i.data[t]}function Ej(i,e,t){let n=e[mt],r=Tm(n,t);switch(i){case Ai.Complete:return r.primaryTmplIndex;case Ai.Loading:return r.loadingTmplIndex;case Ai.Error:return r.errorTmplIndex;case Ai.Placeholder:return r.placeholderTmplIndex;default:return null}}function p2(i,e){return e===Ai.Placeholder?i.placeholderBlockConfig?.[h2]??null:e===Ai.Loading?i.loadingBlockConfig?.[h2]??null:null}function Tj(i){return i.loadingBlockConfig?.[bj]??null}function m2(i,e){if(!i||i.length===0)return e;let t=new Set(i);for(let n of e)t.add(n);return i.length===t.size?i:Array.from(t)}function Mj(i,e){let t=e.primaryTmplIndex+cn;return Tf(i,t)}var Dj=(()=>{class i{cachedInjectors=new Map;getOrCreateInjector(t,n,r,o){if(!this.cachedInjectors.has(t)){let a=r.length>0?uT(r,n,o):null;this.cachedInjectors.set(t,a)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(let t of this.cachedInjectors.values())t!==null&&t.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=pe({token:i,providedIn:"environment",factory:()=>new i})}return i})();var QR=new lt("");function Ow(i,e,t){return i.get(Dj).getOrCreateInjector(e,i,t,"")}function Aj(i,e,t){if(i instanceof Rf){let r=i.injector,o=i.parentInjector,a=Ow(o,e,t);return new Rf(r,a)}let n=i.get(ur);if(n!==i){let r=Ow(n,e,t);return new Rf(i,r)}return Ow(i,e,t)}function Ud(i,e,t,n=!1){let r=t[hi],o=r[mt];if(Jl(r))return;let a=Xf(r,e),s=a[Em],l=a[xj];if(!(l!==null&&i<l)&&g2(s,i)&&g2(a[vj]??-1,i)){let c=Tm(o,e),u=!n&&!0&&(Tj(c)!==null||p2(c,Ai.Loading)!==null||p2(c,Ai.Placeholder))?Ij:Pj;try{u(i,a,t,e,r)}catch(f){nT(r,f)}}}function Oj(i,e){let t=i[Aa]?.findIndex(r=>r.data[rk]===e[Em])??-1;return{dehydratedView:t>-1?i[Aa][t]:null,dehydratedViewIx:t}}function Pj(i,e,t,n,r){fn(an.DeferBlockStateStart);let o=Ej(i,r,n);if(o!==null){e[Em]=i;let a=r[mt],s=o+cn,l=Tf(a,s),c=0;rT(t,c);let d;if(i===Ai.Complete){let p=Tm(a,n),m=p.providers;m&&m.length>0&&(d=Aj(r[_o],p,m))}let{dehydratedView:u,dehydratedViewIx:f}=Oj(t,e),h=jf(r,l,null,{injector:d,dehydratedView:u});if(Wf(t,h,c,jd(l,u)),mv(h,2),f>-1&&t[Aa]?.splice(f,1),(i===Ai.Complete||i===Ai.Error)&&Array.isArray(e[Nf])){for(let p of e[Nf])p();e[Nf]=null}}fn(an.DeferBlockStateEnd)}function g2(i,e){return i<e}function b2(i,e,t){i.loadingPromise.then(()=>{i.loadingState===Eo.COMPLETE?Ud(Ai.Complete,e,t):i.loadingState===Eo.FAILED&&Ud(Ai.Error,e,t)})}var Ij=null;function hT(i){return typeof i=="function"&&i[Ri]!==void 0}function pT(i){return hT(i)&&typeof i.set=="function"}var mT=new lt("");function qf(i){return!!i&&typeof i.then=="function"}function gT(i){return!!i&&typeof i.subscribe=="function"}var eN=new lt("");var bT=(()=>{class i{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((t,n)=>{this.resolve=t,this.reject=n});appInits=U(eN,{optional:!0})??[];injector=U(ir);constructor(){}runInitializers(){if(this.initialized)return;let t=[];for(let r of this.appInits){let o=Cf(this.injector,r);if(qf(o))t.push(o);else if(gT(o)){let a=new Promise((s,l)=>{o.subscribe({complete:s,error:l})});t.push(a)}}let n=()=>{this.done=!0,this.resolve()};Promise.all(t).then(()=>{n()}).catch(r=>{this.reject(r)}),t.length===0&&n(),this.initialized=!0}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Kf=new lt("");function tN(){s1(()=>{let i="";throw new nt(600,i)})}function nN(i){return i.isBoundToModule}var kj=10;var Mo=(()=>{class i{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=U(il);afterRenderManager=U(qE);zonelessEnabled=U(nm);rootEffectScheduler=U(Eb);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Ma;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=U(tc);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(Yi(t=>!t))}constructor(){U(xs,{optional:!0})}whenStable(){let t;return new Promise(n=>{t=this.isStable.subscribe({next:r=>{r&&n()}})}).finally(()=>{t.unsubscribe()})}_injector=U(ur);_rendererFactory=null;get injector(){return this._injector}bootstrap(t,n){return this.bootstrapImpl(t,n)}bootstrapImpl(t,n,r=ir.NULL){return this._injector.get(Zr).run(()=>{fn(an.BootstrapComponentStart);let a=t instanceof xv;if(!this._injector.get(bT).done){let p="";throw new nt(405,p)}let l;a?l=t:l=this._injector.get(Cv).resolveComponentFactory(t),this.componentTypes.push(l.componentType);let c=nN(l)?void 0:this._injector.get(fm),d=n||l.selector,u=l.create(r,[],d,c),f=u.location.nativeElement,h=u.injector.get(mT,null);return h?.registerApplication(f),u.onDestroy(()=>{this.detachView(u.hostView),om(this.components,u),h?.unregisterApplication(f)}),this._loadComponent(u),fn(an.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){fn(an.ChangeDetectionStart),this.tracingSnapshot!==null?this.tracingSnapshot.run(cv.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw fn(an.ChangeDetectionEnd),new nt(101,!1);let t=Tt(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,Tt(t),this.afterTick.next(),fn(an.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Wd,null,{optional:!0}));let t=0;for(;this.dirtyFlags!==0&&t++<kj;){fn(an.ChangeDetectionSyncStart);try{this.synchronizeOnce()}finally{fn(an.ChangeDetectionSyncEnd)}}}synchronizeOnce(){this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush());let t=!1;if(this.dirtyFlags&7){let n=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:r}of this.allViews){if(!n&&!Qp(r))continue;let o=n&&!this.zonelessEnabled?0:1;hR(r,o),t=!0}if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}t||(this._rendererFactory?.begin?.(),this._rendererFactory?.end?.()),this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:t})=>Qp(t))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(t){let n=t;this._views.push(n),n.attachToAppRef(this)}detachView(t){let n=t;om(this._views,n),n.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView);try{this.tick()}catch(r){this.internalErrorHandler(r)}this.components.push(t),this._injector.get(Kf,[]).forEach(r=>r(t))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(t=>t()),this._views.slice().forEach(t=>t.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>om(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new nt(406,!1);let t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function om(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function iN(){let i,e;return{promise:new Promise((n,r)=>{i=n,e=r}),resolve:i,reject:e}}function rN(i,e,t){let n=e[_o],r=e[mt];if(i.loadingState!==Eo.NOT_STARTED)return i.loadingPromise??Promise.resolve();let o=Xf(e,t),a=Mj(r,i);i.loadingState=Eo.IN_PROGRESS,Lb(1,o);let s=i.dependencyResolverFn,l=n.get(zd).add();return s?(i.loadingPromise=Promise.allSettled(s()).then(c=>{let d=!1,u=[],f=[];for(let h of c)if(h.status==="fulfilled"){let p=h.value,m=Zs(p)||ab(p);if(m)u.push(m);else{let g=H1(p);g&&f.push(g)}}else{d=!0;break}if(d){if(i.loadingState=Eo.FAILED,i.errorTmplIndex===null){let p=new nt(-750,!1);nT(e,p)}}else{i.loadingState=Eo.COMPLETE;let h=a.tView;if(u.length>0){h.directiveRegistry=m2(h.directiveRegistry,u);let p=u.map(g=>g.type),m=ub(!1,...p);i.providers=m}f.length>0&&(h.pipeRegistry=m2(h.pipeRegistry,f))}}),i.loadingPromise.finally(()=>{i.loadingPromise=null,l()})):(i.loadingPromise=Promise.resolve().then(()=>{i.loadingPromise=null,i.loadingState=Eo.COMPLETE,l()}),i.loadingPromise)}function Rj(i,e){return e[_o].get(QR,null,{optional:!0})?.behavior!==fT.Manual}function Nj(i,e,t){let n=e[mt],r=e[t.index];if(!Rj(i,e))return;let o=Xf(e,t),a=Tm(n,t);switch(Sj(o),a.loadingState){case Eo.NOT_STARTED:Ud(Ai.Loading,t,r),rN(a,e,t),a.loadingState===Eo.IN_PROGRESS&&b2(a,t,r);break;case Eo.IN_PROGRESS:Ud(Ai.Loading,t,r),b2(a,t,r);break;case Eo.COMPLETE:Ud(Ai.Complete,t,r);break;case Eo.FAILED:Ud(Ai.Error,t,r);break;default:}}async function oN(i,e,t){let n=i.get(nv);if(n.hydrating.has(e))return;let{parentBlockPromise:o,hydrationQueue:a}=E8(e,i);if(a.length===0)return;o!==null&&a.shift(),Bj(n,a),o!==null&&await o;let s=a[0];n.has(s)?await v2(i,a,t):n.awaitParentBlock(s,async()=>await v2(i,a,t))}async function v2(i,e,t){let n=i.get(nv),r=n.hydrating,o=i.get(tc),a=o.add();for(let l=0;l<e.length;l++){let c=e[l],d=n.get(c);if(d!=null){if(await Uj(d),await zj(i),Fj(d)){mG(d),y2(e.slice(l),n);break}r.get(c).resolve()}else{Lj(l,e,n),y2(e.slice(l),n);break}}let s=e[e.length-1];await r.get(s)?.promise,o.remove(a),t&&t(e),gG(n.get(s),e,n,i.get(Mo))}function Fj(i){return Xf(i.lView,i.tNode)[Em]===Ai.Error}function Lj(i,e,t){let n=i-1,r=n>-1?t.get(e[n]):null;r&&_v(r.lContainer)}function y2(i,e){let t=e.hydrating;for(let n in i)t.get(n)?.reject();e.cleanup(i)}function Bj(i,e){for(let t of e)i.hydrating.set(t,iN())}function zj(i){return new Promise(e=>dv(e,{injector:i}))}async function Uj(i){let{tNode:e,lView:t}=i,n=Xf(t,e);return new Promise(r=>{Vj(n,r),Nj(2,t,e)})}function Vj(i,e){Array.isArray(i[Nf])||(i[Nf]=[]),i[Nf].push(e)}function wv(i,e){let t=St(),n=tl();if(Qr(t,n,e)){let r=Hn(),o=Of();if(pv(o,r,t,i,e))Oa(o)&&aR(t,o.index);else{let s=wo(o,t);sR(t[ln],s,null,o.value,i,e,null)}}return wv}function Wt(i,e,t,n){let r=St(),o=tl();if(Qr(r,o,e)){let a=Hn(),s=Of();BH(s,r,i,e,t,n)}return Wt}function rc(){return St()[$i][ii]}var pE=class{destroy(e){}updateValue(e,t){}swap(e,t){let n=Math.min(e,t),r=Math.max(e,t),o=this.detach(r);if(r-n>1){let a=this.detach(n);this.attach(n,o),this.attach(r,a)}else this.attach(n,o)}move(e,t){this.attach(t,this.detach(e))}};function Pw(i,e,t,n,r){return i===t&&Object.is(e,n)?1:Object.is(r(i,e),r(t,n))?-1:0}function Hj(i,e,t,n){let r,o,a=0,s=i.length-1,l=void 0;if(Array.isArray(e)){Tt(n);let c=e.length-1;for(Tt(null);a<=s&&a<=c;){let d=i.at(a),u=e[a],f=Pw(a,d,a,u,t);if(f!==0){f<0&&i.updateValue(a,u),a++;continue}let h=i.at(s),p=e[c],m=Pw(s,h,c,p,t);if(m!==0){m<0&&i.updateValue(s,p),s--,c--;continue}let g=t(a,d),b=t(s,h),_=t(a,u);if(Object.is(_,b)){let w=t(c,p);Object.is(w,g)?(i.swap(a,s),i.updateValue(s,p),c--,s--):i.move(s,a),i.updateValue(a,u),a++;continue}if(r??=new Kb,o??=x2(i,a,s,t),mE(i,r,a,_))i.updateValue(a,u),a++,s++;else if(o.has(_))r.set(g,i.detach(a)),s--;else{let w=i.create(a,e[a]);i.attach(a,w),a++,s++}}for(;a<=c;)_2(i,r,t,a,e[a]),a++}else if(e!=null){Tt(n);let c=e[Symbol.iterator]();Tt(null);let d=c.next();for(;!d.done&&a<=s;){let u=i.at(a),f=d.value,h=Pw(a,u,a,f,t);if(h!==0)h<0&&i.updateValue(a,f),a++,d=c.next();else{r??=new Kb,o??=x2(i,a,s,t);let p=t(a,f);if(mE(i,r,a,p))i.updateValue(a,f),a++,s++,d=c.next();else if(!o.has(p))i.attach(a,i.create(a,f)),a++,s++,d=c.next();else{let m=t(a,u);r.set(m,i.detach(a)),s--}}}for(;!d.done;)_2(i,r,t,i.length,d.value),d=c.next()}for(;a<=s;)i.destroy(i.detach(s--));r?.forEach(c=>{i.destroy(c)})}function mE(i,e,t,n){return e!==void 0&&e.has(n)?(i.attach(t,e.get(n)),e.delete(n),!0):!1}function _2(i,e,t,n,r){if(mE(i,e,n,t(n,r)))i.updateValue(n,r);else{let o=i.create(n,r);i.attach(n,o)}}function x2(i,e,t,n){let r=new Set;for(let o=e;o<=t;o++)r.add(n(o,i.at(o)));return r}var Kb=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function Y(i,e,t,n,r,o,a,s){Fa("NgControlFlow");let l=St(),c=Hn(),d=Qo(c.consts,o);return pm(l,c,i,e,t,n,r,d,256,a,s),vT}function vT(i,e,t,n,r,o,a,s){Fa("NgControlFlow");let l=St(),c=Hn(),d=Qo(c.consts,o);return pm(l,c,i,e,t,n,r,d,512,a,s),vT}function $(i,e){Fa("NgControlFlow");let t=St(),n=tl(),r=t[n]!==Ni?t[n]:-1,o=r!==-1?Zb(t,cn+r):void 0,a=0;if(Qr(t,n,i)){let s=Tt(null);try{if(o!==void 0&&rT(o,a),i!==-1){let l=cn+i,c=Zb(t,l),d=yE(t[mt],l),u=ER(c,d,t),f=jf(t,d,e,{dehydratedView:u});Wf(c,f,a,jd(d,u))}}finally{Tt(s)}}else if(o!==void 0){let s=vR(o,a);s!==void 0&&(s[ii]=e)}}var gE=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-Xn}};function ta(i){return i}function na(i,e){return e}var bE=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function Ve(i,e,t,n,r,o,a,s,l,c,d,u,f){Fa("NgControlFlow");let h=St(),p=Hn(),m=l!==void 0,g=St(),b=s?a.bind(g[$i][ii]):a,_=new bE(m,b);g[cn+i]=_,pm(h,p,i+1,e,t,n,r,Qo(p.consts,o),256),m&&pm(h,p,i+2,l,c,d,u,Qo(p.consts,f),512)}var vE=class extends pE{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n}get length(){return this.lContainer.length-Xn}at(e){return this.getLView(e)[ii].$implicit}attach(e,t){let n=t[kr];this.needsIndexUpdate||=e!==this.length,Wf(this.lContainer,t,e,jd(this.templateTNode,n)),Gj(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,jj(this.lContainer,e),Wj(this.lContainer,e)}create(e,t){let n=dm(this.lContainer,this.templateTNode.tView.ssrId);return jf(this.hostLView,this.templateTNode,new gE(this.lContainer,t,e),{dehydratedView:n})}destroy(e){uv(e[mt],e)}updateValue(e,t){this.getLView(e)[ii].$implicit=t}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[ii].$index=e}getLView(e){return Yj(this.lContainer,e)}};function He(i){let e=Tt(null),t=ea();try{let n=St(),r=n[mt],o=n[t],a=t+1,s=Zb(n,a);if(o.liveCollection===void 0){let c=yE(r,a);o.liveCollection=new vE(s,n,c)}else o.liveCollection.reset();let l=o.liveCollection;if(Hj(l,i,o.trackByFn,e),l.updateIndexes(),o.hasEmptyBlock){let c=tl(),d=l.length===0;if(Qr(n,c,d)){let u=t+2,f=Zb(n,u);if(d){let h=yE(r,u),p=ER(f,h,n),m=jf(n,h,void 0,{dehydratedView:p});Wf(f,m,0,jd(h,p))}else r.firstUpdatePass&&yv(f),rT(f,0)}}}finally{Tt(e)}}function Zb(i,e){return i[e]}function Gj(i,e){if(i.length<=Xn)return;let t=Xn+e,n=i[t],r=n?n[Zl]:void 0;if(n&&r&&r.detachedLeaveAnimationFns&&r.detachedLeaveAnimationFns.length>0){let o=n[_o];bH(o,r),Gd.delete(n[el]),r.detachedLeaveAnimationFns=void 0}}function jj(i,e){if(i.length<=Xn)return;let t=Xn+e,n=i[t],r=n?n[Zl]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function Wj(i,e){return cm(i,e)}function Yj(i,e){return vR(i,e)}function yE(i,e){return Tf(i,e)}function W(i,e,t){let n=St(),r=tl();if(Qr(n,r,e)){let o=Hn(),a=Of();rR(a,n,i,e,n[ln],t)}return W}function _E(i,e,t,n,r){pv(e,i,t,r?"class":"style",n)}function x(i,e,t,n){let r=St(),o=r[mt],a=i+cn,s=o.firstCreatePass?aT(a,r,2,e,QE,gb(),t,n):o.data[a];if(Oa(s)){let l=r[Da].tracingService;if(l&&l.componentCreate){let c=o.data[s.directiveStart+s.componentOffset];return l.componentCreate(RR(c),()=>(C2(i,e,r,s,n),x))}}return C2(i,e,r,s,n),x}function C2(i,e,t,n,r){if(eT(n,t,i,e,yT),Ef(n)){let o=t[mt];hv(o,t,n),FE(o,n,t)}r!=null&&Sm(t,n)}function C(){let i=Hn(),e=rr(),t=tT(e);return i.firstCreatePass&&sT(i,t),cw(t)&&dw(),lw(),t.classesWithoutHost!=null&&X6(t)&&_E(i,t,St(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&q6(t)&&_E(i,t,St(),t.stylesWithoutHost,!1),C}function G(i,e,t,n){return x(i,e,t,n),C(),G}function M(i,e,t,n){let r=St(),o=r[mt],a=i+cn,s=o.firstCreatePass?PG(a,o,2,e,t,n):o.data[a];return eT(s,r,i,e,yT),n!=null&&Sm(r,s),M}function D(){let i=rr(),e=tT(i);return cw(e)&&dw(),lw(),D}function ce(i,e,t,n){return M(i,e,t,n),D(),ce}var yT=(i,e,t,n,r)=>(nl(!0),HE(e[ln],n,bw()));function $j(i,e,t,n,r){let o=!rv(e,t);if(nl(o),o)return HE(e[ln],n,bw());let a=e[kr],s=bv(a,i,e,t);return wk(a,r)&&iv(a,r,s.nextSibling),a&&(j2(t)||W2(s))&&Oa(t)&&(vI(t),Lk(s)),s}function aN(){yT=$j}function _T(i,e,t){let n=St(),r=n[mt],o=i+cn,a=r.firstCreatePass?aT(o,n,8,"ng-container",QE,gb(),e,t):r.data[o];if(eT(a,n,i,"ng-container",sN),Ef(a)){let s=n[mt];hv(s,n,a),FE(s,a,n)}return t!=null&&Sm(n,a),_T}function xT(){let i=Hn(),e=rr(),t=tT(e);return i.firstCreatePass&&sT(i,t),xT}function Do(i,e,t){return _T(i,e,t),xT(),Do}var sN=(i,e,t,n,r)=>(nl(!0),Nk(e[ln],""));function Xj(i,e,t,n,r){let o,a=!rv(e,t);if(nl(a),a)return Nk(e[ln],"");let s=e[kr],l=bv(s,i,e,t),c=S8(s,r);return iv(s,r,l),o=vv(c,l),o}function lN(){sN=Xj}function de(){return St()}function Te(i,e,t){let n=St(),r=tl();if(Qr(n,r,e)){let o=Hn(),a=Of();oR(a,n,i,e,n[ln],t)}return Te}var im=void 0;function qj(i){let e=Math.floor(Math.abs(i)),t=i.toString().replace(/^[^.]*\.?/,"").length;return e===1&&t===0?1:5}var Kj=["en",[["a","p"],["AM","PM"]],[["AM","PM"]],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],im,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],im,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm\u202Fa","h:mm:ss\u202Fa","h:mm:ss\u202Fa z","h:mm:ss\u202Fa zzzz"],["{1}, {0}",im,im,im],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",qj],Iw={};function eo(i){let e=Zj(i),t=S2(e);if(t)return t;let n=e.split("-")[0];if(t=S2(n),t)return t;if(n==="en")return Kj;throw new nt(701,!1)}function S2(i){return i in Iw||(Iw[i]=qo.ng&&qo.ng.common&&qo.ng.common.locales&&qo.ng.common.locales[i]),Iw[i]}var ri=(function(i){return i[i.LocaleId=0]="LocaleId",i[i.DayPeriodsFormat=1]="DayPeriodsFormat",i[i.DayPeriodsStandalone=2]="DayPeriodsStandalone",i[i.DaysFormat=3]="DaysFormat",i[i.DaysStandalone=4]="DaysStandalone",i[i.MonthsFormat=5]="MonthsFormat",i[i.MonthsStandalone=6]="MonthsStandalone",i[i.Eras=7]="Eras",i[i.FirstDayOfWeek=8]="FirstDayOfWeek",i[i.WeekendRange=9]="WeekendRange",i[i.DateFormat=10]="DateFormat",i[i.TimeFormat=11]="TimeFormat",i[i.DateTimeFormat=12]="DateTimeFormat",i[i.NumberSymbols=13]="NumberSymbols",i[i.NumberFormats=14]="NumberFormats",i[i.CurrencyCode=15]="CurrencyCode",i[i.CurrencySymbol=16]="CurrencySymbol",i[i.CurrencyName=17]="CurrencyName",i[i.Currencies=18]="Currencies",i[i.Directionality=19]="Directionality",i[i.PluralCase=20]="PluralCase",i[i.ExtraData=21]="ExtraData",i})(ri||{});function Zj(i){return i.toLowerCase().replace(/_/g,"-")}var Mm="en-US";var Jj=Mm;function cN(i){typeof i=="string"&&(Jj=i.toLowerCase().replace(/_/g,"-"))}function H(i,e,t){let n=St(),r=Hn(),o=rr();return dN(r,n,n[ln],o,i,e,t),H}function ie(i,e,t){let n=St(),r=Hn(),o=rr();return(o.type&3||t)&&IR(o,r,n,t,n[ln],i,e,Fb(o,n,e)),ie}function dN(i,e,t,n,r,o,a){let s=!0,l=null;if((n.type&3||a)&&(l??=Fb(n,e,o),IR(n,i,e,a,t,r,o,l)&&(s=!1)),s){let c=n.outputs?.[r],d=n.hostDirectiveOutputs?.[r];if(d&&d.length)for(let u=0;u<d.length;u+=2){let f=d[u],h=d[u+1];l??=Fb(n,e,o),c2(n,e,f,h,r,l)}if(c&&c.length)for(let u of c)l??=Fb(n,e,o),c2(n,e,u,r,r,l)}}function y(i=1){return AI(i)}function Qj(i,e){let t=null,n=nH(i);for(let r=0;r<e.length;r++){let o=e[r];if(o==="*"){t=r;continue}if(n===null?Hk(i,o,!0):oH(n,o))return r}return t}function or(i){let e=St()[$i][Ir];if(!e.projection){let t=i?i.length:1,n=e.projection=tI(t,null),r=n.slice(),o=e.child;for(;o!==null;){if(o.type!==128){let a=i?Qj(o,i):0;a!==null&&(r[a]?r[a].projectionNext=o:n[a]=o,r[a]=o)}o=o.next}}}function ar(i,e=0,t,n,r,o){let a=St(),s=Hn(),l=n?i+1:null;l!==null&&pm(a,s,l,n,r,o,null,t);let c=Yf(s,cn+i,16,null,t||null);c.projection===null&&(c.projection=e),hw();let u=!a[kr]||bb();a[$i][Ir].projection[c.projection]===null&&l!==null?eW(a,s,l):u&&!_m(c)&&DH(s,a,c)}function eW(i,e,t){let n=cn+t,r=e.data[n],o=i[n],a=dm(o,r.tView.ssrId),s=jf(i,r,void 0,{dehydratedView:a});Wf(o,s,0,jd(r,a))}function Ev(i,e,t){return VR(i,e,t),Ev}function Tv(i){let e=St(),t=Hn(),n=_b();em(n+1);let r=dT(t,n);if(i.dirty&&uI(e)===((r.metadata.flags&2)===2)){if(r.matches===null)i.reset([]);else{let o=HR(e,n);i.reset(o,H2),i.notifyOnChanges()}return!0}return!1}function Mv(){return cT(St(),_b())}function hr(i,e,t,n){return nj(i,VR(e,t,n)),hr}function Rr(i=1){em(_b()+i)}function pi(i){let e=_I();return hb(e,cn+i)}function Ob(i,e){return i<<17|e<<2}function Yd(i){return i>>17&32767}function tW(i){return(i&2)==2}function nW(i,e){return i&131071|e<<17}function xE(i){return i|2}function Uf(i){return(i&131068)>>2}function kw(i,e){return i&-131069|e<<2}function iW(i){return(i&1)===1}function CE(i){return i|1}function rW(i,e,t,n,r,o){let a=o?e.classBindings:e.styleBindings,s=Yd(a),l=Uf(a);i[n]=t;let c=!1,d;if(Array.isArray(t)){let u=t;d=u[1],(d===null||_f(u,d)>0)&&(c=!0)}else d=t;if(r)if(l!==0){let f=Yd(i[s+1]);i[n+1]=Ob(f,s),f!==0&&(i[f+1]=kw(i[f+1],n)),i[s+1]=nW(i[s+1],n)}else i[n+1]=Ob(s,0),s!==0&&(i[s+1]=kw(i[s+1],n)),s=n;else i[n+1]=Ob(l,0),s===0?s=n:i[l+1]=kw(i[l+1],n),l=n;c&&(i[n+1]=xE(i[n+1])),w2(i,d,n,!0),w2(i,d,n,!1),oW(e,d,i,n,o),a=Ob(s,l),o?e.classBindings=a:e.styleBindings=a}function oW(i,e,t,n,r){let o=r?i.residualClasses:i.residualStyles;o!=null&&typeof e=="string"&&_f(o,e)>=0&&(t[n+1]=CE(t[n+1]))}function w2(i,e,t,n){let r=i[t+1],o=e===null,a=n?Yd(r):Uf(r),s=!1;for(;a!==0&&(s===!1||o);){let l=i[a],c=i[a+1];aW(l,e)&&(s=!0,i[a+1]=n?CE(c):xE(c)),a=n?Yd(c):Uf(c)}s&&(i[t+1]=n?xE(r):CE(r))}function aW(i,e){return i===null||e==null||(Array.isArray(i)?i[1]:i)===e?!0:Array.isArray(i)&&typeof e=="string"?_f(i,e)>=0:!1}var Ia={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function sW(i){return i.substring(Ia.key,Ia.keyEnd)}function lW(i){return cW(i),uN(i,fN(i,0,Ia.textEnd))}function uN(i,e){let t=Ia.textEnd;return t===e?-1:(e=Ia.keyEnd=dW(i,Ia.key=e,t),fN(i,e,t))}function cW(i){Ia.key=0,Ia.keyEnd=0,Ia.value=0,Ia.valueEnd=0,Ia.textEnd=i.length}function fN(i,e,t){for(;e<t&&i.charCodeAt(e)<=32;)e++;return e}function dW(i,e,t){for(;e<t&&i.charCodeAt(e)>32;)e++;return e}function Gn(i,e,t){return hN(i,e,t,!1),Gn}function Ee(i,e){return hN(i,e,null,!0),Ee}function mi(i){fW(vW,uW,i,!0)}function uW(i,e){for(let t=lW(e);t>=0;t=uN(e,t))cb(i,sW(e),!0)}function hN(i,e,t,n){let r=St(),o=Hn(),a=Af(2);if(o.firstUpdatePass&&mN(o,i,a,n),e!==Ni&&Qr(r,a,e)){let s=o.data[ea()];gN(o,s,r,r[ln],i,r[a+1]=_W(e,t),n,a)}}function fW(i,e,t,n){let r=Hn(),o=Af(2);r.firstUpdatePass&&mN(r,null,o,n);let a=St();if(t!==Ni&&Qr(a,o,t)){let s=r.data[ea()];if(bN(s,n)&&!pN(r,o)){let l=n?s.classesWithoutHost:s.stylesWithoutHost;l!==null&&(t=ib(l,t||"")),_E(r,s,a,t,n)}else yW(r,s,a,a[ln],a[o+1],a[o+1]=bW(i,e,t),n,o)}}function pN(i,e){return e>=i.expandoStartIndex}function mN(i,e,t,n){let r=i.data;if(r[t+1]===null){let o=r[ea()],a=pN(i,t);bN(o,n)&&e===null&&!a&&(e=!1),e=hW(r,o,e,n),rW(r,o,e,t,a,n)}}function hW(i,e,t,n){let r=EI(i),o=n?e.residualClasses:e.residualStyles;if(r===null)(n?e.classBindings:e.styleBindings)===0&&(t=Rw(null,i,e,t,n),t=mm(t,e.attrs,n),o=null);else{let a=e.directiveStylingLast;if(a===-1||i[a]!==r)if(t=Rw(r,i,e,t,n),o===null){let l=pW(i,e,n);l!==void 0&&Array.isArray(l)&&(l=Rw(null,i,e,l[1],n),l=mm(l,e.attrs,n),mW(i,e,n,l))}else o=gW(i,e,n)}return o!==void 0&&(n?e.residualClasses=o:e.residualStyles=o),t}function pW(i,e,t){let n=t?e.classBindings:e.styleBindings;if(Uf(n)!==0)return i[Yd(n)]}function mW(i,e,t,n){let r=t?e.classBindings:e.styleBindings;i[Yd(r)]=n}function gW(i,e,t){let n,r=e.directiveEnd;for(let o=1+e.directiveStylingLast;o<r;o++){let a=i[o].hostAttrs;n=mm(n,a,t)}return mm(n,e.attrs,t)}function Rw(i,e,t,n,r){let o=null,a=t.directiveEnd,s=t.directiveStylingLast;for(s===-1?s=t.directiveStart:s++;s<a&&(o=e[s],n=mm(n,o.hostAttrs,r),o!==i);)s++;return i!==null&&(t.directiveStylingLast=s),n}function mm(i,e,t){let n=t?1:2,r=-1;if(e!==null)for(let o=0;o<e.length;o++){let a=e[o];typeof a=="number"?r=a:r===n&&(Array.isArray(i)||(i=i===void 0?[]:["",i]),cb(i,a,t?!0:e[++o]))}return i===void 0?null:i}function bW(i,e,t){if(t==null||t==="")return dr;let n=[],r=Ra(t);if(Array.isArray(r))for(let o=0;o<r.length;o++)i(n,r[o],!0);else if(r instanceof Set)for(let o of r)i(n,o,!0);else if(typeof r=="object")for(let o in r)r.hasOwnProperty(o)&&i(n,o,r[o]);else typeof r=="string"&&e(n,r);return n}function vW(i,e,t){let n=String(e);n!==""&&!n.includes(" ")&&cb(i,n,t)}function yW(i,e,t,n,r,o,a,s){r===Ni&&(r=dr);let l=0,c=0,d=0<r.length?r[0]:null,u=0<o.length?o[0]:null;for(;d!==null||u!==null;){let f=l<r.length?r[l+1]:void 0,h=c<o.length?o[c+1]:void 0,p=null,m;d===u?(l+=2,c+=2,f!==h&&(p=u,m=h)):u===null||d!==null&&d<u?(l+=2,p=d):(c+=2,p=u,m=h),p!==null&&gN(i,e,t,n,p,m,a,s),d=l<r.length?r[l]:null,u=c<o.length?o[c]:null}}function gN(i,e,t,n,r,o,a,s){if(!(e.type&3))return;let l=i.data,c=l[s+1],d=iW(c)?E2(l,e,t,r,Uf(c),a):void 0;if(!Jb(d)){Jb(o)||tW(c)&&(o=E2(l,null,t,r,s,a));let u=tw(ea(),t);OH(n,a,u,r,o)}}function E2(i,e,t,n,r,o){let a=e===null,s;for(;r>0;){let l=i[r],c=Array.isArray(l),d=c?l[1]:l,u=d===null,f=t[r+1];f===Ni&&(f=u?dr:void 0);let h=u?db(f,n):d===n?f:void 0;if(c&&!Jb(h)&&(h=db(l,n)),Jb(h)&&(s=h,a))return s;let p=i[r+1];r=a?Yd(p):Uf(p)}if(e!==null){let l=o?e.residualClasses:e.residualStyles;l!=null&&(s=db(l,n))}return s}function Jb(i){return i!==void 0}function _W(i,e){return i==null||i===""||(typeof e=="string"?i=i+e:typeof i=="object"&&(i=nb(Ra(i)))),i}function bN(i,e){return(i.flags&(e?8:16))!==0}function S(i,e=""){let t=St(),n=Hn(),r=i+cn,o=n.firstCreatePass?Yf(n,r,1,e,null):n.data[r],a=vN(n,t,o,e);t[r]=a,Sb()&&ZE(n,t,a,o),Mf(o,!1)}var vN=(i,e,t,n)=>(nl(!0),Rk(e[ln],n));function xW(i,e,t,n){let r=!rv(e,t);if(nl(r),r)return Rk(e[ln],n);let o=e[kr];return bv(o,i,e,t)}function yN(){vN=xW}function _N(i,e,t,n=""){return Qr(i,tl(),t)?e+Jr(t)+n:Ni}function CW(i,e,t,n,r,o=""){let a=vb(),s=um(i,a,t,r);return Af(2),s?e+Jr(t)+n+Jr(r)+o:Ni}function SW(i,e,t,n,r,o,a,s=""){let l=vb(),c=PR(i,l,t,r,a);return Af(3),c?e+Jr(t)+n+Jr(r)+o+Jr(a)+s:Ni}function wW(i,e,t,n,r,o,a,s,l,c=""){let d=vb(),u=kG(i,d,t,r,a,l);return Af(4),u?e+Jr(t)+n+Jr(r)+o+Jr(a)+s+Jr(l)+c:Ni}function De(i){return Be("",i),De}function Be(i,e,t){let n=St(),r=_N(n,i,e,t);return r!==Ni&&Ov(n,ea(),r),Be}function cl(i,e,t,n,r){let o=St(),a=CW(o,i,e,t,n,r);return a!==Ni&&Ov(o,ea(),a),cl}function Dv(i,e,t,n,r,o,a){let s=St(),l=SW(s,i,e,t,n,r,o,a);return l!==Ni&&Ov(s,ea(),l),Dv}function Av(i,e,t,n,r,o,a,s,l){let c=St(),d=wW(c,i,e,t,n,r,o,a,s,l);return d!==Ni&&Ov(c,ea(),d),Av}function Ov(i,e,t){let n=tw(e,i);X8(i[ln],n,t)}function La(i,e,t){pT(e)&&(e=e());let n=St(),r=tl();if(Qr(n,r,e)){let o=Hn(),a=Of();rR(a,n,i,e,n[ln],t)}return La}function Nr(i,e){let t=pT(i);return t&&i.set(e),t}function dl(i,e){let t=St(),n=Hn(),r=rr();return dN(n,t,t[ln],r,i,e),dl}function Zf(i,e,t=""){return _N(St(),i,e,t)}function T2(i,e,t){let n=Hn();n.firstCreatePass&&xN(e,n.data,n.blueprint,bs(i),t)}function xN(i,e,t,n,r){if(i=nr(i),Array.isArray(i))for(let o=0;o<i.length;o++)xN(i[o],e,t,n,r);else{let o=Hn(),a=St(),s=rr(),l=Od(i)?i:nr(i.provide),c=K1(i),d=s.providerIndexes&1048575,u=s.directiveStart,f=s.providerIndexes>>20;if(Od(i)||!i.multi){let h=new Hd(c,r,Xt,null),p=Fw(l,e,r?d:d+f,u);p===-1?(Bw(Hb(s,a),o,l),Nw(o,i,e.length),e.push(l),s.directiveStart++,s.directiveEnd++,r&&(s.providerIndexes+=1048576),t.push(h),a.push(h)):(t[p]=h,a[p]=h)}else{let h=Fw(l,e,d+f,u),p=Fw(l,e,d,d+f),m=h>=0&&t[h],g=p>=0&&t[p];if(r&&!g||!r&&!m){Bw(Hb(s,a),o,l);let b=MW(r?TW:EW,t.length,r,n,c,i);!r&&g&&(t[p].providerFactory=b),Nw(o,i,e.length,0),e.push(l),s.directiveStart++,s.directiveEnd++,r&&(s.providerIndexes+=1048576),t.push(b),a.push(b)}else{let b=CN(t[r?p:h],c,!r&&n);Nw(o,i,h>-1?h:p,b)}!r&&n&&g&&t[p].componentProviders++}}}function Nw(i,e,t,n){let r=Od(e),o=sI(e);if(r||o){let l=(o?nr(e.useClass):e).prototype.ngOnDestroy;if(l){let c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&e.multi){let d=c.indexOf(t);d===-1?c.push(t,[n,l]):c[d+1].push(n,l)}else c.push(t,l)}}}function CN(i,e,t){return t&&i.componentProviders++,i.multi.push(e)-1}function Fw(i,e,t,n){for(let r=t;r<n;r++)if(e[r]===i)return r;return-1}function EW(i,e,t,n,r){return SE(this.multi,[])}function TW(i,e,t,n,r){let o=this.multi,a;if(this.providerFactory){let s=this.providerFactory.componentProviders,l=am(n,n[mt],this.providerFactory.index,r);a=l.slice(0,s),SE(o,a);for(let c=s;c<l.length;c++)a.push(l[c])}else a=[],SE(o,a);return a}function SE(i,e){for(let t=0;t<i.length;t++){let n=i[t];e.push(n())}return e}function MW(i,e,t,n,r,o){let a=new Hd(i,t,Xt,null);return a.multi=[],a.index=e,a.componentProviders=0,CN(a,r,n&&!t),a}function ia(i,e){return t=>{t.providersResolver=(n,r)=>T2(n,r?r(i):i,!1),e&&(t.viewProvidersResolver=(n,r)=>T2(n,r?r(e):e,!0))}}function Jf(i,e){let t=Df()+i,n=St();return n[t]===Ni?Sv(n,t,e()):IG(n,t)}function Ss(i,e,t){return DW(St(),Df(),i,e,t)}function Pv(i,e,t,n){return SN(St(),Df(),i,e,t,n)}function CT(i,e){let t=i[e];return t===Ni?void 0:t}function DW(i,e,t,n,r,o){let a=e+t;return Qr(i,a,r)?Sv(i,a+1,o?n.call(o,r):n(r)):CT(i,a+1)}function SN(i,e,t,n,r,o,a){let s=e+t;return um(i,s,r,o)?Sv(i,s+2,a?n.call(a,r,o):n(r,o)):CT(i,s+2)}function AW(i,e,t,n,r,o,a,s){let l=e+t;return PR(i,l,r,o,a)?Sv(i,l+3,s?n.call(s,r,o,a):n(r,o,a)):CT(i,l+3)}function Yn(i,e){let t=Hn(),n,r=i+cn;t.firstCreatePass?(n=OW(e,t.pipeRegistry),t.data[r]=n,n.onDestroy&&(t.destroyHooks??=[]).push(r,n.onDestroy)):n=t.data[r];let o=n.factory||(n.factory=Yl(n.type,!0)),a,s=Ar(Xt);try{let l=Vb(!1),c=o();return Vb(l),nw(t,St(),r,c),c}finally{Ar(s)}}function OW(i,e){if(e)for(let t=e.length-1;t>=0;t--){let n=e[t];if(i===n.name)return n}}function Kn(i,e,t,n){let r=i+cn,o=St(),a=hb(o,r);return wN(o,r)?SN(o,Df(),e,a.transform,t,n,a):a.transform(t,n)}function ST(i,e,t,n,r){let o=i+cn,a=St(),s=hb(a,o);return wN(a,o)?AW(a,Df(),e,s.transform,t,n,r,s):s.transform(t,n,r)}function wN(i,e){return i[mt].data[e].pure}function oc(i,e){return gv(i,e)}var EN=(()=>{class i{applicationErrorHandler=U(il);appRef=U(Mo);taskService=U(tc);ngZone=U(Zr);zonelessEnabled=U(nm);tracing=U(xs,{optional:!0});zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Dr;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Xp):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(U(Cw,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{let t=this.taskService.add();if(!this.runningTick&&(this.cleanup(),!this.zonelessEnabled||this.appRef.includeAllTestViews)){this.taskService.remove(t);return}this.switchToMicrotaskScheduler(),this.taskService.remove(t)})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()}))}switchToMicrotaskScheduler(){this.ngZone.runOutsideAngular(()=>{let t=this.taskService.add();this.useMicrotaskScheduler=!0,queueMicrotask(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(t)})})}notify(t){if(!this.zonelessEnabled&&t===5)return;switch(t){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2;break}case 12:{this.appRef.dirtyFlags|=16;break}case 13:{this.appRef.dirtyFlags|=2;break}case 11:break;default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick())return;let n=this.useMicrotaskScheduler?RI:vw;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>n(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>n(()=>this.tick()))}shouldScheduleTick(){return!(this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(Xp+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let t=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(n){this.applicationErrorHandler(n)}finally{this.taskService.remove(t),this.cleanup()}}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let t=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(t)}}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function TN(){return[{provide:hs,useExisting:EN},{provide:Zr,useClass:qp},{provide:nm,useValue:!0}]}function PW(){return typeof $localize<"u"&&$localize.locale||Mm}var Qf=new lt("",{factory:()=>U(Qf,{optional:!0,skipSelf:!0})||PW()});var Dm=class{destroyed=!1;listeners=null;errorHandler=U(Xo,{optional:!0});destroyRef=U(Xi);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new nt(953,!1);return(this.listeners??=[]).push(e),{unsubscribe:()=>{let t=this.listeners?.indexOf(e);t!==void 0&&t!==-1&&this.listeners?.splice(t,1)}}}emit(e){if(this.destroyed){console.warn(Ks(953,!1));return}if(this.listeners===null)return;let t=Tt(null);try{for(let n of this.listeners)try{n(e)}catch(r){this.errorHandler?.handleError(r)}}finally{Tt(t)}}};function Pt(i){return jP(i)}function ve(i,e){return Bp(i,e?.equal)}var DT={JSACTION:"__jsaction",OWNER:"__owner"},ON={};function IW(i){return i[DT.JSACTION]}function MN(i,e){i[DT.JSACTION]=e}function kW(i){return ON[i]}function RW(i,e){ON[i]=e}var At={AUXCLICK:"auxclick",CHANGE:"change",CLICK:"click",CLICKMOD:"clickmod",CLICKONLY:"clickonly",DBLCLICK:"dblclick",FOCUS:"focus",FOCUSIN:"focusin",BLUR:"blur",FOCUSOUT:"focusout",SUBMIT:"submit",KEYDOWN:"keydown",KEYPRESS:"keypress",KEYUP:"keyup",MOUSEUP:"mouseup",MOUSEDOWN:"mousedown",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEENTER:"mouseenter",MOUSELEAVE:"mouseleave",MOUSEMOVE:"mousemove",POINTERUP:"pointerup",POINTERDOWN:"pointerdown",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERMOVE:"pointermove",POINTERCANCEL:"pointercancel",GOTPOINTERCAPTURE:"gotpointercapture",LOSTPOINTERCAPTURE:"lostpointercapture",ERROR:"error",LOAD:"load",UNLOAD:"unload",TOUCHSTART:"touchstart",TOUCHEND:"touchend",TOUCHMOVE:"touchmove",INPUT:"input",SCROLL:"scroll",TOGGLE:"toggle",CUSTOM:"_custom"},NW=[At.MOUSEENTER,At.MOUSELEAVE,"pointerenter","pointerleave"],vve=[At.CLICK,At.DBLCLICK,At.FOCUSIN,At.FOCUSOUT,At.KEYDOWN,At.KEYUP,At.KEYPRESS,At.MOUSEOVER,At.MOUSEOUT,At.SUBMIT,At.TOUCHSTART,At.TOUCHEND,At.TOUCHMOVE,"touchcancel","auxclick","change","compositionstart","compositionupdate","compositionend","beforeinput","input","select","copy","cut","paste","mousedown","mouseup","wheel","contextmenu","dragover","dragenter","dragleave","drop","dragstart","dragend","pointerdown","pointermove","pointerup","pointercancel","pointerover","pointerout","gotpointercapture","lostpointercapture","ended","loadedmetadata","pagehide","pageshow","visibilitychange","beforematch"],FW=[At.FOCUS,At.BLUR,At.ERROR,At.LOAD,At.TOGGLE],AT=i=>FW.indexOf(i)>=0;function LW(i){return i===At.MOUSEENTER?At.MOUSEOVER:i===At.MOUSELEAVE?At.MOUSEOUT:i===At.POINTERENTER?At.POINTEROVER:i===At.POINTERLEAVE?At.POINTEROUT:i}function BW(i,e,t,n){let r=!1;AT(e)&&(r=!0);let o=typeof n=="boolean"?{capture:r,passive:n}:r;return i.addEventListener(e,t,o),{eventType:e,handler:t,capture:r,passive:n}}function zW(i,e){if(i.removeEventListener){let t=typeof e.passive=="boolean"?{capture:e.capture}:e.capture;i.removeEventListener(e.eventType,e.handler,t)}else i.detachEvent&&i.detachEvent(`on${e.eventType}`,e.handler)}function UW(i){i.preventDefault?i.preventDefault():i.returnValue=!1}var DN=typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);function VW(i){return i.which===2||i.which==null&&i.button===4}function HW(i){return DN&&i.metaKey||!DN&&i.ctrlKey||VW(i)||i.shiftKey}function GW(i,e,t){let n=i.relatedTarget;return(i.type===At.MOUSEOVER&&e===At.MOUSEENTER||i.type===At.MOUSEOUT&&e===At.MOUSELEAVE||i.type===At.POINTEROVER&&e===At.POINTERENTER||i.type===At.POINTEROUT&&e===At.POINTERLEAVE)&&(!n||n!==t&&!t.contains(n))}function jW(i,e){let t={};for(let n in i){if(n==="srcElement"||n==="target")continue;let r=n,o=i[r];typeof o!="function"&&(t[r]=o)}return i.type===At.MOUSEOVER?t.type=At.MOUSEENTER:i.type===At.MOUSEOUT?t.type=At.MOUSELEAVE:i.type===At.POINTEROVER?t.type=At.POINTERENTER:t.type=At.POINTERLEAVE,t.target=t.srcElement=e,t.bubbles=!1,t._originalEvent=i,t}var WW=typeof navigator<"u"&&/iPhone|iPad|iPod/.test(navigator.userAgent),Nv=class{element;handlerInfos=[];constructor(e){this.element=e}addEventListener(e,t,n){WW&&(this.element.style.cursor="pointer"),this.handlerInfos.push(BW(this.element,e,t(this.element),n))}cleanUp(){for(let e=0;e<this.handlerInfos.length;e++)zW(this.element,this.handlerInfos[e]);this.handlerInfos=[]}},YW={NAMESPACE_ACTION_SEPARATOR:".",EVENT_ACTION_SEPARATOR:":"};function ac(i){return i.eventType}function OT(i,e){i.eventType=e}function kv(i){return i.event}function PN(i,e){i.event=e}function IN(i){return i.targetElement}function kN(i,e){i.targetElement=e}function RN(i){return i.eic}function $W(i,e){i.eic=e}function XW(i){return i.timeStamp}function qW(i,e){i.timeStamp=e}function Rv(i){return i.eia}function NN(i,e,t){i.eia=[e,t]}function wT(i){i.eia=void 0}function Iv(i){return i[1]}function KW(i){return i.eirp}function FN(i,e){i.eirp=e}function LN(i){return i.eir}function BN(i,e){i.eir=e}function zN(i){return{eventType:i.eventType,event:i.event,targetElement:i.targetElement,eic:i.eic,eia:i.eia,timeStamp:i.timeStamp,eirp:i.eirp,eiack:i.eiack,eir:i.eir}}function ZW(i,e,t,n,r,o,a,s){return{eventType:i,event:e,targetElement:t,eic:n,timeStamp:r,eia:o,eirp:a,eiack:s}}var ET=class i{eventInfo;constructor(e){this.eventInfo=e}getEventType(){return ac(this.eventInfo)}setEventType(e){OT(this.eventInfo,e)}getEvent(){return kv(this.eventInfo)}setEvent(e){PN(this.eventInfo,e)}getTargetElement(){return IN(this.eventInfo)}setTargetElement(e){kN(this.eventInfo,e)}getContainer(){return RN(this.eventInfo)}setContainer(e){$W(this.eventInfo,e)}getTimestamp(){return XW(this.eventInfo)}setTimestamp(e){qW(this.eventInfo,e)}getAction(){let e=Rv(this.eventInfo);if(e)return{name:e[0],element:e[1]}}setAction(e){if(!e){wT(this.eventInfo);return}NN(this.eventInfo,e.name,e.element)}getIsReplay(){return KW(this.eventInfo)}setIsReplay(e){FN(this.eventInfo,e)}getResolved(){return LN(this.eventInfo)}setResolved(e){BN(this.eventInfo,e)}clone(){return new i(zN(this.eventInfo))}},JW={},QW=/\s*;\s*/,e9=At.CLICK,TT=class{a11yClickSupport=!1;clickModSupport=!0;syntheticMouseEventSupport;updateEventInfoForA11yClick=void 0;preventDefaultForA11yClick=void 0;populateClickOnlyAction=void 0;constructor({syntheticMouseEventSupport:e=!1,clickModSupport:t=!0}={}){this.syntheticMouseEventSupport=e,this.clickModSupport=t}resolveEventType(e){this.clickModSupport&&ac(e)===At.CLICK&&HW(kv(e))?OT(e,At.CLICKMOD):this.a11yClickSupport&&this.updateEventInfoForA11yClick(e)}resolveAction(e){LN(e)||(this.populateAction(e,IN(e)),BN(e,!0))}resolveParentAction(e){let t=Rv(e),n=t&&Iv(t);wT(e);let r=n&&this.getParentNode(n);r&&this.populateAction(e,r)}populateAction(e,t){let n=t;for(;n&&n!==RN(e)&&(n.nodeType===Node.ELEMENT_NODE&&this.populateActionOnElement(n,e),!Rv(e));)n=this.getParentNode(n);let r=Rv(e);if(r&&(this.a11yClickSupport&&this.preventDefaultForA11yClick(e),this.syntheticMouseEventSupport&&(ac(e)===At.MOUSEENTER||ac(e)===At.MOUSELEAVE||ac(e)===At.POINTERENTER||ac(e)===At.POINTERLEAVE)))if(GW(kv(e),ac(e),Iv(r))){let o=jW(kv(e),Iv(r));PN(e,o),kN(e,Iv(r))}else wT(e)}getParentNode(e){let t=e[DT.OWNER];if(t)return t;let n=e.parentNode;return n?.nodeName==="#document-fragment"?n?.host??null:n}populateActionOnElement(e,t){let n=this.parseActions(e),r=n[ac(t)];r!==void 0&&NN(t,r,e),this.a11yClickSupport&&this.populateClickOnlyAction(e,t,n)}parseActions(e){let t=IW(e);if(!t){let n=e.getAttribute(Tb.JSACTION);if(!n)t=JW,MN(e,t);else{if(t=kW(n),!t){t={};let r=n.split(QW);for(let o=0;o<r.length;o++){let a=r[o];if(!a)continue;let s=a.indexOf(YW.EVENT_ACTION_SEPARATOR),l=s!==-1,c=l?a.substr(0,s).trim():e9,d=l?a.substr(s+1).trim():a;t[c]=d}RW(n,t)}MN(e,t)}}return t}addA11yClickSupport(e,t,n){this.a11yClickSupport=!0,this.updateEventInfoForA11yClick=e,this.preventDefaultForA11yClick=t,this.populateClickOnlyAction=n}},UN=(function(i){return i[i.I_AM_THE_JSACTION_FRAMEWORK=0]="I_AM_THE_JSACTION_FRAMEWORK",i})(UN||{}),MT=class{dispatchDelegate;actionResolver;eventReplayer;eventReplayScheduled=!1;replayEventInfoWrappers=[];constructor(e,{actionResolver:t,eventReplayer:n}={}){this.dispatchDelegate=e,this.actionResolver=t,this.eventReplayer=n}dispatch(e){let t=new ET(e);this.actionResolver?.resolveEventType(e),this.actionResolver?.resolveAction(e);let n=t.getAction();if(n&&t9(n.element,t)&&UW(t.getEvent()),this.eventReplayer&&t.getIsReplay()){this.scheduleEventInfoWrapperReplay(t);return}this.dispatchDelegate(t)}scheduleEventInfoWrapperReplay(e){this.replayEventInfoWrappers.push(e),!this.eventReplayScheduled&&(this.eventReplayScheduled=!0,Promise.resolve().then(()=>{this.eventReplayScheduled=!1,this.eventReplayer(this.replayEventInfoWrappers)}))}};function t9(i,e){return i.tagName==="A"&&(e.getEventType()===At.CLICK||e.getEventType()===At.CLICKMOD)}var VN=Symbol.for("propagationStopped"),PT={REPLAY:101};var n9="`preventDefault` called during event replay.";var i9="`composedPath` called during event replay.",Fv=class{dispatchDelegate;clickModSupport;actionResolver;dispatcher;constructor(e,t=!0){this.dispatchDelegate=e,this.clickModSupport=t,this.actionResolver=new TT({clickModSupport:t}),this.dispatcher=new MT(n=>{this.dispatchToDelegate(n)},{actionResolver:this.actionResolver})}dispatch(e){this.dispatcher.dispatch(e)}dispatchToDelegate(e){for(e.getIsReplay()&&a9(e),r9(e);e.getAction();){if(s9(e),AT(e.getEventType())&&e.getAction().element!==e.getTargetElement()||(this.dispatchDelegate(e.getEvent(),e.getAction().name),o9(e)))return;this.actionResolver.resolveParentAction(e.eventInfo)}}};function r9(i){let e=i.getEvent(),t=i.getEvent().stopPropagation.bind(e),n=()=>{e[VN]=!0,t()};qd(e,"stopPropagation",n),qd(e,"stopImmediatePropagation",n)}function o9(i){return!!i.getEvent()[VN]}function a9(i){let e=i.getEvent(),t=i.getTargetElement(),n=e.preventDefault.bind(e);qd(e,"target",t),qd(e,"eventPhase",PT.REPLAY),qd(e,"preventDefault",()=>{throw n(),new Error(n9+"")}),qd(e,"composedPath",()=>{throw new Error(i9+"")})}function s9(i){let e=i.getEvent(),t=i.getAction()?.element;t&&qd(e,"currentTarget",t,{configurable:!0})}function qd(i,e,t,{configurable:n=!1}={}){Object.defineProperty(i,e,{value:t,configurable:n})}function HN(i,e){i.ecrd(t=>{e.dispatch(t)},UN.I_AM_THE_JSACTION_FRAMEWORK)}function l9(i){return i?.q??[]}function c9(i){i&&(AN(i.c,i.et,i.h),AN(i.c,i.etc,i.h,!0))}function AN(i,e,t,n){for(let r=0;r<e.length;r++)i.removeEventListener(e[r],t,n)}var d9=!1,GN=(()=>{class i{static MOUSE_SPECIAL_SUPPORT=d9;containerManager;eventHandlers={};browserEventTypeToExtraEventTypes={};dispatcher=null;queuedEventInfos=[];constructor(t){this.containerManager=t}handleEvent(t,n,r){let o=ZW(t,n,n.target,r,Date.now());this.handleEventInfo(o)}handleEventInfo(t){if(!this.dispatcher){FN(t,!0),this.queuedEventInfos?.push(t);return}this.dispatcher(t)}addEvent(t,n,r){if(t in this.eventHandlers||!this.containerManager||!i.MOUSE_SPECIAL_SUPPORT&&NW.indexOf(t)>=0)return;let o=(s,l,c)=>{this.handleEvent(s,l,c)};this.eventHandlers[t]=o;let a=LW(n||t);if(a!==t){let s=this.browserEventTypeToExtraEventTypes[a]||[];s.push(t),this.browserEventTypeToExtraEventTypes[a]=s}this.containerManager.addEventListener(a,s=>l=>{o(t,l,s)},r)}replayEarlyEvents(t=window._ejsa){t&&(this.replayEarlyEventInfos(t.q),c9(t),delete window._ejsa)}replayEarlyEventInfos(t){for(let n=0;n<t.length;n++){let r=t[n],o=this.getEventTypesForBrowserEventType(r.eventType);for(let a=0;a<o.length;a++){let s=zN(r);OT(s,o[a]),this.handleEventInfo(s)}}}getEventTypesForBrowserEventType(t){let n=[];return this.eventHandlers[t]&&n.push(t),this.browserEventTypeToExtraEventTypes[t]&&n.push(...this.browserEventTypeToExtraEventTypes[t]),n}handler(t){return this.eventHandlers[t]}cleanUp(){this.containerManager?.cleanUp(),this.containerManager=null,this.eventHandlers={},this.browserEventTypeToExtraEventTypes={},this.dispatcher=null,this.queuedEventInfos=[]}registerDispatcher(t,n){this.ecrd(t,n)}ecrd(t,n){if(this.dispatcher=t,this.queuedEventInfos?.length){for(let r=0;r<this.queuedEventInfos.length;r++)this.handleEventInfo(this.queuedEventInfos[r]);this.queuedEventInfos=null}}}return i})();function jN(i,e=window){return l9(e._ejsas?.[i])}function IT(i,e=window){e._ejsas&&(e._ejsas[i]=void 0)}var zv=Symbol("InputSignalNode#UNSET"),QN=Q(B({},D0),{transformFn:void 0,applyValueToInputSignal(i,e){wd(i,e)}});function eF(i,e){let t=Object.create(QN);t.value=i,t.transformFn=e?.transform;function n(){if(xd(t),t.value===zv){let r=null;throw new nt(-950,r)}return t.value}return n[Ri]=t,n}function fe(i){return new Dm}function WN(i,e){return eF(i,e)}function D9(i){return eF(zv,i)}var X=(WN.required=D9,WN);function YN(i,e){return jR(e)}function A9(i,e){return WR(e)}var qi=(YN.required=A9,YN);function tF(i,e){let t=Object.create(QN),n=new Dm;t.value=i;function r(){return xd(t),$N(t.value),t.value}return r[Ri]=t,r.asReadonly=wb.bind(r),r.set=o=>{t.equal(t.value,o)||(wd(t,o),n.emit(o))},r.update=o=>{$N(t.value),r.set(o(t.value))},r.subscribe=n.subscribe.bind(n),r.destroyRef=n.destroyRef,r}function $N(i){if(i===zv)throw new nt(952,!1)}function XN(i,e){return tF(i,e)}function O9(i){return tF(zv,i)}var pr=(XN.required=O9,XN);var kT=new lt(""),P9=new lt("");function Am(i){return!i.moduleRef}function I9(i){let e=Am(i)?i.r3Injector:i.moduleRef.injector,t=e.get(Zr);return t.run(()=>{Am(i)?i.r3Injector.resolveInjectorInitializers():i.moduleRef.resolveInjectorInitializers();let n=e.get(il),r;if(t.runOutsideAngular(()=>{r=t.onError.subscribe({next:n})}),Am(i)){let o=()=>e.destroy(),a=i.platformInjector.get(kT);a.add(o),e.onDestroy(()=>{r.unsubscribe(),a.delete(o)})}else{let o=()=>i.moduleRef.destroy(),a=i.platformInjector.get(kT);a.add(o),i.moduleRef.onDestroy(()=>{om(i.allPlatformModules,i.moduleRef),r.unsubscribe(),a.delete(o)})}return R9(n,t,()=>{let o=e.get(tc),a=o.add(),s=e.get(bT);return s.runInitializers(),s.donePromise.then(()=>{let l=e.get(Qf,Mm);if(cN(l||Mm),!e.get(P9,!0))return Am(i)?e.get(Mo):(i.allPlatformModules.push(i.moduleRef),i.moduleRef);if(Am(i)){let d=e.get(Mo);return i.rootComponent!==void 0&&d.bootstrap(i.rootComponent),d}else return k9?.(i.moduleRef,i.allPlatformModules),i.moduleRef}).finally(()=>{o.remove(a)})})})}var k9;function R9(i,e,t){try{let n=t();return qf(n)?n.catch(r=>{throw e.runOutsideAngular(()=>i(r)),r}):n}catch(n){throw e.runOutsideAngular(()=>i(n)),n}}var Bv=null;function N9(i=[],e){return ir.create({name:e,providers:[{provide:Zp,useValue:"platform"},{provide:kT,useValue:new Set([()=>Bv=null])},...i]})}function F9(i=[]){if(Bv)return Bv;let e=N9(i);return Bv=e,tN(),L9(e),e}function L9(i){let e=i.get(Qb,null);Cf(i,()=>{e?.forEach(t=>t())})}var Lv=new WeakSet,qN="";function KN(i){return i.get(PE,sk)}function nF(){let i=[{provide:PE,useFactory:()=>{let e=!0;{let t=U(_s);e=!!window._ejsas?.[t]}return e&&Fa("NgEventReplay"),e}}];return i.push({provide:Js,useValue:()=>{let e=U(Mo),{injector:t}=e;if(!Lv.has(e)){let n=U(IE);if(KN(t)){gk();let r=t.get(_s),o=pk(r,(a,s,l)=>{a.nodeType===Node.ELEMENT_NODE&&(dk(a,s,l),uk(a,n))});e.onDestroy(o)}}},multi:!0},{provide:Kf,useFactory:()=>{let e=U(Mo),{injector:t}=e;return()=>{if(!KN(t)||Lv.has(e))return;Lv.add(e);let n=t.get(_s);e.onDestroy(()=>{Lv.delete(e),IT(n)}),e.whenStable().then(()=>{if(e.destroyed)return;let r=t.get(hk);B9(r,t);let o=t.get(IE);o.get(qN)?.forEach(fk),o.delete(qN);let a=r.instance;Sk(t)?e.onDestroy(()=>a.cleanUp()):a.cleanUp()})}},multi:!0}),i}var B9=(i,e)=>{let t=e.get(_s),n=window._ejsas[t],r=i.instance=new GN(new Nv(n.c));for(let s of n.et)r.addEvent(s);for(let s of n.etc)r.addEvent(s);let o=jN(t);r.replayEarlyEventInfos(o),IT(t);let a=new Fv(s=>{z9(e,s,s.currentTarget)});HN(r,a)};function z9(i,e,t){let n=(t&&t.getAttribute(ym))??"";/d\d+/.test(n)?U9(n,i,e,t):e.eventPhase===PT.REPLAY&&kE(e,t)}function U9(i,e,t,n){let r=e.get(lk);r.push({event:t,currentTarget:n}),oN(e,i,V9(r))}function V9(i){return e=>{let t=new Set(e),n=[];for(let{event:r,currentTarget:o}of i){let a=o.getAttribute(ym);t.has(a)?kE(r,o):n.push({event:r,currentTarget:o})}i.length=0,i.push(...n)}}var ZN=!1;var H9=1e4;function G9(){ZN||(ZN=!0,_k(),aN(),yN(),lN(),ZR(),zR(),wR(),iR())}function j9(i){return i.whenStable()}function iF(){let i=[{provide:vm,useFactory:()=>{let e=!0;return e=!!U(Gf,{optional:!0})?.get(RE,null),e&&Fa("NgHydration"),e}},{provide:Js,useValue:()=>{_R(!1);let e=U(Un);U(vm)&&(Tk(e),G9())},multi:!0}];return i.push({provide:OE,useFactory:()=>U(vm)},{provide:Kf,useFactory:()=>{let e=U(hs);if(U(vm)){let t=U(Mo);return()=>{j9(t).then(()=>{t.destroyed||(oT(t),e.notify(7))})}}return()=>{}},multi:!0}),Qs(i)}var rSe=H9-1e3;var Uv=(()=>{class i{static __NG_ELEMENT_ID__=W9}return i})();function W9(i){return Y9(rr(),St(),(i&16)===16)}function Y9(i,e,t){if(Oa(i)&&!t){let n=Jo(i.index,e);return new nc(n,n)}else if(i.type&175){let n=e[$i];return new nc(n,e)}return null}function rF(i){let{rootComponent:e,appProviders:t,platformProviders:n,platformRef:r}=i;fn(an.BootstrapApplicationStart);try{let o=r?.injector??F9(n),a=[TN(),FI,...t||[]],s=new hm({providers:a,parent:o,debugName:"",runEnvironmentInitializers:!1});return I9({r3Injector:s.injector,platformInjector:o,rootComponent:e})}catch(o){return Promise.reject(o)}finally{fn(an.BootstrapApplicationEnd)}}function Vv(i){return typeof i=="boolean"?i:i!=null&&i!=="false"}function Hv(i,e){let t=Zs(i),n=e.elementInjector||xf();return new zf(t).create(n,e.projectableNodes,e.hostElement,e.environmentInjector,e.directives,e.bindings)}var oF=null;function ra(){return oF}function RT(i){oF??=i}var Om=class{},Gv=(()=>{class i{historyGo(t){throw new Error("")}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pe({token:i,factory:()=>U(aF),providedIn:"platform"})}return i})();var aF=(()=>{class i extends Gv{_location;_history;_doc=U(Un);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return ra().getBaseHref(this._doc)}onPopState(t){let n=ra().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",t,!1),()=>n.removeEventListener("popstate",t)}onHashChange(t){let n=ra().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",t,!1),()=>n.removeEventListener("hashchange",t)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(t){this._location.pathname=t}pushState(t,n,r){this._history.pushState(t,n,r)}replaceState(t,n,r){this._history.replaceState(t,n,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pe({token:i,factory:()=>new i,providedIn:"platform"})}return i})();var VT=(function(i){return i[i.Decimal=0]="Decimal",i[i.Percent=1]="Percent",i[i.Currency=2]="Currency",i[i.Scientific=3]="Scientific",i})(VT||{});var mr=(function(i){return i[i.Format=0]="Format",i[i.Standalone=1]="Standalone",i})(mr||{}),En=(function(i){return i[i.Narrow=0]="Narrow",i[i.Abbreviated=1]="Abbreviated",i[i.Wide=2]="Wide",i[i.Short=3]="Short",i})(En||{}),to=(function(i){return i[i.Short=0]="Short",i[i.Medium=1]="Medium",i[i.Long=2]="Long",i[i.Full=3]="Full",i})(to||{}),no={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function dF(i){return eo(i)[ri.LocaleId]}function uF(i,e,t){let n=eo(i),r=[n[ri.DayPeriodsFormat],n[ri.DayPeriodsStandalone]],o=oa(r,e);return oa(o,t)}function fF(i,e,t){let n=eo(i),r=[n[ri.DaysFormat],n[ri.DaysStandalone]],o=oa(r,e);return oa(o,t)}function hF(i,e,t){let n=eo(i),r=[n[ri.MonthsFormat],n[ri.MonthsStandalone]],o=oa(r,e);return oa(o,t)}function pF(i,e){let n=eo(i)[ri.Eras];return oa(n,e)}function Pm(i,e){let t=eo(i);return oa(t[ri.DateFormat],e)}function Im(i,e){let t=eo(i);return oa(t[ri.TimeFormat],e)}function km(i,e){let n=eo(i)[ri.DateTimeFormat];return oa(n,e)}function ws(i,e){let t=eo(i),n=t[ri.NumberSymbols][e];if(typeof n>"u"){if(e===no.CurrencyDecimal)return t[ri.NumberSymbols][no.Decimal];if(e===no.CurrencyGroup)return t[ri.NumberSymbols][no.Group]}return n}function mF(i,e){return eo(i)[ri.NumberFormats][e]}function gF(i){if(!i[ri.ExtraData])throw new nt(2303,!1)}function bF(i){let e=eo(i);return gF(e),(e[ri.ExtraData][2]||[]).map(n=>typeof n=="string"?NT(n):[NT(n[0]),NT(n[1])])}function vF(i,e,t){let n=eo(i);gF(n);let r=[n[ri.ExtraData][0],n[ri.ExtraData][1]],o=oa(r,e)||[];return oa(o,t)||[]}function oa(i,e){for(let t=e;t>-1;t--)if(typeof i[t]<"u")return i[t];throw new nt(2304,!1)}function NT(i){let[e,t]=i.split(":");return{hours:+e,minutes:+t}}var $9=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,jv={},X9=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;function yF(i,e,t,n){let r=i7(i);e=ul(t,e)||e;let a=[],s;for(;e;)if(s=X9.exec(e),s){a=a.concat(s.slice(1));let d=a.pop();if(!d)break;e=d}else{a.push(e);break}let l=r.getTimezoneOffset();n&&(l=xF(n,l),r=n7(r,n));let c="";return a.forEach(d=>{let u=e7(d);c+=u?u(r,t,l):d==="''"?"'":d.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),c}function qv(i,e,t){let n=new Date(0);return n.setFullYear(i,e,t),n.setHours(0,0,0),n}function ul(i,e){let t=dF(i);if(jv[t]??={},jv[t][e])return jv[t][e];let n="";switch(e){case"shortDate":n=Pm(i,to.Short);break;case"mediumDate":n=Pm(i,to.Medium);break;case"longDate":n=Pm(i,to.Long);break;case"fullDate":n=Pm(i,to.Full);break;case"shortTime":n=Im(i,to.Short);break;case"mediumTime":n=Im(i,to.Medium);break;case"longTime":n=Im(i,to.Long);break;case"fullTime":n=Im(i,to.Full);break;case"short":let r=ul(i,"shortTime"),o=ul(i,"shortDate");n=Wv(km(i,to.Short),[r,o]);break;case"medium":let a=ul(i,"mediumTime"),s=ul(i,"mediumDate");n=Wv(km(i,to.Medium),[a,s]);break;case"long":let l=ul(i,"longTime"),c=ul(i,"longDate");n=Wv(km(i,to.Long),[l,c]);break;case"full":let d=ul(i,"fullTime"),u=ul(i,"fullDate");n=Wv(km(i,to.Full),[d,u]);break}return n&&(jv[t][e]=n),n}function Wv(i,e){return e&&(i=i.replace(/\{([^}]+)}/g,function(t,n){return e!=null&&n in e?e[n]:t})),i}function Ba(i,e,t="-",n,r){let o="";(i<0||r&&i<=0)&&(r?i=-i+1:(i=-i,o=t));let a=String(i);for(;a.length<e;)a="0"+a;return n&&(a=a.slice(a.length-e)),o+a}function q9(i,e){return Ba(i,3).substring(0,e)}function Oi(i,e,t=0,n=!1,r=!1){return function(o,a){let s=K9(i,o);if((t>0||s>-t)&&(s+=t),i===3)s===0&&t===-12&&(s=12);else if(i===6)return q9(s,e);let l=ws(a,no.MinusSign);return Ba(s,e,l,n,r)}}function K9(i,e){switch(i){case 0:return e.getFullYear();case 1:return e.getMonth();case 2:return e.getDate();case 3:return e.getHours();case 4:return e.getMinutes();case 5:return e.getSeconds();case 6:return e.getMilliseconds();case 7:return e.getDay();default:throw new nt(2301,!1)}}function Vn(i,e,t=mr.Format,n=!1){return function(r,o){return Z9(r,o,i,e,t,n)}}function Z9(i,e,t,n,r,o){switch(t){case 2:return hF(e,r,n)[i.getMonth()];case 1:return fF(e,r,n)[i.getDay()];case 0:let a=i.getHours(),s=i.getMinutes();if(o){let c=bF(e),d=vF(e,r,n),u=c.findIndex(f=>{if(Array.isArray(f)){let[h,p]=f,m=a>=h.hours&&s>=h.minutes,g=a<p.hours||a===p.hours&&s<p.minutes;if(h.hours<p.hours){if(m&&g)return!0}else if(m||g)return!0}else if(f.hours===a&&f.minutes===s)return!0;return!1});if(u!==-1)return d[u]}return uF(e,r,n)[a<12?0:1];case 3:return pF(e,n)[i.getFullYear()<=0?0:1];default:let l=t;throw new nt(2302,!1)}}function Yv(i){return function(e,t,n){let r=-1*n,o=ws(t,no.MinusSign),a=r>0?Math.floor(r/60):Math.ceil(r/60);switch(i){case 0:return(r>=0?"+":"")+Ba(a,2,o)+Ba(Math.abs(r%60),2,o);case 1:return"GMT"+(r>=0?"+":"")+Ba(a,1,o);case 2:return"GMT"+(r>=0?"+":"")+Ba(a,2,o)+":"+Ba(Math.abs(r%60),2,o);case 3:return n===0?"Z":(r>=0?"+":"")+Ba(a,2,o)+":"+Ba(Math.abs(r%60),2,o);default:throw new nt(2310,!1)}}}var J9=0,Xv=4;function Q9(i){let e=qv(i,J9,1).getDay();return qv(i,0,1+(e<=Xv?Xv:Xv+7)-e)}function _F(i){let e=i.getDay(),t=e===0?-3:Xv-e;return qv(i.getFullYear(),i.getMonth(),i.getDate()+t)}function FT(i,e=!1){return function(t,n){let r;if(e){let o=new Date(t.getFullYear(),t.getMonth(),1).getDay()-1,a=t.getDate();r=1+Math.floor((a+o)/7)}else{let o=_F(t),a=Q9(o.getFullYear()),s=o.getTime()-a.getTime();r=1+Math.round(s/6048e5)}return Ba(r,i,ws(n,no.MinusSign))}}function $v(i,e=!1){return function(t,n){let o=_F(t).getFullYear();return Ba(o,i,ws(n,no.MinusSign),e)}}var LT={};function e7(i){if(LT[i])return LT[i];let e;switch(i){case"G":case"GG":case"GGG":e=Vn(3,En.Abbreviated);break;case"GGGG":e=Vn(3,En.Wide);break;case"GGGGG":e=Vn(3,En.Narrow);break;case"y":e=Oi(0,1,0,!1,!0);break;case"yy":e=Oi(0,2,0,!0,!0);break;case"yyy":e=Oi(0,3,0,!1,!0);break;case"yyyy":e=Oi(0,4,0,!1,!0);break;case"Y":e=$v(1);break;case"YY":e=$v(2,!0);break;case"YYY":e=$v(3);break;case"YYYY":e=$v(4);break;case"M":case"L":e=Oi(1,1,1);break;case"MM":case"LL":e=Oi(1,2,1);break;case"MMM":e=Vn(2,En.Abbreviated);break;case"MMMM":e=Vn(2,En.Wide);break;case"MMMMM":e=Vn(2,En.Narrow);break;case"LLL":e=Vn(2,En.Abbreviated,mr.Standalone);break;case"LLLL":e=Vn(2,En.Wide,mr.Standalone);break;case"LLLLL":e=Vn(2,En.Narrow,mr.Standalone);break;case"w":e=FT(1);break;case"ww":e=FT(2);break;case"W":e=FT(1,!0);break;case"d":e=Oi(2,1);break;case"dd":e=Oi(2,2);break;case"c":case"cc":e=Oi(7,1);break;case"ccc":e=Vn(1,En.Abbreviated,mr.Standalone);break;case"cccc":e=Vn(1,En.Wide,mr.Standalone);break;case"ccccc":e=Vn(1,En.Narrow,mr.Standalone);break;case"cccccc":e=Vn(1,En.Short,mr.Standalone);break;case"E":case"EE":case"EEE":e=Vn(1,En.Abbreviated);break;case"EEEE":e=Vn(1,En.Wide);break;case"EEEEE":e=Vn(1,En.Narrow);break;case"EEEEEE":e=Vn(1,En.Short);break;case"a":case"aa":case"aaa":e=Vn(0,En.Abbreviated);break;case"aaaa":e=Vn(0,En.Wide);break;case"aaaaa":e=Vn(0,En.Narrow);break;case"b":case"bb":case"bbb":e=Vn(0,En.Abbreviated,mr.Standalone,!0);break;case"bbbb":e=Vn(0,En.Wide,mr.Standalone,!0);break;case"bbbbb":e=Vn(0,En.Narrow,mr.Standalone,!0);break;case"B":case"BB":case"BBB":e=Vn(0,En.Abbreviated,mr.Format,!0);break;case"BBBB":e=Vn(0,En.Wide,mr.Format,!0);break;case"BBBBB":e=Vn(0,En.Narrow,mr.Format,!0);break;case"h":e=Oi(3,1,-12);break;case"hh":e=Oi(3,2,-12);break;case"H":e=Oi(3,1);break;case"HH":e=Oi(3,2);break;case"m":e=Oi(4,1);break;case"mm":e=Oi(4,2);break;case"s":e=Oi(5,1);break;case"ss":e=Oi(5,2);break;case"S":e=Oi(6,1);break;case"SS":e=Oi(6,2);break;case"SSS":e=Oi(6,3);break;case"Z":case"ZZ":case"ZZZ":e=Yv(0);break;case"ZZZZZ":e=Yv(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=Yv(1);break;case"OOOO":case"ZZZZ":case"zzzz":e=Yv(2);break;default:return null}return LT[i]=e,e}function xF(i,e){i=i.replace(/:/g,"");let t=Date.parse("Jan 01, 1970 00:00:00 "+i)/6e4;return isNaN(t)?e:t}function t7(i,e){return i=new Date(i.getTime()),i.setMinutes(i.getMinutes()+e),i}function n7(i,e,t){let r=i.getTimezoneOffset(),o=xF(e,r);return t7(i,-1*(o-r))}function i7(i){if(sF(i))return i;if(typeof i=="number"&&!isNaN(i))return new Date(i);if(typeof i=="string"){if(i=i.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(i)){let[r,o=1,a=1]=i.split("-").map(s=>+s);return qv(r,o-1,a)}let t=parseFloat(i);if(!isNaN(i-t))return new Date(t);let n;if(n=i.match($9))return r7(n)}let e=new Date(i);if(!sF(e))throw new nt(2311,!1);return e}function r7(i){let e=new Date(0),t=0,n=0,r=i[8]?e.setUTCFullYear:e.setFullYear,o=i[8]?e.setUTCHours:e.setHours;i[9]&&(t=Number(i[9]+i[10]),n=Number(i[9]+i[11])),r.call(e,Number(i[1]),Number(i[2])-1,Number(i[3]));let a=Number(i[4]||0)-t,s=Number(i[5]||0)-n,l=Number(i[6]||0),c=Math.floor(parseFloat("0."+(i[7]||0))*1e3);return o.call(e,a,s,l,c),e}function sF(i){return i instanceof Date&&!isNaN(i.valueOf())}var o7=/^(\d+)?\.((\d+)(-(\d+))?)?$/,lF=22,Kv=".",Rm="0",a7=";",s7=",",BT="#";function l7(i,e,t,n,r,o,a=!1){let s="",l=!1;if(!isFinite(i))s=ws(t,no.Infinity);else{let c=u7(i);a&&(c=d7(c));let d=e.minInt,u=e.minFrac,f=e.maxFrac;if(o){let _=o.match(o7);if(_===null)throw new nt(2306,!1);let w=_[1],T=_[3],E=_[5];w!=null&&(d=zT(w)),T!=null&&(u=zT(T)),E!=null?f=zT(E):T!=null&&u>f&&(f=u)}f7(c,u,f);let h=c.digits,p=c.integerLen,m=c.exponent,g=[];for(l=h.every(_=>!_);p<d;p++)h.unshift(0);for(;p<0;p++)h.unshift(0);p>0?g=h.splice(p,h.length):(g=h,h=[0]);let b=[];for(h.length>=e.lgSize&&b.unshift(h.splice(-e.lgSize,h.length).join(""));h.length>e.gSize;)b.unshift(h.splice(-e.gSize,h.length).join(""));h.length&&b.unshift(h.join("")),s=b.join(ws(t,n)),g.length&&(s+=ws(t,r)+g.join("")),m&&(s+=ws(t,no.Exponential)+"+"+m)}return i<0&&!l?s=e.negPre+s+e.negSuf:s=e.posPre+s+e.posSuf,s}function CF(i,e,t){let n=mF(e,VT.Decimal),r=c7(n,ws(e,no.MinusSign));return l7(i,r,e,no.Group,no.Decimal,t)}function c7(i,e="-"){let t={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(a7),r=n[0],o=n[1],a=r.indexOf(Kv)!==-1?r.split(Kv):[r.substring(0,r.lastIndexOf(Rm)+1),r.substring(r.lastIndexOf(Rm)+1)],s=a[0],l=a[1]||"";t.posPre=s.substring(0,s.indexOf(BT));for(let d=0;d<l.length;d++){let u=l.charAt(d);u===Rm?t.minFrac=t.maxFrac=d+1:u===BT?t.maxFrac=d+1:t.posSuf+=u}let c=s.split(s7);if(t.gSize=c[1]?c[1].length:0,t.lgSize=c[2]||c[1]?(c[2]||c[1]).length:0,o){let d=r.length-t.posPre.length-t.posSuf.length,u=o.indexOf(BT);t.negPre=o.substring(0,u).replace(/'/g,""),t.negSuf=o.slice(u+d).replace(/'/g,"")}else t.negPre=e+t.posPre,t.negSuf=t.posSuf;return t}function d7(i){if(i.digits[0]===0)return i;let e=i.digits.length-i.integerLen;return i.exponent?i.exponent+=2:(e===0?i.digits.push(0,0):e===1&&i.digits.push(0),i.integerLen+=2),i}function u7(i){let e=Math.abs(i)+"",t=0,n,r,o,a,s;for((r=e.indexOf(Kv))>-1&&(e=e.replace(Kv,"")),(o=e.search(/e/i))>0?(r<0&&(r=o),r+=+e.slice(o+1),e=e.substring(0,o)):r<0&&(r=e.length),o=0;e.charAt(o)===Rm;o++);if(o===(s=e.length))n=[0],r=1;else{for(s--;e.charAt(s)===Rm;)s--;for(r-=o,n=[],a=0;o<=s;o++,a++)n[a]=Number(e.charAt(o))}return r>lF&&(n=n.splice(0,lF-1),t=r-1,r=1),{digits:n,exponent:t,integerLen:r}}function f7(i,e,t){if(e>t)throw new nt(2307,!1);let n=i.digits,r=n.length-i.integerLen,o=Math.min(Math.max(e,r),t),a=o+i.integerLen,s=n[a];if(a>0){n.splice(Math.max(i.integerLen,a));for(let u=a;u<n.length;u++)n[u]=0}else{r=Math.max(0,r),i.integerLen=1,n.length=Math.max(1,a=o+1),n[0]=0;for(let u=1;u<a;u++)n[u]=0}if(s>=5)if(a-1<0){for(let u=0;u>a;u--)n.unshift(0),i.integerLen++;n.unshift(1),i.integerLen++}else n[a-1]++;for(;r<Math.max(0,o);r++)n.push(0);let l=o!==0,c=e+i.integerLen,d=n.reduceRight(function(u,f,h,p){return f=f+u,p[h]=f<10?f:f-10,l&&(p[h]===0&&h>=c?p.pop():l=!1),f>=10?1:0},0);d&&(n.unshift(d),i.integerLen++)}function zT(i){let e=parseInt(i);if(isNaN(e))throw new nt(2305,!1);return e}var UT=/\s+/,cF=[],HT=(()=>{class i{_ngEl;_renderer;initialClasses=cF;rawClass;stateMap=new Map;constructor(t,n){this._ngEl=t,this._renderer=n}set klass(t){this.initialClasses=t!=null?t.trim().split(UT):cF}set ngClass(t){this.rawClass=typeof t=="string"?t.trim().split(UT):t}ngDoCheck(){for(let n of this.initialClasses)this._updateState(n,!0);let t=this.rawClass;if(Array.isArray(t)||t instanceof Set)for(let n of t)this._updateState(n,!0);else if(t!=null)for(let n of Object.keys(t))this._updateState(n,!!t[n]);this._applyStateDiff()}_updateState(t,n){let r=this.stateMap.get(t);r!==void 0?(r.enabled!==n&&(r.changed=!0,r.enabled=n),r.touched=!0):this.stateMap.set(t,{enabled:n,changed:!0,touched:!0})}_applyStateDiff(){for(let t of this.stateMap){let n=t[0],r=t[1];r.changed?(this._toggleClass(n,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(n,!1),this.stateMap.delete(n)),r.touched=!1}}_toggleClass(t,n){t=t.trim(),t.length>0&&t.split(UT).forEach(r=>{n?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}static \u0275fac=function(n){return new(n||i)(Xt(fr),Xt(Cs))};static \u0275dir=qn({type:i,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return i})();var Kd=(()=>{class i{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=U(ir);constructor(t){this._viewContainerRef=t}ngOnChanges(t){if(this._shouldRecreateView(t)){let n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let r=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector==="outlet"?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,n,r)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,n,r):!1,get:(t,n,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,r)}})}static \u0275fac=function(n){return new(n||i)(Xt($f))};static \u0275dir=qn({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[Vf]})}return i})();function GT(i,e){return new nt(2100,!1)}var h7="mediumDate",SF=new lt(""),wF=new lt(""),jT=(()=>{class i{locale;defaultTimezone;defaultOptions;constructor(t,n,r){this.locale=t,this.defaultTimezone=n,this.defaultOptions=r}transform(t,n,r,o){if(t==null||t===""||t!==t)return null;try{let a=n??this.defaultOptions?.dateFormat??h7,s=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return yF(t,a,o||this.locale,s)}catch(a){throw GT(i,a.message)}}static \u0275fac=function(n){return new(n||i)(Xt(Qf,16),Xt(SF,24),Xt(wF,24))};static \u0275pipe=wm({name:"date",type:i,pure:!0})}return i})();var fl=(()=>{class i{_locale;constructor(t){this._locale=t}transform(t,n,r){if(!p7(t))return null;r||=this._locale;try{let o=m7(t);return CF(o,r,n)}catch(o){throw GT(i,o.message)}}static \u0275fac=function(n){return new(n||i)(Xt(Qf,16))};static \u0275pipe=wm({name:"number",type:i,pure:!0})}return i})();function p7(i){return!(i==null||i===""||i!==i)}function m7(i){if(typeof i=="string"&&!isNaN(Number(i)-parseFloat(i)))return Number(i);if(typeof i!="number")throw new nt(2309,!1);return i}var WT=(()=>{class i{transform(t,n,r){if(t==null)return null;if(!(typeof t=="string"||Array.isArray(t)))throw GT(i,t);return t.slice(n,r)}static \u0275fac=function(n){return new(n||i)};static \u0275pipe=wm({name:"slice",type:i,pure:!1})}return i})();var at=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=ll({type:i});static \u0275inj=ps({})}return i})();function Nm(i,e){e=encodeURIComponent(e);for(let t of i.split(";")){let n=t.indexOf("="),[r,o]=n==-1?[t,""]:[t.slice(0,n),t.slice(n+1)];if(r.trim()===e)return decodeURIComponent(o)}return null}var Zd=class{};var EF="browser";var Fm=class{_doc;constructor(e){this._doc=e}manager},Zv=(()=>{class i extends Fm{constructor(t){super(t)}supports(t){return!0}addEventListener(t,n,r,o){return t.addEventListener(n,r,o),()=>this.removeEventListener(t,n,r,o)}removeEventListener(t,n,r,o){return t.removeEventListener(n,r,o)}static \u0275fac=function(n){return new(n||i)(rt(Un))};static \u0275prov=pe({token:i,factory:i.\u0275fac})}return i})(),ey=new lt(""),qT=(()=>{class i{_zone;_plugins;_eventNameToPlugin=new Map;constructor(t,n){this._zone=n,t.forEach(a=>{a.manager=this});let r=t.filter(a=>!(a instanceof Zv));this._plugins=r.slice().reverse();let o=t.find(a=>a instanceof Zv);o&&this._plugins.push(o)}addEventListener(t,n,r,o){return this._findPluginFor(n).addEventListener(t,n,r,o)}getZone(){return this._zone}_findPluginFor(t){let n=this._eventNameToPlugin.get(t);if(n)return n;if(n=this._plugins.find(o=>o.supports(t)),!n)throw new nt(5101,!1);return this._eventNameToPlugin.set(t,n),n}static \u0275fac=function(n){return new(n||i)(rt(ey),rt(Zr))};static \u0275prov=pe({token:i,factory:i.\u0275fac})}return i})(),YT="ng-app-id";function TF(i){for(let e of i)e.remove()}function MF(i,e){let t=e.createElement("style");return t.textContent=i,t}function b7(i,e,t,n){let r=i.head?.querySelectorAll(`style[${YT}="${e}"],link[${YT}="${e}"]`);if(r)for(let o of r)o.removeAttribute(YT),o instanceof HTMLLinkElement?n.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&t.set(o.textContent,{usage:0,elements:[o]})}function XT(i,e){let t=e.createElement("link");return t.setAttribute("rel","stylesheet"),t.setAttribute("href",i),t}var KT=(()=>{class i{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(t,n,r,o={}){this.doc=t,this.appId=n,this.nonce=r,b7(t,n,this.inline,this.external),this.hosts.add(t.head)}addStyles(t,n){for(let r of t)this.addUsage(r,this.inline,MF);n?.forEach(r=>this.addUsage(r,this.external,XT))}removeStyles(t,n){for(let r of t)this.removeUsage(r,this.inline);n?.forEach(r=>this.removeUsage(r,this.external))}addUsage(t,n,r){let o=n.get(t);o?o.usage++:n.set(t,{usage:1,elements:[...this.hosts].map(a=>this.addElement(a,r(t,this.doc)))})}removeUsage(t,n){let r=n.get(t);r&&(r.usage--,r.usage<=0&&(TF(r.elements),n.delete(t)))}ngOnDestroy(){for(let[,{elements:t}]of[...this.inline,...this.external])TF(t);this.hosts.clear()}addHost(t){this.hosts.add(t);for(let[n,{elements:r}]of this.inline)r.push(this.addElement(t,MF(n,this.doc)));for(let[n,{elements:r}]of this.external)r.push(this.addElement(t,XT(n,this.doc)))}removeHost(t){this.hosts.delete(t)}addElement(t,n){return this.nonce&&n.setAttribute("nonce",this.nonce),t.appendChild(n)}static \u0275fac=function(n){return new(n||i)(rt(Un),rt(_s),rt(ev,8),rt(bm))};static \u0275prov=pe({token:i,factory:i.\u0275fac})}return i})(),$T={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},ZT=/%COMP%/g;var AF="%COMP%",v7=`_nghost-${AF}`,y7=`_ngcontent-${AF}`,_7=!0,x7=new lt("",{factory:()=>_7});function C7(i){return y7.replace(ZT,i)}function S7(i){return v7.replace(ZT,i)}function OF(i,e){return e.map(t=>t.replace(ZT,i))}var JT=(()=>{class i{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(t,n,r,o,a,s,l=null,c=null){this.eventManager=t,this.sharedStylesHost=n,this.appId=r,this.removeStylesOnCompDestroy=o,this.doc=a,this.ngZone=s,this.nonce=l,this.tracingService=c,this.defaultRenderer=new Lm(t,a,s,this.tracingService)}createRenderer(t,n){if(!t||!n)return this.defaultRenderer;let r=this.getOrCreateRenderer(t,n);return r instanceof Qv?r.applyToHost(t):r instanceof Bm&&r.applyStyles(),r}getOrCreateRenderer(t,n){let r=this.rendererByCompId,o=r.get(n.id);if(!o){let a=this.doc,s=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,u=this.tracingService;switch(n.encapsulation){case ka.Emulated:o=new Qv(l,c,n,this.appId,d,a,s,u);break;case ka.ShadowDom:return new Jv(l,t,n,a,s,this.nonce,u,c);case ka.ExperimentalIsolatedShadowDom:return new Jv(l,t,n,a,s,this.nonce,u);default:o=new Bm(l,c,n,d,a,s,u);break}r.set(n.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(t){this.rendererByCompId.delete(t)}static \u0275fac=function(n){return new(n||i)(rt(qT),rt(KT),rt(_s),rt(x7),rt(Un),rt(Zr),rt(ev),rt(xs,8))};static \u0275prov=pe({token:i,factory:i.\u0275fac})}return i})(),Lm=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r){this.eventManager=e,this.doc=t,this.ngZone=n,this.tracingService=r}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS($T[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(DF(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){e&&(DF(e)?e.content:e).insertBefore(t,n)}removeChild(e,t){t.remove()}selectRootElement(e,t){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new nt(-5104,!1);return t||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+":"+t;let o=$T[r];o?e.setAttributeNS(o,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=$T[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){r&(ys.DashCase|ys.Important)?e.style.setProperty(t,n,r&ys.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&ys.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n,r){if(typeof e=="string"&&(e=ra().getGlobalEventTarget(this.doc,e),!e))throw new nt(5102,!1);let o=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(e,t,o)),this.eventManager.addEventListener(e,t,o,r)}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;e(t)===!1&&t.preventDefault()}}};function DF(i){return i.tagName==="TEMPLATE"&&i.content!==void 0}var Jv=class extends Lm{hostEl;sharedStylesHost;shadowRoot;constructor(e,t,n,r,o,a,s,l){super(e,r,o,s),this.hostEl=t,this.sharedStylesHost=l,this.shadowRoot=t.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let c=n.styles;c=OF(n.id,c);for(let u of c){let f=document.createElement("style");a&&f.setAttribute("nonce",a),f.textContent=u,this.shadowRoot.appendChild(f)}let d=n.getExternalStyles?.();if(d)for(let u of d){let f=XT(u,r);a&&f.setAttribute("nonce",a),this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},Bm=class extends Lm{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,o,a,s,l){super(e,o,a,s),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let c=n.styles;this.styles=l?OF(l,c):c,this.styleUrls=n.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Gd.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Qv=class extends Bm{contentAttr;hostAttr;constructor(e,t,n,r,o,a,s,l){let c=r+"-"+n.id;super(e,t,n,o,a,s,l,c),this.contentAttr=C7(c),this.hostAttr=S7(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,""),n}};var ty=class i extends Om{supportsDOMEvents=!0;static makeCurrent(){RT(new i)}onAndCancel(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.remove()}createElement(e,t){return t=t||this.getDefaultDocument(),t.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return t==="window"?window:t==="document"?e:t==="body"?e.body:null}getBaseHref(e){let t=w7();return t==null?null:E7(t)}resetBaseElement(){zm=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return Nm(document.cookie,e)}},zm=null;function w7(){return zm=zm||document.head.querySelector("base"),zm?zm.getAttribute("href"):null}function E7(i){return new URL(i,document.baseURI).pathname}var T7=(()=>{class i{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pe({token:i,factory:i.\u0275fac})}return i})(),PF=["alt","control","meta","shift"],M7={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},D7={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey},IF=(()=>{class i extends Fm{constructor(t){super(t)}supports(t){return i.parseEventName(t)!=null}addEventListener(t,n,r,o){let a=i.parseEventName(n),s=i.eventCallback(a.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ra().onAndCancel(t,a.domEventName,s,o))}static parseEventName(t){let n=t.toLowerCase().split("."),r=n.shift();if(n.length===0||!(r==="keydown"||r==="keyup"))return null;let o=i._normalizeKey(n.pop()),a="",s=n.indexOf("code");if(s>-1&&(n.splice(s,1),a="code."),PF.forEach(c=>{let d=n.indexOf(c);d>-1&&(n.splice(d,1),a+=c+".")}),a+=o,n.length!=0||o.length===0)return null;let l={};return l.domEventName=r,l.fullKey=a,l}static matchEventFullKeyCode(t,n){let r=M7[t.key]||t.key,o="";return n.indexOf("code.")>-1&&(r=t.code,o="code."),r==null||!r?!1:(r=r.toLowerCase(),r===" "?r="space":r==="."&&(r="dot"),PF.forEach(a=>{if(a!==r){let s=D7[a];s(t)&&(o+=a+".")}}),o+=r,o===n)}static eventCallback(t,n,r){return o=>{i.matchEventFullKeyCode(o,t)&&r.runGuarded(()=>n(o))}}static _normalizeKey(t){return t==="esc"?"escape":t}static \u0275fac=function(n){return new(n||i)(rt(Un))};static \u0275prov=pe({token:i,factory:i.\u0275fac})}return i})();async function Um(i,e){return rF(A7(i,e))}function A7(i,e){return{platformRef:e?.platformRef,appProviders:[...R7,...i?.providers??[]],platformProviders:k7}}function O7(){ty.makeCurrent()}function P7(){return new Xo}function I7(){return TE(document),document}var k7=[{provide:bm,useValue:EF},{provide:Qb,useValue:O7,multi:!0},{provide:Un,useFactory:I7}];var R7=[{provide:Zp,useValue:"root"},{provide:Xo,useFactory:P7},{provide:ey,useClass:Zv,multi:!0},{provide:ey,useClass:IF,multi:!0},JT,KT,qT,{provide:Wd,useExisting:JT},{provide:Zd,useClass:T7},[]];var sa=class i{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(e){e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(`
|
|
5
|
-
`).forEach(t=>{let n=t.indexOf(":");if(n>0){let r=t.slice(0,n),o=t.slice(n+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,n)=>{this.addHeaderEntry(n,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,n])=>{this.setHeaderEntries(t,n)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof i?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){let t=new i;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof i?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let n=e.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(e.name,t);let r=(e.op==="a"?this.headers.get(t):void 0)||[];r.push(...n),this.headers.set(t,r);break;case"d":let o=e.value;if(!o)this.headers.delete(t),this.normalizedNames.delete(t);else{let a=this.headers.get(t);if(!a)return;a=a.filter(s=>o.indexOf(s)===-1),a.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,a)}break}}addHeaderEntry(e,t){let n=e.toLowerCase();this.maybeSetNormalizedName(e,n),this.headers.has(n)?this.headers.get(n).push(t):this.headers.set(n,[t])}setHeaderEntries(e,t){let n=(Array.isArray(t)?t:[t]).map(o=>o.toString()),r=e.toLowerCase();this.headers.set(r,n),this.maybeSetNormalizedName(e,r)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var iy=class{map=new Map;set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}},ry=class{encodeKey(e){return kF(e)}encodeValue(e){return kF(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function N7(i,e){let t=new Map;return i.length>0&&i.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[a,s]=o==-1?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,o)),e.decodeValue(r.slice(o+1))],l=t.get(a)||[];l.push(s),t.set(a,l)}),t}var F7=/%(\d[a-f0-9])/gi,L7={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function kF(i){return encodeURIComponent(i).replace(F7,(e,t)=>L7[t]??e)}function ny(i){return`${i}`}var aa=class i{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new ry,e.fromString){if(e.fromObject)throw new nt(2805,!1);this.map=N7(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let n=e.fromObject[t],r=Array.isArray(n)?n.map(ny):[ny(n)];this.map.set(t,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(n=>{let r=e[n];Array.isArray(r)?r.forEach(o=>{t.push({param:n,value:o,op:"a"})}):t.push({param:n,value:r,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(n=>t+"="+this.encoder.encodeValue(n)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new i({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=(e.op==="a"?this.map.get(e.param):void 0)||[];t.push(ny(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let n=this.map.get(e.param)||[],r=n.indexOf(ny(e.value));r!==-1&&n.splice(r,1),n.length>0?this.map.set(e.param,n):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};function B7(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function RF(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function NF(i){return typeof Blob<"u"&&i instanceof Blob}function FF(i){return typeof FormData<"u"&&i instanceof FormData}function z7(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var LF="Content-Type",BF="Accept",zF="text/plain",UF="application/json",U7=`${UF}, ${zF}, */*`,eh=class i{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(e,t,n,r){this.url=t,this.method=e.toUpperCase();let o;if(B7(this.method)||r?(this.body=n!==void 0?n:null,o=r):o=n,o){if(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,this.keepalive=!!o.keepalive,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),o.priority&&(this.priority=o.priority),o.cache&&(this.cache=o.cache),o.credentials&&(this.credentials=o.credentials),typeof o.timeout=="number"){if(o.timeout<1||!Number.isInteger(o.timeout))throw new nt(2822,"");this.timeout=o.timeout}o.mode&&(this.mode=o.mode),o.redirect&&(this.redirect=o.redirect),o.integrity&&(this.integrity=o.integrity),o.referrer&&(this.referrer=o.referrer),o.referrerPolicy&&(this.referrerPolicy=o.referrerPolicy),this.transferCache=o.transferCache}if(this.headers??=new sa,this.context??=new iy,!this.params)this.params=new aa,this.urlWithParams=t;else{let a=this.params.toString();if(a.length===0)this.urlWithParams=t;else{let s=t.indexOf("?"),l=s===-1?"?":s<t.length-1?"&":"";this.urlWithParams=t+l+a}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||RF(this.body)||NF(this.body)||FF(this.body)||z7(this.body)?this.body:this.body instanceof aa?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||FF(this.body)?null:NF(this.body)?this.body.type||null:RF(this.body)?null:typeof this.body=="string"?zF:this.body instanceof aa?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?UF:null}clone(e={}){let t=e.method||this.method,n=e.url||this.url,r=e.responseType||this.responseType,o=e.keepalive??this.keepalive,a=e.priority||this.priority,s=e.cache||this.cache,l=e.mode||this.mode,c=e.redirect||this.redirect,d=e.credentials||this.credentials,u=e.referrer||this.referrer,f=e.integrity||this.integrity,h=e.referrerPolicy||this.referrerPolicy,p=e.transferCache??this.transferCache,m=e.timeout??this.timeout,g=e.body!==void 0?e.body:this.body,b=e.withCredentials??this.withCredentials,_=e.reportProgress??this.reportProgress,w=e.headers||this.headers,T=e.params||this.params,E=e.context??this.context;return e.setHeaders!==void 0&&(w=Object.keys(e.setHeaders).reduce((k,O)=>k.set(O,e.setHeaders[O]),w)),e.setParams&&(T=Object.keys(e.setParams).reduce((k,O)=>k.set(O,e.setParams[O]),T)),new i(t,n,g,{params:T,headers:w,context:E,reportProgress:_,responseType:r,withCredentials:b,transferCache:p,keepalive:o,cache:s,priority:a,timeout:m,mode:l,redirect:c,credentials:d,referrer:u,integrity:f,referrerPolicy:h})}},Qd=(function(i){return i[i.Sent=0]="Sent",i[i.UploadProgress=1]="UploadProgress",i[i.ResponseHeader=2]="ResponseHeader",i[i.DownloadProgress=3]="DownloadProgress",i[i.Response=4]="Response",i[i.User=5]="User",i})(Qd||{}),th=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(e,t=200,n="OK"){this.headers=e.headers||new sa,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||n,this.url=e.url||null,this.redirected=e.redirected,this.responseType=e.responseType,this.ok=this.status>=200&&this.status<300}},oy=class i extends th{constructor(e={}){super(e)}type=Qd.ResponseHeader;clone(e={}){return new i({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},nh=class i extends th{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=Qd.Response;clone(e={}){return new i({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0,redirected:e.redirected??this.redirected,responseType:e.responseType??this.responseType})}},sc=class extends th{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},V7=200,H7=204;var G7=new lt("");var j7=/^\)\]\}',?\n/;var eM=(()=>{class i{xhrFactory;tracingService=U(xs,{optional:!0});constructor(t){this.xhrFactory=t}maybePropagateTrace(t){return this.tracingService?.propagate?this.tracingService.propagate(t):t}handle(t){if(t.method==="JSONP")throw new nt(-2800,!1);let n=this.xhrFactory;return $o(null).pipe(x1(()=>new Pn(o=>{let a=n.build();if(a.open(t.method,t.urlWithParams),t.withCredentials&&(a.withCredentials=!0),t.headers.forEach((g,b)=>a.setRequestHeader(g,b.join(","))),t.headers.has(BF)||a.setRequestHeader(BF,U7),!t.headers.has(LF)){let g=t.detectContentTypeHeader();g!==null&&a.setRequestHeader(LF,g)}if(t.timeout&&(a.timeout=t.timeout),t.responseType){let g=t.responseType.toLowerCase();a.responseType=g!=="json"?g:"text"}let s=t.serializeBody(),l=null,c=()=>{if(l!==null)return l;let g=a.statusText||"OK",b=new sa(a.getAllResponseHeaders()),_=a.responseURL||t.url;return l=new oy({headers:b,status:a.status,statusText:g,url:_}),l},d=this.maybePropagateTrace(()=>{let{headers:g,status:b,statusText:_,url:w}=c(),T=null;b!==H7&&(T=typeof a.response>"u"?a.responseText:a.response),b===0&&(b=T?V7:0);let E=b>=200&&b<300;if(t.responseType==="json"&&typeof T=="string"){let k=T;T=T.replace(j7,"");try{T=T!==""?JSON.parse(T):null}catch(O){T=k,E&&(E=!1,T={error:O,text:T})}}E?(o.next(new nh({body:T,headers:g,status:b,statusText:_,url:w||void 0})),o.complete()):o.error(new sc({error:T,headers:g,status:b,statusText:_,url:w||void 0}))}),u=this.maybePropagateTrace(g=>{let{url:b}=c(),_=new sc({error:g,status:a.status||0,statusText:a.statusText||"Unknown Error",url:b||void 0});o.error(_)}),f=u;t.timeout&&(f=this.maybePropagateTrace(g=>{let{url:b}=c(),_=new sc({error:new DOMException("Request timed out","TimeoutError"),status:a.status||0,statusText:a.statusText||"Request timeout",url:b||void 0});o.error(_)}));let h=!1,p=this.maybePropagateTrace(g=>{h||(o.next(c()),h=!0);let b={type:Qd.DownloadProgress,loaded:g.loaded};g.lengthComputable&&(b.total=g.total),t.responseType==="text"&&a.responseText&&(b.partialText=a.responseText),o.next(b)}),m=this.maybePropagateTrace(g=>{let b={type:Qd.UploadProgress,loaded:g.loaded};g.lengthComputable&&(b.total=g.total),o.next(b)});return a.addEventListener("load",d),a.addEventListener("error",u),a.addEventListener("timeout",f),a.addEventListener("abort",u),t.reportProgress&&(a.addEventListener("progress",p),s!==null&&a.upload&&a.upload.addEventListener("progress",m)),a.send(s),o.next({type:Qd.Sent}),()=>{a.removeEventListener("error",u),a.removeEventListener("abort",u),a.removeEventListener("load",d),a.removeEventListener("timeout",f),t.reportProgress&&(a.removeEventListener("progress",p),s!==null&&a.upload&&a.upload.removeEventListener("progress",m)),a.readyState!==a.DONE&&a.abort()}})))}static \u0275fac=function(n){return new(n||i)(rt(Zd))};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function W7(i,e){return e(i)}function Y7(i,e,t){return(n,r)=>Cf(t,()=>e(n,o=>i(o,r)))}var tM=new lt("",{factory:()=>[]}),nM=new lt(""),VF=new lt("",{factory:()=>!0});var iM=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=pe({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=rt(eM),r},providedIn:"root"})}return i})();var ay=(()=>{class i{backend;injector;chain=null;pendingTasks=U(zd);contributeToStability=U(VF);constructor(t,n){this.backend=t,this.injector=n}handle(t){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(tM),...this.injector.get(nM,[])]));this.chain=n.reduceRight((r,o)=>Y7(r,o,this.injector),W7)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(Gp(n))}else return this.chain(t,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||i)(rt(iM),rt(ur))};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),rM=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=pe({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=rt(ay),r},providedIn:"root"})}return i})();function QT(i,e){return{body:e,headers:i.headers,context:i.context,observe:i.observe,params:i.params,reportProgress:i.reportProgress,responseType:i.responseType,withCredentials:i.withCredentials,credentials:i.credentials,transferCache:i.transferCache,timeout:i.timeout,keepalive:i.keepalive,priority:i.priority,cache:i.cache,mode:i.mode,redirect:i.redirect,integrity:i.integrity,referrer:i.referrer,referrerPolicy:i.referrerPolicy}}var ih=(()=>{class i{handler;constructor(t){this.handler=t}request(t,n,r={}){let o;if(t instanceof eh)o=t;else{let l;r.headers instanceof sa?l=r.headers:l=new sa(r.headers);let c;r.params&&(r.params instanceof aa?c=r.params:c=new aa({fromObject:r.params})),o=new eh(t,n,r.body!==void 0?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache,keepalive:r.keepalive,priority:r.priority,cache:r.cache,mode:r.mode,redirect:r.redirect,credentials:r.credentials,referrer:r.referrer,referrerPolicy:r.referrerPolicy,integrity:r.integrity,timeout:r.timeout})}let a=$o(o).pipe(_1(l=>this.handler.handle(l)));if(t instanceof eh||r.observe==="events")return a;let s=a.pipe(y1(l=>l instanceof nh));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return s.pipe(Yi(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new nt(2806,!1);return l.body}));case"blob":return s.pipe(Yi(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new nt(2807,!1);return l.body}));case"text":return s.pipe(Yi(l=>{if(l.body!==null&&typeof l.body!="string")throw new nt(2808,!1);return l.body}));default:return s.pipe(Yi(l=>l.body))}case"response":return s;default:throw new nt(2809,!1)}}delete(t,n={}){return this.request("DELETE",t,n)}get(t,n={}){return this.request("GET",t,n)}head(t,n={}){return this.request("HEAD",t,n)}jsonp(t,n){return this.request("JSONP",t,{params:new aa().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,n={}){return this.request("OPTIONS",t,n)}patch(t,n,r={}){return this.request("PATCH",t,QT(r,n))}post(t,n,r={}){return this.request("POST",t,QT(r,n))}put(t,n,r={}){return this.request("PUT",t,QT(r,n))}static \u0275fac=function(n){return new(n||i)(rt(rM))};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var $7=new lt("",{factory:()=>!0}),X7="XSRF-TOKEN",q7=new lt("",{factory:()=>X7}),K7="X-XSRF-TOKEN",Z7=new lt("",{factory:()=>K7}),J7=(()=>{class i{cookieName=U(q7);doc=U(Un);lastCookieString="";lastToken=null;parseCount=0;getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Nm(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),HF=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=pe({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=rt(J7),r},providedIn:"root"})}return i})();function Q7(i,e){if(!U($7)||i.method==="GET"||i.method==="HEAD")return e(i);try{let r=U(Gv).href,{origin:o}=new URL(r),{origin:a}=new URL(i.url,o);if(o!==a)return e(i)}catch{return e(i)}let t=U(HF).getToken(),n=U(Z7);return t!=null&&!i.headers.has(n)&&(i=i.clone({headers:i.headers.set(n,t)})),e(i)}var oM=(function(i){return i[i.Interceptors=0]="Interceptors",i[i.LegacyInterceptors=1]="LegacyInterceptors",i[i.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",i[i.NoXsrfProtection=3]="NoXsrfProtection",i[i.JsonpSupport=4]="JsonpSupport",i[i.RequestsMadeViaParent=5]="RequestsMadeViaParent",i[i.Fetch=6]="Fetch",i})(oM||{});function eY(i,e){return{\u0275kind:i,\u0275providers:e}}function aM(...i){let e=[ih,ay,{provide:rM,useExisting:ay},{provide:iM,useFactory:()=>U(G7,{optional:!0})??U(eM)},{provide:tM,useValue:Q7,multi:!0}];for(let t of i)e.push(...t.\u0275providers);return Qs(e)}function sM(i){return eY(oM.Interceptors,i.map(e=>({provide:tM,useValue:e,multi:!0})))}var tY=new lt(""),nY="b",iY="h",rY="s",oY="st",aY="u",sY="rt",lM=new lt(""),lY=["GET","HEAD"];function WF(i,e){let a=e,{isCacheActive:t}=a,n=sn(a,["isCacheActive"]),{transferCache:r,method:o}=i;return!(!t||r===!1||o==="POST"&&!n.includePostRequests&&!r||o!=="POST"&&!lY.includes(o)||!n.includeRequestsWithAuthHeaders&&uY(i)||n.filter?.(i)===!1)}function YF(i,e){let{includeHeaders:t}=i,n=t;return typeof e=="object"&&e.includeHeaders&&(n=e.includeHeaders),n}function cY(i,e,t,n){let{transferCache:r}=i;if(!WF(i,e))return null;if(n)throw new nt(2803,!1);let o=i.url,a=$F(i,o),s=t.get(a,null),l=YF(e,r);if(s){let{[nY]:c,[sY]:d,[iY]:u,[rY]:f,[oY]:h,[aY]:p}=s,m=c;switch(d){case"arraybuffer":m=jF(c);break;case"blob":m=new Blob([jF(c)]);break}let g=new sa(u);return new nh({body:m,headers:g,status:f,statusText:h,url:p})}return null}function dY(i,e){let t=U(lM),n=U(Gf),r=U(tY,{optional:!0}),o=cY(i,t,n,r);if(o)return $o(o);let{transferCache:a}=i,s=YF(t,a),l=i.url,c=$F(i,l);return WF(i,t),e(i)}function uY(i){return i.headers.has("authorization")||i.headers.has("proxy-authorization")}function GF(i){return[...i.keys()].sort().map(e=>`${e}=${i.getAll(e)}`).join("&")}function $F(i,e){let{params:t,method:n,responseType:r}=i,o=GF(t),a=i.serializeBody();a instanceof URLSearchParams?a=GF(a):typeof a!="string"&&(a="");let s=[n,r,e,a,o].join("|"),l=fY(s);return l}function fY(i){let e=0;for(let t of i)e=Math.imul(31,e)+t.charCodeAt(0)<<0;return e+=2147483648,e.toString()}function jF(i){let e=atob(i);return Uint8Array.from(e,n=>n.charCodeAt(0)).buffer}function XF(i){return[{provide:lM,useFactory:()=>(Fa("NgHttpTransferCache"),B({isCacheActive:!0},i))},{provide:nM,useValue:dY,multi:!0},{provide:Kf,multi:!0,useFactory:()=>{let e=U(Mo),t=U(lM);return()=>{e.whenStable().then(()=>{t.isCacheActive=!1})}}}]}var Vm=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=pe({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=rt(hY),r},providedIn:"root"})}return i})(),hY=(()=>{class i extends Vm{_doc;constructor(t){super(),this._doc=t}sanitize(t,n){if(n==null)return null;switch(t){case Na.NONE:return n;case Na.HTML:return al(n,"HTML")?Ra(n):av(this._doc,String(n)).toString();case Na.STYLE:return al(n,"Style")?Ra(n):n;case Na.SCRIPT:if(al(n,"Script"))return Ra(n);throw new nt(5200,!1);case Na.URL:return al(n,"URL")?Ra(n):xm(String(n));case Na.RESOURCE_URL:if(al(n,"ResourceURL"))return Ra(n);throw new nt(5201,!1);default:throw new nt(5202,!1)}}bypassSecurityTrustHtml(t){return LE(t)}bypassSecurityTrustStyle(t){return BE(t)}bypassSecurityTrustScript(t){return zE(t)}bypassSecurityTrustUrl(t){return UE(t)}bypassSecurityTrustResourceUrl(t){return VE(t)}static \u0275fac=function(n){return new(n||i)(rt(Un))};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),sy=(function(i){return i[i.NoHttpTransferCache=0]="NoHttpTransferCache",i[i.HttpTransferCacheOptions=1]="HttpTransferCacheOptions",i[i.I18nSupport=2]="I18nSupport",i[i.EventReplay=3]="EventReplay",i[i.IncrementalHydration=4]="IncrementalHydration",i})(sy||{});function pY(i,e=[],t={}){return{\u0275kind:i,\u0275providers:e}}function qF(){return pY(sy.EventReplay,nF())}function KF(...i){let e=[],t=new Set;for(let{\u0275providers:r,\u0275kind:o}of i)t.add(o),r.length&&e.push(r);let n=t.has(sy.HttpTransferCacheOptions);return Qs([[],[],iF(),t.has(sy.NoHttpTransferCache)||n?[]:XF({}),e])}var rh=class i{loadingCount=R(0);isLoading=ve(()=>this.loadingCount()>0);show(){this.loadingCount.update(e=>e+1)}hide(){this.loadingCount.update(e=>Math.max(0,e-1))}reset(){this.loadingCount.set(0)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})};function ly(i){let e=a=>Array.isArray(a)?a.filter(s=>typeof s=="string").join(", "):"";if(!i)return"Unhandled error";let t=i?.error,n=e(t?.errors);if(n)return n;let r=e(t?.message??t?.Messages);if(r)return r;if(Array.isArray(t)&&t.length>0)return e(t)||"Unhandled error";if(typeof t=="string"&&t.trim())return t;if(Array.isArray(i)&&i.length>0)return e(i)||"Unhandled error";let o=e(i?.messages);if(o)return o;if(typeof i?.messages=="string"&&i.messages.trim())return i.messages;if(typeof i?.message=="string"&&i.message.trim())return i.message;if(t?.errors&&typeof t.errors=="object"&&!Array.isArray(t.errors)){let a=[];for(let s in t.errors)Object.prototype.hasOwnProperty.call(t.errors,s)&&a.push(...t.errors[s]??[]);if(a.length)return a.join(", ")}return i?.status===401?"Unauthorized: Please verify your credentials and try again":"Unhandled error"}var In=class i{toastsSignal=R([]);toasts=ve(()=>this.toastsSignal());defaultTimeoutMs=4500;showSuccess(e,t="Success"){this.pushToast("success",t,e)}showInfo(e,t="Info"){this.pushToast("info",t,e)}showWarn(e,t="Warning"){this.pushToast("warning",t,e)}showError(e,t="Error"){this.pushToast("error",t,e)}showContrast(e,t="Note"){this.pushToast("info",t,e)}showSecondary(e,t="Secondary"){this.pushToast("info",t,e)}dismissToast(e){this.toastsSignal.update(t=>t.filter(n=>n.id!==e))}pushToast(e,t,n){let r={id:Date.now()+Math.floor(Math.random()*1e3),type:e,title:t,message:n,timeout:this.defaultTimeoutMs};this.toastsSignal.update(o=>[...o,r]),setTimeout(()=>{this.dismissToast(r.id)},r.timeout)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})};var Hm=class i{constructor(e){this.toasterService=e}handleError(e){e instanceof sc&&this.showError(e)}showError(e){return this.toasterService.showError(ly(e)),Wl(()=>e)}static \u0275fac=function(t){return new(t||i)(rt(In))};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})};var ZF=(i,e)=>{let t=U(Hm),n=U(rh),r=i.headers.has("skipHandleError"),o=i.headers.get("Loader")==="true";return o&&n.show(),e(i).pipe(us(a=>(r||t.handleError(a),r?$o(null):Wl(()=>a))),Gp(()=>{o&&n.hide()}))};var JF=[ZF];var QF={apiUrl:"https://pixeasy-stage-api-htapefcta9c3arfd.westus3-01.azurewebsites.net/api/"};var cy=new lt("ENV"),Qwe=new lt("LOADER_DELAY");var eL={provide:cy,useValue:QF};function dy(){return[xw(),KF(qF()),aM(sM(JF)),eL,rh]}var lc="#111827",cc="#ffffff",oh="rgba(15,23,42,0.45)",cM="#ffffff";var tL="design-export";var nL="jersey-design";var uy="f99808af-8dc9-467a-8acb-08de5fd2bd0f";var Ut={manifestLoadFailed:"Unable to load manifest",missingProductId:"Missing product id.",manifestAssetsLoadFailed:"Unable to load assets",manifestAssetsLoadDetail:"Unable to load one or more manifest assets.",noSvgLoadedToExport:"No SVG loaded to export",noSvgDocumentLoaded:"No SVG document is loaded.",failedToSerializeSvg:"Failed to serialize SVG.",missingApiKey:"Missing API key for design submission.",designSubmissionFailed:"Design submission failed.",submissionLoadFailed:"Unable to load submission for editing.",submissionNotFound:"Submission not found.",submissionInvalidPayload:"Submission payload is invalid for editing.",submissionProductMismatch:"Submission product does not match the current product and cannot be edited here.",designSubmittedTitle:"Design Submitted",no3dModelForThumbnail:"3D model is not available for thumbnail generation.",noSvgDesignLoaded:"No SVG design is loaded.",failedSerializeSvgForThumbnail:"Failed to serialize SVG for thumbnail generation.",noThumbnailsGenerated:"No thumbnails were generated.",invalidSubmissionThumbnails:"Submission requires exactly 4 thumbnails: front, right, back, left.",failedGenerateSubmissionThumbnails:"Failed to generate thumbnails for design submission.",failedGenerateThumbnails:"Failed to generate and download thumbnails.",nothingToCopy:"Nothing to copy.",jsonCopied:"JSON copied.",copyFailed:"Copy failed. Please copy manually.",errorLoadingFilesFromUrls:"Error loading files from URLs:",failedRenderSvgOnCanvas:"Failed to render SVG on canvas",overlaySyncFailed:"Overlay synchronization failed"},Es={svgRequired:"The design is not available. Please try again later or refresh the page.",svgUrlRequired:"Unable to load the design. Please try again.",invalidSvgContent:"The design file is not valid. Please refresh the page or try again later.",unableToParseSvg:"We couldn't process the design. Please refresh the page and try again.",noPathElements:"No customizable areas found in the design. Please contact support.",failedApplyPatternSvg:"Unable to apply the pattern. Please try again or select a different pattern.",invalidSvgPath:"The pattern could not be applied to this design. Please try a different pattern.",missingPathData:"The pattern is incomplete. Please select a different pattern and try again.",addPatternFromUrlFailed:"Error loading pattern:"},Ts={svgRequired:"Design Unavailable",svgUrlRequired:"Design Load Failed",invalidSvgContent:"Design Error",unableToParseSvg:"Design Error",noPathElements:"No Customizable Areas",failedApplyPatternSvg:"Pattern Failed",invalidSvgPath:"Pattern Not Compatible",missingPathData:"Pattern Error"},dc={garmentSvgRequired:"The design is not available. Please try again later or refresh the page.",patternSvgUrlRequired:"Unable to load the pattern. Please try again.",targetIdRequired:"This pattern cannot be applied to the current design. Please select a different pattern.",invalidSvgContent:"The design file is not valid. Please refresh the page or try again later.",noPatternDefinitionsImported:"This pattern is not compatible with the current design. Please try a different pattern.",noMatchingTargetIds:"This pattern cannot be applied to this area. Please select a different pattern or try another area.",skippedMissingTargetIds:"Some pattern areas are not available:",applyPatternFromUrlFailed:"Error loading pattern:",failedApplyPattern:"Unable to apply this pattern. Please try again or select a different pattern."},uc={garmentSvgRequired:"Design Unavailable",patternSvgUrlRequired:"Pattern Load Failed",targetIdRequired:"Pattern Not Compatible",invalidSvgContent:"Design Error",noPatternDefinitionsImported:"Pattern Not Available",noMatchingTargetIds:"Cannot Apply Pattern",failedApplyPattern:"Pattern Failed"},eu={failedFetchEffectSvg:"Failed to fetch effect SVG",failedIngestWarpEnvelope:"Failed to ingest warp envelope",unableLoadEffectSvgUrl:"Unable to load effect SVG from the configured URL.",warpSvgParsingError:"The warp SVG contains parsing errors.",warpSvgNeedsViewBox:"Warp SVG must define a viewBox attribute.",warpSvgInvalidViewBox:"Warp SVG viewBox is invalid.",warpSvgNeedsTopBottomPath:'Warp SVG must contain <path id="top"> and <path id="bottom"> elements with d attributes.',warpEnvelopeReadFailed:"Unable to read the warp envelope SVG."};var dM;(t=>{let i;(s=>(s.ArrayBuffer="arraybuffer",s.Blob="blob",s.JSON="json",s.Text="text"))(i=t.ResponseType||={});let e;(o=>(o.Body="body",o.Response="response"))(e=t.Observe||={})})(dM||={});var gr=class i{http=U(ih);toasterService=U(In);environment=U(cy);request(e,t={}){let h=e,{method:n,params:r,url:o}=h,a=sn(h,["method","params","url"]),{observe:s=dM.Observe.Body,skipHandleError:l,httpParamEncoder:c,loader:d}=t,u=this.removeDuplicateSlashes(`${t.apiName}${o}`),f=B({observe:s},a);return r&&(f.params=this.getParams(r,c)),f.headers=this.addLoaderHeader(d,f.headers),f.headers=this.addskipHandleError(l,f.headers),this.http.request(n,u,f).pipe(S1(p=>{p?.succeeded==!1&&!l&&this.handleError(p)}),us(p=>l?$o():Wl(()=>p)))}get(e,t={},n,r={}){return this.request({method:"GET",url:e,params:t,headers:n},B({apiName:this.environment.apiUrl,loader:!0},r))}post(e,t,n,r={}){return this.request({method:"POST",url:e,body:t,headers:n},B({apiName:this.environment.apiUrl},r))}put(e,t,n,r={}){return this.request({method:"PUT",url:e,body:t,headers:n},B({apiName:this.environment.apiUrl},r))}delete(e,t,n={}){return this.request({method:"DELETE",url:e,headers:t},B({apiName:this.environment.apiUrl},n))}getParams(e,t){let n=Object.entries(e).reduce((r,[o,a])=>(this.isUndefinedOrEmptyString(a)||a===null||(r[o]=a),r),{});return t?new aa({encoder:t,fromObject:n}):new aa({fromObject:n})}addLoaderHeader(e,t){let n=new sa;return t&&Object.keys(t).forEach(r=>{n=n.set(r,t[r])}),e&&(n=n.set("Loader","true")),n}addskipHandleError(e,t){return t=t||new sa,e&&(t=t.set("skipHandleError","true")),t}removeDuplicateSlashes(e){return e.replace(/([^:]\/)\/+/g,"$1")}handleError(e){return this.toasterService.showError(ly(e)),Wl(()=>e)}isUndefinedOrEmptyString(e){return e===void 0||e===""||e===null}static \u0275fac=function(t){return new(t||i)};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})};var Tn=class i{apiKey=R(null);userId=R(null);setApiKey(e){this.apiKey.set(e?.trim()||null)}setUserId(e){this.userId.set(e?.trim()||null)}setCredentials(e,t){this.setApiKey(e),this.setUserId(t)}getApiKey(){return this.apiKey()}getUserId(){return this.userId()}static \u0275fac=function(t){return new(t||i)};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})};var fy=class i{api=U(gr);stateService=U(Tn);getManifest(e,t,n,r){let o=r||this.stateService.apiKey();return this.api.get(`products/${e}/manifest`,B(B({},t?{preDesignId:t}:{}),n!==void 0?{useCdnUrl:n}:{}),o?{"X-API-Key":o}:void 0,{loader:!0})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})};var hy=class i{api=U(gr);stateService=U(Tn);getPublicDistributor(e){let t=e||this.stateService.apiKey()||"";return this.api.get("public/distributor",{},{"X-API-Key":t},{loader:!1,skipHandleError:!0})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})};var hl=(r=>(r.TEXT="TEXT",r.LOGO="LOGO",r.OVERLAY="OVERLAY",r.BACKGROUND="BACKGROUND",r))(hl||{}),pl={OVERLAY:"overlay",EFFECTS:"effects",COLOR:"color",EFFECT:"effect"},iL={removeWhiteBg:"Remove white bg",removingBg:"Removing...",removeWhiteBgTooltip:"Remove white background",logoToEdit:"Logo",widthLabel:"Width",heightLabel:"Height",resetTextDimensions:"Reset Width/Height",dimensionOutOfRange:"Value is out of allowed range for this overlay."};var py=class i{manifestApi=U(fy);publicDistributorApi=U(hy);brandingCache=new Map;resolveProductId(e){let t=e.runtimeConfig?.productId?.trim(),n=e.inputProductId?.trim();return t||n||e.fallbackProductId}resolveApiKey(e){let t=e.runtimeConfig?.apiKey?.trim(),n=e.inputApiKey?.trim();return t||n||null}buildManifestConfigSignature(e){let t=this.resolveProductId(e);if(!t)return null;let n=this.resolveApiKey(e)??"";return`${t}::${n}`}async fetchManifest(e){try{let t=await Di(this.manifestApi.getManifest(e.productId,e.preDesignId??null,e.useCdnUrl,e.apiKey));if(!t?.isSuccess)return{ok:!1,message:(t?.errors??["Unable to load manifest"])[0]};let n=t.data;if(!n)return{ok:!1,message:"Unable to load manifest"};let r=await this.resolveDistributorBranding(e.apiKey??null,n.distributorBranding??null);return n.distributorBranding=r,{ok:!0,data:n}}catch{return{ok:!1,message:"Unable to load manifest"}}}normalizeManifestData(e){let{data:t,preDesignId:n,selectedPredesignId:r,activeStepId:o}=e,a=t.preDesigns??[],s=n??t.preDesignId??t.selectedPreDesignId??t.activePreDesignId??(!r&&a.length?a[0]?.id??null:null),l=(t.personalizationObjectIdMap??t.placements??[]).map(p=>B({},p));l.filter(p=>(p.type??"").trim().toUpperCase()==="BACKGROUND").forEach(p=>{let b=(p.actionPathIdsCsv??p.actionItemId??"").toString().trim().split(",").map(_=>_.trim()).filter(_=>_.length>0).map(_=>_.startsWith("#")?_.slice(1).trim():_).filter(_=>_.length>0).join(",");p.actionPathIdsCsv=b,p.actionItemId=b});let c=t.steps??[],d=t.threeDFileLink??t.model?.url??"",u=t.mtlFileLink??t.model?.mtlUrl??null,f=this.normalizeThreeDVariants({variants:t.threeDVariants??[],fallbackThreeDFileLink:d,fallbackMaterialFileLink:u}),h=this.resolveSelectedThreeDVariant(f);return{productType:t.productType??null,resolvedPredesignId:s,selectedThreeDVariantId:h?.id??null,fontDataSourcePack:t.fontDataSourcePack??null,colorDataSourcePack:t.colorDataSourcePack??null,twoDViewTypes:t.twoDViewTypes??[],twoDVariants:t.twoDVariants??[],twoDDesignAreas:t.twoDDesignAreas??[],threeDVariants:f,threeDFileLink:h?.threeDFileLink??d,materialFileLink:h?.mtlFileLink??u,svgFileLink:t.svgFileLink??t.model?.svgUrl??"",svgViewBox:t.svgViewBox??null,printAreaWidthInches:Number.isFinite(t.printAreaWidthInches)?t.printAreaWidthInches:null,printAreaHeightInches:Number.isFinite(t.printAreaHeightInches)?t.printAreaHeightInches:null,customizations:t.customizations??[],predesigns:a,steps:c,pathIdAccordingLayers:t.layers??[],renderPathAccordingLayers:t.renderLayers??[],isShowWholeLayersOption:!!t.isShowWholeLayersOption,innerMaterialNames:t.innerMaterialNames??null,innerColor:t.innerColor??null,placements:l,nextActiveStepId:o||c[0]?.id||null,manifestMeta:t.meta??null,distributorBranding:t.distributorBranding??null}}normalizeThreeDVariants(e){let t=(e.variants??[]).filter(n=>!!n?.id).map(n=>({id:n.id,name:n.name??"",key:n.key??"",position:Number.isFinite(n.position)?n.position:0,isDefault:!!n.isDefault,threeDFileLink:n.threeDFileLink??null,mtlFileLink:n.mtlFileLink??null})).sort((n,r)=>n.position-r.position||n.name.localeCompare(r.name,void 0,{sensitivity:"base"}));return t.length>0?t:e.fallbackThreeDFileLink?[{id:"default-model",name:"Default",key:"default-model",position:0,isDefault:!0,threeDFileLink:e.fallbackThreeDFileLink,mtlFileLink:e.fallbackMaterialFileLink}]:[]}resolveSelectedThreeDVariant(e){return e.length?e.find(t=>t.isDefault)??[...e].sort((t,n)=>t.position-n.position||t.name.localeCompare(n.name,void 0,{sensitivity:"base"}))[0]:null}async resolveDistributorBranding(e,t){if(!e)return t;if(this.brandingCache.has(e)){let n=this.brandingCache.get(e)??null;if(n)return{distributorId:n.distributorId||t?.distributorId||"",distributorName:n.distributorName??t?.distributorName??null,logoUrl:n.logoUrl??t?.logoUrl??null,themePrimaryColor:n.themePrimaryColor??t?.themePrimaryColor??null,themeSecondaryColor:n.themeSecondaryColor??t?.themeSecondaryColor??null,themeAccentColor:n.themeAccentColor??t?.themeAccentColor??null,themeMode:t?.themeMode??null}}try{let n=await Di(this.publicDistributorApi.getPublicDistributor(e)),r=this.mapPublicDistributorBranding(n);return this.brandingCache.set(e,r),r?{distributorId:r.distributorId||t?.distributorId||"",distributorName:r.distributorName??t?.distributorName??null,logoUrl:r.logoUrl??t?.logoUrl??null,themePrimaryColor:r.themePrimaryColor??t?.themePrimaryColor??null,themeSecondaryColor:r.themeSecondaryColor??t?.themeSecondaryColor??null,themeAccentColor:r.themeAccentColor??t?.themeAccentColor??null,themeMode:t?.themeMode??null}:t}catch{return this.brandingCache.set(e,null),t}}mapPublicDistributorBranding(e){return e?.id?{distributorId:e.id,distributorName:e.name??null,logoUrl:e.branding?.logoUrl??null,themePrimaryColor:e.branding?.primaryColor??null,themeSecondaryColor:e.branding?.secondaryColor??null,themeAccentColor:e.branding?.accentColor??null,themeMode:null}:null}static \u0275fac=function(t){return new(t||i)};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})};var ah=class i{constructor(e){this.manifestService=e}toIdentityInput(e){return{runtimeConfig:e.runtimeConfig,inputProductId:e.inputProductId,inputApiKey:e.inputApiKey,fallbackProductId:e.fallbackProductId}}resolveProductId(e){return this.manifestService.resolveProductId(this.toIdentityInput(e))}resolveApiKey(e){return this.manifestService.resolveApiKey(this.toIdentityInput(e))}buildConfigSignature(e){return this.manifestService.buildManifestConfigSignature(this.toIdentityInput(e))}async loadManifest(e){let t=this.toIdentityInput(e),n=this.manifestService.resolveProductId(t),r=this.manifestService.resolveApiKey(t),o=this.manifestService.buildManifestConfigSignature(t);if(!n)return{ok:!1,message:Ut.missingProductId,productId:null,signature:o};let a=await this.manifestService.fetchManifest({productId:n,preDesignId:e.preDesignId??null,useCdnUrl:e.runtimeConfig?!0:void 0,apiKey:r});return a.ok?{ok:!0,normalized:this.manifestService.normalizeManifestData({data:a.data,preDesignId:e.preDesignId,selectedPredesignId:e.selectedPredesignId,activeStepId:e.activeStepId}),productId:n,apiKey:r,signature:o}:{ok:!1,message:a.message||Ut.manifestLoadFailed,productId:n,signature:o}}static \u0275fac=function(t){return new(t||i)(rt(py))};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})};var hL=(()=>{class i{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,n){this._renderer=t,this._elementRef=n}setProperty(t,n){this._renderer.setProperty(this._elementRef.nativeElement,t,n)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(n){return new(n||i)(Xt(Cs),Xt(fr))};static \u0275dir=qn({type:i})}return i})(),Xm=(()=>{class i extends hL{static \u0275fac=(()=>{let t;return function(r){return(t||(t=ol(i)))(r||i)}})();static \u0275dir=qn({type:i,features:[To]})}return i})(),fc=new lt(""),vY={provide:fc,useExisting:Or(()=>nu),multi:!0},nu=(()=>{class i extends Xm{writeValue(t){this.setProperty("checked",t)}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ol(i)))(r||i)}})();static \u0275dir=qn({type:i,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(n,r){n&1&&H("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[ia([vY]),To]})}return i})(),yY={provide:fc,useExisting:Or(()=>io),multi:!0};function _Y(){let i=ra()?ra().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var xY=new lt(""),io=(()=>{class i extends hL{_compositionMode;_composing=!1;constructor(t,n,r){super(t,n),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!_Y())}writeValue(t){let n=t??"";this.setProperty("value",n)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static \u0275fac=function(n){return new(n||i)(Xt(Cs),Xt(fr),Xt(xY,8))};static \u0275dir=qn({type:i,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,r){n&1&&H("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},standalone:!1,features:[ia([yY]),To]})}return i})();var gM=new lt(""),CY=new lt("");function SY(i){return e=>{if(e.value==null||i==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t<i?{min:{min:i,actual:e.value}}:null}}function wY(i){return e=>{if(e.value==null||i==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t>i?{max:{max:i,actual:e.value}}:null}}function rL(i){return null}function pL(i){return i!=null}function mL(i){return qf(i)?Hp(i):i}function gL(i){let e={};return i.forEach(t=>{e=t!=null?B(B({},e),t):e}),Object.keys(e).length===0?null:e}function bL(i,e){return e.map(t=>t(i))}function EY(i){return!i.validate}function vL(i){return i.map(e=>EY(e)?e:t=>e.validate(t))}function TY(i){if(!i)return null;let e=i.filter(pL);return e.length==0?null:function(t){return gL(bL(t,e))}}function yL(i){return i!=null?TY(vL(i)):null}function MY(i){if(!i)return null;let e=i.filter(pL);return e.length==0?null:function(t){let n=bL(t,e).map(mL);return v1(n).pipe(Yi(gL))}}function _L(i){return i!=null?MY(vL(i)):null}function oL(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function DY(i){return i._rawValidators}function AY(i){return i._rawAsyncValidators}function uM(i){return i?Array.isArray(i)?i:[i]:[]}function gy(i,e){return Array.isArray(i)?i.includes(e):i===e}function aL(i,e){let t=uM(e);return uM(i).forEach(r=>{gy(t,r)||t.push(r)}),t}function sL(i,e){return uM(e).filter(t=>!gy(i,t))}var by=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=yL(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=_L(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control?.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},fM=class extends by{name;get formDirective(){return null}get path(){return null}},$m=class extends by{_parent=null;name=null;valueAccessor=null},hM=class{_cd;constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var br=(()=>{class i extends hM{constructor(t){super(t)}static \u0275fac=function(n){return new(n||i)(Xt($m,2))};static \u0275dir=qn({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&Ee("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[To]})}return i})();var Gm="VALID",my="INVALID",sh="PENDING",jm="DISABLED",tu=class{},vy=class extends tu{value;source;constructor(e,t){super(),this.value=e,this.source=t}},Wm=class extends tu{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},Ym=class extends tu{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},lh=class extends tu{status;source;constructor(e,t){super(),this.status=e,this.source=t}};var pM=class extends tu{source;constructor(e){super(),this.source=e}};function OY(i){return(yy(i)?i.validators:i)||null}function PY(i){return Array.isArray(i)?yL(i):i||null}function IY(i,e){return(yy(e)?e.asyncValidators:i)||null}function kY(i){return Array.isArray(i)?_L(i):i||null}function yy(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}var mM=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return Pt(this.statusReactive)}set status(e){Pt(()=>this.statusReactive.set(e))}_status=ve(()=>this.statusReactive());statusReactive=R(void 0);get valid(){return this.status===Gm}get invalid(){return this.status===my}get pending(){return this.status==sh}get disabled(){return this.status===jm}get enabled(){return this.status!==jm}errors;get pristine(){return Pt(this.pristineReactive)}set pristine(e){Pt(()=>this.pristineReactive.set(e))}_pristine=ve(()=>this.pristineReactive());pristineReactive=R(!0);get dirty(){return!this.pristine}get touched(){return Pt(this.touchedReactive)}set touched(e){Pt(()=>this.touchedReactive.set(e))}_touched=ve(()=>this.touchedReactive());touchedReactive=R(!1);get untouched(){return!this.touched}_events=new Ma;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(aL(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(aL(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(sL(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(sL(e,this._rawAsyncValidators))}hasValidator(e){return gy(this._rawValidators,e)}hasAsyncValidator(e){return gy(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsTouched(Q(B({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new Ym(!0,n))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(e))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),e.onlySelf||this._parent?._updateTouched(e,n),t&&e.emitEvent!==!1&&this._events.next(new Ym(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty(Q(B({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new Wm(!1,n))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),e.onlySelf||this._parent?._updatePristine(e,n),t&&e.emitEvent!==!1&&this._events.next(new Wm(!0,n))}markAsPending(e={}){this.status=sh;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new lh(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending(Q(B({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=jm,this.errors=null,this._forEachChild(r=>{r.disable(Q(B({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new vy(this.value,n)),this._events.next(new lh(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Q(B({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=Gm,this._forEachChild(n=>{n.enable(Q(B({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(Q(B({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(e,t){e.onlySelf||(this._parent?.updateValueAndValidity(e),e.skipPristineCheck||this._parent?._updatePristine({},t),this._parent?._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Gm||this.status===sh)&&this._runAsyncValidator(n,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new vy(this.value,t)),this._events.next(new lh(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity(Q(B({},e),{sourceControl:t}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?jm:Gm}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=sh,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let n=mL(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(".")),t.length===0)?null:t.reduce((n,r)=>n&&n._find(r),this)}getError(e,t){let n=t?this.get(t):this;return n?.errors?n.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,n){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||n)&&this._events.next(new lh(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new yo,this.statusChanges=new yo}_calculateStatus(){return this._allControlsDisabled()?jm:this.errors?my:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(sh)?sh:this._anyControlsHaveStatus(my)?my:Gm}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,t){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,e.onlySelf||this._parent?._updatePristine(e,t),r&&this._events.next(new Wm(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new Ym(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){yy(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=PY(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=kY(this._rawAsyncValidators)}};var xL=new lt("",{factory:()=>bM}),bM="always";function RY(i,e){return[...e.path,i]}function NY(i,e,t=bM){LY(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),BY(i,e),UY(i,e),zY(i,e),FY(i,e)}function lL(i,e){i.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function FY(i,e){if(e.valueAccessor.setDisabledState){let t=n=>{e.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(t),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(t)})}}function LY(i,e){let t=DY(i);e.validator!==null?i.setValidators(oL(t,e.validator)):typeof t=="function"&&i.setValidators([t]);let n=AY(i);e.asyncValidator!==null?i.setAsyncValidators(oL(n,e.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();lL(e._rawValidators,r),lL(e._rawAsyncValidators,r)}function BY(i,e){e.valueAccessor.registerOnChange(t=>{i._pendingValue=t,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&CL(i,e)})}function zY(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&CL(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function CL(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function UY(i,e){let t=(n,r)=>{e.valueAccessor.writeValue(n),r&&e.viewToModelUpdate(n)};i.registerOnChange(t),e._registerOnDestroy(()=>{i._unregisterOnChange(t)})}function VY(i,e){if(!i.hasOwnProperty("model"))return!1;let t=i.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function HY(i){return Object.getPrototypeOf(i.constructor)===Xm}function GY(i,e){if(!e)return null;Array.isArray(e);let t,n,r;return e.forEach(o=>{o.constructor===io?t=o:HY(o)?n=o:r=o}),r||n||t||null}function cL(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function dL(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var jY=class extends mM{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,n){super(OY(t),IY(n,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),yy(t)&&(t.nonNullable||t.initialValueIsDefault)&&(dL(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&t.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,t.emitViewToModelChange!==!1)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),t.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,t?.emitEvent!==!1&&this._events.next(new pM(this))}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){cL(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){cL(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){dL(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var WY={provide:$m,useExisting:Or(()=>sr)},uL=Promise.resolve(),sr=(()=>{class i extends $m{_changeDetectorRef;callSetDisabledState;control=new jY;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new yo;constructor(t,n,r,o,a,s){super(),this._changeDetectorRef=a,this.callSetDisabledState=s,this._parent=t,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=GY(this,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let n=t.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),VY(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective?.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){NY(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(t){uL.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let n=t.isDisabled.currentValue,r=n!==0&&Vv(n);uL.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?RY(t,this._parent):[t]}static \u0275fac=function(n){return new(n||i)(Xt(fM,9),Xt(gM,10),Xt(CY,10),Xt(fc,10),Xt(Uv,8),Xt(xL,8))};static \u0275dir=qn({type:i,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[ia([WY]),To,Vf]})}return i})();var YY={provide:fc,useExisting:Or(()=>ml),multi:!0},ml=(()=>{class i extends Xm{writeValue(t){let n=t??"";this.setProperty("value",n)}registerOnChange(t){this.onChange=n=>{t(n==""?null:parseFloat(n))}}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ol(i)))(r||i)}})();static \u0275dir=qn({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,r){n&1&&H("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[ia([YY]),To]})}return i})();var $Y={provide:fc,useExisting:Or(()=>hc),multi:!0};function SL(i,e){return i==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function XY(i){return i.split(":")[0]}var hc=(()=>{class i extends Xm{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=U(Mo).injector;destroyRef=U(Xi);cdr=U(Uv);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,dv({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(t){this.cdr.markForCheck(),this.value=t;let n=this._getOptionId(t),r=SL(n,t);this.setProperty("value",r)}registerOnChange(t){this.onChange=n=>{this.value=this._getOptionValue(n),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n),t))return n;return null}_getOptionValue(t){let n=XY(t);return this._optionMap.has(n)?this._optionMap.get(n):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ol(i)))(r||i)}})();static \u0275dir=qn({type:i,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,r){n&1&&H("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[ia([$Y]),To]})}return i})(),pc=(()=>{class i{_element;_renderer;_select;id;constructor(t,n,r){this._element=t,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(t){this._select!=null&&(this._select._optionMap.set(this.id,t),this._setElementValue(SL(this.id,t)),this._select._writeValueAfterRender())}set value(t){this._setElementValue(t),this._select?._writeValueAfterRender()}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select?._optionMap.delete(this.id),this._select?._writeValueAfterRender()}static \u0275fac=function(n){return new(n||i)(Xt(fr),Xt(Cs),Xt(hc,9))};static \u0275dir=qn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})(),qY={provide:fc,useExisting:Or(()=>wL),multi:!0};function fL(i,e){return i==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function KY(i){return i.split(":")[0]}var wL=(()=>{class i extends Xm{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let n;if(Array.isArray(t)){let r=t.map(o=>this._getOptionId(o));n=(o,a)=>{o._setSelected(r.indexOf(a.toString())>-1)}}else n=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(t){this.onChange=n=>{let r=[],o=n.selectedOptions;if(o!==void 0){let a=o;for(let s=0;s<a.length;s++){let l=a[s],c=this._getOptionValue(l.value);r.push(c)}}else{let a=n.options;for(let s=0;s<a.length;s++){let l=a[s];if(l.selected){let c=this._getOptionValue(l.value);r.push(c)}}}this.value=r,t(r)}}_registerOption(t){let n=(this._idCounter++).toString();return this._optionMap.set(n,t),n}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n)._value,t))return n;return null}_getOptionValue(t){let n=KY(t);return this._optionMap.has(n)?this._optionMap.get(n)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ol(i)))(r||i)}})();static \u0275dir=qn({type:i,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,r){n&1&&H("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[ia([qY]),To]})}return i})(),mc=(()=>{class i{_element;_renderer;_select;id;_value;constructor(t,n,r){this._element=t,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(fL(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(fL(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(n){return new(n||i)(Xt(fr),Xt(Cs),Xt(wL,9))};static \u0275dir=qn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})();function EL(i){return typeof i=="number"?i:parseFloat(i)}var TL=(()=>{class i{_validator=rL;_onChange;_enabled;ngOnChanges(t){if(this.inputName in t){let n=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):rL,this._onChange?.()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}static \u0275fac=function(n){return new(n||i)};static \u0275dir=qn({type:i,features:[Vf]})}return i})(),ZY={provide:gM,useExisting:Or(()=>iu),multi:!0},iu=(()=>{class i extends TL{max;inputName="max";normalizeInput=t=>EL(t);createValidator=t=>wY(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=ol(i)))(r||i)}})();static \u0275dir=qn({type:i,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&Wt("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[ia([ZY]),To]})}return i})(),JY={provide:gM,useExisting:Or(()=>gl),multi:!0},gl=(()=>{class i extends TL{min;inputName="min";normalizeInput=t=>EL(t);createValidator=t=>SY(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=ol(i)))(r||i)}})();static \u0275dir=qn({type:i,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&Wt("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[ia([JY]),To]})}return i})();var QY=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=ll({type:i});static \u0275inj=ps({})}return i})();var oi=(()=>{class i{static withConfig(t){return{ngModule:i,providers:[{provide:xL,useValue:t.callSetDisabledState??bM}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=ll({type:i});static \u0275inj=ps({imports:[QY]})}return i})();var Oc={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Pc={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},t3=0,QM=1,n3=2;var yg=1,i3=2,zh=3,Lr=0,Ur=1,ua=2,Os=0,cu=1,eD=2,tD=3,nD=4,r3=5,wc=100,o3=101,a3=102,s3=103,l3=104,c3=200,d3=201,u3=202,f3=203,Gy=204,jy=205,h3=206,p3=207,m3=208,g3=209,b3=210,v3=211,y3=212,_3=213,x3=214,m_=0,g_=1,b_=2,du=3,v_=4,y_=5,__=6,x_=7,C_=0,C3=1,S3=2,ja=0,iD=1,rD=2,oD=3,yu=4,aD=5,sD=6,lD=7;var VM=300,Ic=301,_u=302,S_=303,w_=304,_g=306,Eh=1e3,_r=1001,Wy=1002,Ji=1003,w3=1004;var xg=1005;var bi=1006,E_=1007;var fa=1008;var oo=1009,cD=1010,dD=1011,Uh=1012,T_=1013,Wa=1014,Ya=1015,Ps=1016,M_=1017,D_=1018,Vh=1020,uD=35902,fD=35899,hD=1021,pD=1022,ha=1023,Ms=1026,kc=1027,mD=1028,A_=1029,xu=1030,O_=1031;var P_=1033,Cg=33776,Sg=33777,wg=33778,Eg=33779,I_=35840,k_=35841,R_=35842,N_=35843,F_=36196,L_=37492,B_=37496,z_=37488,U_=37489,V_=37490,H_=37491,G_=37808,j_=37809,W_=37810,Y_=37811,$_=37812,X_=37813,q_=37814,K_=37815,Z_=37816,J_=37817,Q_=37818,ex=37819,tx=37820,nx=37821,ix=36492,rx=36494,ox=36495,ax=36283,sx=36284,lx=36285,cx=36286;var ng=2300,Yy=2301,Hy=2302,HM=2400,GM=2401,jM=2402;var E3=3200;var dx=0,T3=1,Al="",kn="srgb",uu="srgb-linear",ig="linear",gn="srgb";var lu=7680;var WM=519,M3=512,D3=513,A3=514,ux=515,O3=516,P3=517,fx=518,I3=519,YM=35044;var gD="300 es",Ha=2e3,rg=2001;function bD(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}function e$(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function Th(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function k3(){let i=Th("canvas");return i.style.display="block",i}var ML={},Mh=null;function vD(...i){let e="THREE."+i.shift();Mh?Mh("log",e,...i):console.log(e,...i)}function Ot(...i){let e="THREE."+i.shift();Mh?Mh("warn",e,...i):console.warn(e,...i)}function kt(...i){let e="THREE."+i.shift();Mh?Mh("error",e,...i):console.error(e,...i)}function Dh(...i){let e=i.join(" ");e in ML||(ML[e]=!0,Ot(...i))}function R3(i,e,t){return new Promise(function(n,r){function o(){switch(i.clientWaitSync(e,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(o,t);break;default:n()}}setTimeout(o,t)})}var Ds=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){let n=this._listeners;if(n===void 0)return;let r=n[e];if(r!==void 0){let o=r.indexOf(t);o!==-1&&r.splice(o,1)}}dispatchEvent(e){let t=this._listeners;if(t===void 0)return;let n=t[e.type];if(n!==void 0){e.target=this;let r=n.slice(0);for(let o=0,a=r.length;o<a;o++)r[o].call(this,e);e.target=null}}},vr=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],DL=1234567,eg=Math.PI/180,Ah=180/Math.PI;function Hh(){let i=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(vr[i&255]+vr[i>>8&255]+vr[i>>16&255]+vr[i>>24&255]+"-"+vr[e&255]+vr[e>>8&255]+"-"+vr[e>>16&15|64]+vr[e>>24&255]+"-"+vr[t&63|128]+vr[t>>8&255]+"-"+vr[t>>16&255]+vr[t>>24&255]+vr[n&255]+vr[n>>8&255]+vr[n>>16&255]+vr[n>>24&255]).toLowerCase()}function nn(i,e,t){return Math.max(e,Math.min(t,i))}function yD(i,e){return(i%e+e)%e}function t$(i,e,t,n,r){return n+(i-e)*(r-n)/(t-e)}function n$(i,e,t){return i!==e?(t-i)/(e-i):0}function tg(i,e,t){return(1-t)*i+t*e}function i$(i,e,t,n){return tg(i,e,1-Math.exp(-t*n))}function r$(i,e=1){return e-Math.abs(yD(i,e*2)-e)}function o$(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function a$(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function s$(i,e){return i+Math.floor(Math.random()*(e-i+1))}function l$(i,e){return i+Math.random()*(e-i)}function c$(i){return i*(.5-Math.random())}function d$(i){i!==void 0&&(DL=i);let e=DL+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function u$(i){return i*eg}function f$(i){return i*Ah}function h$(i){return(i&i-1)===0&&i!==0}function p$(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function m$(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function g$(i,e,t,n,r){let o=Math.cos,a=Math.sin,s=o(t/2),l=a(t/2),c=o((e+n)/2),d=a((e+n)/2),u=o((e-n)/2),f=a((e-n)/2),h=o((n-e)/2),p=a((n-e)/2);switch(r){case"XYX":i.set(s*d,l*u,l*f,s*c);break;case"YZY":i.set(l*f,s*d,l*u,s*c);break;case"ZXZ":i.set(l*u,l*f,s*d,s*c);break;case"XZX":i.set(s*d,l*p,l*h,s*c);break;case"YXY":i.set(l*h,s*d,l*p,s*c);break;case"ZYZ":i.set(l*p,l*h,s*d,s*c);break;default:Ot("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function Ch(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function Fr(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return Math.round(i*4294967295);case Uint16Array:return Math.round(i*65535);case Uint8Array:return Math.round(i*255);case Int32Array:return Math.round(i*2147483647);case Int16Array:return Math.round(i*32767);case Int8Array:return Math.round(i*127);default:throw new Error("Invalid component type.")}}var dn={DEG2RAD:eg,RAD2DEG:Ah,generateUUID:Hh,clamp:nn,euclideanModulo:yD,mapLinear:t$,inverseLerp:n$,lerp:tg,damp:i$,pingpong:r$,smoothstep:o$,smootherstep:a$,randInt:s$,randFloat:l$,randFloatSpread:c$,seededRandom:d$,degToRad:u$,radToDeg:f$,isPowerOfTwo:h$,ceilPowerOfTwo:p$,floorPowerOfTwo:m$,setQuaternionFromProperEuler:g$,normalize:Fr,denormalize:Ch},It=class i{constructor(e=0,t=0){i.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=nn(this.x,e.x,t.x),this.y=nn(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=nn(this.x,e,t),this.y=nn(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(nn(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(nn(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),r=Math.sin(t),o=this.x-e.x,a=this.y-e.y;return this.x=o*n-a*r+e.x,this.y=o*r+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},da=class{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,o,a,s){let l=n[r+0],c=n[r+1],d=n[r+2],u=n[r+3],f=o[a+0],h=o[a+1],p=o[a+2],m=o[a+3];if(s<=0){e[t+0]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u;return}if(s>=1){e[t+0]=f,e[t+1]=h,e[t+2]=p,e[t+3]=m;return}if(u!==m||l!==f||c!==h||d!==p){let g=l*f+c*h+d*p+u*m;g<0&&(f=-f,h=-h,p=-p,m=-m,g=-g);let b=1-s;if(g<.9995){let _=Math.acos(g),w=Math.sin(_);b=Math.sin(b*_)/w,s=Math.sin(s*_)/w,l=l*b+f*s,c=c*b+h*s,d=d*b+p*s,u=u*b+m*s}else{l=l*b+f*s,c=c*b+h*s,d=d*b+p*s,u=u*b+m*s;let _=1/Math.sqrt(l*l+c*c+d*d+u*u);l*=_,c*=_,d*=_,u*=_}}e[t]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,o,a){let s=n[r],l=n[r+1],c=n[r+2],d=n[r+3],u=o[a],f=o[a+1],h=o[a+2],p=o[a+3];return e[t]=s*p+d*u+l*h-c*f,e[t+1]=l*p+d*f+c*u-s*h,e[t+2]=c*p+d*h+s*f-l*u,e[t+3]=d*p-s*u-l*f-c*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let n=e._x,r=e._y,o=e._z,a=e._order,s=Math.cos,l=Math.sin,c=s(n/2),d=s(r/2),u=s(o/2),f=l(n/2),h=l(r/2),p=l(o/2);switch(a){case"XYZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"YXZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"ZXY":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"ZYX":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"YZX":this._x=f*d*u+c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u-f*h*p;break;case"XZY":this._x=f*d*u-c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u+f*h*p;break;default:Ot("Quaternion: .setFromEuler() encountered an unknown order: "+a)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],r=t[4],o=t[8],a=t[1],s=t[5],l=t[9],c=t[2],d=t[6],u=t[10],f=n+s+u;if(f>0){let h=.5/Math.sqrt(f+1);this._w=.25/h,this._x=(d-l)*h,this._y=(o-c)*h,this._z=(a-r)*h}else if(n>s&&n>u){let h=2*Math.sqrt(1+n-s-u);this._w=(d-l)/h,this._x=.25*h,this._y=(r+a)/h,this._z=(o+c)/h}else if(s>u){let h=2*Math.sqrt(1+s-n-u);this._w=(o-c)/h,this._x=(r+a)/h,this._y=.25*h,this._z=(l+d)/h}else{let h=2*Math.sqrt(1+u-n-s);this._w=(a-r)/h,this._x=(o+c)/h,this._y=(l+d)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(nn(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(n===0)return this;let r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,r=e._y,o=e._z,a=e._w,s=t._x,l=t._y,c=t._z,d=t._w;return this._x=n*d+a*s+r*c-o*l,this._y=r*d+a*l+o*s-n*c,this._z=o*d+a*c+n*l-r*s,this._w=a*d-n*s-r*l-o*c,this._onChangeCallback(),this}slerp(e,t){if(t<=0)return this;if(t>=1)return this.copy(e);let n=e._x,r=e._y,o=e._z,a=e._w,s=this.dot(e);s<0&&(n=-n,r=-r,o=-o,a=-a,s=-s);let l=1-t;if(s<.9995){let c=Math.acos(s),d=Math.sin(c);l=Math.sin(l*c)/d,t=Math.sin(t*c)/d,this._x=this._x*l+n*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+a*t,this._onChangeCallback()}else this._x=this._x*l+n*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+a*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),o=Math.sqrt(n);return this.set(r*Math.sin(e),r*Math.cos(e),o*Math.sin(t),o*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},oe=class i{constructor(e=0,t=0,n=0){i.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(AL.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(AL.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[3]*n+o[6]*r,this.y=o[1]*t+o[4]*n+o[7]*r,this.z=o[2]*t+o[5]*n+o[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,o=e.elements,a=1/(o[3]*t+o[7]*n+o[11]*r+o[15]);return this.x=(o[0]*t+o[4]*n+o[8]*r+o[12])*a,this.y=(o[1]*t+o[5]*n+o[9]*r+o[13])*a,this.z=(o[2]*t+o[6]*n+o[10]*r+o[14])*a,this}applyQuaternion(e){let t=this.x,n=this.y,r=this.z,o=e.x,a=e.y,s=e.z,l=e.w,c=2*(a*r-s*n),d=2*(s*t-o*r),u=2*(o*n-a*t);return this.x=t+l*c+a*u-s*d,this.y=n+l*d+s*c-o*u,this.z=r+l*u+o*d-a*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,n=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r,this.y=o[1]*t+o[5]*n+o[9]*r,this.z=o[2]*t+o[6]*n+o[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=nn(this.x,e.x,t.x),this.y=nn(this.y,e.y,t.y),this.z=nn(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=nn(this.x,e,t),this.y=nn(this.y,e,t),this.z=nn(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(nn(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,r=e.y,o=e.z,a=t.x,s=t.y,l=t.z;return this.x=r*l-o*s,this.y=o*a-n*l,this.z=n*s-r*a,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return vM.copy(this).projectOnVector(e),this.sub(vM)}reflect(e){return this.sub(vM.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(nn(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},vM=new oe,AL=new da,qt=class i{constructor(e,t,n,r,o,a,s,l,c){i.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,r,o,a,s,l,c)}set(e,t,n,r,o,a,s,l,c){let d=this.elements;return d[0]=e,d[1]=r,d[2]=s,d[3]=t,d[4]=o,d[5]=l,d[6]=n,d[7]=a,d[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,o=this.elements,a=n[0],s=n[3],l=n[6],c=n[1],d=n[4],u=n[7],f=n[2],h=n[5],p=n[8],m=r[0],g=r[3],b=r[6],_=r[1],w=r[4],T=r[7],E=r[2],k=r[5],O=r[8];return o[0]=a*m+s*_+l*E,o[3]=a*g+s*w+l*k,o[6]=a*b+s*T+l*O,o[1]=c*m+d*_+u*E,o[4]=c*g+d*w+u*k,o[7]=c*b+d*T+u*O,o[2]=f*m+h*_+p*E,o[5]=f*g+h*w+p*k,o[8]=f*b+h*T+p*O,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],d=e[8];return t*a*d-t*s*c-n*o*d+n*s*l+r*o*c-r*a*l}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],d=e[8],u=d*a-s*c,f=s*l-d*o,h=c*o-a*l,p=t*u+n*f+r*h;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);let m=1/p;return e[0]=u*m,e[1]=(r*c-d*n)*m,e[2]=(s*n-r*a)*m,e[3]=f*m,e[4]=(d*t-r*l)*m,e[5]=(r*o-s*t)*m,e[6]=h*m,e[7]=(n*l-c*t)*m,e[8]=(a*t-n*o)*m,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,o,a,s){let l=Math.cos(o),c=Math.sin(o);return this.set(n*l,n*c,-n*(l*a+c*s)+a+e,-r*c,r*l,-r*(-c*a+l*s)+s+t,0,0,1),this}scale(e,t){return this.premultiply(yM.makeScale(e,t)),this}rotate(e){return this.premultiply(yM.makeRotation(-e)),this}translate(e,t){return this.premultiply(yM.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,n=e.elements;for(let r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}},yM=new qt,OL=new qt().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),PL=new qt().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function b$(){let i={enabled:!0,workingColorSpace:uu,spaces:{},convert:function(r,o,a){return this.enabled===!1||o===a||!o||!a||(this.spaces[o].transfer===gn&&(r.r=wl(r.r),r.g=wl(r.g),r.b=wl(r.b)),this.spaces[o].primaries!==this.spaces[a].primaries&&(r.applyMatrix3(this.spaces[o].toXYZ),r.applyMatrix3(this.spaces[a].fromXYZ)),this.spaces[a].transfer===gn&&(r.r=Sh(r.r),r.g=Sh(r.g),r.b=Sh(r.b))),r},workingToColorSpace:function(r,o){return this.convert(r,this.workingColorSpace,o)},colorSpaceToWorking:function(r,o){return this.convert(r,o,this.workingColorSpace)},getPrimaries:function(r){return this.spaces[r].primaries},getTransfer:function(r){return r===Al?ig:this.spaces[r].transfer},getToneMappingMode:function(r){return this.spaces[r].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(r,o=this.workingColorSpace){return r.fromArray(this.spaces[o].luminanceCoefficients)},define:function(r){Object.assign(this.spaces,r)},_getMatrix:function(r,o,a){return r.copy(this.spaces[o].toXYZ).multiply(this.spaces[a].fromXYZ)},_getDrawingBufferColorSpace:function(r){return this.spaces[r].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(r=this.workingColorSpace){return this.spaces[r].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(r,o){return Dh("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),i.workingToColorSpace(r,o)},toWorkingColorSpace:function(r,o){return Dh("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),i.colorSpaceToWorking(r,o)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return i.define({[uu]:{primaries:e,whitePoint:n,transfer:ig,toXYZ:OL,fromXYZ:PL,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:kn},outputColorSpaceConfig:{drawingBufferColorSpace:kn}},[kn]:{primaries:e,whitePoint:n,transfer:gn,toXYZ:OL,fromXYZ:PL,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:kn}}}),i}var tn=b$();function wl(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function Sh(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}var ch,$y=class{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{ch===void 0&&(ch=Th("canvas")),ch.width=e.width,ch.height=e.height;let r=ch.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=ch}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){let t=Th("canvas");t.width=e.width,t.height=e.height;let n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);let r=n.getImageData(0,0,e.width,e.height),o=r.data;for(let a=0;a<o.length;a++)o[a]=wl(o[a]/255)*255;return n.putImageData(r,0,0),t}else if(e.data){let t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(wl(t[n]/255)*255):t[n]=wl(t[n]);return{data:t,width:e.width,height:e.height}}else return Ot("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},v$=0,Oh=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:v$++}),this.uuid=Hh(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){let t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<"u"&&t instanceof VideoFrame?e.set(t.displayHeight,t.displayWidth,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){let t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];let n={uuid:this.uuid,url:""},r=this.data;if(r!==null){let o;if(Array.isArray(r)){o=[];for(let a=0,s=r.length;a<s;a++)r[a].isDataTexture?o.push(_M(r[a].image)):o.push(_M(r[a]))}else o=_M(r);n.url=o}return t||(e.images[this.uuid]=n),n}};function _M(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?$y.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(Ot("Texture: Unable to serialize Texture."),{})}var y$=0,xM=new oe,$a=(()=>{class i extends Ds{constructor(t=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=_r,o=_r,a=bi,s=fa,l=ha,c=oo,d=i.DEFAULT_ANISOTROPY,u=Al){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:y$++}),this.uuid=Hh(),this.name="",this.source=new Oh(t),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=o,this.magFilter=a,this.minFilter=s,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new It(0,0),this.repeat=new It(1,1),this.center=new It(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new qt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(xM).x}get height(){return this.source.getSize(xM).y}get depth(){return this.source.getSize(xM).z}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(t,n){this.updateRanges.push({start:t,count:n})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.isArrayTexture=t.isArrayTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}setValues(t){for(let n in t){let r=t[n];if(r===void 0){Ot(`Texture.setValues(): parameter '${n}' has value of undefined.`);continue}let o=this[n];if(o===void 0){Ot(`Texture.setValues(): property '${n}' does not exist.`);continue}o&&r&&o.isVector2&&r.isVector2||o&&r&&o.isVector3&&r.isVector3||o&&r&&o.isMatrix3&&r.isMatrix3?o.copy(r):this[n]=r}}toJSON(t){let n=t===void 0||typeof t=="string";if(!n&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];let r={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(r.userData=this.userData),n||(t.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==VM)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Eh:t.x=t.x-Math.floor(t.x);break;case _r:t.x=t.x<0?0:1;break;case Wy:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case Eh:t.y=t.y-Math.floor(t.y);break;case _r:t.y=t.y<0?0:1;break;case Wy:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}}return i.DEFAULT_IMAGE=null,i.DEFAULT_MAPPING=VM,i.DEFAULT_ANISOTROPY=1,i})(),Zn=class i{constructor(e=0,t=0,n=0,r=1){i.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,o=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*o,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*o,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*o,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*o,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,o,l=e.elements,c=l[0],d=l[4],u=l[8],f=l[1],h=l[5],p=l[9],m=l[2],g=l[6],b=l[10];if(Math.abs(d-f)<.01&&Math.abs(u-m)<.01&&Math.abs(p-g)<.01){if(Math.abs(d+f)<.1&&Math.abs(u+m)<.1&&Math.abs(p+g)<.1&&Math.abs(c+h+b-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let w=(c+1)/2,T=(h+1)/2,E=(b+1)/2,k=(d+f)/4,O=(u+m)/4,N=(p+g)/4;return w>T&&w>E?w<.01?(n=0,r=.707106781,o=.707106781):(n=Math.sqrt(w),r=k/n,o=O/n):T>E?T<.01?(n=.707106781,r=0,o=.707106781):(r=Math.sqrt(T),n=k/r,o=N/r):E<.01?(n=.707106781,r=.707106781,o=0):(o=Math.sqrt(E),n=O/o,r=N/o),this.set(n,r,o,t),this}let _=Math.sqrt((g-p)*(g-p)+(u-m)*(u-m)+(f-d)*(f-d));return Math.abs(_)<.001&&(_=1),this.x=(g-p)/_,this.y=(u-m)/_,this.z=(f-d)/_,this.w=Math.acos((c+h+b-1)/2),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=nn(this.x,e.x,t.x),this.y=nn(this.y,e.y,t.y),this.z=nn(this.z,e.z,t.z),this.w=nn(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=nn(this.x,e,t),this.y=nn(this.y,e,t),this.z=nn(this.z,e,t),this.w=nn(this.w,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(nn(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},Xy=class extends Ds{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:bi,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new Zn(0,0,e,t),this.scissorTest=!1,this.viewport=new Zn(0,0,e,t);let r={width:e,height:t,depth:n.depth},o=new $a(r);this.textures=[];let a=n.count;for(let s=0;s<a;s++)this.textures[s]=o.clone(),this.textures[s].isRenderTargetTexture=!0,this.textures[s].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){let t={minFilter:bi,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let n=0;n<this.textures.length;n++)this.textures[n].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,o=this.textures.length;r<o;r++)this.textures[r].image.width=e,this.textures[r].image.height=t,this.textures[r].image.depth=n,this.textures[r].isData3DTexture!==!0&&(this.textures[r].isArrayTexture=this.textures[r].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;let r=Object.assign({},e.textures[t].image);this.textures[t].source=new Oh(r)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},Io=class extends Xy{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}},og=class extends $a{constructor(e=null,t=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=Ji,this.minFilter=Ji,this.wrapR=_r,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var qy=class extends $a{constructor(e=null,t=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=Ji,this.minFilter=Ji,this.wrapR=_r,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Br=class{constructor(e=new oe(1/0,1/0,1/0),t=new oe(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(za.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(za.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let n=za.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);let n=e.geometry;if(n!==void 0){let o=n.getAttribute("position");if(t===!0&&o!==void 0&&e.isInstancedMesh!==!0)for(let a=0,s=o.count;a<s;a++)e.isMesh===!0?e.getVertexPosition(a,za):za.fromBufferAttribute(o,a),za.applyMatrix4(e.matrixWorld),this.expandByPoint(za);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),_y.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),_y.copy(n.boundingBox)),_y.applyMatrix4(e.matrixWorld),this.union(_y)}let r=e.children;for(let o=0,a=r.length;o<a;o++)this.expandByObject(r[o],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,za),za.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(qm),xy.subVectors(this.max,qm),dh.subVectors(e.a,qm),uh.subVectors(e.b,qm),fh.subVectors(e.c,qm),bc.subVectors(uh,dh),vc.subVectors(fh,uh),ru.subVectors(dh,fh);let t=[0,-bc.z,bc.y,0,-vc.z,vc.y,0,-ru.z,ru.y,bc.z,0,-bc.x,vc.z,0,-vc.x,ru.z,0,-ru.x,-bc.y,bc.x,0,-vc.y,vc.x,0,-ru.y,ru.x,0];return!CM(t,dh,uh,fh,xy)||(t=[1,0,0,0,1,0,0,0,1],!CM(t,dh,uh,fh,xy))?!1:(Cy.crossVectors(bc,vc),t=[Cy.x,Cy.y,Cy.z],CM(t,dh,uh,fh,xy))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,za).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(za).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(bl[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),bl[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),bl[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),bl[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),bl[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),bl[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),bl[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),bl[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(bl),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}},bl=[new oe,new oe,new oe,new oe,new oe,new oe,new oe,new oe],za=new oe,_y=new Br,dh=new oe,uh=new oe,fh=new oe,bc=new oe,vc=new oe,ru=new oe,qm=new oe,xy=new oe,Cy=new oe,ou=new oe;function CM(i,e,t,n,r){for(let o=0,a=i.length-3;o<=a;o+=3){ou.fromArray(i,o);let s=r.x*Math.abs(ou.x)+r.y*Math.abs(ou.y)+r.z*Math.abs(ou.z),l=e.dot(ou),c=t.dot(ou),d=n.dot(ou);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>s)return!1}return!0}var _$=new Br,Km=new oe,SM=new oe,Ec=class{constructor(e=new oe,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let n=this.center;t!==void 0?n.copy(t):_$.setFromPoints(e).getCenter(n);let r=0;for(let o=0,a=e.length;o<a;o++)r=Math.max(r,n.distanceToSquared(e[o]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){let t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){let n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Km.subVectors(e,this.center);let t=Km.lengthSq();if(t>this.radius*this.radius){let n=Math.sqrt(t),r=(n-this.radius)*.5;this.center.addScaledVector(Km,r/n),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(SM.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Km.copy(e.center).add(SM)),this.expandByPoint(Km.copy(e.center).sub(SM))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}},vl=new oe,wM=new oe,Sy=new oe,yc=new oe,EM=new oe,wy=new oe,TM=new oe,El=class{constructor(e=new oe,t=new oe(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,vl)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=vl.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(vl.copy(this.origin).addScaledVector(this.direction,t),vl.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){wM.copy(e).add(t).multiplyScalar(.5),Sy.copy(t).sub(e).normalize(),yc.copy(this.origin).sub(wM);let o=e.distanceTo(t)*.5,a=-this.direction.dot(Sy),s=yc.dot(this.direction),l=-yc.dot(Sy),c=yc.lengthSq(),d=Math.abs(1-a*a),u,f,h,p;if(d>0)if(u=a*l-s,f=a*s-l,p=o*d,u>=0)if(f>=-p)if(f<=p){let m=1/d;u*=m,f*=m,h=u*(u+a*f+2*s)+f*(a*u+f+2*l)+c}else f=o,u=Math.max(0,-(a*f+s)),h=-u*u+f*(f+2*l)+c;else f=-o,u=Math.max(0,-(a*f+s)),h=-u*u+f*(f+2*l)+c;else f<=-p?(u=Math.max(0,-(-a*o+s)),f=u>0?-o:Math.min(Math.max(-o,-l),o),h=-u*u+f*(f+2*l)+c):f<=p?(u=0,f=Math.min(Math.max(-o,-l),o),h=f*(f+2*l)+c):(u=Math.max(0,-(a*o+s)),f=u>0?o:Math.min(Math.max(-o,-l),o),h=-u*u+f*(f+2*l)+c);else f=a>0?-o:o,u=Math.max(0,-(a*f+s)),h=-u*u+f*(f+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,u),r&&r.copy(wM).addScaledVector(Sy,f),h}intersectSphere(e,t){vl.subVectors(e.center,this.origin);let n=vl.dot(this.direction),r=vl.dot(vl)-n*n,o=e.radius*e.radius;if(r>o)return null;let a=Math.sqrt(o-r),s=n-a,l=n+a;return l<0?null:s<0?this.at(l,t):this.at(s,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,o,a,s,l,c=1/this.direction.x,d=1/this.direction.y,u=1/this.direction.z,f=this.origin;return c>=0?(n=(e.min.x-f.x)*c,r=(e.max.x-f.x)*c):(n=(e.max.x-f.x)*c,r=(e.min.x-f.x)*c),d>=0?(o=(e.min.y-f.y)*d,a=(e.max.y-f.y)*d):(o=(e.max.y-f.y)*d,a=(e.min.y-f.y)*d),n>a||o>r||((o>n||isNaN(n))&&(n=o),(a<r||isNaN(r))&&(r=a),u>=0?(s=(e.min.z-f.z)*u,l=(e.max.z-f.z)*u):(s=(e.max.z-f.z)*u,l=(e.min.z-f.z)*u),n>l||s>r)||((s>n||n!==n)&&(n=s),(l<r||r!==r)&&(r=l),r<0)?null:this.at(n>=0?n:r,t)}intersectsBox(e){return this.intersectBox(e,vl)!==null}intersectTriangle(e,t,n,r,o){EM.subVectors(t,e),wy.subVectors(n,e),TM.crossVectors(EM,wy);let a=this.direction.dot(TM),s;if(a>0){if(r)return null;s=1}else if(a<0)s=-1,a=-a;else return null;yc.subVectors(this.origin,e);let l=s*this.direction.dot(wy.crossVectors(yc,wy));if(l<0)return null;let c=s*this.direction.dot(EM.cross(yc));if(c<0||l+c>a)return null;let d=-s*yc.dot(TM);return d<0?null:this.at(d/a,o)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},jn=class i{constructor(e,t,n,r,o,a,s,l,c,d,u,f,h,p,m,g){i.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,r,o,a,s,l,c,d,u,f,h,p,m,g)}set(e,t,n,r,o,a,s,l,c,d,u,f,h,p,m,g){let b=this.elements;return b[0]=e,b[4]=t,b[8]=n,b[12]=r,b[1]=o,b[5]=a,b[9]=s,b[13]=l,b[2]=c,b[6]=d,b[10]=u,b[14]=f,b[3]=h,b[7]=p,b[11]=m,b[15]=g,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new i().fromArray(this.elements)}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){let t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),n.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this)}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();let t=this.elements,n=e.elements,r=1/hh.setFromMatrixColumn(e,0).length(),o=1/hh.setFromMatrixColumn(e,1).length(),a=1/hh.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*o,t[5]=n[5]*o,t[6]=n[6]*o,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,n=e.x,r=e.y,o=e.z,a=Math.cos(n),s=Math.sin(n),l=Math.cos(r),c=Math.sin(r),d=Math.cos(o),u=Math.sin(o);if(e.order==="XYZ"){let f=a*d,h=a*u,p=s*d,m=s*u;t[0]=l*d,t[4]=-l*u,t[8]=c,t[1]=h+p*c,t[5]=f-m*c,t[9]=-s*l,t[2]=m-f*c,t[6]=p+h*c,t[10]=a*l}else if(e.order==="YXZ"){let f=l*d,h=l*u,p=c*d,m=c*u;t[0]=f+m*s,t[4]=p*s-h,t[8]=a*c,t[1]=a*u,t[5]=a*d,t[9]=-s,t[2]=h*s-p,t[6]=m+f*s,t[10]=a*l}else if(e.order==="ZXY"){let f=l*d,h=l*u,p=c*d,m=c*u;t[0]=f-m*s,t[4]=-a*u,t[8]=p+h*s,t[1]=h+p*s,t[5]=a*d,t[9]=m-f*s,t[2]=-a*c,t[6]=s,t[10]=a*l}else if(e.order==="ZYX"){let f=a*d,h=a*u,p=s*d,m=s*u;t[0]=l*d,t[4]=p*c-h,t[8]=f*c+m,t[1]=l*u,t[5]=m*c+f,t[9]=h*c-p,t[2]=-c,t[6]=s*l,t[10]=a*l}else if(e.order==="YZX"){let f=a*l,h=a*c,p=s*l,m=s*c;t[0]=l*d,t[4]=m-f*u,t[8]=p*u+h,t[1]=u,t[5]=a*d,t[9]=-s*d,t[2]=-c*d,t[6]=h*u+p,t[10]=f-m*u}else if(e.order==="XZY"){let f=a*l,h=a*c,p=s*l,m=s*c;t[0]=l*d,t[4]=-u,t[8]=c*d,t[1]=f*u+m,t[5]=a*d,t[9]=h*u-p,t[2]=p*u-h,t[6]=s*d,t[10]=m*u+f}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(x$,e,C$)}lookAt(e,t,n){let r=this.elements;return Ao.subVectors(e,t),Ao.lengthSq()===0&&(Ao.z=1),Ao.normalize(),_c.crossVectors(n,Ao),_c.lengthSq()===0&&(Math.abs(n.z)===1?Ao.x+=1e-4:Ao.z+=1e-4,Ao.normalize(),_c.crossVectors(n,Ao)),_c.normalize(),Ey.crossVectors(Ao,_c),r[0]=_c.x,r[4]=Ey.x,r[8]=Ao.x,r[1]=_c.y,r[5]=Ey.y,r[9]=Ao.y,r[2]=_c.z,r[6]=Ey.z,r[10]=Ao.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,o=this.elements,a=n[0],s=n[4],l=n[8],c=n[12],d=n[1],u=n[5],f=n[9],h=n[13],p=n[2],m=n[6],g=n[10],b=n[14],_=n[3],w=n[7],T=n[11],E=n[15],k=r[0],O=r[4],N=r[8],A=r[12],L=r[1],V=r[5],K=r[9],q=r[13],ee=r[2],ne=r[6],ae=r[10],Z=r[14],he=r[3],Oe=r[7],Ie=r[11],Se=r[15];return o[0]=a*k+s*L+l*ee+c*he,o[4]=a*O+s*V+l*ne+c*Oe,o[8]=a*N+s*K+l*ae+c*Ie,o[12]=a*A+s*q+l*Z+c*Se,o[1]=d*k+u*L+f*ee+h*he,o[5]=d*O+u*V+f*ne+h*Oe,o[9]=d*N+u*K+f*ae+h*Ie,o[13]=d*A+u*q+f*Z+h*Se,o[2]=p*k+m*L+g*ee+b*he,o[6]=p*O+m*V+g*ne+b*Oe,o[10]=p*N+m*K+g*ae+b*Ie,o[14]=p*A+m*q+g*Z+b*Se,o[3]=_*k+w*L+T*ee+E*he,o[7]=_*O+w*V+T*ne+E*Oe,o[11]=_*N+w*K+T*ae+E*Ie,o[15]=_*A+w*q+T*Z+E*Se,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[4],r=e[8],o=e[12],a=e[1],s=e[5],l=e[9],c=e[13],d=e[2],u=e[6],f=e[10],h=e[14],p=e[3],m=e[7],g=e[11],b=e[15],_=l*h-c*f,w=s*h-c*u,T=s*f-l*u,E=a*h-c*d,k=a*f-l*d,O=a*u-s*d;return t*(m*_-g*w+b*T)-n*(p*_-g*E+b*k)+r*(p*w-m*E+b*O)-o*(p*T-m*k+g*O)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],d=e[8],u=e[9],f=e[10],h=e[11],p=e[12],m=e[13],g=e[14],b=e[15],_=u*g*c-m*f*c+m*l*h-s*g*h-u*l*b+s*f*b,w=p*f*c-d*g*c-p*l*h+a*g*h+d*l*b-a*f*b,T=d*m*c-p*u*c+p*s*h-a*m*h-d*s*b+a*u*b,E=p*u*l-d*m*l-p*s*f+a*m*f+d*s*g-a*u*g,k=t*_+n*w+r*T+o*E;if(k===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let O=1/k;return e[0]=_*O,e[1]=(m*f*o-u*g*o-m*r*h+n*g*h+u*r*b-n*f*b)*O,e[2]=(s*g*o-m*l*o+m*r*c-n*g*c-s*r*b+n*l*b)*O,e[3]=(u*l*o-s*f*o-u*r*c+n*f*c+s*r*h-n*l*h)*O,e[4]=w*O,e[5]=(d*g*o-p*f*o+p*r*h-t*g*h-d*r*b+t*f*b)*O,e[6]=(p*l*o-a*g*o-p*r*c+t*g*c+a*r*b-t*l*b)*O,e[7]=(a*f*o-d*l*o+d*r*c-t*f*c-a*r*h+t*l*h)*O,e[8]=T*O,e[9]=(p*u*o-d*m*o-p*n*h+t*m*h+d*n*b-t*u*b)*O,e[10]=(a*m*o-p*s*o+p*n*c-t*m*c-a*n*b+t*s*b)*O,e[11]=(d*s*o-a*u*o-d*n*c+t*u*c+a*n*h-t*s*h)*O,e[12]=E*O,e[13]=(d*m*r-p*u*r+p*n*f-t*m*f-d*n*g+t*u*g)*O,e[14]=(p*s*r-a*m*r-p*n*l+t*m*l+a*n*g-t*s*g)*O,e[15]=(a*u*r-d*s*r+d*n*l-t*u*l-a*n*f+t*s*f)*O,this}scale(e){let t=this.elements,n=e.x,r=e.y,o=e.z;return t[0]*=n,t[4]*=r,t[8]*=o,t[1]*=n,t[5]*=r,t[9]*=o,t[2]*=n,t[6]*=r,t[10]*=o,t[3]*=n,t[7]*=r,t[11]*=o,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),r=Math.sin(t),o=1-n,a=e.x,s=e.y,l=e.z,c=o*a,d=o*s;return this.set(c*a+n,c*s-r*l,c*l+r*s,0,c*s+r*l,d*s+n,d*l-r*a,0,c*l-r*s,d*l+r*a,o*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,o,a){return this.set(1,n,o,0,e,1,a,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){let r=this.elements,o=t._x,a=t._y,s=t._z,l=t._w,c=o+o,d=a+a,u=s+s,f=o*c,h=o*d,p=o*u,m=a*d,g=a*u,b=s*u,_=l*c,w=l*d,T=l*u,E=n.x,k=n.y,O=n.z;return r[0]=(1-(m+b))*E,r[1]=(h+T)*E,r[2]=(p-w)*E,r[3]=0,r[4]=(h-T)*k,r[5]=(1-(f+b))*k,r[6]=(g+_)*k,r[7]=0,r[8]=(p+w)*O,r[9]=(g-_)*O,r[10]=(1-(f+m))*O,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){let r=this.elements;if(e.x=r[12],e.y=r[13],e.z=r[14],this.determinant()===0)return n.set(1,1,1),t.identity(),this;let o=hh.set(r[0],r[1],r[2]).length(),a=hh.set(r[4],r[5],r[6]).length(),s=hh.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),Ua.copy(this);let c=1/o,d=1/a,u=1/s;return Ua.elements[0]*=c,Ua.elements[1]*=c,Ua.elements[2]*=c,Ua.elements[4]*=d,Ua.elements[5]*=d,Ua.elements[6]*=d,Ua.elements[8]*=u,Ua.elements[9]*=u,Ua.elements[10]*=u,t.setFromRotationMatrix(Ua),n.x=o,n.y=a,n.z=s,this}makePerspective(e,t,n,r,o,a,s=Ha,l=!1){let c=this.elements,d=2*o/(t-e),u=2*o/(n-r),f=(t+e)/(t-e),h=(n+r)/(n-r),p,m;if(l)p=o/(a-o),m=a*o/(a-o);else if(s===Ha)p=-(a+o)/(a-o),m=-2*a*o/(a-o);else if(s===rg)p=-a/(a-o),m=-a*o/(a-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);return c[0]=d,c[4]=0,c[8]=f,c[12]=0,c[1]=0,c[5]=u,c[9]=h,c[13]=0,c[2]=0,c[6]=0,c[10]=p,c[14]=m,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,n,r,o,a,s=Ha,l=!1){let c=this.elements,d=2/(t-e),u=2/(n-r),f=-(t+e)/(t-e),h=-(n+r)/(n-r),p,m;if(l)p=1/(a-o),m=a/(a-o);else if(s===Ha)p=-2/(a-o),m=-(a+o)/(a-o);else if(s===rg)p=-1/(a-o),m=-o/(a-o);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);return c[0]=d,c[4]=0,c[8]=0,c[12]=f,c[1]=0,c[5]=u,c[9]=0,c[13]=h,c[2]=0,c[6]=0,c[10]=p,c[14]=m,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){let t=this.elements,n=e.elements;for(let r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}},hh=new oe,Ua=new jn,x$=new oe(0,0,0),C$=new oe(1,1,1),_c=new oe,Ey=new oe,Ao=new oe,IL=new jn,kL=new da,Tl=(()=>{class i{constructor(t=0,n=0,r=0,o=i.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=n,this._z=r,this._order=o}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,n,r,o=this._order){return this._x=t,this._y=n,this._z=r,this._order=o,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,n=this._order,r=!0){let o=t.elements,a=o[0],s=o[4],l=o[8],c=o[1],d=o[5],u=o[9],f=o[2],h=o[6],p=o[10];switch(n){case"XYZ":this._y=Math.asin(nn(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,p),this._z=Math.atan2(-s,a)):(this._x=Math.atan2(h,d),this._z=0);break;case"YXZ":this._x=Math.asin(-nn(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(l,p),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-f,a),this._z=0);break;case"ZXY":this._x=Math.asin(nn(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,p),this._z=Math.atan2(-s,d)):(this._y=0,this._z=Math.atan2(c,a));break;case"ZYX":this._y=Math.asin(-nn(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(c,a)):(this._x=0,this._z=Math.atan2(-s,d));break;case"YZX":this._z=Math.asin(nn(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-u,d),this._y=Math.atan2(-f,a)):(this._x=0,this._y=Math.atan2(l,p));break;case"XZY":this._z=Math.asin(-nn(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(h,d),this._y=Math.atan2(l,a)):(this._x=Math.atan2(-u,p),this._y=0);break;default:Ot("Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(t,n,r){return IL.makeRotationFromQuaternion(t),this.setFromRotationMatrix(IL,n,r)}setFromVector3(t,n=this._order){return this.set(t.x,t.y,t.z,n)}reorder(t){return kL.setFromEuler(this),this.setFromQuaternion(kL,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],n=0){return t[n]=this._x,t[n+1]=this._y,t[n+2]=this._z,t[n+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}return i.DEFAULT_ORDER="XYZ",i})(),Ph=class{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}},S$=0,RL=new oe,ph=new da,yl=new jn,Ty=new oe,Zm=new oe,w$=new oe,E$=new da,NL=new oe(1,0,0),FL=new oe(0,1,0),LL=new oe(0,0,1),BL={type:"added"},T$={type:"removed"},mh={type:"childadded",child:null},MM={type:"childremoved",child:null},ko=(()=>{class i extends Ds{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:S$++}),this.uuid=Hh(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();let t=new oe,n=new Tl,r=new da,o=new oe(1,1,1);function a(){r.setFromEuler(n,!1)}function s(){n.setFromQuaternion(r,void 0,!1)}n._onChange(a),r._onChange(s),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:o},modelViewMatrix:{value:new jn},normalMatrix:{value:new qt}}),this.matrix=new jn,this.matrixWorld=new jn,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Ph,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,n){this.quaternion.setFromAxisAngle(t,n)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,n){return ph.setFromAxisAngle(t,n),this.quaternion.multiply(ph),this}rotateOnWorldAxis(t,n){return ph.setFromAxisAngle(t,n),this.quaternion.premultiply(ph),this}rotateX(t){return this.rotateOnAxis(NL,t)}rotateY(t){return this.rotateOnAxis(FL,t)}rotateZ(t){return this.rotateOnAxis(LL,t)}translateOnAxis(t,n){return RL.copy(t).applyQuaternion(this.quaternion),this.position.add(RL.multiplyScalar(n)),this}translateX(t){return this.translateOnAxis(NL,t)}translateY(t){return this.translateOnAxis(FL,t)}translateZ(t){return this.translateOnAxis(LL,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(yl.copy(this.matrixWorld).invert())}lookAt(t,n,r){t.isVector3?Ty.copy(t):Ty.set(t,n,r);let o=this.parent;this.updateWorldMatrix(!0,!1),Zm.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?yl.lookAt(Zm,Ty,this.up):yl.lookAt(Ty,Zm,this.up),this.quaternion.setFromRotationMatrix(yl),o&&(yl.extractRotation(o.matrixWorld),ph.setFromRotationMatrix(yl),this.quaternion.premultiply(ph.invert()))}add(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return t===this?(kt("Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(BL),mh.child=t,this.dispatchEvent(mh),mh.child=null):kt("Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.remove(arguments[r]);return this}let n=this.children.indexOf(t);return n!==-1&&(t.parent=null,this.children.splice(n,1),t.dispatchEvent(T$),MM.child=t,this.dispatchEvent(MM),MM.child=null),this}removeFromParent(){let t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),yl.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),yl.multiply(t.parent.matrixWorld)),t.applyMatrix4(yl),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(BL),mh.child=t,this.dispatchEvent(mh),mh.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,n){if(this[t]===n)return this;for(let r=0,o=this.children.length;r<o;r++){let s=this.children[r].getObjectByProperty(t,n);if(s!==void 0)return s}}getObjectsByProperty(t,n,r=[]){this[t]===n&&r.push(this);let o=this.children;for(let a=0,s=o.length;a<s;a++)o[a].getObjectsByProperty(t,n,r);return r}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Zm,t,w$),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Zm,E$,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let n=this.matrixWorld.elements;return t.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(t){t(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverseVisible(t)}traverseAncestors(t){let n=this.parent;n!==null&&(t(n),n.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].updateMatrixWorld(t)}updateWorldMatrix(t,n){let r=this.parent;if(t===!0&&r!==null&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),n===!0){let o=this.children;for(let a=0,s=o.length;a<s;a++)o[a].updateWorldMatrix(!1,!0)}}toJSON(t){let n=t===void 0||typeof t=="string",r={};n&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});let o={};o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.castShadow===!0&&(o.castShadow=!0),this.receiveShadow===!0&&(o.receiveShadow=!0),this.visible===!1&&(o.visible=!1),this.frustumCulled===!1&&(o.frustumCulled=!1),this.renderOrder!==0&&(o.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(o.userData=this.userData),o.layers=this.layers.mask,o.matrix=this.matrix.toArray(),o.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(o.matrixAutoUpdate=!1),this.isInstancedMesh&&(o.type="InstancedMesh",o.count=this.count,o.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(o.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(o.type="BatchedMesh",o.perObjectFrustumCulled=this.perObjectFrustumCulled,o.sortObjects=this.sortObjects,o.drawRanges=this._drawRanges,o.reservedRanges=this._reservedRanges,o.geometryInfo=this._geometryInfo.map(l=>Q(B({},l),{boundingBox:l.boundingBox?l.boundingBox.toJSON():void 0,boundingSphere:l.boundingSphere?l.boundingSphere.toJSON():void 0})),o.instanceInfo=this._instanceInfo.map(l=>B({},l)),o.availableInstanceIds=this._availableInstanceIds.slice(),o.availableGeometryIds=this._availableGeometryIds.slice(),o.nextIndexStart=this._nextIndexStart,o.nextVertexStart=this._nextVertexStart,o.geometryCount=this._geometryCount,o.maxInstanceCount=this._maxInstanceCount,o.maxVertexCount=this._maxVertexCount,o.maxIndexCount=this._maxIndexCount,o.geometryInitialized=this._geometryInitialized,o.matricesTexture=this._matricesTexture.toJSON(t),o.indirectTexture=this._indirectTexture.toJSON(t),this._colorsTexture!==null&&(o.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(o.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(o.boundingBox=this.boundingBox.toJSON()));function a(l,c){return l[c.uuid]===void 0&&(l[c.uuid]=c.toJSON(t)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?o.background=this.background.toJSON():this.background.isTexture&&(o.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(o.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){o.geometry=a(t.geometries,this.geometry);let l=this.geometry.parameters;if(l!==void 0&&l.shapes!==void 0){let c=l.shapes;if(Array.isArray(c))for(let d=0,u=c.length;d<u;d++){let f=c[d];a(t.shapes,f)}else a(t.shapes,c)}}if(this.isSkinnedMesh&&(o.bindMode=this.bindMode,o.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(a(t.skeletons,this.skeleton),o.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let l=[];for(let c=0,d=this.material.length;c<d;c++)l.push(a(t.materials,this.material[c]));o.material=l}else o.material=a(t.materials,this.material);if(this.children.length>0){o.children=[];for(let l=0;l<this.children.length;l++)o.children.push(this.children[l].toJSON(t).object)}if(this.animations.length>0){o.animations=[];for(let l=0;l<this.animations.length;l++){let c=this.animations[l];o.animations.push(a(t.animations,c))}}if(n){let l=s(t.geometries),c=s(t.materials),d=s(t.textures),u=s(t.images),f=s(t.shapes),h=s(t.skeletons),p=s(t.animations),m=s(t.nodes);l.length>0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),u.length>0&&(r.images=u),f.length>0&&(r.shapes=f),h.length>0&&(r.skeletons=h),p.length>0&&(r.animations=p),m.length>0&&(r.nodes=m)}return r.object=o,r;function s(l){let c=[];for(let d in l){let u=l[d];delete u.metadata,c.push(u)}return c}}clone(t){return new this.constructor().copy(this,t)}copy(t,n=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),n===!0)for(let r=0;r<t.children.length;r++){let o=t.children[r];this.add(o.clone())}return this}}return i.DEFAULT_UP=new oe(0,1,0),i.DEFAULT_MATRIX_AUTO_UPDATE=!0,i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0,i})(),Va=new oe,_l=new oe,DM=new oe,xl=new oe,gh=new oe,bh=new oe,zL=new oe,AM=new oe,OM=new oe,PM=new oe,IM=new Zn,kM=new Zn,RM=new Zn,Sc=class i{constructor(e=new oe,t=new oe,n=new oe){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),Va.subVectors(e,t),r.cross(Va);let o=r.lengthSq();return o>0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(e,t,n,r,o){Va.subVectors(r,t),_l.subVectors(n,t),DM.subVectors(e,t);let a=Va.dot(Va),s=Va.dot(_l),l=Va.dot(DM),c=_l.dot(_l),d=_l.dot(DM),u=a*c-s*s;if(u===0)return o.set(0,0,0),null;let f=1/u,h=(c*l-s*d)*f,p=(a*d-s*l)*f;return o.set(1-h-p,p,h)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,xl)===null?!1:xl.x>=0&&xl.y>=0&&xl.x+xl.y<=1}static getInterpolation(e,t,n,r,o,a,s,l){return this.getBarycoord(e,t,n,r,xl)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(o,xl.x),l.addScaledVector(a,xl.y),l.addScaledVector(s,xl.z),l)}static getInterpolatedAttribute(e,t,n,r,o,a){return IM.setScalar(0),kM.setScalar(0),RM.setScalar(0),IM.fromBufferAttribute(e,t),kM.fromBufferAttribute(e,n),RM.fromBufferAttribute(e,r),a.setScalar(0),a.addScaledVector(IM,o.x),a.addScaledVector(kM,o.y),a.addScaledVector(RM,o.z),a}static isFrontFacing(e,t,n,r){return Va.subVectors(n,t),_l.subVectors(e,t),Va.cross(_l).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Va.subVectors(this.c,this.b),_l.subVectors(this.a,this.b),Va.cross(_l).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return i.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return i.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,r,o){return i.getInterpolation(e,this.a,this.b,this.c,t,n,r,o)}containsPoint(e){return i.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return i.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n=this.a,r=this.b,o=this.c,a,s;gh.subVectors(r,n),bh.subVectors(o,n),AM.subVectors(e,n);let l=gh.dot(AM),c=bh.dot(AM);if(l<=0&&c<=0)return t.copy(n);OM.subVectors(e,r);let d=gh.dot(OM),u=bh.dot(OM);if(d>=0&&u<=d)return t.copy(r);let f=l*u-d*c;if(f<=0&&l>=0&&d<=0)return a=l/(l-d),t.copy(n).addScaledVector(gh,a);PM.subVectors(e,o);let h=gh.dot(PM),p=bh.dot(PM);if(p>=0&&h<=p)return t.copy(o);let m=h*c-l*p;if(m<=0&&c>=0&&p<=0)return s=c/(c-p),t.copy(n).addScaledVector(bh,s);let g=d*p-h*u;if(g<=0&&u-d>=0&&h-p>=0)return zL.subVectors(o,r),s=(u-d)/(u-d+(h-p)),t.copy(r).addScaledVector(zL,s);let b=1/(g+m+f);return a=m*b,s=f*b,t.copy(n).addScaledVector(gh,a).addScaledVector(bh,s)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},N3={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},xc={h:0,s:0,l:0},My={h:0,s:0,l:0};function NM(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*6*(2/3-t):i}var wt=class{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){let r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=kn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,tn.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=tn.workingColorSpace){return this.r=e,this.g=t,this.b=n,tn.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=tn.workingColorSpace){if(e=yD(e,1),t=nn(t,0,1),n=nn(n,0,1),t===0)this.r=this.g=this.b=n;else{let o=n<=.5?n*(1+t):n+t-n*t,a=2*n-o;this.r=NM(a,o,e+1/3),this.g=NM(a,o,e),this.b=NM(a,o,e-1/3)}return tn.colorSpaceToWorking(this,r),this}setStyle(e,t=kn){function n(o){o!==void 0&&parseFloat(o)<1&&Ot("Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let o,a=r[1],s=r[2];switch(a){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,t);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,t);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,t);break;default:Ot("Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let o=r[1],a=o.length;if(a===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,t);if(a===6)return this.setHex(parseInt(o,16),t);Ot("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=kn){let n=N3[e.toLowerCase()];return n!==void 0?this.setHex(n,t):Ot("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=wl(e.r),this.g=wl(e.g),this.b=wl(e.b),this}copyLinearToSRGB(e){return this.r=Sh(e.r),this.g=Sh(e.g),this.b=Sh(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=kn){return tn.workingToColorSpace(yr.copy(this),e),Math.round(nn(yr.r*255,0,255))*65536+Math.round(nn(yr.g*255,0,255))*256+Math.round(nn(yr.b*255,0,255))}getHexString(e=kn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=tn.workingColorSpace){tn.workingToColorSpace(yr.copy(this),t);let n=yr.r,r=yr.g,o=yr.b,a=Math.max(n,r,o),s=Math.min(n,r,o),l,c,d=(s+a)/2;if(s===a)l=0,c=0;else{let u=a-s;switch(c=d<=.5?u/(a+s):u/(2-a-s),a){case n:l=(r-o)/u+(r<o?6:0);break;case r:l=(o-n)/u+2;break;case o:l=(n-r)/u+4;break}l/=6}return e.h=l,e.s=c,e.l=d,e}getRGB(e,t=tn.workingColorSpace){return tn.workingToColorSpace(yr.copy(this),t),e.r=yr.r,e.g=yr.g,e.b=yr.b,e}getStyle(e=kn){tn.workingToColorSpace(yr.copy(this),e);let t=yr.r,n=yr.g,r=yr.b;return e!==kn?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(r*255)})`}offsetHSL(e,t,n){return this.getHSL(xc),this.setHSL(xc.h+e,xc.s+t,xc.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(xc),e.getHSL(My);let n=tg(xc.h,My.h,t),r=tg(xc.s,My.s,t),o=tg(xc.l,My.l,t);return this.setHSL(n,r,o),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let t=this.r,n=this.g,r=this.b,o=e.elements;return this.r=o[0]*t+o[3]*n+o[6]*r,this.g=o[1]*t+o[4]*n+o[7]*r,this.b=o[2]*t+o[5]*n+o[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},yr=new wt;wt.NAMES=N3;var M$=0,ro=class extends Ds{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:M$++}),this.uuid=Hh(),this.name="",this.type="Material",this.blending=cu,this.side=Lr,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Gy,this.blendDst=jy,this.blendEquation=wc,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new wt(0,0,0),this.blendAlpha=0,this.depthFunc=du,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=WM,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=lu,this.stencilZFail=lu,this.stencilZPass=lu,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let n=e[t];if(n===void 0){Ot(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){Ot(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});let n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==cu&&(n.blending=this.blending),this.side!==Lr&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==Gy&&(n.blendSrc=this.blendSrc),this.blendDst!==jy&&(n.blendDst=this.blendDst),this.blendEquation!==wc&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==du&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==WM&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==lu&&(n.stencilFail=this.stencilFail),this.stencilZFail!==lu&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==lu&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.allowOverride===!1&&(n.allowOverride=!1),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function r(o){let a=[];for(let s in o){let l=o[s];delete l.metadata,a.push(l)}return a}if(t){let o=r(e.textures),a=r(e.images);o.length>0&&(n.textures=o),a.length>0&&(n.images=a)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,n=null;if(t!==null){let r=t.length;n=new Array(r);for(let o=0;o!==r;++o)n[o]=t[o].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}},ag=class extends ro{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new wt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Tl,this.combine=C_,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}};var Pi=new oe,Dy=new It,D$=0,Po=class{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:D$++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=YM,this.updateRanges=[],this.gpuType=Ya,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,o=this.itemSize;r<o;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)Dy.fromBufferAttribute(this,t),Dy.applyMatrix3(e),this.setXY(t,Dy.x,Dy.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)Pi.fromBufferAttribute(this,t),Pi.applyMatrix3(e),this.setXYZ(t,Pi.x,Pi.y,Pi.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)Pi.fromBufferAttribute(this,t),Pi.applyMatrix4(e),this.setXYZ(t,Pi.x,Pi.y,Pi.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Pi.fromBufferAttribute(this,t),Pi.applyNormalMatrix(e),this.setXYZ(t,Pi.x,Pi.y,Pi.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Pi.fromBufferAttribute(this,t),Pi.transformDirection(e),this.setXYZ(t,Pi.x,Pi.y,Pi.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=Ch(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=Fr(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=Ch(t,this.array)),t}setX(e,t){return this.normalized&&(t=Fr(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=Ch(t,this.array)),t}setY(e,t){return this.normalized&&(t=Fr(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=Ch(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Fr(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=Ch(t,this.array)),t}setW(e,t){return this.normalized&&(t=Fr(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=Fr(t,this.array),n=Fr(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=Fr(t,this.array),n=Fr(n,this.array),r=Fr(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,o){return e*=this.itemSize,this.normalized&&(t=Fr(t,this.array),n=Fr(n,this.array),r=Fr(r,this.array),o=Fr(o,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=o,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==YM&&(e.usage=this.usage),e}};var sg=class extends Po{constructor(e,t,n){super(new Uint16Array(e),t,n)}};var lg=class extends Po{constructor(e,t,n){super(new Uint32Array(e),t,n)}};var gi=class extends Po{constructor(e,t,n){super(new Float32Array(e),t,n)}},A$=0,la=new jn,FM=new ko,vh=new oe,Oo=new Br,Jm=new Br,Ki=new oe,Fi=class i extends Ds{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:A$++}),this.uuid=Hh(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(bD(e)?lg:sg)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let o=new qt().getNormalMatrix(e);n.applyNormalMatrix(o),n.needsUpdate=!0}let r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return la.makeRotationFromQuaternion(e),this.applyMatrix4(la),this}rotateX(e){return la.makeRotationX(e),this.applyMatrix4(la),this}rotateY(e){return la.makeRotationY(e),this.applyMatrix4(la),this}rotateZ(e){return la.makeRotationZ(e),this.applyMatrix4(la),this}translate(e,t,n){return la.makeTranslation(e,t,n),this.applyMatrix4(la),this}scale(e,t,n){return la.makeScale(e,t,n),this.applyMatrix4(la),this}lookAt(e){return FM.lookAt(e),FM.updateMatrix(),this.applyMatrix4(FM.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(vh).negate(),this.translate(vh.x,vh.y,vh.z),this}setFromPoints(e){let t=this.getAttribute("position");if(t===void 0){let n=[];for(let r=0,o=e.length;r<o;r++){let a=e[r];n.push(a.x,a.y,a.z||0)}this.setAttribute("position",new gi(n,3))}else{let n=Math.min(e.length,t.count);for(let r=0;r<n;r++){let o=e[r];t.setXYZ(r,o.x,o.y,o.z||0)}e.length>t.count&&Ot("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Br);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){kt("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new oe(-1/0,-1/0,-1/0),new oe(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,r=t.length;n<r;n++){let o=t[n];Oo.setFromBufferAttribute(o),this.morphTargetsRelative?(Ki.addVectors(this.boundingBox.min,Oo.min),this.boundingBox.expandByPoint(Ki),Ki.addVectors(this.boundingBox.max,Oo.max),this.boundingBox.expandByPoint(Ki)):(this.boundingBox.expandByPoint(Oo.min),this.boundingBox.expandByPoint(Oo.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&kt('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Ec);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){kt("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new oe,1/0);return}if(e){let n=this.boundingSphere.center;if(Oo.setFromBufferAttribute(e),t)for(let o=0,a=t.length;o<a;o++){let s=t[o];Jm.setFromBufferAttribute(s),this.morphTargetsRelative?(Ki.addVectors(Oo.min,Jm.min),Oo.expandByPoint(Ki),Ki.addVectors(Oo.max,Jm.max),Oo.expandByPoint(Ki)):(Oo.expandByPoint(Jm.min),Oo.expandByPoint(Jm.max))}Oo.getCenter(n);let r=0;for(let o=0,a=e.count;o<a;o++)Ki.fromBufferAttribute(e,o),r=Math.max(r,n.distanceToSquared(Ki));if(t)for(let o=0,a=t.length;o<a;o++){let s=t[o],l=this.morphTargetsRelative;for(let c=0,d=s.count;c<d;c++)Ki.fromBufferAttribute(s,c),l&&(vh.fromBufferAttribute(e,c),Ki.add(vh)),r=Math.max(r,n.distanceToSquared(Ki))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&kt('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){kt("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let n=t.position,r=t.normal,o=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Po(new Float32Array(4*n.count),4));let a=this.getAttribute("tangent"),s=[],l=[];for(let N=0;N<n.count;N++)s[N]=new oe,l[N]=new oe;let c=new oe,d=new oe,u=new oe,f=new It,h=new It,p=new It,m=new oe,g=new oe;function b(N,A,L){c.fromBufferAttribute(n,N),d.fromBufferAttribute(n,A),u.fromBufferAttribute(n,L),f.fromBufferAttribute(o,N),h.fromBufferAttribute(o,A),p.fromBufferAttribute(o,L),d.sub(c),u.sub(c),h.sub(f),p.sub(f);let V=1/(h.x*p.y-p.x*h.y);isFinite(V)&&(m.copy(d).multiplyScalar(p.y).addScaledVector(u,-h.y).multiplyScalar(V),g.copy(u).multiplyScalar(h.x).addScaledVector(d,-p.x).multiplyScalar(V),s[N].add(m),s[A].add(m),s[L].add(m),l[N].add(g),l[A].add(g),l[L].add(g))}let _=this.groups;_.length===0&&(_=[{start:0,count:e.count}]);for(let N=0,A=_.length;N<A;++N){let L=_[N],V=L.start,K=L.count;for(let q=V,ee=V+K;q<ee;q+=3)b(e.getX(q+0),e.getX(q+1),e.getX(q+2))}let w=new oe,T=new oe,E=new oe,k=new oe;function O(N){E.fromBufferAttribute(r,N),k.copy(E);let A=s[N];w.copy(A),w.sub(E.multiplyScalar(E.dot(A))).normalize(),T.crossVectors(k,A);let V=T.dot(l[N])<0?-1:1;a.setXYZW(N,w.x,w.y,w.z,V)}for(let N=0,A=_.length;N<A;++N){let L=_[N],V=L.start,K=L.count;for(let q=V,ee=V+K;q<ee;q+=3)O(e.getX(q+0)),O(e.getX(q+1)),O(e.getX(q+2))}}computeVertexNormals(){let e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new Po(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let f=0,h=n.count;f<h;f++)n.setXYZ(f,0,0,0);let r=new oe,o=new oe,a=new oe,s=new oe,l=new oe,c=new oe,d=new oe,u=new oe;if(e)for(let f=0,h=e.count;f<h;f+=3){let p=e.getX(f+0),m=e.getX(f+1),g=e.getX(f+2);r.fromBufferAttribute(t,p),o.fromBufferAttribute(t,m),a.fromBufferAttribute(t,g),d.subVectors(a,o),u.subVectors(r,o),d.cross(u),s.fromBufferAttribute(n,p),l.fromBufferAttribute(n,m),c.fromBufferAttribute(n,g),s.add(d),l.add(d),c.add(d),n.setXYZ(p,s.x,s.y,s.z),n.setXYZ(m,l.x,l.y,l.z),n.setXYZ(g,c.x,c.y,c.z)}else for(let f=0,h=t.count;f<h;f+=3)r.fromBufferAttribute(t,f+0),o.fromBufferAttribute(t,f+1),a.fromBufferAttribute(t,f+2),d.subVectors(a,o),u.subVectors(r,o),d.cross(u),n.setXYZ(f+0,d.x,d.y,d.z),n.setXYZ(f+1,d.x,d.y,d.z),n.setXYZ(f+2,d.x,d.y,d.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)Ki.fromBufferAttribute(e,t),Ki.normalize(),e.setXYZ(t,Ki.x,Ki.y,Ki.z)}toNonIndexed(){function e(s,l){let c=s.array,d=s.itemSize,u=s.normalized,f=new c.constructor(l.length*d),h=0,p=0;for(let m=0,g=l.length;m<g;m++){s.isInterleavedBufferAttribute?h=l[m]*s.data.stride+s.offset:h=l[m]*d;for(let b=0;b<d;b++)f[p++]=c[h++]}return new Po(f,d,u)}if(this.index===null)return Ot("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let t=new i,n=this.index.array,r=this.attributes;for(let s in r){let l=r[s],c=e(l,n);t.setAttribute(s,c)}let o=this.morphAttributes;for(let s in o){let l=[],c=o[s];for(let d=0,u=c.length;d<u;d++){let f=c[d],h=e(f,n);l.push(h)}t.morphAttributes[s]=l}t.morphTargetsRelative=this.morphTargetsRelative;let a=this.groups;for(let s=0,l=a.length;s<l;s++){let c=a[s];t.addGroup(c.start,c.count,c.materialIndex)}return t}toJSON(){let e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){let l=this.parameters;for(let c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let n=this.attributes;for(let l in n){let c=n[l];e.data.attributes[l]=c.toJSON(e.data)}let r={},o=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],d=[];for(let u=0,f=c.length;u<f;u++){let h=c[u];d.push(h.toJSON(e.data))}d.length>0&&(r[l]=d,o=!0)}o&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));let s=this.boundingSphere;return s!==null&&(e.data.boundingSphere=s.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let n=e.index;n!==null&&this.setIndex(n.clone());let r=e.attributes;for(let c in r){let d=r[c];this.setAttribute(c,d.clone(t))}let o=e.morphAttributes;for(let c in o){let d=[],u=o[c];for(let f=0,h=u.length;f<h;f++)d.push(u[f].clone(t));this.morphAttributes[c]=d}this.morphTargetsRelative=e.morphTargetsRelative;let a=e.groups;for(let c=0,d=a.length;c<d;c++){let u=a[c];this.addGroup(u.start,u.count,u.materialIndex)}let s=e.boundingBox;s!==null&&(this.boundingBox=s.clone());let l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}},UL=new jn,au=new El,Ay=new Ec,VL=new oe,Oy=new oe,Py=new oe,Iy=new oe,LM=new oe,ky=new oe,HL=new oe,Ry=new oe,zr=class extends ko{constructor(e=new Fi,t=new ag){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){let t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){let r=t[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,a=r.length;o<a;o++){let s=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=o}}}}getVertexPosition(e,t){let n=this.geometry,r=n.attributes.position,o=n.morphAttributes.position,a=n.morphTargetsRelative;t.fromBufferAttribute(r,e);let s=this.morphTargetInfluences;if(o&&s){ky.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let d=s[l],u=o[l];d!==0&&(LM.fromBufferAttribute(u,e),a?ky.addScaledVector(LM,d):ky.addScaledVector(LM.sub(t),d))}t.add(ky)}return t}raycast(e,t){let n=this.geometry,r=this.material,o=this.matrixWorld;r!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Ay.copy(n.boundingSphere),Ay.applyMatrix4(o),au.copy(e.ray).recast(e.near),!(Ay.containsPoint(au.origin)===!1&&(au.intersectSphere(Ay,VL)===null||au.origin.distanceToSquared(VL)>(e.far-e.near)**2))&&(UL.copy(o).invert(),au.copy(e.ray).applyMatrix4(UL),!(n.boundingBox!==null&&au.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,au)))}_computeIntersections(e,t,n){let r,o=this.geometry,a=this.material,s=o.index,l=o.attributes.position,c=o.attributes.uv,d=o.attributes.uv1,u=o.attributes.normal,f=o.groups,h=o.drawRange;if(s!==null)if(Array.isArray(a))for(let p=0,m=f.length;p<m;p++){let g=f[p],b=a[g.materialIndex],_=Math.max(g.start,h.start),w=Math.min(s.count,Math.min(g.start+g.count,h.start+h.count));for(let T=_,E=w;T<E;T+=3){let k=s.getX(T),O=s.getX(T+1),N=s.getX(T+2);r=Ny(this,b,e,n,c,d,u,k,O,N),r&&(r.faceIndex=Math.floor(T/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),m=Math.min(s.count,h.start+h.count);for(let g=p,b=m;g<b;g+=3){let _=s.getX(g),w=s.getX(g+1),T=s.getX(g+2);r=Ny(this,a,e,n,c,d,u,_,w,T),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}else if(l!==void 0)if(Array.isArray(a))for(let p=0,m=f.length;p<m;p++){let g=f[p],b=a[g.materialIndex],_=Math.max(g.start,h.start),w=Math.min(l.count,Math.min(g.start+g.count,h.start+h.count));for(let T=_,E=w;T<E;T+=3){let k=T,O=T+1,N=T+2;r=Ny(this,b,e,n,c,d,u,k,O,N),r&&(r.faceIndex=Math.floor(T/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),m=Math.min(l.count,h.start+h.count);for(let g=p,b=m;g<b;g+=3){let _=g,w=g+1,T=g+2;r=Ny(this,a,e,n,c,d,u,_,w,T),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}}};function O$(i,e,t,n,r,o,a,s){let l;if(e.side===Ur?l=n.intersectTriangle(a,o,r,!0,s):l=n.intersectTriangle(r,o,a,e.side===Lr,s),l===null)return null;Ry.copy(s),Ry.applyMatrix4(i.matrixWorld);let c=t.ray.origin.distanceTo(Ry);return c<t.near||c>t.far?null:{distance:c,point:Ry.clone(),object:i}}function Ny(i,e,t,n,r,o,a,s,l,c){i.getVertexPosition(s,Oy),i.getVertexPosition(l,Py),i.getVertexPosition(c,Iy);let d=O$(i,e,t,n,Oy,Py,Iy,HL);if(d){let u=new oe;Sc.getBarycoord(HL,Oy,Py,Iy,u),r&&(d.uv=Sc.getInterpolatedAttribute(r,s,l,c,u,new It)),o&&(d.uv1=Sc.getInterpolatedAttribute(o,s,l,c,u,new It)),a&&(d.normal=Sc.getInterpolatedAttribute(a,s,l,c,u,new oe),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));let f={a:s,b:l,c,normal:new oe,materialIndex:0};Sc.getNormal(Oy,Py,Iy,f.normal),d.face=f,d.barycoord=u}return d}var Ih=class i extends Fi{constructor(e=1,t=1,n=1,r=1,o=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:o,depthSegments:a};let s=this;r=Math.floor(r),o=Math.floor(o),a=Math.floor(a);let l=[],c=[],d=[],u=[],f=0,h=0;p("z","y","x",-1,-1,n,t,e,a,o,0),p("z","y","x",1,-1,n,t,-e,a,o,1),p("x","z","y",1,1,e,n,t,r,a,2),p("x","z","y",1,-1,e,n,-t,r,a,3),p("x","y","z",1,-1,e,t,n,r,o,4),p("x","y","z",-1,-1,e,t,-n,r,o,5),this.setIndex(l),this.setAttribute("position",new gi(c,3)),this.setAttribute("normal",new gi(d,3)),this.setAttribute("uv",new gi(u,2));function p(m,g,b,_,w,T,E,k,O,N,A){let L=T/O,V=E/N,K=T/2,q=E/2,ee=k/2,ne=O+1,ae=N+1,Z=0,he=0,Oe=new oe;for(let Ie=0;Ie<ae;Ie++){let Se=Ie*V-q;for(let ze=0;ze<ne;ze++){let _e=ze*L-K;Oe[m]=_e*_,Oe[g]=Se*w,Oe[b]=ee,c.push(Oe.x,Oe.y,Oe.z),Oe[m]=0,Oe[g]=0,Oe[b]=k>0?1:-1,d.push(Oe.x,Oe.y,Oe.z),u.push(ze/O),u.push(1-Ie/N),Z+=1}}for(let Ie=0;Ie<N;Ie++)for(let Se=0;Se<O;Se++){let ze=f+Se+ne*Ie,_e=f+Se+ne*(Ie+1),Ge=f+(Se+1)+ne*(Ie+1),gt=f+(Se+1)+ne*Ie;l.push(ze,_e,gt),l.push(_e,Ge,gt),he+=6}s.addGroup(h,he,A),h+=he,f+=Z}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new i(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}};function Cu(i){let e={};for(let t in i){e[t]={};for(let n in i[t]){let r=i[t][n];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(Ot("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=r.clone():Array.isArray(r)?e[t][n]=r.slice():e[t][n]=r}}return e}function xr(i){let e={};for(let t=0;t<i.length;t++){let n=Cu(i[t]);for(let r in n)e[r]=n[r]}return e}function P$(i){let e=[];for(let t=0;t<i.length;t++)e.push(i[t].clone());return e}function _D(i){let e=i.getRenderTarget();return e===null?i.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:tn.workingColorSpace}var F3={clone:Cu,merge:xr},I$=`void main() {
|
|
5
|
+
`).forEach(t=>{let n=t.indexOf(":");if(n>0){let r=t.slice(0,n),o=t.slice(n+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,n)=>{this.addHeaderEntry(n,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,n])=>{this.setHeaderEntries(t,n)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof i?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){let t=new i;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof i?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let n=e.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(e.name,t);let r=(e.op==="a"?this.headers.get(t):void 0)||[];r.push(...n),this.headers.set(t,r);break;case"d":let o=e.value;if(!o)this.headers.delete(t),this.normalizedNames.delete(t);else{let a=this.headers.get(t);if(!a)return;a=a.filter(s=>o.indexOf(s)===-1),a.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,a)}break}}addHeaderEntry(e,t){let n=e.toLowerCase();this.maybeSetNormalizedName(e,n),this.headers.has(n)?this.headers.get(n).push(t):this.headers.set(n,[t])}setHeaderEntries(e,t){let n=(Array.isArray(t)?t:[t]).map(o=>o.toString()),r=e.toLowerCase();this.headers.set(r,n),this.maybeSetNormalizedName(e,r)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var iy=class{map=new Map;set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}},ry=class{encodeKey(e){return kF(e)}encodeValue(e){return kF(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function N7(i,e){let t=new Map;return i.length>0&&i.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[a,s]=o==-1?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,o)),e.decodeValue(r.slice(o+1))],l=t.get(a)||[];l.push(s),t.set(a,l)}),t}var F7=/%(\d[a-f0-9])/gi,L7={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function kF(i){return encodeURIComponent(i).replace(F7,(e,t)=>L7[t]??e)}function ny(i){return`${i}`}var aa=class i{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new ry,e.fromString){if(e.fromObject)throw new nt(2805,!1);this.map=N7(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let n=e.fromObject[t],r=Array.isArray(n)?n.map(ny):[ny(n)];this.map.set(t,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(n=>{let r=e[n];Array.isArray(r)?r.forEach(o=>{t.push({param:n,value:o,op:"a"})}):t.push({param:n,value:r,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(n=>t+"="+this.encoder.encodeValue(n)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new i({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=(e.op==="a"?this.map.get(e.param):void 0)||[];t.push(ny(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let n=this.map.get(e.param)||[],r=n.indexOf(ny(e.value));r!==-1&&n.splice(r,1),n.length>0?this.map.set(e.param,n):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};function B7(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function RF(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function NF(i){return typeof Blob<"u"&&i instanceof Blob}function FF(i){return typeof FormData<"u"&&i instanceof FormData}function z7(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var LF="Content-Type",BF="Accept",zF="text/plain",UF="application/json",U7=`${UF}, ${zF}, */*`,eh=class i{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(e,t,n,r){this.url=t,this.method=e.toUpperCase();let o;if(B7(this.method)||r?(this.body=n!==void 0?n:null,o=r):o=n,o){if(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,this.keepalive=!!o.keepalive,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),o.priority&&(this.priority=o.priority),o.cache&&(this.cache=o.cache),o.credentials&&(this.credentials=o.credentials),typeof o.timeout=="number"){if(o.timeout<1||!Number.isInteger(o.timeout))throw new nt(2822,"");this.timeout=o.timeout}o.mode&&(this.mode=o.mode),o.redirect&&(this.redirect=o.redirect),o.integrity&&(this.integrity=o.integrity),o.referrer&&(this.referrer=o.referrer),o.referrerPolicy&&(this.referrerPolicy=o.referrerPolicy),this.transferCache=o.transferCache}if(this.headers??=new sa,this.context??=new iy,!this.params)this.params=new aa,this.urlWithParams=t;else{let a=this.params.toString();if(a.length===0)this.urlWithParams=t;else{let s=t.indexOf("?"),l=s===-1?"?":s<t.length-1?"&":"";this.urlWithParams=t+l+a}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||RF(this.body)||NF(this.body)||FF(this.body)||z7(this.body)?this.body:this.body instanceof aa?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||FF(this.body)?null:NF(this.body)?this.body.type||null:RF(this.body)?null:typeof this.body=="string"?zF:this.body instanceof aa?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?UF:null}clone(e={}){let t=e.method||this.method,n=e.url||this.url,r=e.responseType||this.responseType,o=e.keepalive??this.keepalive,a=e.priority||this.priority,s=e.cache||this.cache,l=e.mode||this.mode,c=e.redirect||this.redirect,d=e.credentials||this.credentials,u=e.referrer||this.referrer,f=e.integrity||this.integrity,h=e.referrerPolicy||this.referrerPolicy,p=e.transferCache??this.transferCache,m=e.timeout??this.timeout,g=e.body!==void 0?e.body:this.body,b=e.withCredentials??this.withCredentials,_=e.reportProgress??this.reportProgress,w=e.headers||this.headers,T=e.params||this.params,E=e.context??this.context;return e.setHeaders!==void 0&&(w=Object.keys(e.setHeaders).reduce((k,O)=>k.set(O,e.setHeaders[O]),w)),e.setParams&&(T=Object.keys(e.setParams).reduce((k,O)=>k.set(O,e.setParams[O]),T)),new i(t,n,g,{params:T,headers:w,context:E,reportProgress:_,responseType:r,withCredentials:b,transferCache:p,keepalive:o,cache:s,priority:a,timeout:m,mode:l,redirect:c,credentials:d,referrer:u,integrity:f,referrerPolicy:h})}},Qd=(function(i){return i[i.Sent=0]="Sent",i[i.UploadProgress=1]="UploadProgress",i[i.ResponseHeader=2]="ResponseHeader",i[i.DownloadProgress=3]="DownloadProgress",i[i.Response=4]="Response",i[i.User=5]="User",i})(Qd||{}),th=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(e,t=200,n="OK"){this.headers=e.headers||new sa,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||n,this.url=e.url||null,this.redirected=e.redirected,this.responseType=e.responseType,this.ok=this.status>=200&&this.status<300}},oy=class i extends th{constructor(e={}){super(e)}type=Qd.ResponseHeader;clone(e={}){return new i({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},nh=class i extends th{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=Qd.Response;clone(e={}){return new i({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0,redirected:e.redirected??this.redirected,responseType:e.responseType??this.responseType})}},sc=class extends th{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},V7=200,H7=204;var G7=new lt("");var j7=/^\)\]\}',?\n/;var eM=(()=>{class i{xhrFactory;tracingService=U(xs,{optional:!0});constructor(t){this.xhrFactory=t}maybePropagateTrace(t){return this.tracingService?.propagate?this.tracingService.propagate(t):t}handle(t){if(t.method==="JSONP")throw new nt(-2800,!1);let n=this.xhrFactory;return $o(null).pipe(x1(()=>new Pn(o=>{let a=n.build();if(a.open(t.method,t.urlWithParams),t.withCredentials&&(a.withCredentials=!0),t.headers.forEach((g,b)=>a.setRequestHeader(g,b.join(","))),t.headers.has(BF)||a.setRequestHeader(BF,U7),!t.headers.has(LF)){let g=t.detectContentTypeHeader();g!==null&&a.setRequestHeader(LF,g)}if(t.timeout&&(a.timeout=t.timeout),t.responseType){let g=t.responseType.toLowerCase();a.responseType=g!=="json"?g:"text"}let s=t.serializeBody(),l=null,c=()=>{if(l!==null)return l;let g=a.statusText||"OK",b=new sa(a.getAllResponseHeaders()),_=a.responseURL||t.url;return l=new oy({headers:b,status:a.status,statusText:g,url:_}),l},d=this.maybePropagateTrace(()=>{let{headers:g,status:b,statusText:_,url:w}=c(),T=null;b!==H7&&(T=typeof a.response>"u"?a.responseText:a.response),b===0&&(b=T?V7:0);let E=b>=200&&b<300;if(t.responseType==="json"&&typeof T=="string"){let k=T;T=T.replace(j7,"");try{T=T!==""?JSON.parse(T):null}catch(O){T=k,E&&(E=!1,T={error:O,text:T})}}E?(o.next(new nh({body:T,headers:g,status:b,statusText:_,url:w||void 0})),o.complete()):o.error(new sc({error:T,headers:g,status:b,statusText:_,url:w||void 0}))}),u=this.maybePropagateTrace(g=>{let{url:b}=c(),_=new sc({error:g,status:a.status||0,statusText:a.statusText||"Unknown Error",url:b||void 0});o.error(_)}),f=u;t.timeout&&(f=this.maybePropagateTrace(g=>{let{url:b}=c(),_=new sc({error:new DOMException("Request timed out","TimeoutError"),status:a.status||0,statusText:a.statusText||"Request timeout",url:b||void 0});o.error(_)}));let h=!1,p=this.maybePropagateTrace(g=>{h||(o.next(c()),h=!0);let b={type:Qd.DownloadProgress,loaded:g.loaded};g.lengthComputable&&(b.total=g.total),t.responseType==="text"&&a.responseText&&(b.partialText=a.responseText),o.next(b)}),m=this.maybePropagateTrace(g=>{let b={type:Qd.UploadProgress,loaded:g.loaded};g.lengthComputable&&(b.total=g.total),o.next(b)});return a.addEventListener("load",d),a.addEventListener("error",u),a.addEventListener("timeout",f),a.addEventListener("abort",u),t.reportProgress&&(a.addEventListener("progress",p),s!==null&&a.upload&&a.upload.addEventListener("progress",m)),a.send(s),o.next({type:Qd.Sent}),()=>{a.removeEventListener("error",u),a.removeEventListener("abort",u),a.removeEventListener("load",d),a.removeEventListener("timeout",f),t.reportProgress&&(a.removeEventListener("progress",p),s!==null&&a.upload&&a.upload.removeEventListener("progress",m)),a.readyState!==a.DONE&&a.abort()}})))}static \u0275fac=function(n){return new(n||i)(rt(Zd))};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function W7(i,e){return e(i)}function Y7(i,e,t){return(n,r)=>Cf(t,()=>e(n,o=>i(o,r)))}var tM=new lt("",{factory:()=>[]}),nM=new lt(""),VF=new lt("",{factory:()=>!0});var iM=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=pe({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=rt(eM),r},providedIn:"root"})}return i})();var ay=(()=>{class i{backend;injector;chain=null;pendingTasks=U(zd);contributeToStability=U(VF);constructor(t,n){this.backend=t,this.injector=n}handle(t){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(tM),...this.injector.get(nM,[])]));this.chain=n.reduceRight((r,o)=>Y7(r,o,this.injector),W7)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(Gp(n))}else return this.chain(t,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||i)(rt(iM),rt(ur))};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),rM=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=pe({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=rt(ay),r},providedIn:"root"})}return i})();function QT(i,e){return{body:e,headers:i.headers,context:i.context,observe:i.observe,params:i.params,reportProgress:i.reportProgress,responseType:i.responseType,withCredentials:i.withCredentials,credentials:i.credentials,transferCache:i.transferCache,timeout:i.timeout,keepalive:i.keepalive,priority:i.priority,cache:i.cache,mode:i.mode,redirect:i.redirect,integrity:i.integrity,referrer:i.referrer,referrerPolicy:i.referrerPolicy}}var ih=(()=>{class i{handler;constructor(t){this.handler=t}request(t,n,r={}){let o;if(t instanceof eh)o=t;else{let l;r.headers instanceof sa?l=r.headers:l=new sa(r.headers);let c;r.params&&(r.params instanceof aa?c=r.params:c=new aa({fromObject:r.params})),o=new eh(t,n,r.body!==void 0?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache,keepalive:r.keepalive,priority:r.priority,cache:r.cache,mode:r.mode,redirect:r.redirect,credentials:r.credentials,referrer:r.referrer,referrerPolicy:r.referrerPolicy,integrity:r.integrity,timeout:r.timeout})}let a=$o(o).pipe(_1(l=>this.handler.handle(l)));if(t instanceof eh||r.observe==="events")return a;let s=a.pipe(y1(l=>l instanceof nh));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return s.pipe(Yi(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new nt(2806,!1);return l.body}));case"blob":return s.pipe(Yi(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new nt(2807,!1);return l.body}));case"text":return s.pipe(Yi(l=>{if(l.body!==null&&typeof l.body!="string")throw new nt(2808,!1);return l.body}));default:return s.pipe(Yi(l=>l.body))}case"response":return s;default:throw new nt(2809,!1)}}delete(t,n={}){return this.request("DELETE",t,n)}get(t,n={}){return this.request("GET",t,n)}head(t,n={}){return this.request("HEAD",t,n)}jsonp(t,n){return this.request("JSONP",t,{params:new aa().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,n={}){return this.request("OPTIONS",t,n)}patch(t,n,r={}){return this.request("PATCH",t,QT(r,n))}post(t,n,r={}){return this.request("POST",t,QT(r,n))}put(t,n,r={}){return this.request("PUT",t,QT(r,n))}static \u0275fac=function(n){return new(n||i)(rt(rM))};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var $7=new lt("",{factory:()=>!0}),X7="XSRF-TOKEN",q7=new lt("",{factory:()=>X7}),K7="X-XSRF-TOKEN",Z7=new lt("",{factory:()=>K7}),J7=(()=>{class i{cookieName=U(q7);doc=U(Un);lastCookieString="";lastToken=null;parseCount=0;getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Nm(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),HF=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=pe({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=rt(J7),r},providedIn:"root"})}return i})();function Q7(i,e){if(!U($7)||i.method==="GET"||i.method==="HEAD")return e(i);try{let r=U(Gv).href,{origin:o}=new URL(r),{origin:a}=new URL(i.url,o);if(o!==a)return e(i)}catch{return e(i)}let t=U(HF).getToken(),n=U(Z7);return t!=null&&!i.headers.has(n)&&(i=i.clone({headers:i.headers.set(n,t)})),e(i)}var oM=(function(i){return i[i.Interceptors=0]="Interceptors",i[i.LegacyInterceptors=1]="LegacyInterceptors",i[i.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",i[i.NoXsrfProtection=3]="NoXsrfProtection",i[i.JsonpSupport=4]="JsonpSupport",i[i.RequestsMadeViaParent=5]="RequestsMadeViaParent",i[i.Fetch=6]="Fetch",i})(oM||{});function eY(i,e){return{\u0275kind:i,\u0275providers:e}}function aM(...i){let e=[ih,ay,{provide:rM,useExisting:ay},{provide:iM,useFactory:()=>U(G7,{optional:!0})??U(eM)},{provide:tM,useValue:Q7,multi:!0}];for(let t of i)e.push(...t.\u0275providers);return Qs(e)}function sM(i){return eY(oM.Interceptors,i.map(e=>({provide:tM,useValue:e,multi:!0})))}var tY=new lt(""),nY="b",iY="h",rY="s",oY="st",aY="u",sY="rt",lM=new lt(""),lY=["GET","HEAD"];function WF(i,e){let a=e,{isCacheActive:t}=a,n=sn(a,["isCacheActive"]),{transferCache:r,method:o}=i;return!(!t||r===!1||o==="POST"&&!n.includePostRequests&&!r||o!=="POST"&&!lY.includes(o)||!n.includeRequestsWithAuthHeaders&&uY(i)||n.filter?.(i)===!1)}function YF(i,e){let{includeHeaders:t}=i,n=t;return typeof e=="object"&&e.includeHeaders&&(n=e.includeHeaders),n}function cY(i,e,t,n){let{transferCache:r}=i;if(!WF(i,e))return null;if(n)throw new nt(2803,!1);let o=i.url,a=$F(i,o),s=t.get(a,null),l=YF(e,r);if(s){let{[nY]:c,[sY]:d,[iY]:u,[rY]:f,[oY]:h,[aY]:p}=s,m=c;switch(d){case"arraybuffer":m=jF(c);break;case"blob":m=new Blob([jF(c)]);break}let g=new sa(u);return new nh({body:m,headers:g,status:f,statusText:h,url:p})}return null}function dY(i,e){let t=U(lM),n=U(Gf),r=U(tY,{optional:!0}),o=cY(i,t,n,r);if(o)return $o(o);let{transferCache:a}=i,s=YF(t,a),l=i.url,c=$F(i,l);return WF(i,t),e(i)}function uY(i){return i.headers.has("authorization")||i.headers.has("proxy-authorization")}function GF(i){return[...i.keys()].sort().map(e=>`${e}=${i.getAll(e)}`).join("&")}function $F(i,e){let{params:t,method:n,responseType:r}=i,o=GF(t),a=i.serializeBody();a instanceof URLSearchParams?a=GF(a):typeof a!="string"&&(a="");let s=[n,r,e,a,o].join("|"),l=fY(s);return l}function fY(i){let e=0;for(let t of i)e=Math.imul(31,e)+t.charCodeAt(0)<<0;return e+=2147483648,e.toString()}function jF(i){let e=atob(i);return Uint8Array.from(e,n=>n.charCodeAt(0)).buffer}function XF(i){return[{provide:lM,useFactory:()=>(Fa("NgHttpTransferCache"),B({isCacheActive:!0},i))},{provide:nM,useValue:dY,multi:!0},{provide:Kf,multi:!0,useFactory:()=>{let e=U(Mo),t=U(lM);return()=>{e.whenStable().then(()=>{t.isCacheActive=!1})}}}]}var Vm=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=pe({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=rt(hY),r},providedIn:"root"})}return i})(),hY=(()=>{class i extends Vm{_doc;constructor(t){super(),this._doc=t}sanitize(t,n){if(n==null)return null;switch(t){case Na.NONE:return n;case Na.HTML:return al(n,"HTML")?Ra(n):av(this._doc,String(n)).toString();case Na.STYLE:return al(n,"Style")?Ra(n):n;case Na.SCRIPT:if(al(n,"Script"))return Ra(n);throw new nt(5200,!1);case Na.URL:return al(n,"URL")?Ra(n):xm(String(n));case Na.RESOURCE_URL:if(al(n,"ResourceURL"))return Ra(n);throw new nt(5201,!1);default:throw new nt(5202,!1)}}bypassSecurityTrustHtml(t){return LE(t)}bypassSecurityTrustStyle(t){return BE(t)}bypassSecurityTrustScript(t){return zE(t)}bypassSecurityTrustUrl(t){return UE(t)}bypassSecurityTrustResourceUrl(t){return VE(t)}static \u0275fac=function(n){return new(n||i)(rt(Un))};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),sy=(function(i){return i[i.NoHttpTransferCache=0]="NoHttpTransferCache",i[i.HttpTransferCacheOptions=1]="HttpTransferCacheOptions",i[i.I18nSupport=2]="I18nSupport",i[i.EventReplay=3]="EventReplay",i[i.IncrementalHydration=4]="IncrementalHydration",i})(sy||{});function pY(i,e=[],t={}){return{\u0275kind:i,\u0275providers:e}}function qF(){return pY(sy.EventReplay,nF())}function KF(...i){let e=[],t=new Set;for(let{\u0275providers:r,\u0275kind:o}of i)t.add(o),r.length&&e.push(r);let n=t.has(sy.HttpTransferCacheOptions);return Qs([[],[],iF(),t.has(sy.NoHttpTransferCache)||n?[]:XF({}),e])}var rh=class i{loadingCount=R(0);isLoading=ve(()=>this.loadingCount()>0);show(){this.loadingCount.update(e=>e+1)}hide(){this.loadingCount.update(e=>Math.max(0,e-1))}reset(){this.loadingCount.set(0)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})};function ly(i){let e=a=>Array.isArray(a)?a.filter(s=>typeof s=="string").join(", "):"";if(!i)return"Unhandled error";let t=i?.error,n=e(t?.errors);if(n)return n;let r=e(t?.message??t?.Messages);if(r)return r;if(Array.isArray(t)&&t.length>0)return e(t)||"Unhandled error";if(typeof t=="string"&&t.trim())return t;if(Array.isArray(i)&&i.length>0)return e(i)||"Unhandled error";let o=e(i?.messages);if(o)return o;if(typeof i?.messages=="string"&&i.messages.trim())return i.messages;if(typeof i?.message=="string"&&i.message.trim())return i.message;if(t?.errors&&typeof t.errors=="object"&&!Array.isArray(t.errors)){let a=[];for(let s in t.errors)Object.prototype.hasOwnProperty.call(t.errors,s)&&a.push(...t.errors[s]??[]);if(a.length)return a.join(", ")}return i?.status===401?"Unauthorized: Please verify your credentials and try again":"Unhandled error"}var In=class i{toastsSignal=R([]);toasts=ve(()=>this.toastsSignal());defaultTimeoutMs=4500;showSuccess(e,t="Success"){this.pushToast("success",t,e)}showInfo(e,t="Info"){this.pushToast("info",t,e)}showWarn(e,t="Warning"){this.pushToast("warning",t,e)}showError(e,t="Error"){this.pushToast("error",t,e)}showContrast(e,t="Note"){this.pushToast("info",t,e)}showSecondary(e,t="Secondary"){this.pushToast("info",t,e)}dismissToast(e){this.toastsSignal.update(t=>t.filter(n=>n.id!==e))}pushToast(e,t,n){let r={id:Date.now()+Math.floor(Math.random()*1e3),type:e,title:t,message:n,timeout:this.defaultTimeoutMs};this.toastsSignal.update(o=>[...o,r]),setTimeout(()=>{this.dismissToast(r.id)},r.timeout)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})};var Hm=class i{constructor(e){this.toasterService=e}handleError(e){e instanceof sc&&this.showError(e)}showError(e){return this.toasterService.showError(ly(e)),Wl(()=>e)}static \u0275fac=function(t){return new(t||i)(rt(In))};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})};var ZF=(i,e)=>{let t=U(Hm),n=U(rh),r=i.headers.has("skipHandleError"),o=i.headers.get("Loader")==="true";return o&&n.show(),e(i).pipe(us(a=>(r||t.handleError(a),r?$o(null):Wl(()=>a))),Gp(()=>{o&&n.hide()}))};var JF=[ZF];var QF={apiUrl:"https://pixeasy-api-stage-cpe7dbf2f2gtg9bp.westus3-01.azurewebsites.net/api/"};var cy=new lt("ENV"),Qwe=new lt("LOADER_DELAY");var eL={provide:cy,useValue:QF};function dy(){return[xw(),KF(qF()),aM(sM(JF)),eL,rh]}var lc="#111827",cc="#ffffff",oh="rgba(15,23,42,0.45)",cM="#ffffff";var tL="design-export";var nL="jersey-design";var uy="f99808af-8dc9-467a-8acb-08de5fd2bd0f";var Ut={manifestLoadFailed:"Unable to load manifest",missingProductId:"Missing product id.",manifestAssetsLoadFailed:"Unable to load assets",manifestAssetsLoadDetail:"Unable to load one or more manifest assets.",noSvgLoadedToExport:"No SVG loaded to export",noSvgDocumentLoaded:"No SVG document is loaded.",failedToSerializeSvg:"Failed to serialize SVG.",missingApiKey:"Missing API key for design submission.",designSubmissionFailed:"Design submission failed.",submissionLoadFailed:"Unable to load submission for editing.",submissionNotFound:"Submission not found.",submissionInvalidPayload:"Submission payload is invalid for editing.",submissionProductMismatch:"Submission product does not match the current product and cannot be edited here.",designSubmittedTitle:"Design Submitted",no3dModelForThumbnail:"3D model is not available for thumbnail generation.",noSvgDesignLoaded:"No SVG design is loaded.",failedSerializeSvgForThumbnail:"Failed to serialize SVG for thumbnail generation.",noThumbnailsGenerated:"No thumbnails were generated.",invalidSubmissionThumbnails:"Submission requires exactly 4 thumbnails: front, right, back, left.",failedGenerateSubmissionThumbnails:"Failed to generate thumbnails for design submission.",failedGenerateThumbnails:"Failed to generate and download thumbnails.",nothingToCopy:"Nothing to copy.",jsonCopied:"JSON copied.",copyFailed:"Copy failed. Please copy manually.",errorLoadingFilesFromUrls:"Error loading files from URLs:",failedRenderSvgOnCanvas:"Failed to render SVG on canvas",overlaySyncFailed:"Overlay synchronization failed"},Es={svgRequired:"The design is not available. Please try again later or refresh the page.",svgUrlRequired:"Unable to load the design. Please try again.",invalidSvgContent:"The design file is not valid. Please refresh the page or try again later.",unableToParseSvg:"We couldn't process the design. Please refresh the page and try again.",noPathElements:"No customizable areas found in the design. Please contact support.",failedApplyPatternSvg:"Unable to apply the pattern. Please try again or select a different pattern.",invalidSvgPath:"The pattern could not be applied to this design. Please try a different pattern.",missingPathData:"The pattern is incomplete. Please select a different pattern and try again.",addPatternFromUrlFailed:"Error loading pattern:"},Ts={svgRequired:"Design Unavailable",svgUrlRequired:"Design Load Failed",invalidSvgContent:"Design Error",unableToParseSvg:"Design Error",noPathElements:"No Customizable Areas",failedApplyPatternSvg:"Pattern Failed",invalidSvgPath:"Pattern Not Compatible",missingPathData:"Pattern Error"},dc={garmentSvgRequired:"The design is not available. Please try again later or refresh the page.",patternSvgUrlRequired:"Unable to load the pattern. Please try again.",targetIdRequired:"This pattern cannot be applied to the current design. Please select a different pattern.",invalidSvgContent:"The design file is not valid. Please refresh the page or try again later.",noPatternDefinitionsImported:"This pattern is not compatible with the current design. Please try a different pattern.",noMatchingTargetIds:"This pattern cannot be applied to this area. Please select a different pattern or try another area.",skippedMissingTargetIds:"Some pattern areas are not available:",applyPatternFromUrlFailed:"Error loading pattern:",failedApplyPattern:"Unable to apply this pattern. Please try again or select a different pattern."},uc={garmentSvgRequired:"Design Unavailable",patternSvgUrlRequired:"Pattern Load Failed",targetIdRequired:"Pattern Not Compatible",invalidSvgContent:"Design Error",noPatternDefinitionsImported:"Pattern Not Available",noMatchingTargetIds:"Cannot Apply Pattern",failedApplyPattern:"Pattern Failed"},eu={failedFetchEffectSvg:"Failed to fetch effect SVG",failedIngestWarpEnvelope:"Failed to ingest warp envelope",unableLoadEffectSvgUrl:"Unable to load effect SVG from the configured URL.",warpSvgParsingError:"The warp SVG contains parsing errors.",warpSvgNeedsViewBox:"Warp SVG must define a viewBox attribute.",warpSvgInvalidViewBox:"Warp SVG viewBox is invalid.",warpSvgNeedsTopBottomPath:'Warp SVG must contain <path id="top"> and <path id="bottom"> elements with d attributes.',warpEnvelopeReadFailed:"Unable to read the warp envelope SVG."};var dM;(t=>{let i;(s=>(s.ArrayBuffer="arraybuffer",s.Blob="blob",s.JSON="json",s.Text="text"))(i=t.ResponseType||={});let e;(o=>(o.Body="body",o.Response="response"))(e=t.Observe||={})})(dM||={});var gr=class i{http=U(ih);toasterService=U(In);environment=U(cy);request(e,t={}){let h=e,{method:n,params:r,url:o}=h,a=sn(h,["method","params","url"]),{observe:s=dM.Observe.Body,skipHandleError:l,httpParamEncoder:c,loader:d}=t,u=this.removeDuplicateSlashes(`${t.apiName}${o}`),f=B({observe:s},a);return r&&(f.params=this.getParams(r,c)),f.headers=this.addLoaderHeader(d,f.headers),f.headers=this.addskipHandleError(l,f.headers),this.http.request(n,u,f).pipe(S1(p=>{p?.succeeded==!1&&!l&&this.handleError(p)}),us(p=>l?$o():Wl(()=>p)))}get(e,t={},n,r={}){return this.request({method:"GET",url:e,params:t,headers:n},B({apiName:this.environment.apiUrl,loader:!0},r))}post(e,t,n,r={}){return this.request({method:"POST",url:e,body:t,headers:n},B({apiName:this.environment.apiUrl},r))}put(e,t,n,r={}){return this.request({method:"PUT",url:e,body:t,headers:n},B({apiName:this.environment.apiUrl},r))}delete(e,t,n={}){return this.request({method:"DELETE",url:e,headers:t},B({apiName:this.environment.apiUrl},n))}getParams(e,t){let n=Object.entries(e).reduce((r,[o,a])=>(this.isUndefinedOrEmptyString(a)||a===null||(r[o]=a),r),{});return t?new aa({encoder:t,fromObject:n}):new aa({fromObject:n})}addLoaderHeader(e,t){let n=new sa;return t&&Object.keys(t).forEach(r=>{n=n.set(r,t[r])}),e&&(n=n.set("Loader","true")),n}addskipHandleError(e,t){return t=t||new sa,e&&(t=t.set("skipHandleError","true")),t}removeDuplicateSlashes(e){return e.replace(/([^:]\/)\/+/g,"$1")}handleError(e){return this.toasterService.showError(ly(e)),Wl(()=>e)}isUndefinedOrEmptyString(e){return e===void 0||e===""||e===null}static \u0275fac=function(t){return new(t||i)};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})};var Tn=class i{apiKey=R(null);userId=R(null);setApiKey(e){this.apiKey.set(e?.trim()||null)}setUserId(e){this.userId.set(e?.trim()||null)}setCredentials(e,t){this.setApiKey(e),this.setUserId(t)}getApiKey(){return this.apiKey()}getUserId(){return this.userId()}static \u0275fac=function(t){return new(t||i)};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})};var fy=class i{api=U(gr);stateService=U(Tn);getManifest(e,t,n,r){let o=r||this.stateService.apiKey();return this.api.get(`products/${e}/manifest`,B(B({},t?{preDesignId:t}:{}),n!==void 0?{useCdnUrl:n}:{}),o?{"X-API-Key":o}:void 0,{loader:!0})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})};var hy=class i{api=U(gr);stateService=U(Tn);getPublicDistributor(e){let t=e||this.stateService.apiKey()||"";return this.api.get("public/distributor",{},{"X-API-Key":t},{loader:!1,skipHandleError:!0})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})};var hl=(r=>(r.TEXT="TEXT",r.LOGO="LOGO",r.OVERLAY="OVERLAY",r.BACKGROUND="BACKGROUND",r))(hl||{}),pl={OVERLAY:"overlay",EFFECTS:"effects",COLOR:"color",EFFECT:"effect"},iL={removeWhiteBg:"Remove white bg",removingBg:"Removing...",removeWhiteBgTooltip:"Remove white background",logoToEdit:"Logo",widthLabel:"Width",heightLabel:"Height",resetTextDimensions:"Reset Width/Height",dimensionOutOfRange:"Value is out of allowed range for this overlay."};var py=class i{manifestApi=U(fy);publicDistributorApi=U(hy);brandingCache=new Map;resolveProductId(e){let t=e.runtimeConfig?.productId?.trim(),n=e.inputProductId?.trim();return t||n||e.fallbackProductId}resolveApiKey(e){let t=e.runtimeConfig?.apiKey?.trim(),n=e.inputApiKey?.trim();return t||n||null}buildManifestConfigSignature(e){let t=this.resolveProductId(e);if(!t)return null;let n=this.resolveApiKey(e)??"";return`${t}::${n}`}async fetchManifest(e){try{let t=await Di(this.manifestApi.getManifest(e.productId,e.preDesignId??null,e.useCdnUrl,e.apiKey));if(!t?.isSuccess)return{ok:!1,message:(t?.errors??["Unable to load manifest"])[0]};let n=t.data;if(!n)return{ok:!1,message:"Unable to load manifest"};let r=await this.resolveDistributorBranding(e.apiKey??null,n.distributorBranding??null);return n.distributorBranding=r,{ok:!0,data:n}}catch{return{ok:!1,message:"Unable to load manifest"}}}normalizeManifestData(e){let{data:t,preDesignId:n,selectedPredesignId:r,activeStepId:o}=e,a=t.preDesigns??[],s=n??t.preDesignId??t.selectedPreDesignId??t.activePreDesignId??(!r&&a.length?a[0]?.id??null:null),l=(t.personalizationObjectIdMap??t.placements??[]).map(p=>B({},p));l.filter(p=>(p.type??"").trim().toUpperCase()==="BACKGROUND").forEach(p=>{let b=(p.actionPathIdsCsv??p.actionItemId??"").toString().trim().split(",").map(_=>_.trim()).filter(_=>_.length>0).map(_=>_.startsWith("#")?_.slice(1).trim():_).filter(_=>_.length>0).join(",");p.actionPathIdsCsv=b,p.actionItemId=b});let c=t.steps??[],d=t.threeDFileLink??t.model?.url??"",u=t.mtlFileLink??t.model?.mtlUrl??null,f=this.normalizeThreeDVariants({variants:t.threeDVariants??[],fallbackThreeDFileLink:d,fallbackMaterialFileLink:u}),h=this.resolveSelectedThreeDVariant(f);return{productType:t.productType??null,resolvedPredesignId:s,selectedThreeDVariantId:h?.id??null,fontDataSourcePack:t.fontDataSourcePack??null,colorDataSourcePack:t.colorDataSourcePack??null,twoDViewTypes:t.twoDViewTypes??[],twoDVariants:t.twoDVariants??[],twoDDesignAreas:t.twoDDesignAreas??[],threeDVariants:f,threeDFileLink:h?.threeDFileLink??d,materialFileLink:h?.mtlFileLink??u,svgFileLink:t.svgFileLink??t.model?.svgUrl??"",svgViewBox:t.svgViewBox??null,printAreaWidthInches:Number.isFinite(t.printAreaWidthInches)?t.printAreaWidthInches:null,printAreaHeightInches:Number.isFinite(t.printAreaHeightInches)?t.printAreaHeightInches:null,customizations:t.customizations??[],predesigns:a,steps:c,pathIdAccordingLayers:t.layers??[],renderPathAccordingLayers:t.renderLayers??[],isShowWholeLayersOption:!!t.isShowWholeLayersOption,innerMaterialNames:t.innerMaterialNames??null,innerColor:t.innerColor??null,placements:l,nextActiveStepId:o||c[0]?.id||null,manifestMeta:t.meta??null,distributorBranding:t.distributorBranding??null}}normalizeThreeDVariants(e){let t=(e.variants??[]).filter(n=>!!n?.id).map(n=>({id:n.id,name:n.name??"",key:n.key??"",position:Number.isFinite(n.position)?n.position:0,isDefault:!!n.isDefault,threeDFileLink:n.threeDFileLink??null,mtlFileLink:n.mtlFileLink??null})).sort((n,r)=>n.position-r.position||n.name.localeCompare(r.name,void 0,{sensitivity:"base"}));return t.length>0?t:e.fallbackThreeDFileLink?[{id:"default-model",name:"Default",key:"default-model",position:0,isDefault:!0,threeDFileLink:e.fallbackThreeDFileLink,mtlFileLink:e.fallbackMaterialFileLink}]:[]}resolveSelectedThreeDVariant(e){return e.length?e.find(t=>t.isDefault)??[...e].sort((t,n)=>t.position-n.position||t.name.localeCompare(n.name,void 0,{sensitivity:"base"}))[0]:null}async resolveDistributorBranding(e,t){if(!e)return t;if(this.brandingCache.has(e)){let n=this.brandingCache.get(e)??null;if(n)return{distributorId:n.distributorId||t?.distributorId||"",distributorName:n.distributorName??t?.distributorName??null,logoUrl:n.logoUrl??t?.logoUrl??null,themePrimaryColor:n.themePrimaryColor??t?.themePrimaryColor??null,themeSecondaryColor:n.themeSecondaryColor??t?.themeSecondaryColor??null,themeAccentColor:n.themeAccentColor??t?.themeAccentColor??null,themeMode:t?.themeMode??null}}try{let n=await Di(this.publicDistributorApi.getPublicDistributor(e)),r=this.mapPublicDistributorBranding(n);return this.brandingCache.set(e,r),r?{distributorId:r.distributorId||t?.distributorId||"",distributorName:r.distributorName??t?.distributorName??null,logoUrl:r.logoUrl??t?.logoUrl??null,themePrimaryColor:r.themePrimaryColor??t?.themePrimaryColor??null,themeSecondaryColor:r.themeSecondaryColor??t?.themeSecondaryColor??null,themeAccentColor:r.themeAccentColor??t?.themeAccentColor??null,themeMode:t?.themeMode??null}:t}catch{return this.brandingCache.set(e,null),t}}mapPublicDistributorBranding(e){return e?.id?{distributorId:e.id,distributorName:e.name??null,logoUrl:e.branding?.logoUrl??null,themePrimaryColor:e.branding?.primaryColor??null,themeSecondaryColor:e.branding?.secondaryColor??null,themeAccentColor:e.branding?.accentColor??null,themeMode:null}:null}static \u0275fac=function(t){return new(t||i)};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})};var ah=class i{constructor(e){this.manifestService=e}toIdentityInput(e){return{runtimeConfig:e.runtimeConfig,inputProductId:e.inputProductId,inputApiKey:e.inputApiKey,fallbackProductId:e.fallbackProductId}}resolveProductId(e){return this.manifestService.resolveProductId(this.toIdentityInput(e))}resolveApiKey(e){return this.manifestService.resolveApiKey(this.toIdentityInput(e))}buildConfigSignature(e){return this.manifestService.buildManifestConfigSignature(this.toIdentityInput(e))}async loadManifest(e){let t=this.toIdentityInput(e),n=this.manifestService.resolveProductId(t),r=this.manifestService.resolveApiKey(t),o=this.manifestService.buildManifestConfigSignature(t);if(!n)return{ok:!1,message:Ut.missingProductId,productId:null,signature:o};let a=await this.manifestService.fetchManifest({productId:n,preDesignId:e.preDesignId??null,useCdnUrl:e.runtimeConfig?!0:void 0,apiKey:r});return a.ok?{ok:!0,normalized:this.manifestService.normalizeManifestData({data:a.data,preDesignId:e.preDesignId,selectedPredesignId:e.selectedPredesignId,activeStepId:e.activeStepId}),productId:n,apiKey:r,signature:o}:{ok:!1,message:a.message||Ut.manifestLoadFailed,productId:n,signature:o}}static \u0275fac=function(t){return new(t||i)(rt(py))};static \u0275prov=pe({token:i,factory:i.\u0275fac,providedIn:"root"})};var hL=(()=>{class i{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,n){this._renderer=t,this._elementRef=n}setProperty(t,n){this._renderer.setProperty(this._elementRef.nativeElement,t,n)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(n){return new(n||i)(Xt(Cs),Xt(fr))};static \u0275dir=qn({type:i})}return i})(),Xm=(()=>{class i extends hL{static \u0275fac=(()=>{let t;return function(r){return(t||(t=ol(i)))(r||i)}})();static \u0275dir=qn({type:i,features:[To]})}return i})(),fc=new lt(""),vY={provide:fc,useExisting:Or(()=>nu),multi:!0},nu=(()=>{class i extends Xm{writeValue(t){this.setProperty("checked",t)}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ol(i)))(r||i)}})();static \u0275dir=qn({type:i,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(n,r){n&1&&H("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[ia([vY]),To]})}return i})(),yY={provide:fc,useExisting:Or(()=>io),multi:!0};function _Y(){let i=ra()?ra().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var xY=new lt(""),io=(()=>{class i extends hL{_compositionMode;_composing=!1;constructor(t,n,r){super(t,n),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!_Y())}writeValue(t){let n=t??"";this.setProperty("value",n)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static \u0275fac=function(n){return new(n||i)(Xt(Cs),Xt(fr),Xt(xY,8))};static \u0275dir=qn({type:i,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,r){n&1&&H("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},standalone:!1,features:[ia([yY]),To]})}return i})();var gM=new lt(""),CY=new lt("");function SY(i){return e=>{if(e.value==null||i==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t<i?{min:{min:i,actual:e.value}}:null}}function wY(i){return e=>{if(e.value==null||i==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t>i?{max:{max:i,actual:e.value}}:null}}function rL(i){return null}function pL(i){return i!=null}function mL(i){return qf(i)?Hp(i):i}function gL(i){let e={};return i.forEach(t=>{e=t!=null?B(B({},e),t):e}),Object.keys(e).length===0?null:e}function bL(i,e){return e.map(t=>t(i))}function EY(i){return!i.validate}function vL(i){return i.map(e=>EY(e)?e:t=>e.validate(t))}function TY(i){if(!i)return null;let e=i.filter(pL);return e.length==0?null:function(t){return gL(bL(t,e))}}function yL(i){return i!=null?TY(vL(i)):null}function MY(i){if(!i)return null;let e=i.filter(pL);return e.length==0?null:function(t){let n=bL(t,e).map(mL);return v1(n).pipe(Yi(gL))}}function _L(i){return i!=null?MY(vL(i)):null}function oL(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function DY(i){return i._rawValidators}function AY(i){return i._rawAsyncValidators}function uM(i){return i?Array.isArray(i)?i:[i]:[]}function gy(i,e){return Array.isArray(i)?i.includes(e):i===e}function aL(i,e){let t=uM(e);return uM(i).forEach(r=>{gy(t,r)||t.push(r)}),t}function sL(i,e){return uM(e).filter(t=>!gy(i,t))}var by=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=yL(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=_L(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control?.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},fM=class extends by{name;get formDirective(){return null}get path(){return null}},$m=class extends by{_parent=null;name=null;valueAccessor=null},hM=class{_cd;constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var br=(()=>{class i extends hM{constructor(t){super(t)}static \u0275fac=function(n){return new(n||i)(Xt($m,2))};static \u0275dir=qn({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&Ee("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[To]})}return i})();var Gm="VALID",my="INVALID",sh="PENDING",jm="DISABLED",tu=class{},vy=class extends tu{value;source;constructor(e,t){super(),this.value=e,this.source=t}},Wm=class extends tu{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},Ym=class extends tu{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},lh=class extends tu{status;source;constructor(e,t){super(),this.status=e,this.source=t}};var pM=class extends tu{source;constructor(e){super(),this.source=e}};function OY(i){return(yy(i)?i.validators:i)||null}function PY(i){return Array.isArray(i)?yL(i):i||null}function IY(i,e){return(yy(e)?e.asyncValidators:i)||null}function kY(i){return Array.isArray(i)?_L(i):i||null}function yy(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}var mM=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return Pt(this.statusReactive)}set status(e){Pt(()=>this.statusReactive.set(e))}_status=ve(()=>this.statusReactive());statusReactive=R(void 0);get valid(){return this.status===Gm}get invalid(){return this.status===my}get pending(){return this.status==sh}get disabled(){return this.status===jm}get enabled(){return this.status!==jm}errors;get pristine(){return Pt(this.pristineReactive)}set pristine(e){Pt(()=>this.pristineReactive.set(e))}_pristine=ve(()=>this.pristineReactive());pristineReactive=R(!0);get dirty(){return!this.pristine}get touched(){return Pt(this.touchedReactive)}set touched(e){Pt(()=>this.touchedReactive.set(e))}_touched=ve(()=>this.touchedReactive());touchedReactive=R(!1);get untouched(){return!this.touched}_events=new Ma;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(aL(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(aL(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(sL(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(sL(e,this._rawAsyncValidators))}hasValidator(e){return gy(this._rawValidators,e)}hasAsyncValidator(e){return gy(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsTouched(Q(B({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new Ym(!0,n))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(e))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),e.onlySelf||this._parent?._updateTouched(e,n),t&&e.emitEvent!==!1&&this._events.next(new Ym(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty(Q(B({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new Wm(!1,n))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),e.onlySelf||this._parent?._updatePristine(e,n),t&&e.emitEvent!==!1&&this._events.next(new Wm(!0,n))}markAsPending(e={}){this.status=sh;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new lh(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending(Q(B({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=jm,this.errors=null,this._forEachChild(r=>{r.disable(Q(B({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new vy(this.value,n)),this._events.next(new lh(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Q(B({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=Gm,this._forEachChild(n=>{n.enable(Q(B({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(Q(B({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(e,t){e.onlySelf||(this._parent?.updateValueAndValidity(e),e.skipPristineCheck||this._parent?._updatePristine({},t),this._parent?._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Gm||this.status===sh)&&this._runAsyncValidator(n,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new vy(this.value,t)),this._events.next(new lh(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity(Q(B({},e),{sourceControl:t}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?jm:Gm}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=sh,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let n=mL(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(".")),t.length===0)?null:t.reduce((n,r)=>n&&n._find(r),this)}getError(e,t){let n=t?this.get(t):this;return n?.errors?n.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,n){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||n)&&this._events.next(new lh(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new yo,this.statusChanges=new yo}_calculateStatus(){return this._allControlsDisabled()?jm:this.errors?my:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(sh)?sh:this._anyControlsHaveStatus(my)?my:Gm}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,t){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,e.onlySelf||this._parent?._updatePristine(e,t),r&&this._events.next(new Wm(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new Ym(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){yy(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=PY(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=kY(this._rawAsyncValidators)}};var xL=new lt("",{factory:()=>bM}),bM="always";function RY(i,e){return[...e.path,i]}function NY(i,e,t=bM){LY(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),BY(i,e),UY(i,e),zY(i,e),FY(i,e)}function lL(i,e){i.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function FY(i,e){if(e.valueAccessor.setDisabledState){let t=n=>{e.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(t),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(t)})}}function LY(i,e){let t=DY(i);e.validator!==null?i.setValidators(oL(t,e.validator)):typeof t=="function"&&i.setValidators([t]);let n=AY(i);e.asyncValidator!==null?i.setAsyncValidators(oL(n,e.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();lL(e._rawValidators,r),lL(e._rawAsyncValidators,r)}function BY(i,e){e.valueAccessor.registerOnChange(t=>{i._pendingValue=t,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&CL(i,e)})}function zY(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&CL(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function CL(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function UY(i,e){let t=(n,r)=>{e.valueAccessor.writeValue(n),r&&e.viewToModelUpdate(n)};i.registerOnChange(t),e._registerOnDestroy(()=>{i._unregisterOnChange(t)})}function VY(i,e){if(!i.hasOwnProperty("model"))return!1;let t=i.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function HY(i){return Object.getPrototypeOf(i.constructor)===Xm}function GY(i,e){if(!e)return null;Array.isArray(e);let t,n,r;return e.forEach(o=>{o.constructor===io?t=o:HY(o)?n=o:r=o}),r||n||t||null}function cL(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function dL(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var jY=class extends mM{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,n){super(OY(t),IY(n,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),yy(t)&&(t.nonNullable||t.initialValueIsDefault)&&(dL(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&t.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,t.emitViewToModelChange!==!1)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),t.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,t?.emitEvent!==!1&&this._events.next(new pM(this))}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){cL(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){cL(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){dL(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var WY={provide:$m,useExisting:Or(()=>sr)},uL=Promise.resolve(),sr=(()=>{class i extends $m{_changeDetectorRef;callSetDisabledState;control=new jY;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new yo;constructor(t,n,r,o,a,s){super(),this._changeDetectorRef=a,this.callSetDisabledState=s,this._parent=t,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=GY(this,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let n=t.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),VY(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective?.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){NY(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(t){uL.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let n=t.isDisabled.currentValue,r=n!==0&&Vv(n);uL.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?RY(t,this._parent):[t]}static \u0275fac=function(n){return new(n||i)(Xt(fM,9),Xt(gM,10),Xt(CY,10),Xt(fc,10),Xt(Uv,8),Xt(xL,8))};static \u0275dir=qn({type:i,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[ia([WY]),To,Vf]})}return i})();var YY={provide:fc,useExisting:Or(()=>ml),multi:!0},ml=(()=>{class i extends Xm{writeValue(t){let n=t??"";this.setProperty("value",n)}registerOnChange(t){this.onChange=n=>{t(n==""?null:parseFloat(n))}}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ol(i)))(r||i)}})();static \u0275dir=qn({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,r){n&1&&H("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[ia([YY]),To]})}return i})();var $Y={provide:fc,useExisting:Or(()=>hc),multi:!0};function SL(i,e){return i==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function XY(i){return i.split(":")[0]}var hc=(()=>{class i extends Xm{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=U(Mo).injector;destroyRef=U(Xi);cdr=U(Uv);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,dv({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(t){this.cdr.markForCheck(),this.value=t;let n=this._getOptionId(t),r=SL(n,t);this.setProperty("value",r)}registerOnChange(t){this.onChange=n=>{this.value=this._getOptionValue(n),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n),t))return n;return null}_getOptionValue(t){let n=XY(t);return this._optionMap.has(n)?this._optionMap.get(n):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ol(i)))(r||i)}})();static \u0275dir=qn({type:i,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,r){n&1&&H("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[ia([$Y]),To]})}return i})(),pc=(()=>{class i{_element;_renderer;_select;id;constructor(t,n,r){this._element=t,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(t){this._select!=null&&(this._select._optionMap.set(this.id,t),this._setElementValue(SL(this.id,t)),this._select._writeValueAfterRender())}set value(t){this._setElementValue(t),this._select?._writeValueAfterRender()}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select?._optionMap.delete(this.id),this._select?._writeValueAfterRender()}static \u0275fac=function(n){return new(n||i)(Xt(fr),Xt(Cs),Xt(hc,9))};static \u0275dir=qn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})(),qY={provide:fc,useExisting:Or(()=>wL),multi:!0};function fL(i,e){return i==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function KY(i){return i.split(":")[0]}var wL=(()=>{class i extends Xm{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let n;if(Array.isArray(t)){let r=t.map(o=>this._getOptionId(o));n=(o,a)=>{o._setSelected(r.indexOf(a.toString())>-1)}}else n=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(t){this.onChange=n=>{let r=[],o=n.selectedOptions;if(o!==void 0){let a=o;for(let s=0;s<a.length;s++){let l=a[s],c=this._getOptionValue(l.value);r.push(c)}}else{let a=n.options;for(let s=0;s<a.length;s++){let l=a[s];if(l.selected){let c=this._getOptionValue(l.value);r.push(c)}}}this.value=r,t(r)}}_registerOption(t){let n=(this._idCounter++).toString();return this._optionMap.set(n,t),n}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n)._value,t))return n;return null}_getOptionValue(t){let n=KY(t);return this._optionMap.has(n)?this._optionMap.get(n)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ol(i)))(r||i)}})();static \u0275dir=qn({type:i,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,r){n&1&&H("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[ia([qY]),To]})}return i})(),mc=(()=>{class i{_element;_renderer;_select;id;_value;constructor(t,n,r){this._element=t,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(fL(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(fL(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(n){return new(n||i)(Xt(fr),Xt(Cs),Xt(wL,9))};static \u0275dir=qn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})();function EL(i){return typeof i=="number"?i:parseFloat(i)}var TL=(()=>{class i{_validator=rL;_onChange;_enabled;ngOnChanges(t){if(this.inputName in t){let n=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):rL,this._onChange?.()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}static \u0275fac=function(n){return new(n||i)};static \u0275dir=qn({type:i,features:[Vf]})}return i})(),ZY={provide:gM,useExisting:Or(()=>iu),multi:!0},iu=(()=>{class i extends TL{max;inputName="max";normalizeInput=t=>EL(t);createValidator=t=>wY(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=ol(i)))(r||i)}})();static \u0275dir=qn({type:i,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&Wt("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[ia([ZY]),To]})}return i})(),JY={provide:gM,useExisting:Or(()=>gl),multi:!0},gl=(()=>{class i extends TL{min;inputName="min";normalizeInput=t=>EL(t);createValidator=t=>SY(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=ol(i)))(r||i)}})();static \u0275dir=qn({type:i,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&Wt("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[ia([JY]),To]})}return i})();var QY=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=ll({type:i});static \u0275inj=ps({})}return i})();var oi=(()=>{class i{static withConfig(t){return{ngModule:i,providers:[{provide:xL,useValue:t.callSetDisabledState??bM}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=ll({type:i});static \u0275inj=ps({imports:[QY]})}return i})();var Oc={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Pc={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},t3=0,QM=1,n3=2;var yg=1,i3=2,zh=3,Lr=0,Ur=1,ua=2,Os=0,cu=1,eD=2,tD=3,nD=4,r3=5,wc=100,o3=101,a3=102,s3=103,l3=104,c3=200,d3=201,u3=202,f3=203,Gy=204,jy=205,h3=206,p3=207,m3=208,g3=209,b3=210,v3=211,y3=212,_3=213,x3=214,m_=0,g_=1,b_=2,du=3,v_=4,y_=5,__=6,x_=7,C_=0,C3=1,S3=2,ja=0,iD=1,rD=2,oD=3,yu=4,aD=5,sD=6,lD=7;var VM=300,Ic=301,_u=302,S_=303,w_=304,_g=306,Eh=1e3,_r=1001,Wy=1002,Ji=1003,w3=1004;var xg=1005;var bi=1006,E_=1007;var fa=1008;var oo=1009,cD=1010,dD=1011,Uh=1012,T_=1013,Wa=1014,Ya=1015,Ps=1016,M_=1017,D_=1018,Vh=1020,uD=35902,fD=35899,hD=1021,pD=1022,ha=1023,Ms=1026,kc=1027,mD=1028,A_=1029,xu=1030,O_=1031;var P_=1033,Cg=33776,Sg=33777,wg=33778,Eg=33779,I_=35840,k_=35841,R_=35842,N_=35843,F_=36196,L_=37492,B_=37496,z_=37488,U_=37489,V_=37490,H_=37491,G_=37808,j_=37809,W_=37810,Y_=37811,$_=37812,X_=37813,q_=37814,K_=37815,Z_=37816,J_=37817,Q_=37818,ex=37819,tx=37820,nx=37821,ix=36492,rx=36494,ox=36495,ax=36283,sx=36284,lx=36285,cx=36286;var ng=2300,Yy=2301,Hy=2302,HM=2400,GM=2401,jM=2402;var E3=3200;var dx=0,T3=1,Al="",kn="srgb",uu="srgb-linear",ig="linear",gn="srgb";var lu=7680;var WM=519,M3=512,D3=513,A3=514,ux=515,O3=516,P3=517,fx=518,I3=519,YM=35044;var gD="300 es",Ha=2e3,rg=2001;function bD(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}function e$(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function Th(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function k3(){let i=Th("canvas");return i.style.display="block",i}var ML={},Mh=null;function vD(...i){let e="THREE."+i.shift();Mh?Mh("log",e,...i):console.log(e,...i)}function Ot(...i){let e="THREE."+i.shift();Mh?Mh("warn",e,...i):console.warn(e,...i)}function kt(...i){let e="THREE."+i.shift();Mh?Mh("error",e,...i):console.error(e,...i)}function Dh(...i){let e=i.join(" ");e in ML||(ML[e]=!0,Ot(...i))}function R3(i,e,t){return new Promise(function(n,r){function o(){switch(i.clientWaitSync(e,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(o,t);break;default:n()}}setTimeout(o,t)})}var Ds=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){let n=this._listeners;if(n===void 0)return;let r=n[e];if(r!==void 0){let o=r.indexOf(t);o!==-1&&r.splice(o,1)}}dispatchEvent(e){let t=this._listeners;if(t===void 0)return;let n=t[e.type];if(n!==void 0){e.target=this;let r=n.slice(0);for(let o=0,a=r.length;o<a;o++)r[o].call(this,e);e.target=null}}},vr=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],DL=1234567,eg=Math.PI/180,Ah=180/Math.PI;function Hh(){let i=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(vr[i&255]+vr[i>>8&255]+vr[i>>16&255]+vr[i>>24&255]+"-"+vr[e&255]+vr[e>>8&255]+"-"+vr[e>>16&15|64]+vr[e>>24&255]+"-"+vr[t&63|128]+vr[t>>8&255]+"-"+vr[t>>16&255]+vr[t>>24&255]+vr[n&255]+vr[n>>8&255]+vr[n>>16&255]+vr[n>>24&255]).toLowerCase()}function nn(i,e,t){return Math.max(e,Math.min(t,i))}function yD(i,e){return(i%e+e)%e}function t$(i,e,t,n,r){return n+(i-e)*(r-n)/(t-e)}function n$(i,e,t){return i!==e?(t-i)/(e-i):0}function tg(i,e,t){return(1-t)*i+t*e}function i$(i,e,t,n){return tg(i,e,1-Math.exp(-t*n))}function r$(i,e=1){return e-Math.abs(yD(i,e*2)-e)}function o$(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function a$(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function s$(i,e){return i+Math.floor(Math.random()*(e-i+1))}function l$(i,e){return i+Math.random()*(e-i)}function c$(i){return i*(.5-Math.random())}function d$(i){i!==void 0&&(DL=i);let e=DL+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function u$(i){return i*eg}function f$(i){return i*Ah}function h$(i){return(i&i-1)===0&&i!==0}function p$(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function m$(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function g$(i,e,t,n,r){let o=Math.cos,a=Math.sin,s=o(t/2),l=a(t/2),c=o((e+n)/2),d=a((e+n)/2),u=o((e-n)/2),f=a((e-n)/2),h=o((n-e)/2),p=a((n-e)/2);switch(r){case"XYX":i.set(s*d,l*u,l*f,s*c);break;case"YZY":i.set(l*f,s*d,l*u,s*c);break;case"ZXZ":i.set(l*u,l*f,s*d,s*c);break;case"XZX":i.set(s*d,l*p,l*h,s*c);break;case"YXY":i.set(l*h,s*d,l*p,s*c);break;case"ZYZ":i.set(l*p,l*h,s*d,s*c);break;default:Ot("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function Ch(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function Fr(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return Math.round(i*4294967295);case Uint16Array:return Math.round(i*65535);case Uint8Array:return Math.round(i*255);case Int32Array:return Math.round(i*2147483647);case Int16Array:return Math.round(i*32767);case Int8Array:return Math.round(i*127);default:throw new Error("Invalid component type.")}}var dn={DEG2RAD:eg,RAD2DEG:Ah,generateUUID:Hh,clamp:nn,euclideanModulo:yD,mapLinear:t$,inverseLerp:n$,lerp:tg,damp:i$,pingpong:r$,smoothstep:o$,smootherstep:a$,randInt:s$,randFloat:l$,randFloatSpread:c$,seededRandom:d$,degToRad:u$,radToDeg:f$,isPowerOfTwo:h$,ceilPowerOfTwo:p$,floorPowerOfTwo:m$,setQuaternionFromProperEuler:g$,normalize:Fr,denormalize:Ch},It=class i{constructor(e=0,t=0){i.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=nn(this.x,e.x,t.x),this.y=nn(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=nn(this.x,e,t),this.y=nn(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(nn(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(nn(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),r=Math.sin(t),o=this.x-e.x,a=this.y-e.y;return this.x=o*n-a*r+e.x,this.y=o*r+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},da=class{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,o,a,s){let l=n[r+0],c=n[r+1],d=n[r+2],u=n[r+3],f=o[a+0],h=o[a+1],p=o[a+2],m=o[a+3];if(s<=0){e[t+0]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u;return}if(s>=1){e[t+0]=f,e[t+1]=h,e[t+2]=p,e[t+3]=m;return}if(u!==m||l!==f||c!==h||d!==p){let g=l*f+c*h+d*p+u*m;g<0&&(f=-f,h=-h,p=-p,m=-m,g=-g);let b=1-s;if(g<.9995){let _=Math.acos(g),w=Math.sin(_);b=Math.sin(b*_)/w,s=Math.sin(s*_)/w,l=l*b+f*s,c=c*b+h*s,d=d*b+p*s,u=u*b+m*s}else{l=l*b+f*s,c=c*b+h*s,d=d*b+p*s,u=u*b+m*s;let _=1/Math.sqrt(l*l+c*c+d*d+u*u);l*=_,c*=_,d*=_,u*=_}}e[t]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,o,a){let s=n[r],l=n[r+1],c=n[r+2],d=n[r+3],u=o[a],f=o[a+1],h=o[a+2],p=o[a+3];return e[t]=s*p+d*u+l*h-c*f,e[t+1]=l*p+d*f+c*u-s*h,e[t+2]=c*p+d*h+s*f-l*u,e[t+3]=d*p-s*u-l*f-c*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let n=e._x,r=e._y,o=e._z,a=e._order,s=Math.cos,l=Math.sin,c=s(n/2),d=s(r/2),u=s(o/2),f=l(n/2),h=l(r/2),p=l(o/2);switch(a){case"XYZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"YXZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"ZXY":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"ZYX":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"YZX":this._x=f*d*u+c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u-f*h*p;break;case"XZY":this._x=f*d*u-c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u+f*h*p;break;default:Ot("Quaternion: .setFromEuler() encountered an unknown order: "+a)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],r=t[4],o=t[8],a=t[1],s=t[5],l=t[9],c=t[2],d=t[6],u=t[10],f=n+s+u;if(f>0){let h=.5/Math.sqrt(f+1);this._w=.25/h,this._x=(d-l)*h,this._y=(o-c)*h,this._z=(a-r)*h}else if(n>s&&n>u){let h=2*Math.sqrt(1+n-s-u);this._w=(d-l)/h,this._x=.25*h,this._y=(r+a)/h,this._z=(o+c)/h}else if(s>u){let h=2*Math.sqrt(1+s-n-u);this._w=(o-c)/h,this._x=(r+a)/h,this._y=.25*h,this._z=(l+d)/h}else{let h=2*Math.sqrt(1+u-n-s);this._w=(a-r)/h,this._x=(o+c)/h,this._y=(l+d)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(nn(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(n===0)return this;let r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,r=e._y,o=e._z,a=e._w,s=t._x,l=t._y,c=t._z,d=t._w;return this._x=n*d+a*s+r*c-o*l,this._y=r*d+a*l+o*s-n*c,this._z=o*d+a*c+n*l-r*s,this._w=a*d-n*s-r*l-o*c,this._onChangeCallback(),this}slerp(e,t){if(t<=0)return this;if(t>=1)return this.copy(e);let n=e._x,r=e._y,o=e._z,a=e._w,s=this.dot(e);s<0&&(n=-n,r=-r,o=-o,a=-a,s=-s);let l=1-t;if(s<.9995){let c=Math.acos(s),d=Math.sin(c);l=Math.sin(l*c)/d,t=Math.sin(t*c)/d,this._x=this._x*l+n*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+a*t,this._onChangeCallback()}else this._x=this._x*l+n*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+a*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),o=Math.sqrt(n);return this.set(r*Math.sin(e),r*Math.cos(e),o*Math.sin(t),o*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},oe=class i{constructor(e=0,t=0,n=0){i.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(AL.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(AL.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[3]*n+o[6]*r,this.y=o[1]*t+o[4]*n+o[7]*r,this.z=o[2]*t+o[5]*n+o[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,o=e.elements,a=1/(o[3]*t+o[7]*n+o[11]*r+o[15]);return this.x=(o[0]*t+o[4]*n+o[8]*r+o[12])*a,this.y=(o[1]*t+o[5]*n+o[9]*r+o[13])*a,this.z=(o[2]*t+o[6]*n+o[10]*r+o[14])*a,this}applyQuaternion(e){let t=this.x,n=this.y,r=this.z,o=e.x,a=e.y,s=e.z,l=e.w,c=2*(a*r-s*n),d=2*(s*t-o*r),u=2*(o*n-a*t);return this.x=t+l*c+a*u-s*d,this.y=n+l*d+s*c-o*u,this.z=r+l*u+o*d-a*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,n=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r,this.y=o[1]*t+o[5]*n+o[9]*r,this.z=o[2]*t+o[6]*n+o[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=nn(this.x,e.x,t.x),this.y=nn(this.y,e.y,t.y),this.z=nn(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=nn(this.x,e,t),this.y=nn(this.y,e,t),this.z=nn(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(nn(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,r=e.y,o=e.z,a=t.x,s=t.y,l=t.z;return this.x=r*l-o*s,this.y=o*a-n*l,this.z=n*s-r*a,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return vM.copy(this).projectOnVector(e),this.sub(vM)}reflect(e){return this.sub(vM.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(nn(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},vM=new oe,AL=new da,qt=class i{constructor(e,t,n,r,o,a,s,l,c){i.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,r,o,a,s,l,c)}set(e,t,n,r,o,a,s,l,c){let d=this.elements;return d[0]=e,d[1]=r,d[2]=s,d[3]=t,d[4]=o,d[5]=l,d[6]=n,d[7]=a,d[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,o=this.elements,a=n[0],s=n[3],l=n[6],c=n[1],d=n[4],u=n[7],f=n[2],h=n[5],p=n[8],m=r[0],g=r[3],b=r[6],_=r[1],w=r[4],T=r[7],E=r[2],k=r[5],O=r[8];return o[0]=a*m+s*_+l*E,o[3]=a*g+s*w+l*k,o[6]=a*b+s*T+l*O,o[1]=c*m+d*_+u*E,o[4]=c*g+d*w+u*k,o[7]=c*b+d*T+u*O,o[2]=f*m+h*_+p*E,o[5]=f*g+h*w+p*k,o[8]=f*b+h*T+p*O,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],d=e[8];return t*a*d-t*s*c-n*o*d+n*s*l+r*o*c-r*a*l}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],d=e[8],u=d*a-s*c,f=s*l-d*o,h=c*o-a*l,p=t*u+n*f+r*h;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);let m=1/p;return e[0]=u*m,e[1]=(r*c-d*n)*m,e[2]=(s*n-r*a)*m,e[3]=f*m,e[4]=(d*t-r*l)*m,e[5]=(r*o-s*t)*m,e[6]=h*m,e[7]=(n*l-c*t)*m,e[8]=(a*t-n*o)*m,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,o,a,s){let l=Math.cos(o),c=Math.sin(o);return this.set(n*l,n*c,-n*(l*a+c*s)+a+e,-r*c,r*l,-r*(-c*a+l*s)+s+t,0,0,1),this}scale(e,t){return this.premultiply(yM.makeScale(e,t)),this}rotate(e){return this.premultiply(yM.makeRotation(-e)),this}translate(e,t){return this.premultiply(yM.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,n=e.elements;for(let r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}},yM=new qt,OL=new qt().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),PL=new qt().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function b$(){let i={enabled:!0,workingColorSpace:uu,spaces:{},convert:function(r,o,a){return this.enabled===!1||o===a||!o||!a||(this.spaces[o].transfer===gn&&(r.r=wl(r.r),r.g=wl(r.g),r.b=wl(r.b)),this.spaces[o].primaries!==this.spaces[a].primaries&&(r.applyMatrix3(this.spaces[o].toXYZ),r.applyMatrix3(this.spaces[a].fromXYZ)),this.spaces[a].transfer===gn&&(r.r=Sh(r.r),r.g=Sh(r.g),r.b=Sh(r.b))),r},workingToColorSpace:function(r,o){return this.convert(r,this.workingColorSpace,o)},colorSpaceToWorking:function(r,o){return this.convert(r,o,this.workingColorSpace)},getPrimaries:function(r){return this.spaces[r].primaries},getTransfer:function(r){return r===Al?ig:this.spaces[r].transfer},getToneMappingMode:function(r){return this.spaces[r].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(r,o=this.workingColorSpace){return r.fromArray(this.spaces[o].luminanceCoefficients)},define:function(r){Object.assign(this.spaces,r)},_getMatrix:function(r,o,a){return r.copy(this.spaces[o].toXYZ).multiply(this.spaces[a].fromXYZ)},_getDrawingBufferColorSpace:function(r){return this.spaces[r].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(r=this.workingColorSpace){return this.spaces[r].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(r,o){return Dh("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),i.workingToColorSpace(r,o)},toWorkingColorSpace:function(r,o){return Dh("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),i.colorSpaceToWorking(r,o)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return i.define({[uu]:{primaries:e,whitePoint:n,transfer:ig,toXYZ:OL,fromXYZ:PL,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:kn},outputColorSpaceConfig:{drawingBufferColorSpace:kn}},[kn]:{primaries:e,whitePoint:n,transfer:gn,toXYZ:OL,fromXYZ:PL,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:kn}}}),i}var tn=b$();function wl(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function Sh(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}var ch,$y=class{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{ch===void 0&&(ch=Th("canvas")),ch.width=e.width,ch.height=e.height;let r=ch.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=ch}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){let t=Th("canvas");t.width=e.width,t.height=e.height;let n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);let r=n.getImageData(0,0,e.width,e.height),o=r.data;for(let a=0;a<o.length;a++)o[a]=wl(o[a]/255)*255;return n.putImageData(r,0,0),t}else if(e.data){let t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(wl(t[n]/255)*255):t[n]=wl(t[n]);return{data:t,width:e.width,height:e.height}}else return Ot("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},v$=0,Oh=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:v$++}),this.uuid=Hh(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){let t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<"u"&&t instanceof VideoFrame?e.set(t.displayHeight,t.displayWidth,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){let t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];let n={uuid:this.uuid,url:""},r=this.data;if(r!==null){let o;if(Array.isArray(r)){o=[];for(let a=0,s=r.length;a<s;a++)r[a].isDataTexture?o.push(_M(r[a].image)):o.push(_M(r[a]))}else o=_M(r);n.url=o}return t||(e.images[this.uuid]=n),n}};function _M(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?$y.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(Ot("Texture: Unable to serialize Texture."),{})}var y$=0,xM=new oe,$a=(()=>{class i extends Ds{constructor(t=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=_r,o=_r,a=bi,s=fa,l=ha,c=oo,d=i.DEFAULT_ANISOTROPY,u=Al){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:y$++}),this.uuid=Hh(),this.name="",this.source=new Oh(t),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=o,this.magFilter=a,this.minFilter=s,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new It(0,0),this.repeat=new It(1,1),this.center=new It(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new qt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(xM).x}get height(){return this.source.getSize(xM).y}get depth(){return this.source.getSize(xM).z}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(t,n){this.updateRanges.push({start:t,count:n})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.isArrayTexture=t.isArrayTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}setValues(t){for(let n in t){let r=t[n];if(r===void 0){Ot(`Texture.setValues(): parameter '${n}' has value of undefined.`);continue}let o=this[n];if(o===void 0){Ot(`Texture.setValues(): property '${n}' does not exist.`);continue}o&&r&&o.isVector2&&r.isVector2||o&&r&&o.isVector3&&r.isVector3||o&&r&&o.isMatrix3&&r.isMatrix3?o.copy(r):this[n]=r}}toJSON(t){let n=t===void 0||typeof t=="string";if(!n&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];let r={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(r.userData=this.userData),n||(t.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==VM)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Eh:t.x=t.x-Math.floor(t.x);break;case _r:t.x=t.x<0?0:1;break;case Wy:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case Eh:t.y=t.y-Math.floor(t.y);break;case _r:t.y=t.y<0?0:1;break;case Wy:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}}return i.DEFAULT_IMAGE=null,i.DEFAULT_MAPPING=VM,i.DEFAULT_ANISOTROPY=1,i})(),Zn=class i{constructor(e=0,t=0,n=0,r=1){i.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,o=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*o,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*o,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*o,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*o,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,o,l=e.elements,c=l[0],d=l[4],u=l[8],f=l[1],h=l[5],p=l[9],m=l[2],g=l[6],b=l[10];if(Math.abs(d-f)<.01&&Math.abs(u-m)<.01&&Math.abs(p-g)<.01){if(Math.abs(d+f)<.1&&Math.abs(u+m)<.1&&Math.abs(p+g)<.1&&Math.abs(c+h+b-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let w=(c+1)/2,T=(h+1)/2,E=(b+1)/2,k=(d+f)/4,O=(u+m)/4,N=(p+g)/4;return w>T&&w>E?w<.01?(n=0,r=.707106781,o=.707106781):(n=Math.sqrt(w),r=k/n,o=O/n):T>E?T<.01?(n=.707106781,r=0,o=.707106781):(r=Math.sqrt(T),n=k/r,o=N/r):E<.01?(n=.707106781,r=.707106781,o=0):(o=Math.sqrt(E),n=O/o,r=N/o),this.set(n,r,o,t),this}let _=Math.sqrt((g-p)*(g-p)+(u-m)*(u-m)+(f-d)*(f-d));return Math.abs(_)<.001&&(_=1),this.x=(g-p)/_,this.y=(u-m)/_,this.z=(f-d)/_,this.w=Math.acos((c+h+b-1)/2),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=nn(this.x,e.x,t.x),this.y=nn(this.y,e.y,t.y),this.z=nn(this.z,e.z,t.z),this.w=nn(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=nn(this.x,e,t),this.y=nn(this.y,e,t),this.z=nn(this.z,e,t),this.w=nn(this.w,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(nn(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},Xy=class extends Ds{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:bi,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new Zn(0,0,e,t),this.scissorTest=!1,this.viewport=new Zn(0,0,e,t);let r={width:e,height:t,depth:n.depth},o=new $a(r);this.textures=[];let a=n.count;for(let s=0;s<a;s++)this.textures[s]=o.clone(),this.textures[s].isRenderTargetTexture=!0,this.textures[s].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){let t={minFilter:bi,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let n=0;n<this.textures.length;n++)this.textures[n].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,o=this.textures.length;r<o;r++)this.textures[r].image.width=e,this.textures[r].image.height=t,this.textures[r].image.depth=n,this.textures[r].isData3DTexture!==!0&&(this.textures[r].isArrayTexture=this.textures[r].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;let r=Object.assign({},e.textures[t].image);this.textures[t].source=new Oh(r)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},Io=class extends Xy{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}},og=class extends $a{constructor(e=null,t=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=Ji,this.minFilter=Ji,this.wrapR=_r,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var qy=class extends $a{constructor(e=null,t=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=Ji,this.minFilter=Ji,this.wrapR=_r,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Br=class{constructor(e=new oe(1/0,1/0,1/0),t=new oe(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(za.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(za.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let n=za.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);let n=e.geometry;if(n!==void 0){let o=n.getAttribute("position");if(t===!0&&o!==void 0&&e.isInstancedMesh!==!0)for(let a=0,s=o.count;a<s;a++)e.isMesh===!0?e.getVertexPosition(a,za):za.fromBufferAttribute(o,a),za.applyMatrix4(e.matrixWorld),this.expandByPoint(za);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),_y.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),_y.copy(n.boundingBox)),_y.applyMatrix4(e.matrixWorld),this.union(_y)}let r=e.children;for(let o=0,a=r.length;o<a;o++)this.expandByObject(r[o],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,za),za.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(qm),xy.subVectors(this.max,qm),dh.subVectors(e.a,qm),uh.subVectors(e.b,qm),fh.subVectors(e.c,qm),bc.subVectors(uh,dh),vc.subVectors(fh,uh),ru.subVectors(dh,fh);let t=[0,-bc.z,bc.y,0,-vc.z,vc.y,0,-ru.z,ru.y,bc.z,0,-bc.x,vc.z,0,-vc.x,ru.z,0,-ru.x,-bc.y,bc.x,0,-vc.y,vc.x,0,-ru.y,ru.x,0];return!CM(t,dh,uh,fh,xy)||(t=[1,0,0,0,1,0,0,0,1],!CM(t,dh,uh,fh,xy))?!1:(Cy.crossVectors(bc,vc),t=[Cy.x,Cy.y,Cy.z],CM(t,dh,uh,fh,xy))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,za).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(za).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(bl[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),bl[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),bl[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),bl[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),bl[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),bl[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),bl[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),bl[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(bl),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}},bl=[new oe,new oe,new oe,new oe,new oe,new oe,new oe,new oe],za=new oe,_y=new Br,dh=new oe,uh=new oe,fh=new oe,bc=new oe,vc=new oe,ru=new oe,qm=new oe,xy=new oe,Cy=new oe,ou=new oe;function CM(i,e,t,n,r){for(let o=0,a=i.length-3;o<=a;o+=3){ou.fromArray(i,o);let s=r.x*Math.abs(ou.x)+r.y*Math.abs(ou.y)+r.z*Math.abs(ou.z),l=e.dot(ou),c=t.dot(ou),d=n.dot(ou);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>s)return!1}return!0}var _$=new Br,Km=new oe,SM=new oe,Ec=class{constructor(e=new oe,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let n=this.center;t!==void 0?n.copy(t):_$.setFromPoints(e).getCenter(n);let r=0;for(let o=0,a=e.length;o<a;o++)r=Math.max(r,n.distanceToSquared(e[o]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){let t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){let n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Km.subVectors(e,this.center);let t=Km.lengthSq();if(t>this.radius*this.radius){let n=Math.sqrt(t),r=(n-this.radius)*.5;this.center.addScaledVector(Km,r/n),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(SM.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Km.copy(e.center).add(SM)),this.expandByPoint(Km.copy(e.center).sub(SM))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}},vl=new oe,wM=new oe,Sy=new oe,yc=new oe,EM=new oe,wy=new oe,TM=new oe,El=class{constructor(e=new oe,t=new oe(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,vl)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=vl.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(vl.copy(this.origin).addScaledVector(this.direction,t),vl.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){wM.copy(e).add(t).multiplyScalar(.5),Sy.copy(t).sub(e).normalize(),yc.copy(this.origin).sub(wM);let o=e.distanceTo(t)*.5,a=-this.direction.dot(Sy),s=yc.dot(this.direction),l=-yc.dot(Sy),c=yc.lengthSq(),d=Math.abs(1-a*a),u,f,h,p;if(d>0)if(u=a*l-s,f=a*s-l,p=o*d,u>=0)if(f>=-p)if(f<=p){let m=1/d;u*=m,f*=m,h=u*(u+a*f+2*s)+f*(a*u+f+2*l)+c}else f=o,u=Math.max(0,-(a*f+s)),h=-u*u+f*(f+2*l)+c;else f=-o,u=Math.max(0,-(a*f+s)),h=-u*u+f*(f+2*l)+c;else f<=-p?(u=Math.max(0,-(-a*o+s)),f=u>0?-o:Math.min(Math.max(-o,-l),o),h=-u*u+f*(f+2*l)+c):f<=p?(u=0,f=Math.min(Math.max(-o,-l),o),h=f*(f+2*l)+c):(u=Math.max(0,-(a*o+s)),f=u>0?o:Math.min(Math.max(-o,-l),o),h=-u*u+f*(f+2*l)+c);else f=a>0?-o:o,u=Math.max(0,-(a*f+s)),h=-u*u+f*(f+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,u),r&&r.copy(wM).addScaledVector(Sy,f),h}intersectSphere(e,t){vl.subVectors(e.center,this.origin);let n=vl.dot(this.direction),r=vl.dot(vl)-n*n,o=e.radius*e.radius;if(r>o)return null;let a=Math.sqrt(o-r),s=n-a,l=n+a;return l<0?null:s<0?this.at(l,t):this.at(s,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,o,a,s,l,c=1/this.direction.x,d=1/this.direction.y,u=1/this.direction.z,f=this.origin;return c>=0?(n=(e.min.x-f.x)*c,r=(e.max.x-f.x)*c):(n=(e.max.x-f.x)*c,r=(e.min.x-f.x)*c),d>=0?(o=(e.min.y-f.y)*d,a=(e.max.y-f.y)*d):(o=(e.max.y-f.y)*d,a=(e.min.y-f.y)*d),n>a||o>r||((o>n||isNaN(n))&&(n=o),(a<r||isNaN(r))&&(r=a),u>=0?(s=(e.min.z-f.z)*u,l=(e.max.z-f.z)*u):(s=(e.max.z-f.z)*u,l=(e.min.z-f.z)*u),n>l||s>r)||((s>n||n!==n)&&(n=s),(l<r||r!==r)&&(r=l),r<0)?null:this.at(n>=0?n:r,t)}intersectsBox(e){return this.intersectBox(e,vl)!==null}intersectTriangle(e,t,n,r,o){EM.subVectors(t,e),wy.subVectors(n,e),TM.crossVectors(EM,wy);let a=this.direction.dot(TM),s;if(a>0){if(r)return null;s=1}else if(a<0)s=-1,a=-a;else return null;yc.subVectors(this.origin,e);let l=s*this.direction.dot(wy.crossVectors(yc,wy));if(l<0)return null;let c=s*this.direction.dot(EM.cross(yc));if(c<0||l+c>a)return null;let d=-s*yc.dot(TM);return d<0?null:this.at(d/a,o)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},jn=class i{constructor(e,t,n,r,o,a,s,l,c,d,u,f,h,p,m,g){i.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,r,o,a,s,l,c,d,u,f,h,p,m,g)}set(e,t,n,r,o,a,s,l,c,d,u,f,h,p,m,g){let b=this.elements;return b[0]=e,b[4]=t,b[8]=n,b[12]=r,b[1]=o,b[5]=a,b[9]=s,b[13]=l,b[2]=c,b[6]=d,b[10]=u,b[14]=f,b[3]=h,b[7]=p,b[11]=m,b[15]=g,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new i().fromArray(this.elements)}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){let t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),n.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this)}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();let t=this.elements,n=e.elements,r=1/hh.setFromMatrixColumn(e,0).length(),o=1/hh.setFromMatrixColumn(e,1).length(),a=1/hh.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*o,t[5]=n[5]*o,t[6]=n[6]*o,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,n=e.x,r=e.y,o=e.z,a=Math.cos(n),s=Math.sin(n),l=Math.cos(r),c=Math.sin(r),d=Math.cos(o),u=Math.sin(o);if(e.order==="XYZ"){let f=a*d,h=a*u,p=s*d,m=s*u;t[0]=l*d,t[4]=-l*u,t[8]=c,t[1]=h+p*c,t[5]=f-m*c,t[9]=-s*l,t[2]=m-f*c,t[6]=p+h*c,t[10]=a*l}else if(e.order==="YXZ"){let f=l*d,h=l*u,p=c*d,m=c*u;t[0]=f+m*s,t[4]=p*s-h,t[8]=a*c,t[1]=a*u,t[5]=a*d,t[9]=-s,t[2]=h*s-p,t[6]=m+f*s,t[10]=a*l}else if(e.order==="ZXY"){let f=l*d,h=l*u,p=c*d,m=c*u;t[0]=f-m*s,t[4]=-a*u,t[8]=p+h*s,t[1]=h+p*s,t[5]=a*d,t[9]=m-f*s,t[2]=-a*c,t[6]=s,t[10]=a*l}else if(e.order==="ZYX"){let f=a*d,h=a*u,p=s*d,m=s*u;t[0]=l*d,t[4]=p*c-h,t[8]=f*c+m,t[1]=l*u,t[5]=m*c+f,t[9]=h*c-p,t[2]=-c,t[6]=s*l,t[10]=a*l}else if(e.order==="YZX"){let f=a*l,h=a*c,p=s*l,m=s*c;t[0]=l*d,t[4]=m-f*u,t[8]=p*u+h,t[1]=u,t[5]=a*d,t[9]=-s*d,t[2]=-c*d,t[6]=h*u+p,t[10]=f-m*u}else if(e.order==="XZY"){let f=a*l,h=a*c,p=s*l,m=s*c;t[0]=l*d,t[4]=-u,t[8]=c*d,t[1]=f*u+m,t[5]=a*d,t[9]=h*u-p,t[2]=p*u-h,t[6]=s*d,t[10]=m*u+f}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(x$,e,C$)}lookAt(e,t,n){let r=this.elements;return Ao.subVectors(e,t),Ao.lengthSq()===0&&(Ao.z=1),Ao.normalize(),_c.crossVectors(n,Ao),_c.lengthSq()===0&&(Math.abs(n.z)===1?Ao.x+=1e-4:Ao.z+=1e-4,Ao.normalize(),_c.crossVectors(n,Ao)),_c.normalize(),Ey.crossVectors(Ao,_c),r[0]=_c.x,r[4]=Ey.x,r[8]=Ao.x,r[1]=_c.y,r[5]=Ey.y,r[9]=Ao.y,r[2]=_c.z,r[6]=Ey.z,r[10]=Ao.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,o=this.elements,a=n[0],s=n[4],l=n[8],c=n[12],d=n[1],u=n[5],f=n[9],h=n[13],p=n[2],m=n[6],g=n[10],b=n[14],_=n[3],w=n[7],T=n[11],E=n[15],k=r[0],O=r[4],N=r[8],A=r[12],L=r[1],V=r[5],K=r[9],q=r[13],ee=r[2],ne=r[6],ae=r[10],Z=r[14],he=r[3],Oe=r[7],Ie=r[11],Se=r[15];return o[0]=a*k+s*L+l*ee+c*he,o[4]=a*O+s*V+l*ne+c*Oe,o[8]=a*N+s*K+l*ae+c*Ie,o[12]=a*A+s*q+l*Z+c*Se,o[1]=d*k+u*L+f*ee+h*he,o[5]=d*O+u*V+f*ne+h*Oe,o[9]=d*N+u*K+f*ae+h*Ie,o[13]=d*A+u*q+f*Z+h*Se,o[2]=p*k+m*L+g*ee+b*he,o[6]=p*O+m*V+g*ne+b*Oe,o[10]=p*N+m*K+g*ae+b*Ie,o[14]=p*A+m*q+g*Z+b*Se,o[3]=_*k+w*L+T*ee+E*he,o[7]=_*O+w*V+T*ne+E*Oe,o[11]=_*N+w*K+T*ae+E*Ie,o[15]=_*A+w*q+T*Z+E*Se,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[4],r=e[8],o=e[12],a=e[1],s=e[5],l=e[9],c=e[13],d=e[2],u=e[6],f=e[10],h=e[14],p=e[3],m=e[7],g=e[11],b=e[15],_=l*h-c*f,w=s*h-c*u,T=s*f-l*u,E=a*h-c*d,k=a*f-l*d,O=a*u-s*d;return t*(m*_-g*w+b*T)-n*(p*_-g*E+b*k)+r*(p*w-m*E+b*O)-o*(p*T-m*k+g*O)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],d=e[8],u=e[9],f=e[10],h=e[11],p=e[12],m=e[13],g=e[14],b=e[15],_=u*g*c-m*f*c+m*l*h-s*g*h-u*l*b+s*f*b,w=p*f*c-d*g*c-p*l*h+a*g*h+d*l*b-a*f*b,T=d*m*c-p*u*c+p*s*h-a*m*h-d*s*b+a*u*b,E=p*u*l-d*m*l-p*s*f+a*m*f+d*s*g-a*u*g,k=t*_+n*w+r*T+o*E;if(k===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let O=1/k;return e[0]=_*O,e[1]=(m*f*o-u*g*o-m*r*h+n*g*h+u*r*b-n*f*b)*O,e[2]=(s*g*o-m*l*o+m*r*c-n*g*c-s*r*b+n*l*b)*O,e[3]=(u*l*o-s*f*o-u*r*c+n*f*c+s*r*h-n*l*h)*O,e[4]=w*O,e[5]=(d*g*o-p*f*o+p*r*h-t*g*h-d*r*b+t*f*b)*O,e[6]=(p*l*o-a*g*o-p*r*c+t*g*c+a*r*b-t*l*b)*O,e[7]=(a*f*o-d*l*o+d*r*c-t*f*c-a*r*h+t*l*h)*O,e[8]=T*O,e[9]=(p*u*o-d*m*o-p*n*h+t*m*h+d*n*b-t*u*b)*O,e[10]=(a*m*o-p*s*o+p*n*c-t*m*c-a*n*b+t*s*b)*O,e[11]=(d*s*o-a*u*o-d*n*c+t*u*c+a*n*h-t*s*h)*O,e[12]=E*O,e[13]=(d*m*r-p*u*r+p*n*f-t*m*f-d*n*g+t*u*g)*O,e[14]=(p*s*r-a*m*r-p*n*l+t*m*l+a*n*g-t*s*g)*O,e[15]=(a*u*r-d*s*r+d*n*l-t*u*l-a*n*f+t*s*f)*O,this}scale(e){let t=this.elements,n=e.x,r=e.y,o=e.z;return t[0]*=n,t[4]*=r,t[8]*=o,t[1]*=n,t[5]*=r,t[9]*=o,t[2]*=n,t[6]*=r,t[10]*=o,t[3]*=n,t[7]*=r,t[11]*=o,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),r=Math.sin(t),o=1-n,a=e.x,s=e.y,l=e.z,c=o*a,d=o*s;return this.set(c*a+n,c*s-r*l,c*l+r*s,0,c*s+r*l,d*s+n,d*l-r*a,0,c*l-r*s,d*l+r*a,o*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,o,a){return this.set(1,n,o,0,e,1,a,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){let r=this.elements,o=t._x,a=t._y,s=t._z,l=t._w,c=o+o,d=a+a,u=s+s,f=o*c,h=o*d,p=o*u,m=a*d,g=a*u,b=s*u,_=l*c,w=l*d,T=l*u,E=n.x,k=n.y,O=n.z;return r[0]=(1-(m+b))*E,r[1]=(h+T)*E,r[2]=(p-w)*E,r[3]=0,r[4]=(h-T)*k,r[5]=(1-(f+b))*k,r[6]=(g+_)*k,r[7]=0,r[8]=(p+w)*O,r[9]=(g-_)*O,r[10]=(1-(f+m))*O,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){let r=this.elements;if(e.x=r[12],e.y=r[13],e.z=r[14],this.determinant()===0)return n.set(1,1,1),t.identity(),this;let o=hh.set(r[0],r[1],r[2]).length(),a=hh.set(r[4],r[5],r[6]).length(),s=hh.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),Ua.copy(this);let c=1/o,d=1/a,u=1/s;return Ua.elements[0]*=c,Ua.elements[1]*=c,Ua.elements[2]*=c,Ua.elements[4]*=d,Ua.elements[5]*=d,Ua.elements[6]*=d,Ua.elements[8]*=u,Ua.elements[9]*=u,Ua.elements[10]*=u,t.setFromRotationMatrix(Ua),n.x=o,n.y=a,n.z=s,this}makePerspective(e,t,n,r,o,a,s=Ha,l=!1){let c=this.elements,d=2*o/(t-e),u=2*o/(n-r),f=(t+e)/(t-e),h=(n+r)/(n-r),p,m;if(l)p=o/(a-o),m=a*o/(a-o);else if(s===Ha)p=-(a+o)/(a-o),m=-2*a*o/(a-o);else if(s===rg)p=-a/(a-o),m=-a*o/(a-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);return c[0]=d,c[4]=0,c[8]=f,c[12]=0,c[1]=0,c[5]=u,c[9]=h,c[13]=0,c[2]=0,c[6]=0,c[10]=p,c[14]=m,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,n,r,o,a,s=Ha,l=!1){let c=this.elements,d=2/(t-e),u=2/(n-r),f=-(t+e)/(t-e),h=-(n+r)/(n-r),p,m;if(l)p=1/(a-o),m=a/(a-o);else if(s===Ha)p=-2/(a-o),m=-(a+o)/(a-o);else if(s===rg)p=-1/(a-o),m=-o/(a-o);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);return c[0]=d,c[4]=0,c[8]=0,c[12]=f,c[1]=0,c[5]=u,c[9]=0,c[13]=h,c[2]=0,c[6]=0,c[10]=p,c[14]=m,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){let t=this.elements,n=e.elements;for(let r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}},hh=new oe,Ua=new jn,x$=new oe(0,0,0),C$=new oe(1,1,1),_c=new oe,Ey=new oe,Ao=new oe,IL=new jn,kL=new da,Tl=(()=>{class i{constructor(t=0,n=0,r=0,o=i.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=n,this._z=r,this._order=o}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,n,r,o=this._order){return this._x=t,this._y=n,this._z=r,this._order=o,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,n=this._order,r=!0){let o=t.elements,a=o[0],s=o[4],l=o[8],c=o[1],d=o[5],u=o[9],f=o[2],h=o[6],p=o[10];switch(n){case"XYZ":this._y=Math.asin(nn(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,p),this._z=Math.atan2(-s,a)):(this._x=Math.atan2(h,d),this._z=0);break;case"YXZ":this._x=Math.asin(-nn(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(l,p),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-f,a),this._z=0);break;case"ZXY":this._x=Math.asin(nn(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,p),this._z=Math.atan2(-s,d)):(this._y=0,this._z=Math.atan2(c,a));break;case"ZYX":this._y=Math.asin(-nn(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(c,a)):(this._x=0,this._z=Math.atan2(-s,d));break;case"YZX":this._z=Math.asin(nn(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-u,d),this._y=Math.atan2(-f,a)):(this._x=0,this._y=Math.atan2(l,p));break;case"XZY":this._z=Math.asin(-nn(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(h,d),this._y=Math.atan2(l,a)):(this._x=Math.atan2(-u,p),this._y=0);break;default:Ot("Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(t,n,r){return IL.makeRotationFromQuaternion(t),this.setFromRotationMatrix(IL,n,r)}setFromVector3(t,n=this._order){return this.set(t.x,t.y,t.z,n)}reorder(t){return kL.setFromEuler(this),this.setFromQuaternion(kL,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],n=0){return t[n]=this._x,t[n+1]=this._y,t[n+2]=this._z,t[n+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}return i.DEFAULT_ORDER="XYZ",i})(),Ph=class{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}},S$=0,RL=new oe,ph=new da,yl=new jn,Ty=new oe,Zm=new oe,w$=new oe,E$=new da,NL=new oe(1,0,0),FL=new oe(0,1,0),LL=new oe(0,0,1),BL={type:"added"},T$={type:"removed"},mh={type:"childadded",child:null},MM={type:"childremoved",child:null},ko=(()=>{class i extends Ds{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:S$++}),this.uuid=Hh(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();let t=new oe,n=new Tl,r=new da,o=new oe(1,1,1);function a(){r.setFromEuler(n,!1)}function s(){n.setFromQuaternion(r,void 0,!1)}n._onChange(a),r._onChange(s),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:o},modelViewMatrix:{value:new jn},normalMatrix:{value:new qt}}),this.matrix=new jn,this.matrixWorld=new jn,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Ph,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,n){this.quaternion.setFromAxisAngle(t,n)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,n){return ph.setFromAxisAngle(t,n),this.quaternion.multiply(ph),this}rotateOnWorldAxis(t,n){return ph.setFromAxisAngle(t,n),this.quaternion.premultiply(ph),this}rotateX(t){return this.rotateOnAxis(NL,t)}rotateY(t){return this.rotateOnAxis(FL,t)}rotateZ(t){return this.rotateOnAxis(LL,t)}translateOnAxis(t,n){return RL.copy(t).applyQuaternion(this.quaternion),this.position.add(RL.multiplyScalar(n)),this}translateX(t){return this.translateOnAxis(NL,t)}translateY(t){return this.translateOnAxis(FL,t)}translateZ(t){return this.translateOnAxis(LL,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(yl.copy(this.matrixWorld).invert())}lookAt(t,n,r){t.isVector3?Ty.copy(t):Ty.set(t,n,r);let o=this.parent;this.updateWorldMatrix(!0,!1),Zm.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?yl.lookAt(Zm,Ty,this.up):yl.lookAt(Ty,Zm,this.up),this.quaternion.setFromRotationMatrix(yl),o&&(yl.extractRotation(o.matrixWorld),ph.setFromRotationMatrix(yl),this.quaternion.premultiply(ph.invert()))}add(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return t===this?(kt("Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(BL),mh.child=t,this.dispatchEvent(mh),mh.child=null):kt("Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.remove(arguments[r]);return this}let n=this.children.indexOf(t);return n!==-1&&(t.parent=null,this.children.splice(n,1),t.dispatchEvent(T$),MM.child=t,this.dispatchEvent(MM),MM.child=null),this}removeFromParent(){let t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),yl.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),yl.multiply(t.parent.matrixWorld)),t.applyMatrix4(yl),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(BL),mh.child=t,this.dispatchEvent(mh),mh.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,n){if(this[t]===n)return this;for(let r=0,o=this.children.length;r<o;r++){let s=this.children[r].getObjectByProperty(t,n);if(s!==void 0)return s}}getObjectsByProperty(t,n,r=[]){this[t]===n&&r.push(this);let o=this.children;for(let a=0,s=o.length;a<s;a++)o[a].getObjectsByProperty(t,n,r);return r}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Zm,t,w$),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Zm,E$,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let n=this.matrixWorld.elements;return t.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(t){t(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverseVisible(t)}traverseAncestors(t){let n=this.parent;n!==null&&(t(n),n.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].updateMatrixWorld(t)}updateWorldMatrix(t,n){let r=this.parent;if(t===!0&&r!==null&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),n===!0){let o=this.children;for(let a=0,s=o.length;a<s;a++)o[a].updateWorldMatrix(!1,!0)}}toJSON(t){let n=t===void 0||typeof t=="string",r={};n&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});let o={};o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.castShadow===!0&&(o.castShadow=!0),this.receiveShadow===!0&&(o.receiveShadow=!0),this.visible===!1&&(o.visible=!1),this.frustumCulled===!1&&(o.frustumCulled=!1),this.renderOrder!==0&&(o.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(o.userData=this.userData),o.layers=this.layers.mask,o.matrix=this.matrix.toArray(),o.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(o.matrixAutoUpdate=!1),this.isInstancedMesh&&(o.type="InstancedMesh",o.count=this.count,o.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(o.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(o.type="BatchedMesh",o.perObjectFrustumCulled=this.perObjectFrustumCulled,o.sortObjects=this.sortObjects,o.drawRanges=this._drawRanges,o.reservedRanges=this._reservedRanges,o.geometryInfo=this._geometryInfo.map(l=>Q(B({},l),{boundingBox:l.boundingBox?l.boundingBox.toJSON():void 0,boundingSphere:l.boundingSphere?l.boundingSphere.toJSON():void 0})),o.instanceInfo=this._instanceInfo.map(l=>B({},l)),o.availableInstanceIds=this._availableInstanceIds.slice(),o.availableGeometryIds=this._availableGeometryIds.slice(),o.nextIndexStart=this._nextIndexStart,o.nextVertexStart=this._nextVertexStart,o.geometryCount=this._geometryCount,o.maxInstanceCount=this._maxInstanceCount,o.maxVertexCount=this._maxVertexCount,o.maxIndexCount=this._maxIndexCount,o.geometryInitialized=this._geometryInitialized,o.matricesTexture=this._matricesTexture.toJSON(t),o.indirectTexture=this._indirectTexture.toJSON(t),this._colorsTexture!==null&&(o.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(o.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(o.boundingBox=this.boundingBox.toJSON()));function a(l,c){return l[c.uuid]===void 0&&(l[c.uuid]=c.toJSON(t)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?o.background=this.background.toJSON():this.background.isTexture&&(o.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(o.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){o.geometry=a(t.geometries,this.geometry);let l=this.geometry.parameters;if(l!==void 0&&l.shapes!==void 0){let c=l.shapes;if(Array.isArray(c))for(let d=0,u=c.length;d<u;d++){let f=c[d];a(t.shapes,f)}else a(t.shapes,c)}}if(this.isSkinnedMesh&&(o.bindMode=this.bindMode,o.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(a(t.skeletons,this.skeleton),o.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let l=[];for(let c=0,d=this.material.length;c<d;c++)l.push(a(t.materials,this.material[c]));o.material=l}else o.material=a(t.materials,this.material);if(this.children.length>0){o.children=[];for(let l=0;l<this.children.length;l++)o.children.push(this.children[l].toJSON(t).object)}if(this.animations.length>0){o.animations=[];for(let l=0;l<this.animations.length;l++){let c=this.animations[l];o.animations.push(a(t.animations,c))}}if(n){let l=s(t.geometries),c=s(t.materials),d=s(t.textures),u=s(t.images),f=s(t.shapes),h=s(t.skeletons),p=s(t.animations),m=s(t.nodes);l.length>0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),u.length>0&&(r.images=u),f.length>0&&(r.shapes=f),h.length>0&&(r.skeletons=h),p.length>0&&(r.animations=p),m.length>0&&(r.nodes=m)}return r.object=o,r;function s(l){let c=[];for(let d in l){let u=l[d];delete u.metadata,c.push(u)}return c}}clone(t){return new this.constructor().copy(this,t)}copy(t,n=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),n===!0)for(let r=0;r<t.children.length;r++){let o=t.children[r];this.add(o.clone())}return this}}return i.DEFAULT_UP=new oe(0,1,0),i.DEFAULT_MATRIX_AUTO_UPDATE=!0,i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0,i})(),Va=new oe,_l=new oe,DM=new oe,xl=new oe,gh=new oe,bh=new oe,zL=new oe,AM=new oe,OM=new oe,PM=new oe,IM=new Zn,kM=new Zn,RM=new Zn,Sc=class i{constructor(e=new oe,t=new oe,n=new oe){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),Va.subVectors(e,t),r.cross(Va);let o=r.lengthSq();return o>0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(e,t,n,r,o){Va.subVectors(r,t),_l.subVectors(n,t),DM.subVectors(e,t);let a=Va.dot(Va),s=Va.dot(_l),l=Va.dot(DM),c=_l.dot(_l),d=_l.dot(DM),u=a*c-s*s;if(u===0)return o.set(0,0,0),null;let f=1/u,h=(c*l-s*d)*f,p=(a*d-s*l)*f;return o.set(1-h-p,p,h)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,xl)===null?!1:xl.x>=0&&xl.y>=0&&xl.x+xl.y<=1}static getInterpolation(e,t,n,r,o,a,s,l){return this.getBarycoord(e,t,n,r,xl)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(o,xl.x),l.addScaledVector(a,xl.y),l.addScaledVector(s,xl.z),l)}static getInterpolatedAttribute(e,t,n,r,o,a){return IM.setScalar(0),kM.setScalar(0),RM.setScalar(0),IM.fromBufferAttribute(e,t),kM.fromBufferAttribute(e,n),RM.fromBufferAttribute(e,r),a.setScalar(0),a.addScaledVector(IM,o.x),a.addScaledVector(kM,o.y),a.addScaledVector(RM,o.z),a}static isFrontFacing(e,t,n,r){return Va.subVectors(n,t),_l.subVectors(e,t),Va.cross(_l).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Va.subVectors(this.c,this.b),_l.subVectors(this.a,this.b),Va.cross(_l).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return i.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return i.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,r,o){return i.getInterpolation(e,this.a,this.b,this.c,t,n,r,o)}containsPoint(e){return i.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return i.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n=this.a,r=this.b,o=this.c,a,s;gh.subVectors(r,n),bh.subVectors(o,n),AM.subVectors(e,n);let l=gh.dot(AM),c=bh.dot(AM);if(l<=0&&c<=0)return t.copy(n);OM.subVectors(e,r);let d=gh.dot(OM),u=bh.dot(OM);if(d>=0&&u<=d)return t.copy(r);let f=l*u-d*c;if(f<=0&&l>=0&&d<=0)return a=l/(l-d),t.copy(n).addScaledVector(gh,a);PM.subVectors(e,o);let h=gh.dot(PM),p=bh.dot(PM);if(p>=0&&h<=p)return t.copy(o);let m=h*c-l*p;if(m<=0&&c>=0&&p<=0)return s=c/(c-p),t.copy(n).addScaledVector(bh,s);let g=d*p-h*u;if(g<=0&&u-d>=0&&h-p>=0)return zL.subVectors(o,r),s=(u-d)/(u-d+(h-p)),t.copy(r).addScaledVector(zL,s);let b=1/(g+m+f);return a=m*b,s=f*b,t.copy(n).addScaledVector(gh,a).addScaledVector(bh,s)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},N3={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},xc={h:0,s:0,l:0},My={h:0,s:0,l:0};function NM(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*6*(2/3-t):i}var wt=class{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){let r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=kn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,tn.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=tn.workingColorSpace){return this.r=e,this.g=t,this.b=n,tn.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=tn.workingColorSpace){if(e=yD(e,1),t=nn(t,0,1),n=nn(n,0,1),t===0)this.r=this.g=this.b=n;else{let o=n<=.5?n*(1+t):n+t-n*t,a=2*n-o;this.r=NM(a,o,e+1/3),this.g=NM(a,o,e),this.b=NM(a,o,e-1/3)}return tn.colorSpaceToWorking(this,r),this}setStyle(e,t=kn){function n(o){o!==void 0&&parseFloat(o)<1&&Ot("Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let o,a=r[1],s=r[2];switch(a){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,t);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,t);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,t);break;default:Ot("Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let o=r[1],a=o.length;if(a===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,t);if(a===6)return this.setHex(parseInt(o,16),t);Ot("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=kn){let n=N3[e.toLowerCase()];return n!==void 0?this.setHex(n,t):Ot("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=wl(e.r),this.g=wl(e.g),this.b=wl(e.b),this}copyLinearToSRGB(e){return this.r=Sh(e.r),this.g=Sh(e.g),this.b=Sh(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=kn){return tn.workingToColorSpace(yr.copy(this),e),Math.round(nn(yr.r*255,0,255))*65536+Math.round(nn(yr.g*255,0,255))*256+Math.round(nn(yr.b*255,0,255))}getHexString(e=kn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=tn.workingColorSpace){tn.workingToColorSpace(yr.copy(this),t);let n=yr.r,r=yr.g,o=yr.b,a=Math.max(n,r,o),s=Math.min(n,r,o),l,c,d=(s+a)/2;if(s===a)l=0,c=0;else{let u=a-s;switch(c=d<=.5?u/(a+s):u/(2-a-s),a){case n:l=(r-o)/u+(r<o?6:0);break;case r:l=(o-n)/u+2;break;case o:l=(n-r)/u+4;break}l/=6}return e.h=l,e.s=c,e.l=d,e}getRGB(e,t=tn.workingColorSpace){return tn.workingToColorSpace(yr.copy(this),t),e.r=yr.r,e.g=yr.g,e.b=yr.b,e}getStyle(e=kn){tn.workingToColorSpace(yr.copy(this),e);let t=yr.r,n=yr.g,r=yr.b;return e!==kn?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(r*255)})`}offsetHSL(e,t,n){return this.getHSL(xc),this.setHSL(xc.h+e,xc.s+t,xc.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(xc),e.getHSL(My);let n=tg(xc.h,My.h,t),r=tg(xc.s,My.s,t),o=tg(xc.l,My.l,t);return this.setHSL(n,r,o),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let t=this.r,n=this.g,r=this.b,o=e.elements;return this.r=o[0]*t+o[3]*n+o[6]*r,this.g=o[1]*t+o[4]*n+o[7]*r,this.b=o[2]*t+o[5]*n+o[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},yr=new wt;wt.NAMES=N3;var M$=0,ro=class extends Ds{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:M$++}),this.uuid=Hh(),this.name="",this.type="Material",this.blending=cu,this.side=Lr,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Gy,this.blendDst=jy,this.blendEquation=wc,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new wt(0,0,0),this.blendAlpha=0,this.depthFunc=du,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=WM,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=lu,this.stencilZFail=lu,this.stencilZPass=lu,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let n=e[t];if(n===void 0){Ot(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){Ot(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});let n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==cu&&(n.blending=this.blending),this.side!==Lr&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==Gy&&(n.blendSrc=this.blendSrc),this.blendDst!==jy&&(n.blendDst=this.blendDst),this.blendEquation!==wc&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==du&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==WM&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==lu&&(n.stencilFail=this.stencilFail),this.stencilZFail!==lu&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==lu&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.allowOverride===!1&&(n.allowOverride=!1),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function r(o){let a=[];for(let s in o){let l=o[s];delete l.metadata,a.push(l)}return a}if(t){let o=r(e.textures),a=r(e.images);o.length>0&&(n.textures=o),a.length>0&&(n.images=a)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,n=null;if(t!==null){let r=t.length;n=new Array(r);for(let o=0;o!==r;++o)n[o]=t[o].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}},ag=class extends ro{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new wt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Tl,this.combine=C_,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}};var Pi=new oe,Dy=new It,D$=0,Po=class{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:D$++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=YM,this.updateRanges=[],this.gpuType=Ya,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,o=this.itemSize;r<o;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)Dy.fromBufferAttribute(this,t),Dy.applyMatrix3(e),this.setXY(t,Dy.x,Dy.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)Pi.fromBufferAttribute(this,t),Pi.applyMatrix3(e),this.setXYZ(t,Pi.x,Pi.y,Pi.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)Pi.fromBufferAttribute(this,t),Pi.applyMatrix4(e),this.setXYZ(t,Pi.x,Pi.y,Pi.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Pi.fromBufferAttribute(this,t),Pi.applyNormalMatrix(e),this.setXYZ(t,Pi.x,Pi.y,Pi.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Pi.fromBufferAttribute(this,t),Pi.transformDirection(e),this.setXYZ(t,Pi.x,Pi.y,Pi.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=Ch(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=Fr(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=Ch(t,this.array)),t}setX(e,t){return this.normalized&&(t=Fr(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=Ch(t,this.array)),t}setY(e,t){return this.normalized&&(t=Fr(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=Ch(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Fr(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=Ch(t,this.array)),t}setW(e,t){return this.normalized&&(t=Fr(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=Fr(t,this.array),n=Fr(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=Fr(t,this.array),n=Fr(n,this.array),r=Fr(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,o){return e*=this.itemSize,this.normalized&&(t=Fr(t,this.array),n=Fr(n,this.array),r=Fr(r,this.array),o=Fr(o,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=o,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==YM&&(e.usage=this.usage),e}};var sg=class extends Po{constructor(e,t,n){super(new Uint16Array(e),t,n)}};var lg=class extends Po{constructor(e,t,n){super(new Uint32Array(e),t,n)}};var gi=class extends Po{constructor(e,t,n){super(new Float32Array(e),t,n)}},A$=0,la=new jn,FM=new ko,vh=new oe,Oo=new Br,Jm=new Br,Ki=new oe,Fi=class i extends Ds{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:A$++}),this.uuid=Hh(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(bD(e)?lg:sg)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let o=new qt().getNormalMatrix(e);n.applyNormalMatrix(o),n.needsUpdate=!0}let r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return la.makeRotationFromQuaternion(e),this.applyMatrix4(la),this}rotateX(e){return la.makeRotationX(e),this.applyMatrix4(la),this}rotateY(e){return la.makeRotationY(e),this.applyMatrix4(la),this}rotateZ(e){return la.makeRotationZ(e),this.applyMatrix4(la),this}translate(e,t,n){return la.makeTranslation(e,t,n),this.applyMatrix4(la),this}scale(e,t,n){return la.makeScale(e,t,n),this.applyMatrix4(la),this}lookAt(e){return FM.lookAt(e),FM.updateMatrix(),this.applyMatrix4(FM.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(vh).negate(),this.translate(vh.x,vh.y,vh.z),this}setFromPoints(e){let t=this.getAttribute("position");if(t===void 0){let n=[];for(let r=0,o=e.length;r<o;r++){let a=e[r];n.push(a.x,a.y,a.z||0)}this.setAttribute("position",new gi(n,3))}else{let n=Math.min(e.length,t.count);for(let r=0;r<n;r++){let o=e[r];t.setXYZ(r,o.x,o.y,o.z||0)}e.length>t.count&&Ot("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Br);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){kt("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new oe(-1/0,-1/0,-1/0),new oe(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,r=t.length;n<r;n++){let o=t[n];Oo.setFromBufferAttribute(o),this.morphTargetsRelative?(Ki.addVectors(this.boundingBox.min,Oo.min),this.boundingBox.expandByPoint(Ki),Ki.addVectors(this.boundingBox.max,Oo.max),this.boundingBox.expandByPoint(Ki)):(this.boundingBox.expandByPoint(Oo.min),this.boundingBox.expandByPoint(Oo.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&kt('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Ec);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){kt("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new oe,1/0);return}if(e){let n=this.boundingSphere.center;if(Oo.setFromBufferAttribute(e),t)for(let o=0,a=t.length;o<a;o++){let s=t[o];Jm.setFromBufferAttribute(s),this.morphTargetsRelative?(Ki.addVectors(Oo.min,Jm.min),Oo.expandByPoint(Ki),Ki.addVectors(Oo.max,Jm.max),Oo.expandByPoint(Ki)):(Oo.expandByPoint(Jm.min),Oo.expandByPoint(Jm.max))}Oo.getCenter(n);let r=0;for(let o=0,a=e.count;o<a;o++)Ki.fromBufferAttribute(e,o),r=Math.max(r,n.distanceToSquared(Ki));if(t)for(let o=0,a=t.length;o<a;o++){let s=t[o],l=this.morphTargetsRelative;for(let c=0,d=s.count;c<d;c++)Ki.fromBufferAttribute(s,c),l&&(vh.fromBufferAttribute(e,c),Ki.add(vh)),r=Math.max(r,n.distanceToSquared(Ki))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&kt('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){kt("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let n=t.position,r=t.normal,o=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Po(new Float32Array(4*n.count),4));let a=this.getAttribute("tangent"),s=[],l=[];for(let N=0;N<n.count;N++)s[N]=new oe,l[N]=new oe;let c=new oe,d=new oe,u=new oe,f=new It,h=new It,p=new It,m=new oe,g=new oe;function b(N,A,L){c.fromBufferAttribute(n,N),d.fromBufferAttribute(n,A),u.fromBufferAttribute(n,L),f.fromBufferAttribute(o,N),h.fromBufferAttribute(o,A),p.fromBufferAttribute(o,L),d.sub(c),u.sub(c),h.sub(f),p.sub(f);let V=1/(h.x*p.y-p.x*h.y);isFinite(V)&&(m.copy(d).multiplyScalar(p.y).addScaledVector(u,-h.y).multiplyScalar(V),g.copy(u).multiplyScalar(h.x).addScaledVector(d,-p.x).multiplyScalar(V),s[N].add(m),s[A].add(m),s[L].add(m),l[N].add(g),l[A].add(g),l[L].add(g))}let _=this.groups;_.length===0&&(_=[{start:0,count:e.count}]);for(let N=0,A=_.length;N<A;++N){let L=_[N],V=L.start,K=L.count;for(let q=V,ee=V+K;q<ee;q+=3)b(e.getX(q+0),e.getX(q+1),e.getX(q+2))}let w=new oe,T=new oe,E=new oe,k=new oe;function O(N){E.fromBufferAttribute(r,N),k.copy(E);let A=s[N];w.copy(A),w.sub(E.multiplyScalar(E.dot(A))).normalize(),T.crossVectors(k,A);let V=T.dot(l[N])<0?-1:1;a.setXYZW(N,w.x,w.y,w.z,V)}for(let N=0,A=_.length;N<A;++N){let L=_[N],V=L.start,K=L.count;for(let q=V,ee=V+K;q<ee;q+=3)O(e.getX(q+0)),O(e.getX(q+1)),O(e.getX(q+2))}}computeVertexNormals(){let e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new Po(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let f=0,h=n.count;f<h;f++)n.setXYZ(f,0,0,0);let r=new oe,o=new oe,a=new oe,s=new oe,l=new oe,c=new oe,d=new oe,u=new oe;if(e)for(let f=0,h=e.count;f<h;f+=3){let p=e.getX(f+0),m=e.getX(f+1),g=e.getX(f+2);r.fromBufferAttribute(t,p),o.fromBufferAttribute(t,m),a.fromBufferAttribute(t,g),d.subVectors(a,o),u.subVectors(r,o),d.cross(u),s.fromBufferAttribute(n,p),l.fromBufferAttribute(n,m),c.fromBufferAttribute(n,g),s.add(d),l.add(d),c.add(d),n.setXYZ(p,s.x,s.y,s.z),n.setXYZ(m,l.x,l.y,l.z),n.setXYZ(g,c.x,c.y,c.z)}else for(let f=0,h=t.count;f<h;f+=3)r.fromBufferAttribute(t,f+0),o.fromBufferAttribute(t,f+1),a.fromBufferAttribute(t,f+2),d.subVectors(a,o),u.subVectors(r,o),d.cross(u),n.setXYZ(f+0,d.x,d.y,d.z),n.setXYZ(f+1,d.x,d.y,d.z),n.setXYZ(f+2,d.x,d.y,d.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)Ki.fromBufferAttribute(e,t),Ki.normalize(),e.setXYZ(t,Ki.x,Ki.y,Ki.z)}toNonIndexed(){function e(s,l){let c=s.array,d=s.itemSize,u=s.normalized,f=new c.constructor(l.length*d),h=0,p=0;for(let m=0,g=l.length;m<g;m++){s.isInterleavedBufferAttribute?h=l[m]*s.data.stride+s.offset:h=l[m]*d;for(let b=0;b<d;b++)f[p++]=c[h++]}return new Po(f,d,u)}if(this.index===null)return Ot("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let t=new i,n=this.index.array,r=this.attributes;for(let s in r){let l=r[s],c=e(l,n);t.setAttribute(s,c)}let o=this.morphAttributes;for(let s in o){let l=[],c=o[s];for(let d=0,u=c.length;d<u;d++){let f=c[d],h=e(f,n);l.push(h)}t.morphAttributes[s]=l}t.morphTargetsRelative=this.morphTargetsRelative;let a=this.groups;for(let s=0,l=a.length;s<l;s++){let c=a[s];t.addGroup(c.start,c.count,c.materialIndex)}return t}toJSON(){let e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){let l=this.parameters;for(let c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let n=this.attributes;for(let l in n){let c=n[l];e.data.attributes[l]=c.toJSON(e.data)}let r={},o=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],d=[];for(let u=0,f=c.length;u<f;u++){let h=c[u];d.push(h.toJSON(e.data))}d.length>0&&(r[l]=d,o=!0)}o&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));let s=this.boundingSphere;return s!==null&&(e.data.boundingSphere=s.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let n=e.index;n!==null&&this.setIndex(n.clone());let r=e.attributes;for(let c in r){let d=r[c];this.setAttribute(c,d.clone(t))}let o=e.morphAttributes;for(let c in o){let d=[],u=o[c];for(let f=0,h=u.length;f<h;f++)d.push(u[f].clone(t));this.morphAttributes[c]=d}this.morphTargetsRelative=e.morphTargetsRelative;let a=e.groups;for(let c=0,d=a.length;c<d;c++){let u=a[c];this.addGroup(u.start,u.count,u.materialIndex)}let s=e.boundingBox;s!==null&&(this.boundingBox=s.clone());let l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}},UL=new jn,au=new El,Ay=new Ec,VL=new oe,Oy=new oe,Py=new oe,Iy=new oe,LM=new oe,ky=new oe,HL=new oe,Ry=new oe,zr=class extends ko{constructor(e=new Fi,t=new ag){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){let t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){let r=t[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,a=r.length;o<a;o++){let s=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=o}}}}getVertexPosition(e,t){let n=this.geometry,r=n.attributes.position,o=n.morphAttributes.position,a=n.morphTargetsRelative;t.fromBufferAttribute(r,e);let s=this.morphTargetInfluences;if(o&&s){ky.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let d=s[l],u=o[l];d!==0&&(LM.fromBufferAttribute(u,e),a?ky.addScaledVector(LM,d):ky.addScaledVector(LM.sub(t),d))}t.add(ky)}return t}raycast(e,t){let n=this.geometry,r=this.material,o=this.matrixWorld;r!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Ay.copy(n.boundingSphere),Ay.applyMatrix4(o),au.copy(e.ray).recast(e.near),!(Ay.containsPoint(au.origin)===!1&&(au.intersectSphere(Ay,VL)===null||au.origin.distanceToSquared(VL)>(e.far-e.near)**2))&&(UL.copy(o).invert(),au.copy(e.ray).applyMatrix4(UL),!(n.boundingBox!==null&&au.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,au)))}_computeIntersections(e,t,n){let r,o=this.geometry,a=this.material,s=o.index,l=o.attributes.position,c=o.attributes.uv,d=o.attributes.uv1,u=o.attributes.normal,f=o.groups,h=o.drawRange;if(s!==null)if(Array.isArray(a))for(let p=0,m=f.length;p<m;p++){let g=f[p],b=a[g.materialIndex],_=Math.max(g.start,h.start),w=Math.min(s.count,Math.min(g.start+g.count,h.start+h.count));for(let T=_,E=w;T<E;T+=3){let k=s.getX(T),O=s.getX(T+1),N=s.getX(T+2);r=Ny(this,b,e,n,c,d,u,k,O,N),r&&(r.faceIndex=Math.floor(T/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),m=Math.min(s.count,h.start+h.count);for(let g=p,b=m;g<b;g+=3){let _=s.getX(g),w=s.getX(g+1),T=s.getX(g+2);r=Ny(this,a,e,n,c,d,u,_,w,T),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}else if(l!==void 0)if(Array.isArray(a))for(let p=0,m=f.length;p<m;p++){let g=f[p],b=a[g.materialIndex],_=Math.max(g.start,h.start),w=Math.min(l.count,Math.min(g.start+g.count,h.start+h.count));for(let T=_,E=w;T<E;T+=3){let k=T,O=T+1,N=T+2;r=Ny(this,b,e,n,c,d,u,k,O,N),r&&(r.faceIndex=Math.floor(T/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),m=Math.min(l.count,h.start+h.count);for(let g=p,b=m;g<b;g+=3){let _=g,w=g+1,T=g+2;r=Ny(this,a,e,n,c,d,u,_,w,T),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}}};function O$(i,e,t,n,r,o,a,s){let l;if(e.side===Ur?l=n.intersectTriangle(a,o,r,!0,s):l=n.intersectTriangle(r,o,a,e.side===Lr,s),l===null)return null;Ry.copy(s),Ry.applyMatrix4(i.matrixWorld);let c=t.ray.origin.distanceTo(Ry);return c<t.near||c>t.far?null:{distance:c,point:Ry.clone(),object:i}}function Ny(i,e,t,n,r,o,a,s,l,c){i.getVertexPosition(s,Oy),i.getVertexPosition(l,Py),i.getVertexPosition(c,Iy);let d=O$(i,e,t,n,Oy,Py,Iy,HL);if(d){let u=new oe;Sc.getBarycoord(HL,Oy,Py,Iy,u),r&&(d.uv=Sc.getInterpolatedAttribute(r,s,l,c,u,new It)),o&&(d.uv1=Sc.getInterpolatedAttribute(o,s,l,c,u,new It)),a&&(d.normal=Sc.getInterpolatedAttribute(a,s,l,c,u,new oe),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));let f={a:s,b:l,c,normal:new oe,materialIndex:0};Sc.getNormal(Oy,Py,Iy,f.normal),d.face=f,d.barycoord=u}return d}var Ih=class i extends Fi{constructor(e=1,t=1,n=1,r=1,o=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:o,depthSegments:a};let s=this;r=Math.floor(r),o=Math.floor(o),a=Math.floor(a);let l=[],c=[],d=[],u=[],f=0,h=0;p("z","y","x",-1,-1,n,t,e,a,o,0),p("z","y","x",1,-1,n,t,-e,a,o,1),p("x","z","y",1,1,e,n,t,r,a,2),p("x","z","y",1,-1,e,n,-t,r,a,3),p("x","y","z",1,-1,e,t,n,r,o,4),p("x","y","z",-1,-1,e,t,-n,r,o,5),this.setIndex(l),this.setAttribute("position",new gi(c,3)),this.setAttribute("normal",new gi(d,3)),this.setAttribute("uv",new gi(u,2));function p(m,g,b,_,w,T,E,k,O,N,A){let L=T/O,V=E/N,K=T/2,q=E/2,ee=k/2,ne=O+1,ae=N+1,Z=0,he=0,Oe=new oe;for(let Ie=0;Ie<ae;Ie++){let Se=Ie*V-q;for(let ze=0;ze<ne;ze++){let _e=ze*L-K;Oe[m]=_e*_,Oe[g]=Se*w,Oe[b]=ee,c.push(Oe.x,Oe.y,Oe.z),Oe[m]=0,Oe[g]=0,Oe[b]=k>0?1:-1,d.push(Oe.x,Oe.y,Oe.z),u.push(ze/O),u.push(1-Ie/N),Z+=1}}for(let Ie=0;Ie<N;Ie++)for(let Se=0;Se<O;Se++){let ze=f+Se+ne*Ie,_e=f+Se+ne*(Ie+1),Ge=f+(Se+1)+ne*(Ie+1),gt=f+(Se+1)+ne*Ie;l.push(ze,_e,gt),l.push(_e,Ge,gt),he+=6}s.addGroup(h,he,A),h+=he,f+=Z}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new i(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}};function Cu(i){let e={};for(let t in i){e[t]={};for(let n in i[t]){let r=i[t][n];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(Ot("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=r.clone():Array.isArray(r)?e[t][n]=r.slice():e[t][n]=r}}return e}function xr(i){let e={};for(let t=0;t<i.length;t++){let n=Cu(i[t]);for(let r in n)e[r]=n[r]}return e}function P$(i){let e=[];for(let t=0;t<i.length;t++)e.push(i[t].clone());return e}function _D(i){let e=i.getRenderTarget();return e===null?i.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:tn.workingColorSpace}var F3={clone:Cu,merge:xr},I$=`void main() {
|
|
6
6
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
7
7
|
}`,k$=`void main() {
|
|
8
8
|
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
|